當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。