IDEA-127197 Remote debug: easy way to change library used to display sources - only...
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 27 May 2015 14:42:51 +0000 (17:42 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 27 May 2015 14:48:58 +0000 (17:48 +0300)
java/debugger/impl/src/com/intellij/debugger/impl/DebuggerUtilsEx.java

index c645439010ee72c9ec575900459c51be91a7a8ab..740e2063b0498f99659f7e58c7f9649fa262780f 100644 (file)
@@ -47,6 +47,7 @@ import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.editor.markup.RangeHighlighter;
 import com.intellij.openapi.editor.markup.TextAttributes;
+import com.intellij.openapi.fileEditor.OpenFileDescriptor;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.StdFileTypes;
 import com.intellij.openapi.project.Project;
@@ -739,6 +740,9 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     @NotNull
     @Override
     public Navigatable createNavigatable(@NotNull Project project) {
+      if (ALTERNATIVE_SOURCE_KEY.get(myFile) != null) {
+        return new OpenFileDescriptor(project, getFile(), getLine(), 0);
+      }
       return XSourcePositionImpl.doCreateOpenFileDescriptor(project, this);
     }