release the editor in a write-safe context (EA-90138 - assert: PsiDocumentManagerBase...
authorpeter <peter@jetbrains.com>
Fri, 4 Nov 2016 15:14:58 +0000 (16:14 +0100)
committerpeter <peter@jetbrains.com>
Fri, 4 Nov 2016 15:33:21 +0000 (16:33 +0100)
platform/platform-impl/src/com/intellij/ui/EditorTextField.java

index d516906618ec49251eaa2edbe8b81dfbf9e2d9d6..a7da48ca76f2db486abdad482a4a67351038f2cc 100644 (file)
@@ -404,7 +404,7 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
     // and only then execute another removal from the hierarchy. Otherwise
     // swing goes nuts because of nested removals and indices get corrupted
     EditorEx editor = myEditor;
-    SwingUtilities.invokeLater(() -> releaseEditor(editor));
+    ApplicationManager.getApplication().invokeLater(() -> releaseEditor(editor));
     myEditor = null;
   }