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

Bug 326868

Summary: Function content assist doesn't allow parentheses
Product: z_Archived Reporter: Jason Craig <os-dev>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: minor    
Priority: P3 CC: felix.saphir, ganoro, kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch
none
patch none

Description Jason Craig CLA 2010-10-03 12:09:45 EDT
Build Identifier: 20100917-0705

When you enter into a function template with content assist, if you try to use parentheses in on of the arguments, content assist takes you to the end of the function when you enter a closing parenthesis.  It can be avoided by not using parentheses in the function, but ideally it should track the number of parentheses opened and only move to the end of the function when there are no more open parentheses that were typed into the argument.

Reproducible: Always

Steps to Reproduce:
1.  Type "array_diff" and then press enter to activate the function template.
2.  Type "array('a', 'b', 'c')" as the first argument to array_diff.
3.  Once you type the second parenthesis, the cursor is moved to the closing parenthesis of the array_diff function.
Comment 1 xu jiaxi CLA 2010-10-14 00:26:55 EDT
Created attachment 180840 [details]
patch

workaround
Comment 2 xu jiaxi CLA 2010-10-14 00:32:44 EDT
")" is set as the Exit Policy of the Linked Mode UI.

So when you typing ")", the cursor will go to the end of the function and the linked mode ui exits.

I'm not sure why we need to exit when typing ")".

Maybe we can use another character instead of ")".
Comment 3 Zhongwei Zhao CLA 2010-11-05 01:58:18 EDT
*** Bug 319598 has been marked as a duplicate of this bug. ***
Comment 4 xu jiaxi CLA 2010-12-05 23:00:41 EST
Created attachment 184570 [details]
patch

The solution is add the ')' char when typing '(' in LinkedModeUI
Comment 5 Roy Ganor CLA 2011-08-09 04:50:20 EDT
seems like a fixed bug like 353783
Comment 6 Kalin CLA 2011-10-18 03:08:52 EDT
Verified.
Currently when you type '(', the closing bracket ')' is automatically added.
Closing...