void (CompletionProcessEx indicator) { PsiFile psiFile = PsiUtilBase.getPsiFileInEditor(InjectedLanguageEditorUtil.getTopLevelEditor(indicator.getEditor()), indicator.getProject()); if (psiFile != null) { if (Registry.is("ide.check.stub.text.consistency") || ApplicationManager.getApplication().isUnitTestMode() && !ApplicationManagerEx.isInStressTest()) { StubTextInconsistencyException.checkStubTextConsistency(psiFile); if (PsiDocumentManager.getInstance(psiFile.getProject()).hasUncommitedDocuments()) { PsiDocumentManager.getInstance(psiFile.getProject()).commitAllDocuments(); StubTextInconsistencyException.checkStubTextConsistency(psiFile); } } } }