@Override
  public Object @NotNull [] getChildElements(@NotNull Object element) {
    final AntConfiguration configuration = AntConfiguration.getInstance(myProject);
    if (element == myRoot) {
      if (!configuration.isInitialized()) {
        return new Object[] {AntBundle.message("progress.text.loading.ant.config")};
      }
      return configuration.getBuildFiles();
    }

    if (element instanceof AntBuildFile buildFile) {
      final AntBuildModel model = buildFile.getModel();

      final List<AntBuildTarget> targets =
        new ArrayList<>(Arrays.asList(myFilteredTargets ? model.getFilteredTargets() : model.getTargets()));
      targets.sort(ourTargetComparator);

      final List<AntBuildTarget> metaTargets = Arrays.asList(configuration.getMetaTargets(buildFile));
      metaTargets.sort(ourTargetComparator);
      targets.addAll(metaTargets);

      return targets.toArray(new AntBuildTarget[0]);
    }

    return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
  }
@Override
  public Object @NotNull [] getChildElements(@NotNull Object element)