private void reparseByTextIfNeeded(@NotNull FileViewProvider viewProvider, @NotNull Document document) {
    if (PsiDocumentManager.getInstance(myProject).isCommitted(document)) {
      Set<PsiFile> rootsToReparse = new HashSet<>();
      for (ASTNode node : myContext.get().myRaisingCandidates.get(viewProvider)) {
        if (hasRaiseableEdgeChild(node)) { // check again because AST might be changed again and there's no need to reparse child now
          ContainerUtil.addIfNotNull(rootsToReparse, SharedImplUtil.getContainingFile(node));
        }
      }

      for (PsiFile file : viewProvider.getAllFiles()) {
        if (file.getUserData(REPARSE_PENDING) != null || rootsToReparse.contains(file)) {
          ((PsiDocumentManagerBase)PsiDocumentManager.getInstance(myProject)).reparseFileFromText((PsiFileImpl)file);
          file.putUserData(REPARSE_PENDING, null);
        }
      }
    }
  }
private void reparseByTextIfNeeded(@NotNull FileViewProvider viewProvider, @NotNull Document document)