private static void collectNamesToImport(final @NotNull List<ImportUtils.Import> names,
                                           final @NotNull Collection<String> demandedForNested,
                                           @NotNull XmlFile file) {
    file.accept(new JavaFxUsedClassesVisitor() {
      @Override
      protected void appendClassName(String fqn) {
        names.add(new ImportUtils.Import(fqn, false));
      }

      @Override
      protected void appendDemandedPackageName(@NotNull String packageName) {
        demandedForNested.add(packageName);
      }
    });
  }
private static void collectNamesToImport(final @NotNull List<ImportUtils.Import> names,
                                           final @NotNull Collection<String> demandedForNested,
                                           @NotNull XmlFile file)