void (@NotNull HintHint hintHint) { beforeShow(); IdeTooltip tooltip = new IdeTooltip(hintHint.getOriginalComponent(), hintHint.getOriginalPoint(), myComponent, hintHint, myComponent) { @Override protected boolean canAutohideOn(TooltipEvent event) { if (!LightweightHint.this.canAutoHideOn(event)) { return false; } else if (event.getInputEvent() instanceof MouseEvent) { return !(hintHint.isContentActive() && event.isIsEventInsideBalloon()); } else if (event.getAction() != null) { return false; } else { return true; } } @Override protected void onHidden() { fireHintHidden(); TooltipController.getInstance().resetCurrent(); } @Override public boolean canBeDismissedOnTimeout() { return false; } }.setToCenterIfSmall(hintHint.isMayCenterTooltip()) .setPreferredPosition(hintHint.getPreferredPosition()) .setHighlighterType(hintHint.isHighlighterType()) .setTextForeground(hintHint.getTextForeground()) .setTextBackground(hintHint.getTextBackground()) .setBorderColor(hintHint.getBorderColor()) .setBorderInsets(hintHint.getBorderInsets()) .setFont(hintHint.getTextFont()) .setCalloutShift(hintHint.getCalloutShift()) .setPositionChangeShift(hintHint.getPositionChangeX(), hintHint.getPositionChangeY()) .setExplicitClose(hintHint.isExplicitClose()) .setRequestFocus(hintHint.isRequestFocus()) .setHint(true); myComponent.validate(); Border border = hintHint.getComponentBorder(); if (border != null) { tooltip.setComponentBorder(border); } if (ExperimentalUI.isNewUI()) { tooltip.setPointerSize(JBUI.size(16, 8)).setPointerShiftedToStart(true); } myCurrentIdeTooltip = IdeTooltipManager.getInstance().show(tooltip, hintHint.isShowImmediately(), hintHint.isAnimationEnabled()); }