当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurableGroup.getConfigurables方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SearchUtil.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:OptionsTree.java

示例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;
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:OptionsTree.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:OptionsTree.java

示例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()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ShowSettingsUtilImpl.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:IdeSettingsDialogFixture.java

示例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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:ShowSettingsUtilImpl.java

示例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()]);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:ShowSettingsUtilImpl.java


注:本文中的com.intellij.openapi.options.ConfigurableGroup.getConfigurables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。