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


Java DefaultDebugExecutor.getDebugExecutorInstance方法代码示例

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


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

示例1: hyperlinkActivated

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
  final Module moduleByName = ModuleManager.getInstance(myProject).findModuleByName(e.getDescription());
  if (moduleByName != null) {
    myConfiguration.getConfigurationModule().setModule(moduleByName);
    try {
      Executor executor = myIsDebug ? DefaultDebugExecutor.getDebugExecutorInstance()
                                    : DefaultRunExecutor.getRunExecutorInstance();
      ExecutionEnvironmentBuilder.create(myProject, executor, myConfiguration).contentToReuse(null).buildAndExecute();
      Balloon balloon = myToolWindowManager.getToolWindowBalloon(myTestRunDebugId);
      if (balloon != null) {
        balloon.hide();
      }
    }
    catch (ExecutionException e1) {
      LOG.error(e1);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ResetConfigurationModuleAdapter.java

示例2: patchProjectAreaExtensions

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
private static void patchProjectAreaExtensions(@NotNull final Project project) {
  Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance();
  unregisterAction(debugExecutor.getId(), ExecutorRegistryImpl.RUNNERS_GROUP);
  unregisterAction(debugExecutor.getContextActionId(), ExecutorRegistryImpl.RUN_CONTEXT_GROUP);

  ExtensionsArea projectArea = Extensions.getArea(project);

  for (SelectInTarget target : Extensions.getExtensions(SelectInTarget.EP_NAME, project)) {
    if (ToolWindowId.FAVORITES_VIEW.equals(target.getToolWindowId()) ||
        ToolWindowId.STRUCTURE_VIEW.equals(target.getToolWindowId())) {
      projectArea.getExtensionPoint(SelectInTarget.EP_NAME).unregisterExtension(target);
    }
  }

  for (AbstractProjectViewPane pane : Extensions.getExtensions(AbstractProjectViewPane.EP_NAME, project)) {
    if (pane.getId().equals(ScopeViewPane.ID)) {
      Disposer.dispose(pane);
      projectArea.getExtensionPoint(AbstractProjectViewPane.EP_NAME).unregisterExtension(pane);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:PyCharmEduInitialConfigurator.java

示例3: closeOldSession

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
/**
 * 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);
            }
        }
    }
}
 
开发者ID:asebak,项目名称:embeddedlinux-jvmdebugger-intellij,代码行数:31,代码来源:AppCommandLineState.java

示例4: hyperlinkActivated

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
@Override
protected void hyperlinkActivated(HyperlinkEvent e)
{
	final Module moduleByName = ModuleManager.getInstance(myProject).findModuleByName(e.getDescription());
	if(moduleByName != null)
	{
		myConfiguration.getConfigurationModule().setModule(moduleByName);
		try
		{
			Executor executor = myIsDebug ? DefaultDebugExecutor.getDebugExecutorInstance() : DefaultRunExecutor.getRunExecutorInstance();
			ExecutionEnvironmentBuilder.create(myProject, executor, myConfiguration).contentToReuse(null).buildAndExecute();
			Balloon balloon = myToolWindowManager.getToolWindowBalloon(myTestRunDebugId);
			if(balloon != null)
			{
				balloon.hide();
			}
		}
		catch(ExecutionException e1)
		{
			LOG.error(e1);
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:24,代码来源:ResetConfigurationModuleAdapter.java

示例5: createConsoleProperties

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
protected TestConsoleProperties createConsoleProperties() {
  final ModuleRunConfiguration runConfiguration = createRunConfiguration();

  final TestConsoleProperties consoleProperties = new SMTRunnerConsoleProperties(runConfiguration, "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance());
  TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false);
  
  return consoleProperties;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:BaseSMTRunnerTestCase.java

示例6: MyRenderer

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
public MyRenderer(final boolean isPaused,
                  final UITestUtil.FragmentsContainer fragmentsContainer) {
  super(new SMTRunnerConsoleProperties(createRunConfiguration(), "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance()) {
    @Override
    public boolean isPaused() {
      return isPaused;
    }
  });
  myFragmentsContainer = fragmentsContainer;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TestsPresentationUtilTest.java

示例7: closeOldSessionAndRun

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
private void closeOldSessionAndRun(final String debugPort) {
  final String configurationName = getRunConfigurationName(debugPort);
  final Collection<RunContentDescriptor> descriptors =
    ExecutionHelper.findRunningConsoleByTitle(myProject, new NotNullFunction<String, Boolean>() {
      @NotNull
      @Override
      public Boolean fun(String title) {
        return configurationName.equals(title);
      }
    });

  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(myProject).getContentManager()
          .removeRunContent(executor, descriptor);
      }
      else {
        content.getManager().setSelectedContent(content);
        ToolWindow window = ToolWindowManager.getInstance(myProject).getToolWindow(executor.getToolWindowId());
        window.activate(null, false, true);
        return;
      }
    }
  }

  runSession(debugPort);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:AndroidProcessChooserDialog.java

示例8: debugConfiguration

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
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);
}
 
开发者ID:krasa,项目名称:MavenHelper,代码行数:11,代码来源:MavenDebugConfigurationType.java

示例9: createConsoleProperties

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:BaseSMTRunnerTestCase.java

示例10: attachToSession

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
private void attachToSession(@NotNull XDebugSessionImpl session) {
  for (XDebugView view : myViews) {
    session.addSessionListener(new XDebugViewSessionListener(view), myRunContentDescriptor);
  }

  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());
  leftToolbar.add(new CloseAction(myEnvironment != null ? myEnvironment.getExecutor() : debugExecutor, myRunContentDescriptor, myProject));
  leftToolbar.add(new ContextHelpAction(debugExecutor.getHelpId()));

  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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:62,代码来源:XDebugSessionTab.java

示例11: createLocalSession

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
protected DebuggerSession createLocalSession(final JavaParameters javaParameters, final String sessionName) throws ExecutionException, InterruptedException {
  createBreakpoints(javaParameters.getMainClass());
  DebuggerSettings.getInstance().DEBUGGER_TRANSPORT = DebuggerSettings.SOCKET_TRANSPORT;

  GenericDebuggerRunnerSettings debuggerRunnerSettings = new GenericDebuggerRunnerSettings();
  debuggerRunnerSettings.LOCAL      = true;

  final RemoteConnection debugParameters = DebuggerManagerImpl.createDebugParameters(javaParameters, debuggerRunnerSettings, false);

  ExecutionEnvironment environment = new ExecutionEnvironment(new MockConfiguration(), DefaultDebugExecutor.getDebugExecutorInstance(),
                                                              myProject, debuggerRunnerSettings);
  final JavaCommandLineState javaCommandLineState = new JavaCommandLineState(environment){
    @Override
    protected JavaParameters createJavaParameters() {
      return javaParameters;
    }

    @Override
    protected GeneralCommandLine createCommandLine() throws ExecutionException {
      return CommandLineBuilder.createFromJavaParameters(getJavaParameters());
    }
  };

  final GenericDebuggerRunner runner = new GenericDebuggerRunner();

  ApplicationManager.getApplication().invokeAndWait(new Runnable() {
    @Override
    public void run() {
      try {
        myDebuggerSession = DebuggerManagerEx.getInstanceEx(myProject).attachVirtualMachine(DefaultDebugExecutor.getDebugExecutorInstance(),
          runner, new MockConfiguration(), javaCommandLineState, debugParameters, false);
      }
      catch (ExecutionException e) {
        LOG.error(e);
      }
    }
  }, ModalityState.defaultModalityState());
  myDebugProcess = myDebuggerSession.getProcess();

  //myConsoleBuffer = new StringBuffer();

  myDebugProcess.addProcessListener(new ProcessAdapter() {
    @Override
    public void onTextAvailable(ProcessEvent event, Key outputType) {
      //myConsoleBuffer.append(event.getText());
      print(event.getText(), outputType);
    }
  });

  assertNotNull(myDebuggerSession);
  assertNotNull(myDebugProcess);

  return myDebuggerSession;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:55,代码来源:DebuggerTestCase.java

示例12: createLocalProcess

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
protected DebuggerSession createLocalProcess(int transport, final JavaParameters javaParameters) throws ExecutionException, InterruptedException, InvocationTargetException {
  createBreakpoints(javaParameters.getMainClass());
  final DebuggerSession[] debuggerSession = new DebuggerSession[]{null};

  DebuggerSettings.getInstance().DEBUGGER_TRANSPORT = transport;

  GenericDebuggerRunnerSettings debuggerRunnerSettings = new GenericDebuggerRunnerSettings();
  debuggerRunnerSettings.LOCAL = true;
  debuggerRunnerSettings.DEBUG_PORT = "3456";

  ExecutionEnvironment environment = new ExecutionEnvironment(new MockConfiguration(), DefaultDebugExecutor.getDebugExecutorInstance(), myProject,
                                                              debuggerRunnerSettings);
  final JavaCommandLineState javaCommandLineState = new JavaCommandLineState(environment) {
    @Override
    protected JavaParameters createJavaParameters() {
      return javaParameters;
    }

    @Override
    protected GeneralCommandLine createCommandLine() throws ExecutionException {
      return CommandLineBuilder.createFromJavaParameters(getJavaParameters());
    }
  };

  final RemoteConnection debugParameters =
    DebuggerManagerImpl.createDebugParameters(javaCommandLineState.getJavaParameters(), debuggerRunnerSettings, true);

  UIUtil.invokeAndWaitIfNeeded(new Runnable() {
    @Override
    public void run() {
      try {
        debuggerSession[0] = attachVirtualMachine(javaCommandLineState, debugParameters, false);
      }
      catch (ExecutionException e) {
        fail(e.getMessage());
      }
    }
  });

  final ExecutionResult executionResult = debuggerSession[0].getProcess().getExecutionResult();
  debuggerSession[0].getProcess().addProcessListener(new ProcessAdapter() {
    @Override
    public void onTextAvailable(ProcessEvent event, Key outputType) {
      print(event.getText(), outputType);
    }
  });

  DebugProcessImpl process =
    (DebugProcessImpl)DebuggerManagerEx.getInstanceEx(myProject).getDebugProcess(executionResult.getProcessHandler());
  assertNotNull(process);
  return debuggerSession[0];
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:53,代码来源:DebuggerTestCase.java

示例13: getRunConfigurationAction

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
@Override
protected RunConfigurationAction getRunConfigurationAction(Project project, RunnerAndConfigurationSettings cfg) {
	return new DebugConfigurationAction(DefaultDebugExecutor.getDebugExecutorInstance(), true, project, cfg);
}
 
开发者ID:krasa,项目名称:MavenHelper,代码行数:5,代码来源:MainMavenDebugActionGroup.java

示例14: attachDebugger

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
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);
            }
          });
}
 
开发者ID:facebook,项目名称:buck,代码行数:48,代码来源:TestExecutionState.java

示例15: buildUi

import com.intellij.execution.executors.DefaultDebugExecutor; //导入方法依赖的package包/类
@Override
public void buildUi(RunnerLayoutUi ui)
{
	int index = myExecutor == DefaultDebugExecutor.getDebugExecutorInstance() ? 1 : 0;

	((LayoutStateDefaults) ui).initTabDefaults(index, "Server", null);

	final Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID, getComponent(), "Output", null, getPreferredFocusableComponent());
	consoleContent.setCloseable(false);

	RunContentBuilder.addAdditionalConsoleEditorActions(this, consoleContent);

	ui.addContent(consoleContent, index, PlaceInGrid.center, false);


	final Content deploymentContent = ui.createContent("JavaEEDeployment", myDeploymentView.getComponent(), "Deployment", null, null);
	deploymentContent.setCloseable(false);
	ui.addContent(deploymentContent, index, PlaceInGrid.left, false);
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:20,代码来源:JavaEEDeploymentConsole.java


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