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