mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Change CompletionLookupArranger API so that it actually works
Previously it always crashed at runtime.
This commit is contained in:
+4
-1
@@ -17,7 +17,10 @@ public interface CompletionLookupArranger {
|
||||
* Adds an element to be arranged.
|
||||
* @param presentation The presentation of the element (rendered with {@link LookupElement#renderElement(LookupElementPresentation)}
|
||||
*/
|
||||
void addElement(LookupElement element, LookupElementPresentation presentation);
|
||||
void addElement(LookupElement element,
|
||||
CompletionSorter sorter,
|
||||
PrefixMatcher prefixMatcher,
|
||||
LookupElementPresentation presentation);
|
||||
|
||||
/**
|
||||
* Returns the items in the appropriate order and the initial selection.
|
||||
|
||||
+10
@@ -136,6 +136,16 @@ public class CompletionLookupArrangerImpl extends LookupArranger implements Comp
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addElement(LookupElement element,
|
||||
CompletionSorter sorter,
|
||||
PrefixMatcher prefixMatcher,
|
||||
LookupElementPresentation presentation) {
|
||||
registerMatcher(element, prefixMatcher);
|
||||
associateSorter(element, (CompletionSorterImpl)sorter);
|
||||
addElement(element, presentation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addElement(LookupElement element, LookupElementPresentation presentation) {
|
||||
StatisticsWeigher.clearBaseStatisticsInfo(element);
|
||||
|
||||
Reference in New Issue
Block a user