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


Java ExecutionConsole类代码示例

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


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

示例1: showHelperProcessRunContent

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static final ConsoleView showHelperProcessRunContent(String header, OSProcessHandler runHandler, Project project, Executor defaultExecutor) {
        ProcessTerminatedListener.attach(runHandler);

        ConsoleViewImpl consoleView = new ConsoleViewImpl(project, true);
        DefaultActionGroup toolbarActions = new DefaultActionGroup();

        JPanel panel = new JPanel((LayoutManager) new BorderLayout());
        panel.add((Component) consoleView.getComponent(), "Center");
        ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("unknown", (ActionGroup) toolbarActions, false);
        toolbar.setTargetComponent(consoleView.getComponent());
        panel.add((Component) toolbar.getComponent(), "West");

        RunContentDescriptor runDescriptor = new RunContentDescriptor((ExecutionConsole) consoleView,
                (ProcessHandler) runHandler, (JComponent) panel, header, AllIcons.RunConfigurations.Application);
        AnAction[]
                consoleActions = consoleView.createConsoleActions();
        toolbarActions.addAll((AnAction[]) Arrays.copyOf(consoleActions, consoleActions.length));
        toolbarActions.add((AnAction) new StopProcessAction("Stop process", "Stop process", (ProcessHandler) runHandler));
        toolbarActions.add((AnAction) new CloseAction(defaultExecutor, runDescriptor, project));

        consoleView.attachToProcess((ProcessHandler) runHandler);
//        ExecutionManager.getInstance(environment.getProject()).getContentManager().showRunContent(environment.getExecutor(), runDescriptor);
        showConsole(project, defaultExecutor, runDescriptor);
        return (ConsoleView) consoleView;
    }
 
开发者ID:beansoftapp,项目名称:react-native-console,代码行数:26,代码来源:RunnerUtil.java

示例2: showRerunNotification

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static void showRerunNotification(@Nullable RunContentDescriptor contentToReuse,
                                         @NotNull final ExecutionConsole executionConsole) {
  if (contentToReuse == null) {
    return;
  }
  String lastActionId = ActionManagerEx.getInstanceEx().getPrevPreformedActionId();
  boolean showNotification = !RerunTestsAction.ID.equals(lastActionId);
  if (showNotification && !PropertiesComponent.getInstance().isTrueValue(KEY)) {
    UiNotifyConnector.doWhenFirstShown(executionConsole.getComponent(), new Runnable() {
      @Override
      public void run() {
        doShow(executionConsole);
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:RerunTestsNotification.java

示例3: createDebugProcess

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
protected PyDebugProcess createDebugProcess(@NotNull XDebugSession session,
                                            ServerSocket serverSocket,
                                            ExecutionResult result,
                                            PythonCommandLineState pyState) {
  ExecutionConsole executionConsole = result.getExecutionConsole();
  ProcessHandler processHandler = result.getProcessHandler();
  boolean isMultiProcess = pyState.isMultiprocessDebug();
  String scriptName = getScriptName(pyState);
  if (scriptName != null) {
    VirtualFile file = VfsUtil.findFileByIoFile(new File(scriptName), true);
    if (file != null) {
      int line = getBreakpointLineNumber(file, session.getProject());
      if (line != NO_LINE) {
        return new PyEduDebugProcess(session, serverSocket,
                                     executionConsole, processHandler,
                                     isMultiProcess, scriptName, line + 1);
      }
    }
  }
  LOG.info("Failed to create PyEduDebugProcess. PyDebugProcess created instead.");
  return new PyDebugProcess(session, serverSocket, executionConsole,
                            processHandler, isMultiProcess);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:PyEduDebugRunner.java

示例4: attachRerunFailedTestsAction

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static DefaultExecutionResult attachRerunFailedTestsAction(DefaultExecutionResult result) {
  ExecutionConsole console = result.getExecutionConsole();
  if (!(console instanceof SMTRunnerConsoleView)) {
    return result;
  }
  SMTRunnerConsoleView smConsole = (SMTRunnerConsoleView) console;
  TestConsoleProperties consoleProperties = smConsole.getProperties();
  if (!(consoleProperties instanceof BlazeTestConsoleProperties)) {
    return result;
  }
  BlazeTestConsoleProperties properties = (BlazeTestConsoleProperties) consoleProperties;
  AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(smConsole);
  if (action != null) {
    action.init(properties);
    action.setModelProvider(smConsole::getResultsViewer);
    result.setRestartActions(action);
  }
  return result;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:20,代码来源:SmRunnerUtils.java

示例5: createDebugProcessStarter

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
private XDebugProcessStarter createDebugProcessStarter(@NotNull final TheRXProcessHandler processHandler,
                                                       @NotNull final ExecutionConsole executionConsole,
                                                       @NotNull final TheRDebugger debugger,
                                                       @NotNull final TheROutputReceiver outputReceiver,
                                                       @NotNull final TheRResolvingSession resolvingSession) {
  return new XDebugProcessStarter() {
    @NotNull
    @Override
    public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
      return new TheRDebugProcess(
        session,
        processHandler,
        executionConsole,
        debugger,
        outputReceiver,
        resolvingSession,
        ConcurrencyUtil.newSingleThreadExecutor(EXECUTOR_NAME)
      );
    }
  };
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:23,代码来源:TheRDebugRunner.java

示例6: TheRDebugProcess

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public TheRDebugProcess(@NotNull final XDebugSession session,
                        @NotNull final TheRXProcessHandler processHandler,
                        @NotNull final ExecutionConsole executionConsole,
                        @NotNull final TheRDebugger debugger,
                        @NotNull final TheROutputReceiver outputReceiver,
                        @NotNull final TheRResolvingSession resolvingSession,
                        @NotNull final ExecutorService executor) {
  super(session);

  myProcessHandler = processHandler;
  myExecutionConsole = executionConsole;

  myDebugger = debugger;
  myOutputReceiver = outputReceiver;
  myStack = new TheRXStack(myDebugger.getStack(), resolvingSession, executor);
  myExecutor = executor;

  myBreakpoints = new HashMap<XSourcePositionWrapper, XLineBreakpoint<XBreakpointProperties>>();
  myTempBreakpoints = new HashSet<XSourcePositionWrapper>();

  myEditorsProvider = new TheREditorsProvider();
  myBreakpointHandlers = new XBreakpointHandler[]{new TheRXLineBreakpointHandler()};

  myProcessHandler.addListener(this);
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:26,代码来源:TheRDebugProcess.java

示例7: createConsole

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole createConsole() {
    myExecutionConsole = (ConsoleView) executionResult.getExecutionConsole();

    controller.setConsole(myExecutionConsole);
    return myExecutionConsole;
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:9,代码来源:LuaDebugProcess.java

示例8: createConsole

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole createConsole() {
  ExecutionConsole console = myJavaSession.getProcess().getExecutionResult().getExecutionConsole();
  if (console != null) return console;
  return super.createConsole();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:JavaDebugProcess.java

示例9: attachExecutionConsole

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
ExecutionConsole attachExecutionConsole(@NotNull ExternalSystemTask task,
                                        @NotNull Project project,
                                        @NotNull ExternalSystemRunConfiguration configuration,
                                        @NotNull Executor executor,
                                        @NotNull ExecutionEnvironment env,
                                        @NotNull ProcessHandler processHandler) throws ExecutionException;
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ExternalSystemExecutionConsoleManager.java

示例10: registerConsoleContent

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

示例11: attachExecutionConsole

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole attachExecutionConsole(@NotNull ExternalSystemTask task,
                                               @NotNull Project project,
                                               @NotNull ExternalSystemRunConfiguration configuration,
                                               @NotNull Executor executor,
                                               @NotNull ExecutionEnvironment env,
                                               @NotNull ProcessHandler processHandler) throws ExecutionException {
  myProcessHandler = processHandler;
  ConsoleView executionConsole = new TextConsoleBuilderImpl(project).getConsole();
  executionConsole.attachToProcess(processHandler);
  return executionConsole;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DefaultExternalSystemExecutionConsoleManager.java

示例12: getDebugSession

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@Override
@Nullable
public XDebugSession getDebugSession(@NotNull ExecutionConsole executionConsole) {
  for (final XDebugSessionImpl debuggerSession : mySessions.values()) {
    XDebugSessionTab sessionTab = debuggerSession.getSessionTab();
    if (sessionTab != null) {
      RunContentDescriptor contentDescriptor = sessionTab.getRunContentDescriptor();
      if (contentDescriptor != null && executionConsole == contentDescriptor.getExecutionConsole()) {
        return debuggerSession;
      }
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:XDebuggerManagerImpl.java

示例13: doShow

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
private static void doShow(@NotNull final ExecutionConsole executionConsole) {
  final Alarm alarm = new Alarm();
  alarm.addRequest(new Runnable() {
    @Override
    public void run() {
      String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(
        ActionManager.getInstance().getAction(RerunTestsAction.ID)
      );
      if (shortcutText.isEmpty()) {
        return;
      }

      GotItMessage message = GotItMessage.createMessage("Rerun tests with " + shortcutText, "");
      message.setDisposable(executionConsole);
      message.setCallback(new Runnable() {
        @Override
        public void run() {
          PropertiesComponent.getInstance().setValue(KEY, true);
        }
      });
      message.setShowCallout(false);
      Dimension consoleSize = executionConsole.getComponent().getSize();

      message.show(
        new RelativePoint(
          executionConsole.getComponent(),
          new Point(consoleSize.width - 185, consoleSize.height - 60)
        ),
        Balloon.Position.below
      );

      Disposer.dispose(alarm);
    }
  }, 1000);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:RerunTestsNotification.java

示例14: MyConsolePanel

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public MyConsolePanel(ExecutionConsole consoleView, ActionGroup toolbarActions) {
  super(new BorderLayout());
  JPanel toolbarPanel = new JPanel(new BorderLayout());
  toolbarPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarActions,false).getComponent());
  add(toolbarPanel, BorderLayout.WEST);
  add(consoleView.getComponent(), BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AnalyzeStacktraceUtil.java

示例15: PyEduDebugProcess

import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public PyEduDebugProcess(@NotNull XDebugSession session,
                         @NotNull ServerSocket serverSocket,
                         @NotNull ExecutionConsole executionConsole,
                         @Nullable ProcessHandler processHandler, boolean multiProcess,
                         String scriptName,
                         int line) {
  super(session, serverSocket, executionConsole, processHandler, multiProcess);
  myScriptName = scriptName;
  myLine = line;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:PyEduDebugProcess.java


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