private Collection<EditorSchemeAttributeDescriptor> getOrderedDescriptors( @NotNull ColorAndFontOptions options) { ArrayList<EditorSchemeAttributeDescriptor> list = ContainerUtil.newArrayList(); for (EditorSchemeAttributeDescriptor description : options.getCurrentDescriptions()) { if (!description.getGroup().equals(myCategoryName)) continue; list.add(description); } Collections.sort(list, ATTR_COMPARATOR); return list; }
public void fillOptions(@NotNull ColorAndFontOptions options) { DefaultMutableTreeNode root = new DefaultMutableTreeNode(); for (EditorSchemeAttributeDescriptor description : getOrderedDescriptors(options)) { if (!description.getGroup().equals(myCategoryName)) continue; List<String> path = extractPath(description); if (path != null && path.size() > 1) { MyTreeNode groupNode = ensureGroup(root, path, 0); groupNode.add(new MyTreeNode(description, path.get(path.size() - 1))); } else { root.add(new MyTreeNode(description)); } } myTreeModel.setRoot(root); }