Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326868 - Function content assist doesn't allow parentheses
Summary: Function content assist doesn't allow parentheses
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 319598 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-03 12:09 EDT by Jason Craig CLA
Modified: 2020-05-14 11:16 EDT (History)
3 users (show)

See Also:


Attachments
patch (1.08 KB, patch)
2010-10-14 00:26 EDT, xu jiaxi CLA
no flags Details | Diff
patch (1020 bytes, patch)
2010-12-05 23:00 EST, xu jiaxi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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...