boolean (@NotNull VirtualFile file, @NotNull Project project, @Nullable NamedScopesHolder holder) { ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex(); if (!matchesScope(file, project, fileIndex)) { return false; } if (myPattern == null) { return true; } String packageName = getPackageName(file, project); return packageName != null && myPattern.matcher(packageName).matches(); }