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


Java ContextHelpAction类代码示例

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


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

示例1: createToolbar

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JComponent createToolbar() {
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(new CloseAction());
  group.add(new RerunAction(this));
  group.add(new FlattenPackagesAction());
  group.add(new ShowFilesAction());
  if (ModuleManager.getInstance(myProject).getModules().length > 1) {
    group.add(new ShowModulesAction());
    group.add(new ShowModuleGroupsAction());
  }
  group.add(new GroupByScopeTypeAction());
  //group.add(new GroupByFilesAction());
  group.add(new FilterLegalsAction());
  group.add(new MarkAsIllegalAction());
  group.add(new ChooseScopeTypeAction());
  group.add(new EditDependencyRulesAction());
  group.add(CommonActionsManager.getInstance().createExportToTextFileAction(new DependenciesExporterToTextFile()));
  group.add(new ContextHelpAction("dependency.viewer.tool.window"));

  ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true);
  return toolbar.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:DependenciesPanel.java

示例2: appendActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
protected void appendActions(@NotNull DefaultActionGroup actionGroup, @Nullable String helpID) {
  actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
  final ActionManager actionManager = ActionManager.getInstance();
  actionGroup.add(actionManager.getAction(IdeActions.ACTION_EXPAND_ALL));
  actionGroup.add(new PinToolwindowTabAction(){
    @Override
    public void update(AnActionEvent event) {
      super.update(event);
      // sometimes there is no content to close, e.g. in usage view preview
      event.getPresentation().setVisible(myContent != null);
    }
  });
  actionGroup.add(CommonActionsManager.getInstance().createExportToTextFileAction(new ExporterToTextFileHierarchy(this)));
  actionGroup.add(new CloseAction());
  if (helpID != null) {
    actionGroup.add(new ContextHelpAction(helpID));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:HierarchyBrowserBase.java

示例3: patchLeftToolbar

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private static void patchLeftToolbar(@NotNull XDebugSession session, @NotNull RunnerLayoutUi ui) {
  DefaultActionGroup newLeftToolbar = new DefaultActionGroup();

  DefaultActionGroup firstGroup = new DefaultActionGroup();
  addActionToGroup(firstGroup, XDebuggerActions.RESUME);
  addActionToGroup(firstGroup, IdeActions.ACTION_STOP_PROGRAM);
  newLeftToolbar.addAll(firstGroup);

  newLeftToolbar.addSeparator();

  Executor executor = PyEduDebugExecutor.getInstance();
  newLeftToolbar.add(new CloseAction(executor, session.getRunContentDescriptor(), session.getProject()));
  //TODO: return proper helpID
  newLeftToolbar.add(new ContextHelpAction(executor.getHelpId()));

  ui.getOptions().setLeftToolbar(newLeftToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyEduDebugRunner.java

示例4: createToolbarPanel

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JPanel createToolbarPanel() {
  final DefaultActionGroup group = new DefaultActionGroup();
  group.add(new AddAction());
  group.add(new RemoveAction());
  group.add(new RunAction());
  group.add(new ShowAllTargetsAction());
  AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
  group.add(action);
  action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
  group.add(action);
  group.add(myAntBuildFilePropertiesAction);
  group.add(new ContextHelpAction(HelpID.ANT));

  final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
  return JBUI.Panels.simplePanel(actionToolBar.getComponent());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AntExplorer.java

示例5: CvsTabbedWindowComponent

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
public CvsTabbedWindowComponent(JComponent component, boolean addDefaultToolbar,
                                @Nullable ActionGroup toolbarActions,
                                ContentManager contentManager, String helpId) {
  super(new BorderLayout());
  myAddToolbar = addDefaultToolbar;
  myComponent = component;
  myContentManager = contentManager;
  myHelpId = helpId;

  add(myComponent, BorderLayout.CENTER);

  if (myAddToolbar) {
    DefaultActionGroup actionGroup = new DefaultActionGroup(null, false);
    actionGroup.add(new CloseAction());
    if (toolbarActions != null) {
      actionGroup.add(toolbarActions);
    }
    actionGroup.add(new ContextHelpAction(helpId));
    add(ActionManager.getInstance().
        createActionToolbar("DefaultCvsComponentToolbar", actionGroup, false).getComponent(),
        BorderLayout.WEST);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:CvsTabbedWindowComponent.java

示例6: createToolbarActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private ActionGroup createToolbarActions(final CoverageViewTreeStructure treeStructure) {
  final DefaultActionGroup actionGroup = new DefaultActionGroup();
  actionGroup.add(new GoUpAction(treeStructure));
  if (treeStructure.supportFlattenPackages()) {
    actionGroup.add(new FlattenPackagesAction());
  }

  installAutoScrollToSource(actionGroup);
  installAutoScrollFromSource(actionGroup);

  actionGroup.add(ActionManager.getInstance().getAction("GenerateCoverageReport"));
  actionGroup.add(new CloseTabToolbarAction() {
    @Override
    public void actionPerformed(AnActionEvent e) {
      CoverageDataManager.getInstance(myProject).chooseSuitesBundle(null);
    }
  });
  actionGroup.add(new ContextHelpAction(HELP_ID));
  return actionGroup;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:CoverageView.java

示例7: appendActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
protected void appendActions(@NotNull DefaultActionGroup actionGroup, @Nullable String helpID) {
  actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
  actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_ALL));
  actionGroup.add(new PinToolwindowTabAction(){
    @Override
    public void update(AnActionEvent event) {
      super.update(event);
      // sometimes there is no content to close, e.g. in usage view preview
      event.getPresentation().setVisible(myContent != null);
    }
  });
  actionGroup.add(new CloseAction());
  if (helpID != null) {
    actionGroup.add(new ContextHelpAction(helpID));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:HierarchyBrowserBase.java

示例8: setToolbarActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
public final void setToolbarActions(final AnAction... actions) {
  final DefaultActionGroup actionGroup = new DefaultActionGroup();
  for (final AnAction action : actions) {
    actionGroup.add(action);
  }
  if (getHelpId() != null) {
    actionGroup.add(Separator.getInstance());
    actionGroup.add(new ContextHelpAction(getHelpId()));
  }

  final ActionManager actionManager = ActionManager.getInstance();
  final ToolbarPosition position = getToolbarPosition();
  final ActionToolbar myActionToolbar = actionManager.createActionToolbar(ActionPlaces.PROJECT_VIEW_TOOLBAR, actionGroup, position == ToolbarPosition.TOP || position == ToolbarPosition.BOTTOM);
  myActionToolbar.setTargetComponent(myInnerPanel);
  final JComponent toolbarComponent = myActionToolbar.getComponent();
  final MatteBorder matteBorder = BorderFactory.createMatteBorder(0, 0, position == ToolbarPosition.TOP ? 1 : 0, 0, JBColor.DARK_GRAY);
  toolbarComponent.setBorder(BorderFactory.createCompoundBorder(matteBorder, toolbarComponent.getBorder()));

  getTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
      myActionToolbar.updateActionsImmediately();
    }
  });

  add(toolbarComponent, position.getPosition());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:AbstractTableView.java

示例9: createToolbarPanel

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JPanel createToolbarPanel() {
  final DefaultActionGroup group = new DefaultActionGroup();
  group.add(new AddAction());
  group.add(new RemoveAction());
  group.add(new RunAction());
  group.add(new ShowAllTargetsAction());
  AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
  group.add(action);
  action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
  group.add(action);
  group.add(myAntBuildFilePropertiesAction);
  group.add(new ContextHelpAction(HelpID.ANT));

  final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
  final JPanel buttonsPanel = new JPanel(new BorderLayout());
  buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
  return buttonsPanel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:AntExplorer.java

示例10: createToolbarPanel

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JPanel createToolbarPanel() {
  final DefaultActionGroup group = new DefaultActionGroup();
  group.add(new AddAction());
  group.add(new RemoveAction());
  group.add(new RunAction());
  group.add(myAntBuildFilePropertiesAction);
  group.addSeparator();
  group.add(new ShowAllTargetsAction());
  group.add(new ShowModuleGrouping());
  AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
  group.add(action);
  action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
  action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
  group.add(action);
  group.addSeparator();
  group.add(new ContextHelpAction(HelpID.ANT));

  final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
  final JPanel buttonsPanel = new JPanel(new BorderLayout());
  buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
  return buttonsPanel;
}
 
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:24,代码来源:AntExplorer.java

示例11: appendActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
protected void appendActions(@Nonnull DefaultActionGroup actionGroup, @Nullable String helpID) {
  actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
  actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_ALL));
  actionGroup.add(new PinToolwindowTabAction() {
    @Override
    public void update(AnActionEvent event) {
      super.update(event);
      // sometimes there is no content to close, e.g. in usage view preview
      event.getPresentation().setVisible(myContent != null);
    }
  });
  actionGroup.add(new CloseAction());
  if (helpID != null) {
    actionGroup.add(new ContextHelpAction(helpID));
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:HierarchyBrowserBase.java

示例12: setToolbarActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
public final void setToolbarActions(final AnAction... actions) {
  final DefaultActionGroup actionGroup = new DefaultActionGroup();
  for (final AnAction action : actions) {
    actionGroup.add(action);
  }
  if (getHelpId() != null) {
    actionGroup.add(AnSeparator.getInstance());
    actionGroup.add(new ContextHelpAction(getHelpId()));
  }

  final ActionManager actionManager = ActionManager.getInstance();
  final ToolbarPosition position = getToolbarPosition();
  final ActionToolbar myActionToolbar = actionManager.createActionToolbar(ActionPlaces.PROJECT_VIEW_TOOLBAR, actionGroup, position == ToolbarPosition.TOP || position == ToolbarPosition.BOTTOM);
  myActionToolbar.setTargetComponent(myInnerPanel);
  final JComponent toolbarComponent = myActionToolbar.getComponent();
  final MatteBorder matteBorder = BorderFactory.createMatteBorder(0, 0, position == ToolbarPosition.TOP ? 1 : 0, 0, JBColor.DARK_GRAY);
  toolbarComponent.setBorder(BorderFactory.createCompoundBorder(matteBorder, toolbarComponent.getBorder()));

  getTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
      myActionToolbar.updateActionsImmediately();
    }
  });

  add(toolbarComponent, position.getPosition());
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:27,代码来源:AbstractTableView.java

示例13: initActions

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
@Override
public void initActions(RunContentDescriptor content, DefaultActionGroup actionGroup) {
  Executor executor = myExecutionEnvironment.getExecutor();
  actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN), Constraints.FIRST);

  actionGroup.add(new CloseAction(executor, content, myExecutionEnvironment.getProject()));
  actionGroup.add(new ContextHelpAction(executor.getHelpId()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:DefaultDebugUIEnvironment.java

示例14: createToolbar

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JComponent createToolbar() {
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(new CloseAction());
  group.add(new RerunAction(this));
  group.add(new ShowFilesAction());
  group.add(new HideOutOfCyclePackagesAction());
  group.add(new GroupByScopeTypeAction());
  group.add(new ContextHelpAction("dependency.viewer.tool.window"));

  ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true);
  return toolbar.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CyclicDependenciesPanel.java

示例15: createToolbar

import com.intellij.ide.actions.ContextHelpAction; //导入依赖的package包/类
private JComponent createToolbar() {
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(ActionManager.getInstance().getAction(SERVERS_TOOL_WINDOW_TOOLBAR));
  group.add(new Separator());
  group.add(new ContextHelpAction(HELP_ID));

  ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(PLACE_TOOLBAR, group, false);


  myTree.putClientProperty(DataManager.CLIENT_PROPERTY_DATA_PROVIDER, new DataProvider() {

    @Override
    public Object getData(@NonNls String dataId) {
      if (KEY.getName().equals(dataId)) {
        return ServersToolWindowContent.this;
      }
      for (RemoteServersViewContributor contributor : RemoteServersViewContributor.EP_NAME.getExtensions()) {
        Object data = contributor.getData(dataId, ServersToolWindowContent.this);
        if (data != null) {
          return data;
        }
      }
      return null;
    }
  });
  actionToolBar.setTargetComponent(myTree);
  return actionToolBar.getComponent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ServersToolWindowContent.java


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