mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
smart step into an anonymous class while debugging decompiled code
This commit is contained in:
@@ -363,7 +363,7 @@ public class PositionManagerImpl implements PositionManager {
|
||||
continue;
|
||||
}
|
||||
int locationLine = lnumber - 1;
|
||||
PsiFile psiFile = position.getFile();
|
||||
PsiFile psiFile = position.getFile().getOriginalFile();
|
||||
if (psiFile instanceof PsiCompiledFile) {
|
||||
locationLine = bytecodeToSourceLine(psiFile, locationLine);
|
||||
if (locationLine < 0) continue;
|
||||
|
||||
@@ -168,6 +168,9 @@ public abstract class SourcePosition implements Navigatable{
|
||||
Document document = null;
|
||||
try {
|
||||
document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);
|
||||
if (document == null) { // may be decompiled psi - try to get document for the original file
|
||||
document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file.getOriginalFile());
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
|
||||
Reference in New Issue
Block a user