void () { super.onSuccess(); @Nullable ItemWithPresentation oneElement = getTheOnlyOneElement(); if (oneElement != null && oneElement.getItem() instanceof SmartPsiElementPointer<?> && navigateToElement(((SmartPsiElementPointer<?>)oneElement.getItem()).getElement())) { myPopup.cancel(); } }