boolean (GrListOrMap list) { PsiElement parent = list.getParent(); GrControlFlowOwner owner = ControlFlowUtils.findControlFlowOwner(list); if (!(owner instanceof GrOpenBlock && owner.getParent() instanceof GrMethod)) return false; if (!(parent instanceof GrReturnStatement || ControlFlowUtils.isReturnValue(list, owner))) return false; PsiType type = ((GrMethod)owner.getParent()).getReturnType(); return type instanceof PsiArrayType; }