BaseInspectionVisitor () { return new BaseInspectionVisitor() { @Override public void visitFile(@NotNull GroovyFileBase file) { CompilerConfiguration configuration = CompilerConfiguration.getInstance(file.getProject()); if (configuration != null && !configuration.isResourceFile(file.getVirtualFile()) && fileSeemsToBeTypeCustomizer(file)) { final LocalQuickFix[] fixes = {new AddToResourceFix(file)}; final String message = GroovyBundle.message("type.customizer.is.not.marked.as.a.resource.file"); registerError(file, message, fixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); } } }; }