mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
calculate completionSorting weight outside EDT
This commit is contained in:
+4
-1
@@ -33,6 +33,7 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.WeighingComparable;
|
||||
import com.intellij.psi.WeighingService;
|
||||
import com.intellij.psi.statistics.StatisticsInfo;
|
||||
import com.intellij.psi.statistics.StatisticsManager;
|
||||
@@ -122,7 +123,9 @@ public class CompletionLookupArranger extends LookupArranger {
|
||||
|
||||
@Override
|
||||
public void addElement(Lookup lookup, LookupElement element, LookupElementPresentation presentation) {
|
||||
mySortingWeights.put(element, WeighingService.weigh(CompletionService.SORTING_KEY, element, myLocation));
|
||||
WeighingComparable<LookupElement,CompletionLocation> w = WeighingService.weigh(CompletionService.SORTING_KEY, element, myLocation);
|
||||
w.force();
|
||||
mySortingWeights.put(element, w);
|
||||
CompletionSorterImpl sorter = obtainSorter(element);
|
||||
Classifier<LookupElement> classifier = myClassifiers.get(sorter);
|
||||
if (classifier == null) {
|
||||
|
||||
Reference in New Issue
Block a user