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


Java RunnerLayoutUi.Factory方法代码示例

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


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

示例1: createToolWindowContent

import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
public void createToolWindowContent(@NotNull ToolWindow toolWindow) {
  //Create runner UI layout
  RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(myProject);
  RunnerLayoutUi layoutUi = factory.create("", "", "session", myProject);

  // Adding actions
  DefaultActionGroup group = new DefaultActionGroup();
  layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);

  Content console = layoutUi.createContent(GradleConsoleToolWindowFactory.ID, myConsoleView.getComponent(), "", null, null);
  AnAction[] consoleActions = myConsoleView.createConsoleActions();
  for (AnAction action : consoleActions) {
    if (!shouldIgnoreAction(action)) {
      group.add(action);
    }
  }
  layoutUi.addContent(console, 0, PlaceInGrid.right, false);

  JComponent layoutComponent = layoutUi.getComponent();
  myConsolePanel.add(layoutComponent, BorderLayout.CENTER);

  //noinspection ConstantConditions
  Content content = ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
  toolWindow.getContentManager().addContent(content);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:GradleConsoleView.java

示例2: setUpToolWindow

import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
private Content setUpToolWindow() {
  //Create runner UI layout
  final RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(myProject);
  final RunnerLayoutUi layoutUi = factory.create("", "", "session", myProject);

  // Adding actions
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(myKillAction);
  group.addSeparator();

  layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);

  final Content console = layoutUi.createContent(CONSOLE_ID, myConsole.getComponent(), "", null, null);
  layoutUi.addContent(console, 0, PlaceInGrid.right, false);

  final JComponent uiComponent = layoutUi.getComponent();
  myPanel.add(uiComponent, BorderLayout.CENTER);

  final ContentManager manager = myToolWindow.getContentManager();
  final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
  final Content content = contentFactory.createContent(uiComponent, null, true);
  manager.addContent(content);
  return content;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:MvcConsole.java

示例3: createToolWindowContent

import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
/**
 * Creats the tool window content
 * @param toolWindow
 */
public void createToolWindowContent(@NotNull ToolWindow toolWindow) {
    //Create runner UI layout
    RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(project);
    RunnerLayoutUi layoutUi = factory.create("", "", "session", project);

    // Adding actions
    DefaultActionGroup group = new DefaultActionGroup();
    layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);

    Content console = layoutUi.createContent(EmbeddedLinuxJVMToolWindowFactory.ID, consoleView.getComponent(), "", null, null);
    AnAction[] consoleActions = consoleView.createConsoleActions();
    for (AnAction action : consoleActions) {
        if (!shouldIgnoreAction(action)) {
            group.add(action);
        }
    }
    layoutUi.addContent(console, 0, PlaceInGrid.right, false);

    JComponent layoutComponent = layoutUi.getComponent();
    myConsolePanel.add(layoutComponent, BorderLayout.CENTER);
    Content content = ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
    toolWindow.getContentManager().addContent(content);
}
 
开发者ID:asebak,项目名称:embeddedlinux-jvmdebugger-intellij,代码行数:28,代码来源:EmbeddedLinuxJVMConsoleView.java

示例4: createToolWindowContent

import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
public void createToolWindowContent(ToolWindow toolWindow) {
  // Create runner UI layout
  RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(project);
  RunnerLayoutUi layoutUi = factory.create("", "", "session", project);

  Content console =
      layoutUi.createContent(
          BlazeConsoleToolWindowFactory.ID, consoleView.getComponent(), "", null, null);
  console.setCloseable(false);
  layoutUi.addContent(console, 0, PlaceInGrid.right, false);

  // Adding actions
  DefaultActionGroup group = new DefaultActionGroup();
  layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);

  AnAction[] consoleActions = consoleView.createConsoleActions();
  for (AnAction action : consoleActions) {
    if (!shouldIgnoreAction(action)) {
      group.add(action);
    }
  }
  group.add(new StopAction());

  JComponent layoutComponent = layoutUi.getComponent();

  //noinspection ConstantConditions
  Content content =
      ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
  content.setCloseable(false);
  toolWindow.getContentManager().addContent(content);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:32,代码来源:BlazeConsoleView.java


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