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


Java Content.setActions方法代码示例

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


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

示例1: createContent

import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
@NotNull
public Content createContent(@NotNull final String contentId, @NotNull final ComponentWithActions withActions, @NotNull final String displayName,
                             @Nullable final Icon icon,
                             @Nullable final JComponent toFocus) {
  final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false);
  content.putUserData(CONTENT_TYPE, contentId);
  content.putUserData(ViewImpl.ID, contentId);
  content.setIcon(icon);
  if (toFocus != null) {
    content.setPreferredFocusableComponent(toFocus);
  }

  if (!withActions.isContentBuiltIn()) {
    content.setSearchComponent(withActions.getSearchComponent());
    content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent());
  }

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

示例2: addAdditionalConsoleEditorActions

import com.intellij.ui.content.Content; //导入方法依赖的package包/类
public static void addAdditionalConsoleEditorActions(final ConsoleView console, final Content consoleContent) {
    final DefaultActionGroup consoleActions = new DefaultActionGroup();
        for (AnAction action : console.createConsoleActions()) {
            consoleActions.add(action);
        }

    consoleContent.setActions(consoleActions, ActionPlaces.RUNNER_TOOLBAR, console.getComponent());
}
 
开发者ID:beansoftapp,项目名称:react-native-console,代码行数:9,代码来源:RNUtil.java

示例3: createVariablesContent

import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private Content createVariablesContent(@NotNull XDebugSessionImpl session) {
  final XVariablesView variablesView = new XVariablesView(session);
  myViews.add(variablesView);
  Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
                                      XDebuggerBundle.message("debugger.session.tab.variables.title"),
                                      AllIcons.Debugger.Value, null);
  result.setCloseable(false);

  ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
  result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebugSessionTab.java

示例4: addAdditionalConsoleEditorActions

import com.intellij.ui.content.Content; //导入方法依赖的package包/类
public static void addAdditionalConsoleEditorActions(final ExecutionConsole console, final Content consoleContent) {
  final DefaultActionGroup consoleActions = new DefaultActionGroup();
  if (console instanceof ConsoleView) {
    for (AnAction action : ((ConsoleView)console).createConsoleActions()) {
      consoleActions.add(action);
    }
  }

  consoleContent.setActions(consoleActions, ActionPlaces.UNKNOWN, console.getComponent());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:RunContentBuilder.java


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