void () { super.addNotify(); if (ComponentUtil.findParentByCondition(this, it -> ClientProperty.isTrue(it, ToolWindowPane.TEMPORARY_ADDED)) != null) { return; } if (!myUiLastStateWasRestored && myOriginal == null) { myUiLastStateWasRestored = true; // [kirillk] this is done later since restoreUiState doesn't work properly in the addNotify call chain //todo to investigate and to fix (may cause extra flickering) //noinspection SSBasedInspection SwingUtilities.invokeLater(() -> restoreLastUiState().doWhenDone(() -> { if (!myWasEverAdded) { myWasEverAdded = true; attractOnStartup(); myInitialized.setDone(); } })); } }