void (@NotNull Editor editor) { ThreadingAssertions.assertEventDispatchThread(); try { EditorFactoryEvent event = new EditorFactoryEvent(this, editor); myEditorFactoryEventDispatcher.getMulticaster().editorReleased(event); EP.forEachExtensionSafe(it -> it.editorReleased(event)); } finally { try { if (editor instanceof EditorImpl) { ((EditorImpl)editor).release(); } } finally { for (ClientEditorManager clientEditors : ClientEditorManager.getAllInstances()) { if (clientEditors.editorReleased(editor)) { if (LOG.isDebugEnabled()) { LOG.debug("number of Editors after release: " + clientEditors.editors().count()); } if (clientEditors != ClientEditorManager.getCurrentInstance()) { LOG.warn("Released editor didn't belong to current session"); } break; } } } } }