mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplified DebuggerContextImpl
This commit is contained in:
@@ -709,6 +709,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
return myExecutionResult;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Project getProject() {
|
||||
return myProject;
|
||||
|
||||
@@ -49,7 +49,6 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
|
||||
@Nullable
|
||||
private final DebuggerSession myDebuggerSession;
|
||||
private final DebugProcessImpl myDebugProcess;
|
||||
private final SuspendContextImpl mySuspendContext;
|
||||
private final ThreadReferenceProxyImpl myThreadProxy;
|
||||
|
||||
@@ -58,7 +57,6 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
private PsiElement myContextElement;
|
||||
|
||||
private DebuggerContextImpl(@Nullable DebuggerSession session,
|
||||
@Nullable DebugProcessImpl debugProcess,
|
||||
@Nullable SuspendContextImpl context,
|
||||
ThreadReferenceProxyImpl threadProxy,
|
||||
StackFrameProxyImpl frameProxy,
|
||||
@@ -66,11 +64,9 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
PsiElement contextElement,
|
||||
boolean initialized) {
|
||||
LOG.assertTrue(frameProxy == null || threadProxy == null || threadProxy == frameProxy.threadProxy());
|
||||
LOG.assertTrue(debugProcess != null || frameProxy == null && threadProxy == null);
|
||||
myDebuggerSession = session;
|
||||
myThreadProxy = threadProxy;
|
||||
myFrameProxy = frameProxy;
|
||||
myDebugProcess = debugProcess;
|
||||
mySourcePosition = position;
|
||||
mySuspendContext = context;
|
||||
myContextElement = contextElement;
|
||||
@@ -85,7 +81,7 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
@Nullable
|
||||
@Override
|
||||
public DebugProcessImpl getDebugProcess() {
|
||||
return myDebugProcess;
|
||||
return myDebuggerSession != null ? myDebuggerSession.getProcess() : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -100,7 +96,7 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
|
||||
@Override
|
||||
public Project getProject() {
|
||||
return myDebugProcess != null ? myDebugProcess.getProject() : null;
|
||||
return myDebuggerSession != null ? myDebuggerSession.getProject() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +147,7 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
ThreadReferenceProxyImpl threadProxy,
|
||||
StackFrameProxyImpl frameProxy) {
|
||||
LOG.assertTrue(frameProxy == null || threadProxy == null || threadProxy == frameProxy.threadProxy());
|
||||
return new DebuggerContextImpl(session, session != null ? session.getProcess() : null, context, threadProxy, frameProxy, null, null, context == null);
|
||||
return new DebuggerContextImpl(session, context, threadProxy, frameProxy, null, null, context == null);
|
||||
}
|
||||
|
||||
public void initCaches() {
|
||||
|
||||
Reference in New Issue
Block a user