|
|
|
Re: Default Ordering of XText Content Assistant [message #1745586 is a reply to message #1745585] |
Wed, 12 October 2016 19:00 |
|
as i said it depends of the use of the comparator.
if you have a look at the code you can see
Integer relevance1 = getRelevance(o1);
Integer relevance2 = getRelevance(o2);
if (relevance1 != null && relevance2 != null) {
int res = relevance2.compareTo(relevance1);
if (res != 0) {
return res;
}
}
return o1.getDisplayString().compareToIgnoreCase(o2.getDisplayString());
that it is sorted by relevance/priority and then by display string
the priority comes from org.eclipse.xtext.ui.editor.contentassist.AbstractContentProposalProvider.createCompletionProposal(String, StyledString, Image, int, String, ContentAssistContext) in the proposal provider
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03282 seconds