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

Bug 377596

Summary: [chain] extend subsequence/subwords search range to next level
Product: z_Archived Reporter: Lars Vogel <Lars.Vogel>
Component: RecommendersAssignee: Marcel Bruch <marcel.bruch>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P4 CC: deepakazad, kutschke.michael, Lars.Vogel, stefan.henss
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Lars Vogel CLA 2012-04-25 01:59:08 EDT
I think it would be great if subwords could offer a functionality to match strings in the next level.

For example I have an object foo which has a method which contains the string "krass"

foo.-> would should the first level, e.g. all methods of foo. which match

and then I would have the option to extend the search range.

This would be terrible useful IMHO and would be a great addition to Call-Chain which requires that I know the type on the left side.

Maybe something like Shift+Ctrl+Space could be used?
Comment 1 Marcel Bruch CLA 2012-04-25 02:50:07 EDT
I'm not sure I understand your request completely.

Assuming there is a method call chain for foo, say,  foo.someBar().someOtherBar().someBaz()

What do you want to code completion to return given which prefix?


I've *think* you are asking for something like

foo.baz<Shift+Ctrl+Space> --> finds 'foo.someBar().someOtherBar().someBaz()'

But I may be wrong.
Comment 2 Lars Vogel CLA 2012-04-25 11:50:10 EDT
Yes. And if use foo.some -> <Shift+Ctrl+Space> --> finds: 

'foo.someBar()'
'foo.someBar().someOtherBar()'
'foo.someBar().someOtherBar().someBaz()'

If there are performance issues with going through the full stack <Shift+Ctrl+Space> could only trigger the next extension level.
Comment 3 Marcel Bruch CLA 2012-04-25 12:34:19 EDT
Adding Stefan. He's going to refine the call completion algorithm and may consider this in his reimplementation.

This feature is prioritized little below the feature requests listed in Bug 376796.
Comment 4 Lars Vogel CLA 2012-08-23 17:06:33 EDT
*** Bug 387862 has been marked as a duplicate of this bug. ***
Comment 5 Lars Vogel CLA 2012-08-23 17:07:25 EDT
Not only should Subwords extended but I think Chain Completion should work similar to Subwords.

Example:

Person p = test.tp -> trigger Call chain should now return methods which match to tp AND return an object of type Person.
Comment 6 Marcel Bruch CLA 2012-08-26 02:54:18 EDT
The required bits to make chain completion work like subwords are in place. One just needs to update the isPrefix method of the chain completion proposal to create one string like

getPerson().getAdress().getStreet() --> getPersonGetAdressGetStreet

and then apply the Subwords matcher on this string.

Syntax highlighting will be little more complicated but feasible. Gerrit Patch welcome.
Comment 7 Lars Vogel CLA 2013-11-28 00:26:47 EST
Please reopen if you plan to work on this.