mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update LazyParseableElement children under a non-cancellable section after parsing
This commit is contained in:
@@ -23,6 +23,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Attachment;
|
||||
import com.intellij.openapi.diagnostic.LogUtil;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.util.Getter;
|
||||
import com.intellij.openapi.util.StaticGetter;
|
||||
import com.intellij.psi.impl.DebugUtil;
|
||||
@@ -222,15 +223,17 @@ public class LazyParseableElement extends CompositeElement {
|
||||
}
|
||||
|
||||
private void setChildren(@NotNull TreeElement parsedNode, @Nullable AstPath thisPath) {
|
||||
try {
|
||||
AstPath.cacheNodePaths(this, parsedNode, thisPath);
|
||||
TreeElement last = rawSetParents(parsedNode, this);
|
||||
super.setFirstChildNode(parsedNode);
|
||||
super.setLastChildNode(last);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error("Chameleon expansion may not be interrupted by exceptions", e);
|
||||
}
|
||||
ProgressManager.getInstance().executeNonCancelableSection(() -> {
|
||||
try {
|
||||
AstPath.cacheNodePaths(this, parsedNode, thisPath);
|
||||
TreeElement last = rawSetParents(parsedNode, this);
|
||||
super.setFirstChildNode(parsedNode);
|
||||
super.setLastChildNode(last);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error("Chameleon expansion may not be interrupted by exceptions", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user