mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics: chameleons may not be expanded outside read action
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
package com.intellij.psi.impl.source.tree;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.ILazyParseableElementType;
|
||||
@@ -167,6 +168,8 @@ public class LazyParseableElement extends CompositeElement {
|
||||
LOG.error("Chameleons must not be parsed till they're in file tree");
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().assertReadAccessAllowed();
|
||||
|
||||
ILazyParseableElementType type = (ILazyParseableElementType)getElementType();
|
||||
ASTNode parsedNode = type.parseContents(this);
|
||||
myText = null;
|
||||
|
||||
Reference in New Issue
Block a user