EA-66438 - assert: BreakpointWithHighlighter.getPsiFile

This commit is contained in:
Egor.Ushakov
2015-03-16 19:53:28 +03:00
parent fade0c6a30
commit 1b0fee2899
3 changed files with 12 additions and 11 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -456,4 +456,13 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
myPackageName = packageName;
}
}
public String toString() {
return ApplicationManager.getApplication().runReadAction(new Computable<String>() {
@Override
public String compute() {
return getDescription();
}
});
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -320,10 +320,6 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return className;
}
public String toString() {
return getDescription();
}
@Override
public String getShortName() {
return getDisplayInfoInternal(false, 30);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -377,10 +377,6 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
}
}
public String toString() {
return getDescription();
}
public boolean isBodyAt(@NotNull Document document, int offset) {
PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document);
if(psiFile instanceof PsiJavaFile) {