本文整理汇总了Java中com.intellij.xdebugger.XDebugProcess类的典型用法代码示例。如果您正苦于以下问题:Java XDebugProcess类的具体用法?Java XDebugProcess怎么用?Java XDebugProcess使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XDebugProcess类属于com.intellij.xdebugger包,在下文中一共展示了XDebugProcess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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();
}
示例2: clear
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Override
protected void clear() {
XDebuggerTree tree = getTree();
tree.setSourcePosition(null);
clearInlineData(tree);
XDebuggerTreeNode node;
XDebugSession session = getSession(getPanel());
if (session == null || (!session.isStopped() && session.isPaused())) {
node = createInfoMessage(tree, "Frame is not available");
}
else {
XDebugProcess debugProcess = session.getDebugProcess();
node = createInfoMessage(tree, debugProcess.getCurrentStateMessage(), debugProcess.getCurrentStateHyperlinkListener());
}
tree.setRoot(node, true);
super.clear();
}
示例3: createSession
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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;
}
});
}
示例4: createContentDescriptor
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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();
}
示例5: createDebugProcessStarter
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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)
);
}
};
}
示例6: createContentDescriptor
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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();
}
示例7: getProcessStarter
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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);
}
};
}
示例8: startSession
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
private XDebugSessionImpl startSession(@Nullable RunContentDescriptor contentToReuse,
@Nonnull consulo.xdebugger.XDebugProcessStarter processStarter,
@Nonnull XDebugSessionImpl session) throws ExecutionException {
XDebugProcess process = processStarter.start(session);
myProject.getMessageBus().syncPublisher(TOPIC).processStarted(process);
// Perform custom configuration of session data for XDebugProcessConfiguratorStarter classes
if (processStarter instanceof XDebugProcessConfiguratorStarter) {
session.activateSession();
((XDebugProcessConfiguratorStarter)processStarter).configure(session.getSessionData());
}
session.init(process, contentToReuse);
mySessions.put(session.getDebugProcess().getProcessHandler(), session);
return session;
}
示例9: createContentDescriptor
import com.intellij.xdebugger.XDebugProcess; //导入依赖的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();
}
示例10: getCurrentDebugProcess
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Nullable
private static DebugProcessImpl getCurrentDebugProcess(@Nullable Project project)
{
if(project != null)
{
XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
if(session != null)
{
XDebugProcess process = session.getDebugProcess();
if(process instanceof JavaDebugProcess)
{
return ((JavaDebugProcess) process).getDebuggerSession().getProcess();
}
}
}
return null;
}
示例11: ContextAwareDebugProcess
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
public ContextAwareDebugProcess(@NotNull XDebugSession session, ProcessHandler processHandler, Map<String, XDebugProcess> debugProcesses, String defaultContext) {
super(session);
this.processHandler = processHandler;
this.debugProcesses = debugProcesses;
this.currentContext = defaultContext;
this.defaultContext = defaultContext;
}
示例12: getBreakpointHandlers
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Override
@NotNull
public XBreakpointHandler<?>[] getBreakpointHandlers() {
List<XBreakpointHandler> breakpointHandlers = new ArrayList<>();
final Collection<XDebugProcess> values = debugProcesses.values();
for (XDebugProcess value : values) {
breakpointHandlers.addAll(Arrays.asList(value.getBreakpointHandlers()));
}
return breakpointHandlers.toArray(new XBreakpointHandler[breakpointHandlers.size()]);
}
示例13: stop
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Override
public void stop() {
final Collection<XDebugProcess> values = debugProcesses.values();
for (XDebugProcess value : values) {
value.stop();
}
}
示例14: stopAsync
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Override
@NotNull
public Promise stopAsync() {
final Collection<XDebugProcess> values = debugProcesses.values();
for (XDebugProcess value : values) {
value.stopAsync();
}
return getDefaultDebugProcesses().stopAsync();
}
示例15: registerAdditionalActions
import com.intellij.xdebugger.XDebugProcess; //导入依赖的package包/类
@Override
public void registerAdditionalActions(@NotNull DefaultActionGroup leftToolbar, @NotNull DefaultActionGroup topToolbar, @NotNull DefaultActionGroup settings) {
final Collection<XDebugProcess> values = debugProcesses.values();
for (XDebugProcess value : values) {
value.registerAdditionalActions(leftToolbar, topToolbar, settings);
}
}