public static Set<LightMethodBuilder> getAntTasks(PsiElement place) {
    final PsiFile file = place.getContainingFile();
    if (!(file instanceof GroovyFile)) {
      return Collections.emptySet();
    }

    return CachedValuesManager.getManager(file.getProject()).getCachedValue(file, GANT_METHODS, () -> {
      Map<String, Class<?>> antObjects = getAntObjects((GroovyFile)file);

      final Set<LightMethodBuilder> methods = new HashSet<>();

      final Project project = file.getProject();
      final PsiType mapType = TypesUtil.createType(GroovyCommonClassNames.JAVA_UTIL_LINKED_HASH_MAP, file);
      final PsiType stringType = TypesUtil.createType(CommonClassNames.JAVA_LANG_STRING, file);
      final PsiType closureType = TypesUtil.createType(GroovyCommonClassNames.GROOVY_LANG_CLOSURE, file);

      for (String name : antObjects.keySet()) {
        methods.addAll(AntBuilderMethod.methods(file, name, antObjects.get(name), mapType, stringType, closureType));
      }
      return CachedValueProvider.Result
        .create(methods, PsiModificationTracker.MODIFICATION_COUNT, ProjectRootManager.getInstance(project));
    }, false);
  }
public static Set<LightMethodBuilder> getAntTasks(PsiElement place)