boolean (PsiElement element, final @NotNull Project project) { final VirtualFile file = PsiUtilCore.getVirtualFile(element); if (file != null) { List<OrderEntry> orderEntries = ProjectRootManager.getInstance(project).getFileIndex().getOrderEntriesForFile(file); if (!orderEntries.isEmpty() && orderEntries.get(0) instanceof JdkOrderEntry) { return true; } } return false; }