mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Postfix templates: show templates with same presentable names
This commit is contained in:
+7
-2
@@ -42,8 +42,13 @@ import java.awt.event.MouseEvent;
|
||||
import java.util.*;
|
||||
|
||||
public class PostfixTemplatesCheckboxTree extends CheckboxTree implements Disposable {
|
||||
private static final Factory<Set<PostfixTemplateCheckedTreeNode>> myNodesComparator = () ->
|
||||
new TreeSet<>((o1, o2) -> Comparing.compare(o1.getTemplate().getPresentableName(), o2.getTemplate().getPresentableName()));
|
||||
private static final Factory<Set<PostfixTemplateCheckedTreeNode>> myNodesComparator = () -> new TreeSet<>((o1, o2) -> {
|
||||
PostfixTemplate template1 = o1.getTemplate();
|
||||
PostfixTemplate template2 = o2.getTemplate();
|
||||
int compare = Comparing.compare(template1.getPresentableName(), template2.getPresentableName());
|
||||
return compare != 0 ? compare : Comparing.compare(template1.getId(), template2.getId());
|
||||
});
|
||||
|
||||
@NotNull
|
||||
private final CheckedTreeNode myRoot;
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user