From 37a064255fc5f18d531ce6e58d79e103dae237f9 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Mon, 29 Jul 2013 13:52:02 +0200 Subject: [PATCH] avoid parsing during disposal of smart pointers --- .../com/intellij/psi/impl/smartPointers/FileElementInfo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/core-impl/src/com/intellij/psi/impl/smartPointers/FileElementInfo.java b/platform/core-impl/src/com/intellij/psi/impl/smartPointers/FileElementInfo.java index a9f5bb8d6e07..ee74a28b3b8b 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/smartPointers/FileElementInfo.java +++ b/platform/core-impl/src/com/intellij/psi/impl/smartPointers/FileElementInfo.java @@ -76,6 +76,10 @@ class FileElementInfo implements SmartPointerElementInfo { if (other instanceof FileElementInfo) { return Comparing.equal(myVirtualFile, ((FileElementInfo)other).myVirtualFile); } + if (other instanceof SelfElementInfo && ((SelfElementInfo)other).getSyncStartOffset() != 0) { + // SelfElementInfo need psi (parsing) for element restoration and apriori could not reference psi file + return false; + } return Comparing.equal(restoreElement(), other.restoreElement()); }