use of com.intellij.pom.tree.TreeAspectEvent in project intellij-community by JetBrains.
the class PomModelImpl method reparseFile.
@Nullable
private Runnable reparseFile(@NotNull final PsiFile file, @NotNull FileElement treeElement, @NotNull CharSequence newText) {
TextRange changedPsiRange = DocumentCommitThread.getChangedPsiRange(file, treeElement, newText);
if (changedPsiRange == null)
return null;
Runnable reparseLeaf = tryReparseOneLeaf(treeElement, newText, changedPsiRange);
if (reparseLeaf != null)
return reparseLeaf;
final DiffLog log = BlockSupport.getInstance(myProject).reparseRange(file, treeElement, changedPsiRange, newText, new EmptyProgressIndicator(), treeElement.getText());
return () -> runTransaction(new PomTransactionBase(file, getModelAspect(TreeAspect.class)) {
@Nullable
@Override
public PomModelEvent runInner() throws IncorrectOperationException {
return new TreeAspectEvent(PomModelImpl.this, log.performActualPsiChange(file));
}
});
}
Aggregations