Java Code Examples for com.intellij.execution.executors.DefaultDebugExecutor#getDebugExecutorInstance()
The following examples show how to use
com.intellij.execution.executors.DefaultDebugExecutor#getDebugExecutorInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppCommandLineState.java From embeddedlinux-jvmdebugger-intellij with Apache License 2.0 | 6 votes |
/** * Closes old session only for debug mode * * @param project * @param parameters */ private void closeOldSession(final Project project, EmbeddedLinuxJVMRunConfigurationRunnerParameters parameters) { final String configurationName = AppCommandLineState.getRunConfigurationName(parameters.getPort()); final Collection<RunContentDescriptor> descriptors = ExecutionHelper.findRunningConsoleByTitle(project, configurationName::equals); if (descriptors.size() > 0) { final RunContentDescriptor descriptor = descriptors.iterator().next(); final ProcessHandler processHandler = descriptor.getProcessHandler(); final Content content = descriptor.getAttachedContent(); if (processHandler != null && content != null) { final Executor executor = DefaultDebugExecutor.getDebugExecutorInstance(); if (processHandler.isProcessTerminated()) { ExecutionManager.getInstance(project).getContentManager() .removeRunContent(executor, descriptor); } else { content.getManager().setSelectedContent(content); ToolWindow window = ToolWindowManager.getInstance(project).getToolWindow(executor.getToolWindowId()); window.activate(null, false, true); } } } }
Example 2
Source File: MavenDebugConfigurationType.java From MavenHelper with Apache License 2.0 | 5 votes |
public static void debugConfiguration(Project project, @NotNull MavenRunnerParameters params, @Nullable MavenGeneralSettings settings, @Nullable MavenRunnerSettings runnerSettings, @Nullable ProgramRunner.Callback callback) { RunnerAndConfigurationSettings configSettings = MavenRunConfigurationType.createRunnerAndConfigurationSettings( settings, runnerSettings, params, project); final Executor executor = DefaultDebugExecutor.getDebugExecutorInstance(); debugConfiguration(project, callback, configSettings, executor); }
Example 3
Source File: QuickRunMavenGoalAction.java From MavenHelper with Apache License 2.0 | 5 votes |
protected AnAction getRunConfigurationAction(Project project, RunnerAndConfigurationSettings cfg) { RunConfigurationAction action = new RunConfigurationAction(DefaultRunExecutor.getRunExecutorInstance(), true, project, cfg); return new ActionGroup(action.getTemplatePresentation().getText(), action.getTemplatePresentation().getDescription(), action.getTemplatePresentation().getIcon()) { @NotNull @Override public AnAction[] getChildren(@Nullable AnActionEvent anActionEvent) { DebugConfigurationAction debugConfigurationAction = new DebugConfigurationAction(DefaultDebugExecutor.getDebugExecutorInstance(), true, project, cfg); debugConfigurationAction.getTemplatePresentation().setText("Debug"); return new AnAction[]{debugConfigurationAction}; } @Override public void actionPerformed(@NotNull AnActionEvent e) { action.actionPerformed(e); } @Override public boolean canBePerformed(@NotNull DataContext context) { return true; } @Override public boolean isPopup() { return true; } }; }
Example 4
Source File: BaseSMTRunnerTestCase.java From consulo with Apache License 2.0 | 5 votes |
protected TestConsoleProperties createConsoleProperties() { final RuntimeConfiguration runConfiguration = createRunConfiguration(); final TestConsoleProperties consoleProperties = new SMTRunnerConsoleProperties(runConfiguration, "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance()); TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false); return consoleProperties; }
Example 5
Source File: TestsPresentationUtilTest.java From consulo with Apache License 2.0 | 5 votes |
public MyRenderer(final boolean isPaused, final UITestUtil.FragmentsContainer fragmentsContainer) { super(new SMTRunnerConsoleProperties(createRunConfiguration(), "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance()) { @Override public boolean isPaused() { return isPaused; } }); myFragmentsContainer = fragmentsContainer; }
Example 6
Source File: MainMavenDebugActionGroup.java From MavenHelper with Apache License 2.0 | 4 votes |
@Override protected RunConfigurationAction getRunConfigurationAction(Project project, RunnerAndConfigurationSettings cfg) { return new DebugConfigurationAction(DefaultDebugExecutor.getDebugExecutorInstance(), true, project, cfg); }
Example 7
Source File: TestExecutionState.java From buck with Apache License 2.0 | 4 votes |
private void attachDebugger(String title, String port) { final RemoteConnection remoteConnection = new RemoteConnection(/* useSockets */ true, "localhost", port, /* serverMode */ false); final RemoteStateState state = new RemoteStateState(mProject, remoteConnection); final String name = title + " debugger (" + port + ")"; final ConfigurationFactory cfgFactory = ConfigurationTypeUtil.findConfigurationType("Remote").getConfigurationFactories()[0]; RunnerAndConfigurationSettings runSettings = RunManager.getInstance(mProject).createRunConfiguration(name, cfgFactory); final Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance(); final ExecutionEnvironment env = new ExecutionEnvironmentBuilder(mProject, debugExecutor) .runProfile(runSettings.getConfiguration()) .build(); final int pollTimeout = 3000; final DebugEnvironment environment = new DefaultDebugEnvironment(env, state, remoteConnection, pollTimeout); ApplicationManager.getApplication() .invokeLater( () -> { try { final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(mProject).attachVirtualMachine(environment); if (debuggerSession == null) { return; } XDebuggerManager.getInstance(mProject) .startSessionAndShowTab( name, null, new XDebugProcessStarter() { @Override @NotNull public XDebugProcess start(@NotNull XDebugSession session) { return JavaDebugProcess.create(session, debuggerSession); } }); } catch (ExecutionException e) { LOG.error( "failed to attach to debugger on port " + port + " with polling timeout " + pollTimeout); } }); }
Example 8
Source File: DebugServerAction.java From consulo with Apache License 2.0 | 4 votes |
@Override protected Executor getExecutor() { return DefaultDebugExecutor.getDebugExecutorInstance(); }
Example 9
Source File: XDebugSessionTab.java From consulo with Apache License 2.0 | 4 votes |
private void attachToSession(@Nonnull XDebugSessionImpl session) { for (XDebugView view : myViews.values()) { attachViewToSession(session, view); } XDebugTabLayouter layouter = session.getDebugProcess().createTabLayouter(); Content consoleContent = layouter.registerConsoleContent(myUi, myConsole); attachNotificationTo(consoleContent); layouter.registerAdditionalContent(myUi); RunContentBuilder.addAdditionalConsoleEditorActions(myConsole, consoleContent); if (ApplicationManager.getApplication().isUnitTestMode()) { return; } DefaultActionGroup leftToolbar = new DefaultActionGroup(); final Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance(); if (myEnvironment != null) { leftToolbar.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN)); List<AnAction> additionalRestartActions = session.getRestartActions(); if (!additionalRestartActions.isEmpty()) { leftToolbar.addAll(additionalRestartActions); leftToolbar.addSeparator(); } leftToolbar.addAll(session.getExtraActions()); } leftToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_LEFT_TOOLBAR_GROUP)); for (AnAction action : session.getExtraStopActions()) { leftToolbar.add(action, new Constraints(Anchor.AFTER, IdeActions.ACTION_STOP_PROGRAM)); } //group.addSeparator(); //addAction(group, DebuggerActions.EXPORT_THREADS); leftToolbar.addSeparator(); leftToolbar.add(myUi.getOptions().getLayoutActions()); final AnAction[] commonSettings = myUi.getOptions().getSettingsActionsList(); DefaultActionGroup settings = new DefaultActionGroup(ActionsBundle.message("group.XDebugger.settings.text"), true); settings.getTemplatePresentation().setIcon(myUi.getOptions().getSettingsActions().getTemplatePresentation().getIcon()); settings.addAll(commonSettings); leftToolbar.add(settings); leftToolbar.addSeparator(); leftToolbar.add(PinToolwindowTabAction.getPinAction()); DefaultActionGroup topToolbar = new DefaultActionGroup(); topToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_TOP_TOOLBAR_GROUP)); session.getDebugProcess().registerAdditionalActions(leftToolbar, topToolbar, settings); myUi.getOptions().setLeftToolbar(leftToolbar, ActionPlaces.DEBUGGER_TOOLBAR); myUi.getOptions().setTopToolbar(topToolbar, ActionPlaces.DEBUGGER_TOOLBAR); if (myEnvironment != null) { initLogConsoles(myEnvironment.getRunProfile(), myRunContentDescriptor, myConsole); } }