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


Java ConfigurableGroup类代码示例

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


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

示例1: getGroup

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
private ConfigurableGroup getGroup(int offset) {
  TreePath path = myTree.getClosestPathForLocation(-myTree.getX(), -myTree.getY() + offset);
  SimpleNode node = myTree.getNodeFor(path);
  if (node instanceof FilteringTreeStructure.FilteringNode) {
    Object delegate = ((FilteringTreeStructure.FilteringNode)node).getDelegate();
    while (delegate instanceof EditorNode) {
      EditorNode editor = (EditorNode)delegate;
      ConfigurableGroup group = editor.getGroup();
      if (group != null) {
        return group;
      }
      delegate = editor.getParent();
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:OptionsTree.java

示例2: getConfigurableGroups

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
@NotNull
public static ConfigurableGroup[] getConfigurableGroups(@Nullable Project project, boolean withIdeSettings) {
  if (Registry.is("ide.new.settings.dialog")) {
    if (!withIdeSettings) {
      project = getProject(project);
    }
    return new ConfigurableGroup[]{ConfigurableExtensionPointUtil.getConfigurableGroup(project, withIdeSettings)};
  }
  ConfigurableGroup[] groups = !withIdeSettings
         ? new ConfigurableGroup[]{new ProjectConfigurablesGroup(getProject(project))}
         : (project == null)
           ? new ConfigurableGroup[]{new IdeConfigurablesGroup()}
           : new ConfigurableGroup[]{
             new ProjectConfigurablesGroup(project),
             new IdeConfigurablesGroup()};

  return groups;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ShowSettingsUtilImpl.java

示例3: showSettingsDialog

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
public static void showSettingsDialog(@Nullable Project project, final String id2Select, final String filter) {
  ConfigurableGroup[] group = getConfigurableGroups(project, true);

  group = filterEmptyGroups(group);
  final Configurable configurable2Select = id2Select == null ? null : new ConfigurableVisitor.ByID(id2Select).find(group);

  if (Registry.is("ide.new.settings.view")) {
    new SettingsDialog(getProject(project), group, configurable2Select, filter).show();
    return;
  }
  final DialogWrapper dialog = getDialog(project, group, configurable2Select);

  new UiNotifyConnector.Once(dialog.getContentPane(), new Activatable.Adapter() {
    @Override
    public void showNotify() {
      final OptionsEditor editor = (OptionsEditor)((DataProvider)dialog).getData(OptionsEditor.KEY.getName());
      LOG.assertTrue(editor != null);
      editor.select(configurable2Select, filter);
    }
  });
  dialog.show();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ShowSettingsUtilImpl.java

示例4: 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

示例5: actionPerformed

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
public void actionPerformed(AnActionEvent event) {
    // Get selected WA module
    final Module module = event.getData(LangDataKeys.MODULE);
    WindowsAzureProjectManager projMngr;
    try {
        VirtualFile vFile = CommonDataKeys.VIRTUAL_FILE.getData(event.getDataContext());
        projMngr = WindowsAzureProjectManager.load(new File(PluginUtil.getModulePath(module)));
        WindowsAzureRole role = projMngr.roleFromPath(new File(vFile.getPath()));
        if (role != null) {
            ShowSettingsUtil.getInstance().showSettingsDialog(module.getProject(),
                    new ConfigurableGroup[]{new RoleConfigurablesGroup(module, projMngr, role, false)});
        }
    } catch (WindowsAzureInvalidProjectOperationException e) {
        log(message("error"), e);
    }
}
 
开发者ID:Microsoft,项目名称:Azure-Toolkit-for-IntelliJ,代码行数:17,代码来源:RolePropertiesAction.java

示例6: actionPerformed

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
    try {
        // Get selected module
        final Module module = event.getData(LangDataKeys.MODULE);
        final String modulePath = PluginUtil.getModulePath(module);
        WindowsAzureProjectManager waProjManager = WindowsAzureProjectManager.load(new File(modulePath));
        List<WindowsAzureRole> listRoles = waProjManager.getRoles();
        WindowsAzureRole windowsAzureRole = WAHelper.prepareRoleToAdd(waProjManager);
        RoleConfigurablesGroup group = new RoleConfigurablesGroup(module, waProjManager, windowsAzureRole, true);
        ShowSettingsUtil.getInstance().showSettingsDialog(module.getProject(), new ConfigurableGroup[]{group});
        if (group.isModified()) { // Cancel was clicked, so changes should be reverted
            listRoles.remove(windowsAzureRole);
        }
        LocalFileSystem.getInstance().findFileByPath(PluginUtil.getModulePath(module)).refresh(true, true);
    } catch (Exception ex) {
        PluginUtil.displayErrorDialogAndLog(message("rolsDlgErr"), message("rolsDlgErrMsg"), ex);
    }
}
 
开发者ID:Microsoft,项目名称:Azure-Toolkit-for-IntelliJ,代码行数:20,代码来源:AddRoleAction.java

示例7: createBtnEditListener

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
private ActionListener createBtnEditListener() {
    return new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            int selIndex = tblRoles.getSelectedRow();
            if (selIndex > -1) {
                try {
                    loadProject();
                    WindowsAzureRole windowsAzureRole = listRoles.get(tblRoles.getSelectedRow());
                    ShowSettingsUtil.getInstance().showSettingsDialog(myModule.getProject(),
                            new ConfigurableGroup[]{new RoleConfigurablesGroup(myModule, waProjManager, windowsAzureRole, false)});
                    ((RolesTableModel) tblRoles.getModel()).fireTableDataChanged();
                    LocalFileSystem.getInstance().findFileByPath(PluginUtil.getModulePath(myModule)).refresh(true, true);
                } catch (Exception ex) {
                    PluginUtil.displayErrorDialogAndLog(message("rolsDlgErr"), message("rolsDlgErrMsg"), ex);
                }
            }
        }
    };
}
 
开发者ID:Microsoft,项目名称:Azure-Toolkit-for-IntelliJ,代码行数:21,代码来源:RolesPanel.java

示例8: 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

示例9: buildChildren

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
private List<EditorNode> buildChildren(final Configurable configurable, SimpleNode parent, final ConfigurableGroup group) {
  if (configurable instanceof Configurable.Composite) {
    final Configurable[] kids = ((Configurable.Composite)configurable).getConfigurables();
    final List<EditorNode> result = new ArrayList<EditorNode>(kids.length);
    for (Configurable child : kids) {
      if (isInvisibleNode(child)) {
        result.addAll(buildChildren(child, parent, group));
      }
      result.add(new EditorNode(parent, child, group));
      myContext.registerKid(configurable, child);
    }
    return result; // TODO: DECIDE IF INNERS SHOULD BE SORTED: sort(result);
  }
  else {
    return Collections.emptyList();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:OptionsTree.java

示例10: find

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
public final Configurable find(@NotNull ConfigurableGroup... groups) {
  for (ConfigurableGroup group : groups) {
    Configurable result = find(group.getConfigurables());
    if (result != null) {
      return result;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ConfigurableVisitor.java

示例11: findAll

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
public final List<Configurable> findAll(@NotNull ConfigurableGroup... groups) {
  List<Configurable> list = new ArrayList<Configurable>();
  for (ConfigurableGroup group : groups) {
    add(list, group.getConfigurables());
  }
  return list;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ConfigurableVisitor.java

示例12: SettingsDialog

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
public SettingsDialog(@NotNull Project project, @NotNull ConfigurableGroup[] groups, Configurable configurable, String filter) {
  super(project, true);
  myDimensionServiceKey = "SettingsEditor";
  myEditor = new SettingsEditor(myDisposable, project, groups, configurable, filter);
  myApplyButtonNeeded = true;
  init(null, project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SettingsDialog.java

示例13: init

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
private void init(final Project project, final ConfigurableGroup[] groups, @Nullable final Configurable preselected) {
  myProject = project;
  myGroups = groups;
  myPreselected = preselected;

  setTitle(CommonBundle.settingsTitle());

  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:IdeSettingsDialog.java

示例14: getPreselectedByDisplayName

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
@Nullable
private static Configurable getPreselectedByDisplayName(final ConfigurableGroup[] groups, final String preselectedConfigurableDisplayName,
                                                        final Project project) {
  Configurable result = new ConfigurableVisitor.ByName(preselectedConfigurableDisplayName).find(groups);

  return result == null ? findLastSavedConfigurable(groups, project) : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IdeSettingsDialog.java

示例15: findLastSavedConfigurable

import com.intellij.openapi.options.ConfigurableGroup; //导入依赖的package包/类
@Nullable
private static Configurable findLastSavedConfigurable(ConfigurableGroup[] groups, final Project project) {
  final String id = PropertiesComponent.getInstance(project).getValue(LAST_SELECTED_CONFIGURABLE);
  if (id == null) return null;

  return new ConfigurableVisitor.ByID(id).find(groups);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IdeSettingsDialog.java


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