IdeTooltip (final IdeTooltip tooltip, boolean now, final boolean animationEnabled) { myAlarm.cancelAllRequests(); hideCurrent(null, tooltip); myQueuedComponent = tooltip.getComponent(); myQueuedTooltip = tooltip; myShowRequest = () -> { if (myShowRequest == null) { return; } if (myQueuedComponent != tooltip.getComponent() || !tooltip.getComponent().isShowing()) { hideCurrent(null, tooltip, null, null, animationEnabled); return; } if (tooltip.beforeShow()) { doShow(tooltip, animationEnabled); } else { hideCurrent(null, tooltip, null, null, animationEnabled); } }; if (now) { myShowRequest.run(); } else { myAlarm.addRequest(myShowRequest, myShowDelay ? tooltip.getShowDelay() : tooltip.getInitialReshowDelay()); } return tooltip; }