Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332185

Summary: Cursor moves to after the closing parenthesis of the method after disabling the 'Insert parameters names'
Product: z_Archived Reporter: xu jiaxi <legend7z>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: normal    
Priority: P3 CC: kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
new patch none

Description xu jiaxi CLA 2010-12-08 22:47:39 EST
from users:
I've tried disabling the 'Insert parameters names' feature to make Zend Studio work the old way.
The problem is that when using code completion, the cursor moves to after the closing parenthesis of the method.

For example, 
******************************************
class Foo {
    public function bar($a, $b) {
        return $a+$b;
    }
}

$f = new Foo();
******************************************

now start writing $f->b<CTRL+SPACE> --> you get $f->bar()<CURSOR> instead of $f->bar(<CURSOR>)
Comment 1 xu jiaxi CLA 2010-12-08 22:52:17 EST
Created attachment 184836 [details]
patch

Now the solution is
if the method has parameters, the cursor will be "$f->bar(<CURSOR>)"
otherwise "$f->bar()<CURSOR>"
Comment 2 xu jiaxi CLA 2010-12-08 23:21:12 EST
Created attachment 184837 [details]
new patch
Comment 3 Zhongwei Zhao CLA 2011-05-11 03:52:53 EDT
applied the patch,thanks Xu!
Comment 4 Kalin CLA 2011-07-26 06:57:23 EDT
Verified.
Closing...