boolean (@NotNull Module module, @NotNull VirtualFile file, boolean isLibraryElement) { ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module); if (isLibraryElement) { OrderEntry orderEntry = moduleRootManager.getFileIndex().getOrderEntryForFile(file); return orderEntry instanceof JdkOrderEntry || orderEntry instanceof LibraryOrderEntry; } else { return moduleRootManager.getFileIndex().isInContent(file); } }