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


Java RunnerLayoutUi类代码示例

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


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

示例1: initSession

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@Override
protected void initSession(XDebugSession session, RunProfileState state, Executor executor) {
  XDebugSessionTab tab = ((XDebugSessionImpl)session).getSessionTab();
  if (tab != null) {
    RunnerLayoutUi ui = tab.getUi();
    ContentManager contentManager = ui.getContentManager();
    Content content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.watches.title"));
    if (content != null) {
      contentManager.removeContent(content, true);
    }
    content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.console.content.name"));
    if (content != null) {
      contentManager.removeContent(content, true);
    }
    initEduConsole(session, ui);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyEduDebugRunner.java

示例2: initEduConsole

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
private static void initEduConsole(@NotNull final XDebugSession session,
                                   @NotNull final RunnerLayoutUi ui) {
  Project project = session.getProject();
  final Sdk sdk = PythonSdkType.findPythonSdk(ModuleManager.getInstance(project).getModules()[0]);
  final PythonDebugLanguageConsoleView view = new PythonDebugLanguageConsoleView(project, sdk);
  final ProcessHandler processHandler = session.getDebugProcess().getProcessHandler();

  view.attachToProcess(processHandler);
  view.addMessageFilter(new PythonTracebackFilter(project));
  view.addMessageFilter(new UrlFilter());

  view.enableConsole(false);

  Content eduConsole =
    ui.createContent("EduConsole", view.getComponent(),
                     XDebuggerBundle.message("debugger.session.tab.console.content.name"),
                     AllIcons.Debugger.ToolConsole, view.getPreferredFocusableComponent());
  eduConsole.setCloseable(false);
  ui.addContent(eduConsole, 0, PlaceInGrid.right, false);

  PyDebugProcess process = (PyDebugProcess)session.getDebugProcess();
  PyDebugRunner.initDebugConsoleView(project, process, view, processHandler, session);

  patchLeftToolbar(session, ui);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:PyEduDebugRunner.java

示例3: patchLeftToolbar

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的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: 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

示例5: 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

示例6: 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

示例7: createToolWindowContent

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@Override
public void createToolWindowContent(
    @NotNull final Project project, @NotNull ToolWindow toolWindow) {
  toolWindow.setAvailable(true, null);
  toolWindow.setToHideOnEmptyContent(true);

  RunnerLayoutUi runnerLayoutUi = BuckUIManager.getInstance(project).getLayoutUi(project);
  Content consoleContent = createConsoleContent(runnerLayoutUi, project);

  runnerLayoutUi.addContent(consoleContent, 0, PlaceInGrid.center, false);
  runnerLayoutUi.getOptions().setLeftToolbar(
      getLeftToolbarActions(project), ActionPlaces.UNKNOWN);

  runnerLayoutUi.updateActionsNow();

  final ContentManager contentManager = toolWindow.getContentManager();
  Content content = contentManager.getFactory().createContent(
      runnerLayoutUi.getComponent(), "", true);
  contentManager.addContent(content);

  updateBuckToolWindowTitle(project);
}
 
开发者ID:wangyanxing,项目名称:Buck-IntelliJ-Plugin,代码行数:23,代码来源:BuckToolWindowFactory.java

示例8: processTerminated

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@Override
public void processTerminated(ProcessEvent event) {
  if (myProject.isDisposed()) return;
  if (!myTerminateNotified.compareAndSet(false, true)) return;

  ApplicationManager.getApplication().invokeLater(() -> {
    RunnerLayoutUi ui = myDescriptor.getRunnerLayoutUi();
    if (ui != null && !ui.isDisposed()) {
      ui.updateActionsNow();
    }
  }, ModalityState.any());

  myProject.getMessageBus().syncPublisher(EXECUTION_TOPIC).processTerminated(myExecutorId, myEnvironment, myProcessHandler, event.getExitCode());

  SaveAndSyncHandler saveAndSyncHandler = SaveAndSyncHandler.getInstance();
  if (saveAndSyncHandler != null) {
    saveAndSyncHandler.scheduleRefresh();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:ExecutionManagerImpl.java

示例9: createTabLayouter

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@NotNull
@Override
public XDebugTabLayouter createTabLayouter()
{
	return new XDebugTabLayouter()
	{
		@Override
		public void registerAdditionalContent(@NotNull RunnerLayoutUi ui)
		{
			Content content = ui.createContent("ScriptListView", myScriptListPanel, "Scripts", JavaScriptIcons.JavaScript, null);
			content.setCloseable(false);

			ui.addContent(content);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:17,代码来源:V8DebugProcess.java

示例10: createActionToolbar

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@NotNull
private ActionGroup createActionToolbar(JComponent consolePanel, ConsoleView consoleView, @NotNull final RunnerLayoutUi myUi, RunContentDescriptor contentDescriptor, Executor runExecutorInstance) {
    final DefaultActionGroup actionGroup = new DefaultActionGroup();
    actionGroup.add(new FilterAction());
    actionGroup.add(new RerunAction(consolePanel, consoleView));
    actionGroup.add(new StopAction());
    actionGroup.add(new FormatAction());
    actionGroup.add(new MyCloseAction(runExecutorInstance, contentDescriptor, myProject));
    return actionGroup;
}
 
开发者ID:kookob,项目名称:mybatis-log-plugin,代码行数:11,代码来源:TailContentExecutor.java

示例11: createActionToolbar

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@NotNull
private ActionGroup createActionToolbar(JComponent consolePanel, ConsoleView consoleView, @NotNull final RunnerLayoutUi myUi, RunContentDescriptor contentDescriptor, Executor runExecutorInstance) {
    final DefaultActionGroup actionGroup = new DefaultActionGroup();
    actionGroup.add(new RerunAction(consolePanel, consoleView));
    actionGroup.add(new StopAction());
    actionGroup.add(new FormatAction());
    actionGroup.add(new MyCloseAction(runExecutorInstance, contentDescriptor, myProject));
    return actionGroup;
}
 
开发者ID:kookob,项目名称:RestoreSql,代码行数:10,代码来源:TailContentExecutor.java

示例12: addThreadDump

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
public static void addThreadDump(Project project, List<ThreadState> threads, final RunnerLayoutUi ui, DebuggerSession session) {
  final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
  consoleBuilder.filters(ExceptionFilters.getFilters(session.getSearchScope()));
  final ConsoleView consoleView = consoleBuilder.getConsole();
  final DefaultActionGroup toolbarActions = new DefaultActionGroup();
  consoleView.allowHeavyFilters();
  final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);

  final String id = THREAD_DUMP_CONTENT_PREFIX + " #" + myCurrentThreadDumpId;
  final Content content = ui.createContent(id, panel, id, null, null);
  content.putUserData(RunnerContentUi.LIGHTWEIGHT_CONTENT_MARKER, Boolean.TRUE);
  content.setCloseable(true);
  content.setDescription("Thread Dump");
  ui.addContent(content);
  ui.selectAndFocus(content, true, true);
  myThreadDumpsCount++;
  myCurrentThreadDumpId++;
  Disposer.register(content, new Disposable() {
    @Override
    public void dispose() {
      myThreadDumpsCount--;
      if (myThreadDumpsCount == 0) {
        myCurrentThreadDumpId = 1;
      }
    }
  });
  Disposer.register(content, consoleView);
  ui.selectAndFocus(content, true, false);
  if (threads.size() > 0) {
    panel.selectStackFrame(0);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:DebuggerUtilsEx.java

示例13: registerConsoleContent

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
/**
 * Registers tab for the given {@code console}.
 *
 * @param console {@code ExecutionConsole} instance
 * @param ui {@code RunnerLayoutUi} instance
 * @return registered {@code Content} instance
 */
@NotNull
public Content registerConsoleContent(@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) {
  Content content = ui.createContent(DebuggerContentInfo.CONSOLE_CONTENT, console.getComponent(),
                                     XDebuggerBundle.message("debugger.session.tab.console.content.name"),
                                     AllIcons.Debugger.Console,
                                     console.getPreferredFocusableComponent());
  content.setCloseable(false);
  ui.addContent(content, 1, PlaceInGrid.bottom, false);
  return content;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:XDebugTabLayouter.java

示例14: CompositeDiffPanel

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
public CompositeDiffPanel(Project project, final DiscloseMultiRequest request, final Window window, @NotNull Disposable parentDisposable) {
  myRequest = request;
  myWindow = window;
  myParentDisposable = parentDisposable;
  myUi = RunnerLayoutUi.Factory.getInstance(project).create("Diff", "Diff", "Diff", parentDisposable);
  myUi.getComponent().setBorder(null);
  myUi.getOptions().setMinimizeActionEnabled(false);
  //myUi.getOptions().setTopToolbar()
  myMap = new HashMap<String, Pair<DiffViewer, Content>>();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:CompositeDiffPanel.java

示例15: attract

import com.intellij.execution.ui.RunnerLayoutUi; //导入依赖的package包/类
@Override
public void attract(final Content content, final RunnerLayoutUi ui) {
  if (!myWasAttracted) {
    myWasAttracted = true;
    ui.selectAndFocus(content, myRequestFocus, true, true);
  } else {
    ui.setBouncing(content, true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:LayoutAttractionPolicy.java


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