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


Java XDebugProcessStarter类代码示例

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


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

示例1: attachVirtualMachine

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(final RunProfileState state, final @NotNull ExecutionEnvironment env)
        throws ExecutionException
{

    return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter()
    {
        @NotNull
        public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException
        {
            WeaveRunnerCommandLine weaveRunnerCommandLine = (WeaveRunnerCommandLine) state;
            final String weaveFile = weaveRunnerCommandLine.getModel().getWeaveFile();
            final Project project = weaveRunnerCommandLine.getEnvironment().getProject();
            final VirtualFile projectFile = project.getBaseDir();
            final String path = project.getBasePath();
            final String relativePath = weaveFile.substring(path.length());
            final VirtualFile fileByRelativePath = projectFile.findFileByRelativePath(relativePath);
            final DebuggerClient localhost = new DebuggerClient(new WeaveDebuggerClientListener(session, fileByRelativePath), new TcpClientDebuggerProtocol("localhost", 6565));
            final ExecutionResult result = state.execute(env.getExecutor(), WeaveDebuggerRunner.this);
            new DebuggerConnector(localhost).start();
            return new WeaveDebugProcess(session, localhost, result);
        }
    }).getRunContentDescriptor();

}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:26,代码来源:WeaveDebuggerRunner.java

示例2: createSession

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected XDebugSession createSession(@NotNull RunProfileState state, @NotNull final ExecutionEnvironment environment)
  throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();

  final PythonCommandLineState pyState = (PythonCommandLineState)state;
  final ServerSocket serverSocket = PythonCommandLineState.createServerSocket();
  final int serverLocalPort = serverSocket.getLocalPort();
  RunProfile profile = environment.getRunProfile();
  final ExecutionResult result =
    pyState.execute(environment.getExecutor(), createCommandLinePatchers(environment.getProject(), pyState, profile, serverLocalPort));

  return XDebuggerManager.getInstance(environment.getProject()).
    startSession(environment, new XDebugProcessStarter() {
      @Override
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) {
        PyDebugProcess pyDebugProcess =
          createDebugProcess(session, serverSocket, result, pyState);

        createConsoleCommunicationAndSetupActions(environment.getProject(), result, pyDebugProcess, session);
        return pyDebugProcess;
      }
    });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:PyDebugRunner.java

示例3: createContentDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(final RunProfileState runProfileState, final ExecutionEnvironment environment) throws ExecutionException {
  final XDebugSession debugSession =
    XDebuggerManager.getInstance(environment.getProject()).startSession(environment, new XDebugProcessStarter() {
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
        ACTIVE.set(Boolean.TRUE);
        try {
          final XsltCommandLineState c = (XsltCommandLineState)runProfileState;
          final ExecutionResult result = runProfileState.execute(environment.getExecutor(), XsltDebuggerRunner.this);
          return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
        } finally {
          ACTIVE.remove();
        }
      }
    });
  return debugSession.getRunContentDescriptor();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:XsltDebuggerRunner.java

示例4: createDebugProcessStarter

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的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

示例5: createContentDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(Project project,
                                                       final RunProfileState runProfileState,
                                                       RunContentDescriptor contentToReuse,
                                                       final ExecutionEnvironment executionEnvironment) throws ExecutionException {
  final XDebugSession debugSession =
    XDebuggerManager.getInstance(project).startSession(this, executionEnvironment, contentToReuse, new XDebugProcessStarter() {
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
        ACTIVE.set(Boolean.TRUE);
        try {
          final XsltCommandLineState c = (XsltCommandLineState)runProfileState;
          final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XsltDebuggerRunner.this);
          return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
        } finally {
          ACTIVE.remove();
        }
      }
    });
  return debugSession.getRunContentDescriptor();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:XsltDebuggerRunner.java

示例6: getProcessStarter

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
private XDebugProcessStarter getProcessStarter(final RunProfileState runProfileState, final ExecutionEnvironment
        executionEnvironment) throws ExecutionException {
    int port = getAvailablePort();
    ((XQueryRunProfileState) runProfileState).setPort(port);
    return new XDebugProcessStarter() {
        @NotNull
        public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
            final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XQueryDebuggerRunner.this);
            XQueryDebugProcess.XQueryDebuggerIde debuggerIde = new XQueryDebugProcess.XQueryDebuggerIde(session, result.getProcessHandler());
            final DBGpIde dbgpIde = ide().withPort(port).withDebuggerIde(debuggerIde).build();
            dbgpIde.startListening();
            result.getProcessHandler().addProcessListener(new ProcessAdapter() {
                @Override
                public void processTerminated(ProcessEvent event) {
                    dbgpIde.stopListening();
                }
            });
            return new XQueryDebugProcess(session, result, dbgpIde);
        }
    };
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:22,代码来源:XQueryDebuggerRunner.java

示例7: createContentDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(final RunProfileState runProfileState, final ExecutionEnvironment executionEnvironment) throws ExecutionException
{
	Project project = executionEnvironment.getProject();
	final XDebugSession debugSession = XDebuggerManager.getInstance(project).startSession(executionEnvironment, new XDebugProcessStarter()
	{
		@Override
		@NotNull
		public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException
		{
			ACTIVE.set(Boolean.TRUE);
			try
			{
				final XsltCommandLineState c = (XsltCommandLineState) runProfileState;
				final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XsltDebuggerRunner.this);
				return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
			}
			finally
			{
				ACTIVE.remove();
			}
		}
	});
	return debugSession.getRunContentDescriptor();
}
 
开发者ID:consulo,项目名称:consulo-xslt,代码行数:25,代码来源:XsltDebuggerRunner.java

示例8: attachVirtualMachine

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
public RunContentDescriptor attachVirtualMachine(DebugUIEnvironment environment) throws ExecutionException {
  final DebugEnvironment modelEnvironment = environment.getEnvironment();
  final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(myProject).attachVirtualMachine(modelEnvironment);
  if (debuggerSession == null) {
    return null;
  }

  final DebugProcessImpl debugProcess = debuggerSession.getProcess();
  if (debugProcess.isDetached() || debugProcess.isDetaching()) {
    debuggerSession.dispose();
    return null;
  }
  if (modelEnvironment.isRemote()) {
    // optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
    // which is an expensive operation when executed first time
    debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
  }

  XDebugSession debugSession =
    XDebuggerManager.getInstance(myProject).startSessionAndShowTab(modelEnvironment.getSessionName(), environment.getReuseContent(), new XDebugProcessStarter() {
      @Override
      @NotNull
      public XDebugProcess start(@NotNull XDebugSession session) {
        return JavaDebugProcess.create(session, debuggerSession);
      }
    });
  return debugSession.getRunContentDescriptor();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:DebuggerPanelsManager.java

示例9: attachVirtualMachine

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(RunProfileState state,
                                                    @NotNull ExecutionEnvironment env,
                                                    RemoteConnection connection,
                                                    boolean pollConnection) throws ExecutionException {
  DebugEnvironment environment = new DefaultDebugEnvironment(env, state, connection, pollConnection);
  final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(env.getProject()).attachVirtualMachine(environment);
  if (debuggerSession == null) {
    return null;
  }

  final DebugProcessImpl debugProcess = debuggerSession.getProcess();
  if (debugProcess.isDetached() || debugProcess.isDetaching()) {
    debuggerSession.dispose();
    return null;
  }
  if (environment.isRemote()) {
    // optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
    // which is an expensive operation when executed first time
    debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
  }

  return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
    @Override
    @NotNull
    public XDebugProcess start(@NotNull XDebugSession session) {
      XDebugSessionImpl sessionImpl = (XDebugSessionImpl)session;
      ExecutionResult executionResult = debugProcess.getExecutionResult();
      sessionImpl.addExtraActions(executionResult.getActions());
      if (executionResult instanceof DefaultExecutionResult) {
        sessionImpl.addRestartActions(((DefaultExecutionResult)executionResult).getRestartActions());
        sessionImpl.addExtraStopActions(((DefaultExecutionResult)executionResult).getAdditionalStopActions());
      }
      return JavaDebugProcess.create(session, debuggerSession);
    }
  }).getRunContentDescriptor();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:GenericDebuggerRunner.java

示例10: attachVirtualMachine

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected DebuggerSession attachVirtualMachine(RunProfileState state,
                                               ExecutionEnvironment environment,
                                               RemoteConnection remoteConnection,
                                               boolean pollConnection) throws ExecutionException {
  final DebuggerSession debuggerSession =
    DebuggerManagerEx.getInstanceEx(myProject).attachVirtualMachine(new DefaultDebugEnvironment(environment, state, remoteConnection, pollConnection));
  XDebuggerManager.getInstance(myProject).startSession(environment, new XDebugProcessStarter() {
    @Override
    @NotNull
    public XDebugProcess start(@NotNull XDebugSession session) {
      return JavaDebugProcess.create(session, debuggerSession);
    }
  });
  return debuggerSession;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:DebuggerTestCase.java

示例11: doExecute

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull final ExecutionEnvironment environment) throws ExecutionException {
    RunContentDescriptor r = super.doExecute(state, environment);

    XDebuggerManager xDebuggerManager = XDebuggerManager.getInstance(environment.getProject());
    return xDebuggerManager.startSession(environment, new XDebugProcessStarter() {
        @NotNull
        @Override
        public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
            return new SquirrelDebugProcess(session, environment, r);
        }
    }).getRunContentDescriptor();
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:15,代码来源:SquirrelDebugRunner.java

示例12: attachVirtualMachine

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(RunProfileState state,
                                                    @NotNull ExecutionEnvironment env,
                                                    RemoteConnection connection,
                                                    boolean pollConnection) throws ExecutionException {
    DebugEnvironment environment = new DefaultDebugUIEnvironment(env, state, connection, pollConnection).getEnvironment();
    final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(env.getProject()).attachVirtualMachine(environment);
    if (debuggerSession == null) {
        return null;
    }

    final DebugProcessImpl debugProcess = debuggerSession.getProcess();
    if (debugProcess.isDetached() || debugProcess.isDetaching()) {
        debuggerSession.dispose();
        return null;
    }
    // optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
    // which is an expensive operation when executed first time
    debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);

    return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
        @Override
        @NotNull
        public XDebugProcess start(@NotNull XDebugSession session) {
            XDebugSessionImpl sessionImpl = (XDebugSessionImpl)session;
            ExecutionResult executionResult = debugProcess.getExecutionResult();
            sessionImpl.addExtraActions(executionResult.getActions());
            if (executionResult instanceof DefaultExecutionResult) {
                sessionImpl.addRestartActions(((DefaultExecutionResult)executionResult).getRestartActions());
                sessionImpl.addExtraStopActions(((DefaultExecutionResult)executionResult).getAdditionalStopActions());
            }
            return JavaDebugProcess.create(session, debuggerSession);
        }
    }).getRunContentDescriptor();
}
 
开发者ID:robovm,项目名称:robovm-idea,代码行数:36,代码来源:RoboVmRunner.java

示例13: getDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getDescriptor(final Module module,
                                                 ExecutionEnvironment env,
                                                 String urlToLaunch,
                                                 String flexSdkName) throws ExecutionException {
  final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
  if (flexSdk == null) {
    throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
  }

  final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, urlToLaunch);

  final XDebugSession debugSession =
    XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
        try {
          final FlashRunnerParameters params = new FlashRunnerParameters();
          params.setModuleName(module.getName());
          return new HaxeDebugProcess(session, bc, params);
        }
        catch (IOException e) {
          throw new ExecutionException(e.getMessage(), e);
        }
      }
    });

  return debugSession.getRunContentDescriptor();
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:29,代码来源:HaxeFlashDebuggingUtil.java

示例14: getNMEDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getNMEDescriptor(final HaxeDebugRunner runner,
                                                    final Module module,
                                                    final ExecutionEnvironment env,
                                                    final Executor executor, String flexSdkName) throws ExecutionException {
  final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
  if (flexSdk == null) {
    throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
  }

  final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, null);

  final XDebugSession debugSession =
    XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
        try {
          NMERunningState runningState = new NMERunningState(env, module, false, true);
          final ExecutionResult executionResult = runningState.execute(executor, runner);
          final BCBasedRunnerParameters params = new BCBasedRunnerParameters();
          params.setModuleName(module.getName());
          return new HaxeDebugProcess(session, bc, params);
        }
        catch (IOException e) {
          throw new ExecutionException(e.getMessage(), e);
        }
      }
    });

  return debugSession.getRunContentDescriptor();
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:31,代码来源:HaxeFlashDebuggingUtil.java

示例15: getOpenFLDescriptor

import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getOpenFLDescriptor(final HaxeDebugRunner runner,
                                                       final Module module,
                                                       final ExecutionEnvironment env,
                                                       final Executor executor, String flexSdkName) throws ExecutionException {
  final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
  if (flexSdk == null) {
    throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
  }

  final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, null);

  final XDebugSession debugSession =
    XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
      @NotNull
      public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
        try {
          OpenFLRunningState runningState = new OpenFLRunningState(env, module, true, true);
          final ExecutionResult executionResult = runningState.execute(executor, runner);
          final BCBasedRunnerParameters params = new BCBasedRunnerParameters();
          params.setModuleName(module.getName());
          return new HaxeDebugProcess(session, bc, params);
        }
        catch (IOException e) {
          throw new ExecutionException(e.getMessage(), e);
        }
      }
    });

  return debugSession.getRunContentDescriptor();
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:31,代码来源:HaxeFlashDebuggingUtil.java


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