public static boolean checkMacros(final @NotNull Project project, final @NotNull Set<String> usedMacros) {
    PathMacros pathMacros = PathMacros.getInstance();
    usedMacros.removeAll(pathMacros.getSystemMacroNames());
    usedMacros.removeAll(pathMacros.getUserMacroNames());

    // try to lookup values in System properties
    String pathMacroSystemPrefix = "path.macro.";
    for (Iterator<String> it = usedMacros.iterator(); it.hasNext();) {
      String macro = it.next();
      String value = System.getProperty(pathMacroSystemPrefix + macro, null);
      if (value != null) {
        pathMacros.setMacro(macro, value);
        it.remove();
      }
    }

    if (usedMacros.isEmpty()) {
      // all macros in configuration files are defined
      return true;
    }

    // there are undefined macros, need to define them before loading components
    final boolean[] result = new boolean[1];
    WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(() -> result[0] = showMacrosConfigurationDialog(project, usedMacros), ModalityState.nonModal());
    return result[0];
  }
public static boolean checkMacros(final @NotNull Project project, final @NotNull Set<String> usedMacros)