GlobalSearchScope (@NotNull GroovyFile script, @NotNull GlobalSearchScope scope) { GroovyScriptType scriptType = getScriptType(script); return scriptType == null ? scope : scriptType.patchResolveScope(script, scope); }