void (@NotNull Editor editor, @Nullable Boolean value) { ThreadingAssertions.assertEventDispatchThread(); boolean enabledBefore = isDocRenderingEnabled(editor); editor.putUserData(DOC_RENDER_ENABLED, value); boolean enabledAfter = isDocRenderingEnabled(editor); if (enabledAfter != enabledBefore) { resetEditorToDefaultState(editor); } }