some fixes in editor showing for remote debug files
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Fri, 10 Dec 2010 17:07:35 +0000 (20:07 +0300)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Fri, 10 Dec 2010 17:07:35 +0000 (20:07 +0300)
platform/xdebugger-api/src/com/intellij/xdebugger/XDebugSession.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerManagerImpl.java

index f924a5fb70a4fc0c2f9b04feebb89e2adff8b510..f8010f52b2a17b06cac22c431fbe23b8d066c8f4 100644 (file)
 
 package com.intellij.xdebugger;
 
-import com.intellij.execution.ExecutionException;
-import com.intellij.execution.ui.RunContentDescriptor;
 import com.intellij.execution.configurations.RunProfile;
+import com.intellij.execution.ui.RunContentDescriptor;
 import com.intellij.openapi.project.Project;
 import com.intellij.xdebugger.breakpoints.XBreakpoint;
 import com.intellij.xdebugger.breakpoints.XLineBreakpoint;
-import com.intellij.xdebugger.frame.XSuspendContext;
 import com.intellij.xdebugger.frame.XStackFrame;
-import com.intellij.xdebugger.stepping.XSmartStepIntoVariant;
+import com.intellij.xdebugger.frame.XSuspendContext;
 import com.intellij.xdebugger.stepping.XSmartStepIntoHandler;
+import com.intellij.xdebugger.stepping.XSmartStepIntoVariant;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -64,6 +63,8 @@ public interface XDebugSession extends AbstractDebuggerSession {
   void pause();
   void resume();
 
+  void showExecutionPoint(XSourcePosition sourcePosition);
+
   void showExecutionPoint();
 
   void setCurrentStackFrame(@NotNull XStackFrame frame);
index b4765e42e86e76a73c809717ff8c427968bedb1f..8d66f86e78eeb4a0c9ae482d6d738650263004a7 100644 (file)
@@ -344,6 +344,12 @@ public class XDebugSessionImpl implements XDebugSession {
     myDispatcher.getMulticaster().sessionResumed();
   }
 
+  public void showExecutionPoint(XSourcePosition sourcePosition) {
+    XExecutionStack activeExecutionStack = mySuspendContext.getActiveExecutionStack();
+    boolean isTopFrame = activeExecutionStack != null && activeExecutionStack.getTopFrame() == myCurrentStackFrame;
+    myDebuggerManager.setActiveSession(this, sourcePosition, !isTopFrame);
+  }
+
   public void showExecutionPoint() {
     if (mySuspendContext != null) {
       XExecutionStack executionStack = mySuspendContext.getActiveExecutionStack();
index 3dc3c8af5c7395e3f37a2ebcfc0d47e0100714de..2b410768f79bb05fd273932c5dc2565d5ab0f34d 100644 (file)
@@ -68,7 +68,6 @@ public class XDebuggerManagerImpl extends XDebuggerManager implements ProjectCom
   private final ExecutionPointHighlighter myExecutionPointHighlighter;
   private XDebugSessionImpl myActiveSession;
 
-
   public XDebuggerManagerImpl(final Project project, final StartupManager startupManager, MessageBus messageBus) {
     myProject = project;
     myBreakpointManager = new XBreakpointManagerImpl(project, this, startupManager);