use of com.intellij.ui.treeStructure.CachingSimpleNode in project android by JetBrains.
the class IdeSettingsDialogFixture method getProjectSettingsNames.
@NotNull
public List<String> getProjectSettingsNames() {
List<String> names = Lists.newArrayList();
JPanel optionsEditor = field("myEditor").ofType(JPanel.class).in(getDialogWrapper()).get();
List<JComponent> trees = findComponentsOfType(optionsEditor, "com.intellij.openapi.options.newEditor.SettingsTreeView");
assertThat(trees).hasSize(1);
JComponent tree = trees.get(0);
CachingSimpleNode root = field("myRoot").ofType(CachingSimpleNode.class).in(tree).get();
ConfigurableGroup[] groups = field("myGroups").ofType(ConfigurableGroup[].class).in(root).get();
for (ConfigurableGroup current : groups) {
Configurable[] configurables = current.getConfigurables();
for (Configurable configurable : configurables) {
names.add(configurable.getDisplayName());
}
}
return names;
}
use of com.intellij.ui.treeStructure.CachingSimpleNode in project intellij-community by JetBrains.
the class IdeSettingsDialogFixture method getProjectSettingsNames.
@NotNull
public List<String> getProjectSettingsNames() {
List<String> names = new ArrayList<>();
JPanel optionsEditor = field("myEditor").ofType(JPanel.class).in(getDialogWrapper()).get();
assertNotNull(optionsEditor);
List<JComponent> trees = findComponentsOfType(optionsEditor, "com.intellij.openapi.options.newEditor.SettingsTreeView");
assertThat(trees).hasSize(1);
JComponent tree = trees.get(0);
CachingSimpleNode root = field("myRoot").ofType(CachingSimpleNode.class).in(tree).get();
assertNotNull(root);
ConfigurableGroup[] groups = field("myGroups").ofType(ConfigurableGroup[].class).in(root).get();
assertNotNull(groups);
for (ConfigurableGroup current : groups) {
Configurable[] configurables = current.getConfigurables();
for (Configurable configurable : configurables) {
names.add(configurable.getDisplayName());
}
}
return names;
}
use of com.intellij.ui.treeStructure.CachingSimpleNode in project intellij-community by JetBrains.
the class SettingsTreeFixture method getValueFromNode.
@Nullable
public static String getValueFromNode(@NotNull JTree jTree, Object treeNode) {
if (!(treeNode instanceof DefaultMutableTreeNode))
return null;
Object userObject = ((DefaultMutableTreeNode) treeNode).getUserObject();
if (!(userObject instanceof FilteringTreeStructure.FilteringNode))
return null;
FilteringTreeStructure.FilteringNode myNode = (FilteringTreeStructure.FilteringNode) userObject;
Object delegate = myNode.getDelegate();
if (!(delegate instanceof CachingSimpleNode))
return null;
CachingSimpleNode simpleNode = (CachingSimpleNode) delegate;
return simpleNode.toString();
}
Aggregations