Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314292 - [content assist] Proposals sort variables before classes
Summary: [content assist] Proposals sort variables before classes
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 11:31 EDT by Marvin Fröhlich CLA
Modified: 2010-05-26 06:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2010-05-25 11:31:40 EDT
Build Identifier: 20090920-1017

I couldn't find a way to tell the code assist to sort variable names before class names.

If I have a class named "MyFunnyClass" defined somewhere and a variable defined and named "myFunnyVariable" or even "myFunnyClass" and I type code like this

################
System.out.println( "test: " + myFunn| );
################

where the caret is at the pipe's location and I press CTRL+Space, the proposals list will contain the class MyFunnyClass before the variable myFunnyVariable and myFunnyClass.

In almost every single case I want to use the variable beginning with the name part, but not the class. But there is no way to tell the code assis to adjust this order.

I thought, it could be "Java/Editor/Code Assist/Advanced" in the Preferences, but this doesn't change anything.

I would also like to push deprecated proposals to the bottom.

Reproducible: Always
Comment 1 Dani Megert CLA 2010-05-25 11:44:07 EDT
Works fine for me using 3.6 RC2. Make sure that you sort the proposals by relevance (Java > Editor > Content Assist preference page).
Comment 2 Marvin Fröhlich CLA 2010-05-25 12:16:29 EDT
I do sort them by relevance.

Is this a new feature in 3.6? What did you do to use this order?
Comment 3 Dani Megert CLA 2010-05-26 03:20:09 EDT
>Is this a new feature in 3.6? What did you do to use this order?
No. Works like this for a long time for variables. Maybe you have Mylyn installed - they fiddle around with JDT's sorting/filtering.

Note that this is not true for deprecated members: those can only be filtered away but not sorted to the end.
Comment 4 Marvin Fröhlich CLA 2010-05-26 06:30:40 EDT
Yes, I have Mylyn installed. So what should I do to raise a bug in the mylyn tracker? Isn't this this very same tracker?

What about the deprecated proposals? Could it be added to 3.6 to sort them to the bottom?
Comment 5 Dani Megert CLA 2010-05-26 06:46:12 EDT
>So what should I do to raise a bug in the mylyn
>tracker? Isn't this this very same tracker?
Right, it's the same system but since you started to report two different things in one bug, it's best to just open a new one against Mylyn.

>What about the deprecated proposals? Could it be added to 3.6 to sort them to
>the bottom?
3.6 is basically done. You might want to track bug 137953.