void (JBPopup popup) { boolean wasInStack = myStack.remove(popup); myPersistentPopups.remove(popup); if (wasInStack && myStack.isEmpty()) { if (ApplicationManager.getApplication() != null) { IdeEventQueue.getInstance().getPopupManager().remove(this); } } myAllPopups.remove(popup); }