@Override protected String stubTreeAndIndexDoNotMatch( StubTree stubTree, PsiFileWithStubSupport psiFile, List<StubElement<?>> plained, VirtualFile virtualFile, StubTree stubTreeFromIndex) { String details = "Please report the problem to JetBrains with the file attached"; details += "\npsiFile" + psiFile; details += "\npsiFile.class" + psiFile.getClass(); details += "\npsiFile.lang" + psiFile.getLanguage(); String fileText = psiFile instanceof PsiCompiledElement ? "compiled" : psiFile.getText(); return LogMessageEx.createEvent( "PSI and index do not match", details, new Attachment( virtualFile != null ? virtualFile.getPath() + "_file.txt" : "vFile.txt", fileText), new Attachment("stubTree.txt", ((PsiFileStubImpl) stubTree.getRoot()).printTree()), new Attachment( "stubTreeFromIndex.txt", stubTreeFromIndex == null ? "null" : ((PsiFileStubImpl) stubTreeFromIndex.getRoot()).printTree())) .toString(); }