Object (@NotNull DataProvider dataProvider) { Navigatable[] result = null; Object[] selection = PlatformCoreDataKeys.SELECTED_ITEMS.getData(dataProvider); if (selection != null) { List<Navigatable> res = ContainerUtil.filterIsInstance(selection, Navigatable.class); result = res.isEmpty() ? null : res.toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY); } if (result == null) { Navigatable element = CommonDataKeys.NAVIGATABLE.getData(dataProvider); result = element == null ? null : new Navigatable[]{element}; } if (result != null && EDT.isCurrentThreadEdt() && ContainerUtil.findInstance(result, PsiElement.class) != null && SlowOperations.isInSection(SlowOperations.FORCE_ASSERT)) { return null; // in precaching, the error is already reported } return result; }