void (boolean ok) { if (isVisible()) { if (myIsRealPopup) { if (ok) { myPopup.closeOk(null); } else { myPopup.cancel(); } myPopup = null; } else { if (myCurrentIdeTooltip != null) { IdeTooltip tooltip = myCurrentIdeTooltip; myCurrentIdeTooltip = null; tooltip.hide(); } else { JRootPane rootPane = myComponent.getRootPane(); JLayeredPane layeredPane = rootPane == null ? null : rootPane.getLayeredPane(); if (layeredPane != null) { Rectangle bounds = myComponent.getBounds(); layeredPane.remove(myComponent); layeredPane.paintImmediately(bounds.x, bounds.y, bounds.width, bounds.height); } } } } if (myEscListener != null) { myComponent.unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0)); } TooltipController.getInstance().hide(this); myShouldReopenPopup = false; fireHintHidden(); }