public static IPsiFile GetPsiFile(IPsiSourceFile sourceFile) { PsiManager manager = PsiManager.GetInstance(sourceFile.GetSolution()); manager.AssertAllDocumentAreCommited(); return(manager.GetPsiFile <PsiLanguage>(new DocumentRange(sourceFile.Document, 0)) as IPsiFile); }