void (@Nullable ToolWindowAnchor newState) { ToolWindowAnchor oldState = getEditorMode(); PropertiesComponent.getInstance(myProject).setValue(myEditorModeKey, newState == null ? "ToolWindow" : newState.toString()); if (oldState != null && newState != null) { runUpdateContent(myUpdateAnchorAction); } else if (newState != null) { removeListeners(); updateToolWindow(null); runUpdateContent(myCreateAction); } else { runUpdateContent(myDisposeAction); initListeners(); bindToDesigner(getActiveDesigner()); } }