mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inconsistent psi tree length diagnostics ( EA-53915 - assert: LowLevelSearchUtil.processElementsContainingWordInElement)
This commit is contained in:
@@ -165,10 +165,6 @@ public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi
|
||||
|
||||
@Override
|
||||
public void contentsSynchronized() {
|
||||
unsetPsiContent();
|
||||
}
|
||||
|
||||
private void unsetPsiContent() {
|
||||
if (!(myContent instanceof PsiFileContent)) return;
|
||||
setContent(new VirtualFileContent());
|
||||
}
|
||||
@@ -452,14 +448,18 @@ public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi
|
||||
}
|
||||
|
||||
private void setContent(@NotNull Content content) {
|
||||
// temporarily commented
|
||||
//if (myPhysical) {
|
||||
// final Content oldContent = myContent;
|
||||
// if (oldContent != null && content.getModificationStamp() != oldContent.getModificationStamp()) {
|
||||
// ApplicationManager.getApplication().assertWriteAccessAllowed();
|
||||
// }
|
||||
//}
|
||||
Content prevContent = myContent;
|
||||
myContent = content;
|
||||
if (prevContent instanceof PsiFileContent && content instanceof VirtualFileContent) {
|
||||
int fileLength = content.getText().length();
|
||||
for (FileElement fileElement : getKnownTreeRoots()) {
|
||||
int nodeLength = fileElement.getTextLength();
|
||||
if (nodeLength != fileLength) {
|
||||
LOG.error("Inconsistent " + fileElement.getElementType() + " tree in " + this + "; nodeLength=" + nodeLength + "; fileLength=" + fileLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@NonNls
|
||||
|
||||
Reference in New Issue
Block a user