void (MouseEvent e, PsiElement element) { Optional.ofNullable(JavaModuleGraphUtil.findDescriptorByElement(element)) .map(this::findTargetReference) .filter(NavigationItem.class::isInstance) .map(NavigationItem.class::cast) .ifPresent(item -> item.navigate(true)); }