boolean (GroovyClassDescriptor descriptor, ProcessingContext ctx) { PsiFile file = descriptor.getPlaceFile(); if (file instanceof GroovyFile && ((GroovyFile)file).isScript()) { return myScriptType.contains(getScriptTypeId((GroovyFile)file)); } return false; }