本文整理汇总了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());
}
}
}
}
示例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;
}
}
示例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;
}
}
示例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());
}
}
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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();
}
示例10: isEmptyParent
import com.intellij.openapi.options.SearchableConfigurable; //导入方法依赖的package包/类
private boolean isEmptyParent(Configurable configurable) {
return configurable instanceof SearchableConfigurable.Parent && !((SearchableConfigurable.Parent)configurable).hasOwnContent();
}