mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remember PsiAnchor creation mod count for invalidity diagnostisc
This commit is contained in:
@@ -379,6 +379,7 @@ public abstract class PsiAnchor {
|
||||
private final int myIndex;
|
||||
private final Language myLanguage;
|
||||
private final IStubElementType myElementType;
|
||||
private final long myCreationModCount;
|
||||
|
||||
public StubIndexReference(@NotNull final PsiFile file, final int index, @NotNull Language language, IStubElementType elementType) {
|
||||
myLanguage = language;
|
||||
@@ -386,6 +387,7 @@ public abstract class PsiAnchor {
|
||||
myVirtualFile = file.getVirtualFile();
|
||||
myProject = file.getProject();
|
||||
myIndex = index;
|
||||
myCreationModCount = file.getManager().getModificationTracker().getModificationCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -425,7 +427,9 @@ public abstract class PsiAnchor {
|
||||
return "No diagnostics, element=" + element + "@" + (element == null ? 0 : System.identityHashCode(element));
|
||||
}
|
||||
catch (AssertionError e) {
|
||||
return e.getMessage();
|
||||
return e.getMessage() +
|
||||
"; current modCount=" + PsiManager.getInstance(getProject()).getModificationTracker().getModificationCount() +
|
||||
"; creation modCount=" + myCreationModCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user