Commit fd3ecff5 authored by peter's avatar peter
Browse files

stop live template if injected editor is gone (EA-139160 - ISE:...

stop live template if injected editor is gone (EA-139160 - ISE: ShortenFQNamesProcessor.processText)
parent 6343235c
Showing with 5 additions and 0 deletions
+5 -0
......@@ -34,6 +34,7 @@ import com.intellij.openapi.editor.markup.HighlighterLayer;
import com.intellij.openapi.editor.markup.HighlighterTargetArea;
import com.intellij.openapi.editor.markup.RangeHighlighter;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.fileEditor.impl.EditorWindow;
import com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.IndexNotReadyException;
......@@ -426,6 +427,10 @@ public class TemplateState implements Disposable {
LOG.assertTrue(myTemplateRange.isValid(), getRangesDebugInfo());
calcResults(false); //Fixed SCR #[vk500] : all variables should be recalced twice on start.
LOG.assertTrue(myTemplateRange.isValid(), getRangesDebugInfo());
if (myEditor instanceof EditorWindow && !((EditorWindow)myEditor).isValid()) {
finishTemplateEditing();
return;
}
doReformat();
int nextVariableNumber = getNextVariableNumber(-1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment