void (@Nullable AnActionEvent e) { Navigatable[] navigatables = e != null ? e.getData(CommonDataKeys.NAVIGATABLE_ARRAY) : null; if (navigatables != null) { if (canBeClosed()) { myDialog.doCancelAction(); } OpenSourceUtil.navigate(navigatables); return; } Map<Integer, Usage> usages = getSelectedUsages(); if (usages != null) { if (canBeClosed()) { myDialog.doCancelAction(); } boolean first = true; for (Usage usage : usages.values()) { if (first) { usage.navigate(true); } else { usage.highlightInEditor(); } first = false; } } }