IDEA-148802 Java Scratch files debugging: debugger ignores breakpoints in module classes and doesn't show their sources

This commit is contained in:
Egor.Ushakov
2015-12-03 11:55:02 +03:00
parent a7b8276727
commit 7014f9fc68
2 changed files with 15 additions and 4 deletions
@@ -333,7 +333,7 @@ public class PositionManagerImpl implements PositionManager, MultiRequestPositio
}
@Nullable
protected PsiFile getPsiFileByLocation(final Project project, final Location location) {
protected PsiFile getPsiFileByLocation(final Project project, final Location location) throws NoDataException {
if (location == null) {
return null;
}
@@ -15,6 +15,7 @@
*/
package com.intellij.execution.scratch;
import com.intellij.debugger.NoDataException;
import com.intellij.debugger.engine.DebugProcessImpl;
import com.intellij.debugger.engine.PositionManagerImpl;
import com.intellij.openapi.project.Project;
@@ -40,9 +41,7 @@ public class JavaScratchPositionManager extends PositionManagerImpl{
myScratchFile = scratchFile;
}
@Nullable
@Override
protected PsiFile getPsiFileByLocation(Project project, Location location) {
private PsiFile getScratchPsiFileByLocation(Project project, Location location) {
if (location == null) {
return null;
}
@@ -78,4 +77,16 @@ public class JavaScratchPositionManager extends PositionManagerImpl{
return null;
}
@Nullable
@Override
protected PsiFile getPsiFileByLocation(Project project, Location location) throws NoDataException {
PsiFile file = getScratchPsiFileByLocation(project, location);
if (file != null) {
return file;
}
else {
throw NoDataException.INSTANCE;
}
}
}