Community
Participate
Working Groups
Using 3.2 M6 -- but was there at least since M5 Content Assist preferences set to default. Consider the following class: public class ContentAssist { public static void main(String[] args) { ContentAssist contentAssist; contenta // content assist here } } When performing content assist after "contenta", the class is listed before the field. On the other hand, performing content assist after "contentA" (note change in capitalization), the field is listed before the class. The field is also listed before the class when performing content assist after "content" and then incrementally typing "a". The desired order is to consistently list the field before the class.
I cannot reproduce the problem. But by default proposals are sorted by 'relevance' and in this case the field and the type have the same relevance. This could the cause of what you have seen. tom - how do you exactly sort proposals with the same relevance ?
I assume by 'field' you mean the local variable. Cannot reproduce either. -- about sorting: Proposals are first sorted by relevance; proposals of the same relevance are sorted alphabetically. However, in jdt-ui, we sort local variables into a higher bucket than types, so the variable should always be shown first, as long as your prefix does not precisely match the proposal. If you have a case-sensitive for the type (e.g. "ContentA"), the type will be listed first.
I cannot reproduce the problem. Wing - Could you reproduce the problem with the debug completion trace enabled and add the content of the console in this bug report ? To enable the trace launch eclipse with the '-consoleLog -debug D:\.options' options and add in the '.options' file the lines below. # Turn on debug tracing for org.eclipse.jdt.core plugin org.eclipse.jdt.core/debug=true # Reports codeassist completion activity : recovered unit, inferred completions org.eclipse.jdt.core/debug/completion=true
The problem seems to be the local variable is not getting higher priority. Make sure your reproduce with "insert common prefix" disabled, since that interferes with the proposal. I could reproduce. What are you seeing that is different than described?
When i complete 'contenta' The field 'contentAssist' is the first proposal and the type 'ContentAssist' is the second proposal. The result is the same if i type 'contentA'. The type is on the top of the list only if i sort proposals alphabetically instead of by relevance (Preferences>Java>Editor>ContentAssist>Sorting and Filtering>Sort Proposals). And when the proposal are alphabetically sorted, 'ContentAssist' is the first proposal even if i type 'contentA'.
Cannot reproduce with I20060428-0010. Closing as REMIND. I cannot reproduce without specific steps. Please reopen once you add steps to reproduce the problem.
Wing Hong, I can no longer reproduce in RC1. It might be fixed, or the defaults for sorting changed somehow.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.