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


Java SearchableConfigurable.Parent方法代码示例

本文整理汇总了Java中com.intellij.openapi.options.SearchableConfigurable.Parent方法的典型用法代码示例。如果您正苦于以下问题:Java SearchableConfigurable.Parent方法的具体用法?Java SearchableConfigurable.Parent怎么用?Java SearchableConfigurable.Parent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.options.SearchableConfigurable的用法示例。


在下文中一共展示了SearchableConfigurable.Parent方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processConfigurables

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private static void processConfigurables(final Configurable[] configurables,
                                         final HashMap<SearchableConfigurable, TreeSet<OptionDescription>> options) {
  for (Configurable configurable : configurables) {
    if (configurable instanceof SearchableConfigurable) {
      TreeSet<OptionDescription> configurableOptions = new TreeSet<OptionDescription>();

      if (configurable instanceof Configurable.Composite) {
        final Configurable[] children = ((Configurable.Composite)configurable).getConfigurables();
        processConfigurables(children, options);
      }

      //ignore invisible root nodes
      if (configurable instanceof SearchableConfigurable.Parent && !((SearchableConfigurable.Parent)configurable).isVisible()) {
        continue;
      }

      options.put((SearchableConfigurable)configurable, configurableOptions);

      if (configurable instanceof MasterDetails) {
        final MasterDetails md = (MasterDetails)configurable;
        md.initUi();
        _processComponent(configurable, configurableOptions, md.getMaster());
        _processComponent(configurable, configurableOptions, md.getDetails().getComponent());
      }
      else {
        _processComponent(configurable, configurableOptions, configurable.createComponent());
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:SearchUtil.java

示例2: getConfigurables

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
@Override
public Configurable[] getConfigurables() {
  compute();

  if (myChildren.length == 0 && myRootConfigurable instanceof SearchableConfigurable.Parent) {
    return ((Parent)myRootConfigurable).getConfigurables();
  }
  else {
    return myChildren;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DebuggerConfigurable.java

示例3: compute

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private void compute() {
  if (myChildren != null) {
    return;
  }

  List<Configurable> configurables = new SmartList<Configurable>();
  configurables.add(new DataViewsConfigurable());

  DebuggerConfigurableProvider[] providers = DebuggerConfigurableProvider.EXTENSION_POINT.getExtensions();
  computeMergedConfigurables(providers, configurables);

  for (DebuggerConfigurableProvider provider : providers) {
    configurables.addAll(provider.getConfigurables(DebuggerSettingsCategory.ROOT));
  }

  MergedCompositeConfigurable mergedGeneralConfigurable = computeGeneralConfigurables(providers);
  if (configurables.isEmpty() && mergedGeneralConfigurable == null) {
    myRootConfigurable = null;
    myChildren = EMPTY_CONFIGURABLES;
  }
  else if (configurables.size() == 1) {
    Configurable firstConfigurable = configurables.get(0);
    if (mergedGeneralConfigurable == null) {
      myRootConfigurable = firstConfigurable;
      myChildren = EMPTY_CONFIGURABLES;
    }
    else {
      Configurable[] generalConfigurables = mergedGeneralConfigurable.children;
      Configurable[] mergedArray = new Configurable[generalConfigurables.length + 1];
      System.arraycopy(generalConfigurables, 0, mergedArray, 0, generalConfigurables.length);
      mergedArray[generalConfigurables.length] = firstConfigurable;
      myRootConfigurable = new MergedCompositeConfigurable("", "", mergedArray);
      myChildren = firstConfigurable instanceof SearchableConfigurable.Parent ? ((Parent)firstConfigurable).getConfigurables() : EMPTY_CONFIGURABLES;
    }
  }
  else {
    myChildren = configurables.toArray(new Configurable[configurables.size()]);
    myRootConfigurable = mergedGeneralConfigurable;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:DebuggerConfigurable.java

示例4: fillConfigurablesIds

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private void fillConfigurablesIds(String pathToParent, Configurable[] configurables) {
  for (Configurable configurable : configurables) {
    if (configurable instanceof SearchableConfigurable) {
      final String id = ((SearchableConfigurable)configurable).getId();
      String name = configurable.getDisplayName();
      if (pathToParent != null) {
        name = pathToParent + " -> " + name;
      }
      myConfigurables.put(id, name);
      if (configurable instanceof SearchableConfigurable.Parent) {
        fillConfigurablesIds(name, ((SearchableConfigurable.Parent)configurable).getConfigurables());
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:SearchEverywhereAction.java

示例5: containsId

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
@Nullable
private static Configurable containsId(String id2Select, Configurable configurable) {
  if (configurable instanceof SearchableConfigurable && id2Select.equals(((SearchableConfigurable)configurable).getId())) {
    return configurable;
  }
  if (configurable instanceof SearchableConfigurable.Parent) {
    for (Configurable subConfigurable : ((SearchableConfigurable.Parent)configurable).getConfigurables()) {
      final Configurable config = containsId(id2Select, subConfigurable);
      if (config != null) return config;
    }
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:ShowSettingsUtilImpl.java

示例6: getConfigurables

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
@Nonnull
@Override
public Configurable[] getConfigurables() {
  compute();

  if (myChildren.length == 0 && myRootConfigurable instanceof SearchableConfigurable.Parent) {
    return ((Parent)myRootConfigurable).getConfigurables();
  }
  else {
    return myChildren;
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:DebuggerConfigurable.java

示例7: compute

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private void compute() {
  if (myChildren != null) {
    return;
  }

  List<Configurable> configurables = new SmartList<>();
  configurables.add(new DataViewsConfigurable());

  computeMergedConfigurables(configurables);

  configurables.addAll(XDebuggerConfigurableProvider.getConfigurables(DebuggerSettingsCategory.ROOT));

  MergedCompositeConfigurable mergedGeneralConfigurable = computeGeneralConfigurables();
  if (configurables.isEmpty() && mergedGeneralConfigurable == null) {
    myRootConfigurable = null;
    myChildren = EMPTY_CONFIGURABLES;
  }
  else if (configurables.size() == 1) {
    Configurable firstConfigurable = configurables.get(0);
    if (mergedGeneralConfigurable == null) {
      myRootConfigurable = firstConfigurable;
      myChildren = EMPTY_CONFIGURABLES;
    }
    else {
      Configurable[] generalConfigurables = mergedGeneralConfigurable.children;
      Configurable[] mergedArray = new Configurable[generalConfigurables.length + 1];
      System.arraycopy(generalConfigurables, 0, mergedArray, 0, generalConfigurables.length);
      mergedArray[generalConfigurables.length] = firstConfigurable;
      myRootConfigurable = new MergedCompositeConfigurable("", "", mergedArray);
      myChildren = firstConfigurable instanceof SearchableConfigurable.Parent ? ((Parent)firstConfigurable).getConfigurables() : EMPTY_CONFIGURABLES;
    }
  }
  else {
    myChildren = configurables.toArray(new Configurable[configurables.size()]);
    myRootConfigurable = mergedGeneralConfigurable;
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:38,代码来源:DebuggerConfigurable.java

示例8: isEmptyParent

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private static boolean isEmptyParent(Configurable configurable) {
  SearchableConfigurable.Parent parent = ConfigurableWrapper.cast(SearchableConfigurable.Parent.class, configurable);
  return parent != null && !parent.hasOwnContent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SettingsFilter.java

示例9: isInvisibleNode

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private static boolean isInvisibleNode(final Configurable child) {
  return child instanceof SearchableConfigurable.Parent && !((SearchableConfigurable.Parent)child).isVisible();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:OptionsTree.java

示例10: isEmptyParent

import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private boolean isEmptyParent(Configurable configurable) {
  return configurable instanceof SearchableConfigurable.Parent && !((SearchableConfigurable.Parent)configurable).hasOwnContent();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:OptionsEditor.java


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