本文整理汇总了Java中com.intellij.openapi.options.ConfigurableGroup.getConfigurables方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurableGroup.getConfigurables方法的具体用法?Java ConfigurableGroup.getConfigurables怎么用?Java ConfigurableGroup.getConfigurables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.options.ConfigurableGroup
的用法示例。
在下文中一共展示了ConfigurableGroup.getConfigurables方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: expandGroup
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
public static List<Configurable> expandGroup(final ConfigurableGroup group) {
final Configurable[] configurables = group.getConfigurables();
List<Configurable> result = new ArrayList<Configurable>();
ContainerUtil.addAll(result, configurables);
for (Configurable each : configurables) {
addChildren(each, result);
}
result = ContainerUtil.filter(result, new Condition<Configurable>() {
@Override
public boolean value(Configurable configurable) {
return !(configurable instanceof SearchableConfigurable.Parent) || ((SearchableConfigurable.Parent)configurable).isVisible();
}
});
return result;
}
示例2: buildGroup
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
private List<EditorNode> buildGroup(final ConfigurableGroup eachGroup) {
List<EditorNode> result = new ArrayList<EditorNode>();
final Configurable[] kids = eachGroup.getConfigurables();
if (kids.length > 0) {
for (Configurable eachKid : kids) {
if (isInvisibleNode(eachKid)) {
result.addAll(OptionsTree.this.buildChildren(eachKid, this, eachGroup));
}
else {
result.add(new EditorNode(this, eachKid, eachGroup));
}
}
}
return sort(result);
}
示例3: selectFirst
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
public void selectFirst() {
for (ConfigurableGroup eachGroup : myGroups) {
final Configurable[] kids = eachGroup.getConfigurables();
if (kids.length > 0) {
queueSelection(kids[0]);
return;
}
}
}
示例4: buildGroup
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
private List<EditorNode> buildGroup(final ConfigurableGroup eachGroup) {
List<EditorNode> result = new ArrayList<EditorNode>();
final Configurable[] kids = eachGroup.getConfigurables();
if (kids.length > 0) {
for (Configurable eachKid : kids) {
if (!isInvisibleNode(eachKid)) {
result.add(new EditorNode(this, eachKid, eachGroup));
}
}
}
return sort(result);
}
示例5: filterEmptyGroups
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
@NotNull
private static ConfigurableGroup[] filterEmptyGroups(@NotNull final ConfigurableGroup[] group) {
List<ConfigurableGroup> groups = new ArrayList<ConfigurableGroup>();
for (ConfigurableGroup g : group) {
if (g.getConfigurables().length > 0) {
groups.add(g);
}
}
return groups.toArray(new ConfigurableGroup[groups.size()]);
}
示例6: getSettingsNames
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
private List<String> getSettingsNames(@NotNull Class<? extends ConfigurableGroup> groupType) {
List<String> names = Lists.newArrayList();
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);
ConfigurableGroup group = null;
for (ConfigurableGroup current : groups) {
if (groupType.isInstance(current)) {
group = current;
break;
}
}
assertNotNull(group);
for (Configurable configurable : group.getConfigurables()) {
names.add(configurable.getDisplayName());
}
return names;
}
示例7: findConfigurable2Select
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
@Nullable
private static Configurable findConfigurable2Select(String id2Select, ConfigurableGroup[] group) {
for (ConfigurableGroup configurableGroup : group) {
for (Configurable configurable : configurableGroup.getConfigurables()) {
final Configurable conf = containsId(id2Select, configurable);
if (conf != null) return conf;
}
}
return null;
}
示例8: filterEmptyGroups
import com.intellij.openapi.options.ConfigurableGroup; //导入方法依赖的package包/类
private static ConfigurableGroup[] filterEmptyGroups(final ConfigurableGroup[] group) {
List<ConfigurableGroup> groups = new ArrayList<ConfigurableGroup>();
for (ConfigurableGroup g : group) {
if (g.getConfigurables().length > 0) {
groups.add(g);
}
}
return groups.toArray(new ConfigurableGroup[groups.size()]);
}