mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
mark frozen items in dump weights action
This commit is contained in:
@@ -458,6 +458,10 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFrozen(@NotNull LookupElement element) {
|
||||
return myFrozenItems.contains(element);
|
||||
}
|
||||
|
||||
private boolean addExactPrefixItems(DefaultListModel model, Set<LookupElement> firstItems, final Collection<LookupElement> elements) {
|
||||
List<LookupElement> sorted = new SortedList<LookupElement>(new Comparator<LookupElement>() {
|
||||
public int compare(LookupElement o1, LookupElement o2) {
|
||||
|
||||
@@ -82,7 +82,10 @@ public class DumpLookupElementWeights extends AnAction implements DumbAware {
|
||||
for (String s : toExclude) {
|
||||
weight = StringUtil.replace(weight, s, "", false);
|
||||
}
|
||||
final String s = item.getLookupString() + weight;
|
||||
while (weight.contains(", ,")) {
|
||||
weight = weight.replaceAll(", ,", ",");
|
||||
}
|
||||
final String s = item.getLookupString() + (lookup.isFrozen(item) ? "\t_first_\t" : "\t") + weight;
|
||||
System.out.println(s);
|
||||
LOG.info(s);
|
||||
if (i == count - 1) {
|
||||
|
||||
Reference in New Issue
Block a user