use of org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessor in project intellij-community by JetBrains.
the class GdkMethodUtil method categoryIteration.
public static boolean categoryIteration(GrClosableBlock place, final PsiScopeProcessor processor, ResolveState state) {
if (!ResolveUtil.shouldProcessMethods(processor.getHint(ElementClassHint.KEY)) && !(processor instanceof GroovyResolverProcessor && ((GroovyResolverProcessor) processor).isPropertyResolve())) {
return true;
}
final GrMethodCall call = checkMethodCall(place, USE);
if (call == null)
return true;
final GrClosableBlock[] closures = call.getClosureArguments();
GrExpression[] args = call.getExpressionArguments();
if (!(placeEqualsSingleClosureArg(place, closures) || placeEqualsLastArg(place, args)))
return true;
if (!(call.resolveMethod() instanceof GrGdkMethod))
return true;
state = state.put(ClassHint.RESOLVE_CONTEXT, call);
if ((args.length == 1 || args.length == 2 && placeEqualsLastArg(place, args))) {
PsiType type = args[0].getType();
if (type instanceof GrTupleType) {
return processTypesFromTuple((GrTupleType) type, processor, state, place);
}
}
return processTypesFomArgs(args, processor, state, place);
}
Aggregations