mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't decompile code when reporting stub/AST mismatch (IDEA-175646)
This commit is contained in:
@@ -72,7 +72,8 @@ public abstract class StubTreeLoader {
|
||||
public RuntimeException stubTreeAndIndexDoNotMatch(@NotNull String _message, @NotNull ObjectStubTree stubTree, @NotNull PsiFileWithStubSupport psiFile) {
|
||||
VirtualFile file = psiFile.getViewProvider().getVirtualFile();
|
||||
StubTree stubTreeFromIndex = (StubTree)readFromVFile(psiFile.getProject(), file);
|
||||
Document document = FileDocumentManager.getInstance().getDocument(file);
|
||||
boolean compiled = psiFile instanceof PsiCompiledElement;
|
||||
Document document = compiled ? null : FileDocumentManager.getInstance().getDocument(file);
|
||||
IndexingStampInfo indexingStampInfo = getIndexingStampInfo(file);
|
||||
boolean upToDate = indexingStampInfo != null && indexingStampInfo.isUpToDate(document, file, psiFile);
|
||||
|
||||
@@ -86,7 +87,7 @@ public abstract class StubTreeLoader {
|
||||
msg += ", file.lang=" + psiFile.getLanguage();
|
||||
msg += ", modStamp=" + psiFile.getModificationStamp();
|
||||
|
||||
if (!(psiFile instanceof PsiCompiledElement)) {
|
||||
if (!compiled) {
|
||||
String text = psiFile.getText();
|
||||
PsiFile fromText = PsiFileFactory.getInstance(psiFile.getProject()).createFileFromText(psiFile.getName(), psiFile.getFileType(), text);
|
||||
if (fromText.getLanguage().equals(psiFile.getLanguage())) {
|
||||
|
||||
Reference in New Issue
Block a user