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


Java RunnerLayoutUi.getComponent方法代码示例

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


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

示例5: startUploadingProcess

import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
private void startUploadingProcess() {
  final Process process;
  final GeneralCommandLine commandLine;

  try {
    JavaParameters parameters = new JavaParameters();
    parameters.configureByModule(myAppEngineFacet.getModule(), JavaParameters.JDK_ONLY);
    parameters.setMainClass("com.google.appengine.tools.admin.AppCfg");
    parameters.getClassPath().add(mySdk.getToolsApiJarFile().getAbsolutePath());

    final List<KeyValue<String,String>> list = HttpConfigurable.getJvmPropertiesList(false, null);
    if (! list.isEmpty()) {
      final ParametersList parametersList = parameters.getVMParametersList();
      for (KeyValue<String, String> value : list) {
        parametersList.defineProperty(value.getKey(), value.getValue());
      }
    }

    final ParametersList programParameters = parameters.getProgramParametersList();
    programParameters.add("--email=" + myEmail);
    programParameters.add("update");
    programParameters.add(FileUtil.toSystemDependentName(myArtifact.getOutputPath()));

    commandLine = CommandLineBuilder.createFromJavaParameters(parameters);
    process = commandLine.createProcess();
  }
  catch (ExecutionException e) {
    Messages.showErrorDialog(myProject, "Cannot start uploading: " + e.getMessage(), CommonBundle.getErrorTitle());
    return;
  }

  final Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  final ConsoleView console = TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole();
  final RunnerLayoutUi ui = RunnerLayoutUi.Factory.getInstance(myProject).create("Upload", "Upload Application", "Upload Application", myProject);
  final DefaultActionGroup group = new DefaultActionGroup();
  ui.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
  ui.addContent(ui.createContent("upload", console.getComponent(), "Upload Application", null, console.getPreferredFocusableComponent()));

  final ProcessHandler processHandler = new OSProcessHandler(process, commandLine.getCommandLineString());
  processHandler.addProcessListener(new MyProcessListener(processHandler, console));
  console.attachToProcess(processHandler);
  final RunContentDescriptor contentDescriptor = new RunContentDescriptor(console, processHandler, ui.getComponent(), "Upload Application");
  group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_STOP_PROGRAM));
  group.add(new CloseAction(executor, contentDescriptor, myProject));

  ExecutionManager.getInstance(myProject).getContentManager().showRunContent(executor, contentDescriptor);
  processHandler.startNotify();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:49,代码来源:AppEngineUploader.java


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