public static @NlsSafe String expandMacrosInName(Tool tool, DataContext context) {
    String name = tool.getName();
    if (name != null && name.contains("$")) {
      try {
        return MacroManager.getInstance().expandMacrosInString(name, true, context);
      }
      catch (Macro.ExecutionCancelledException e) {
        LOG.info(e);
      }
    }
    return name;
  }
public static @NlsSafe String expandMacrosInName(Tool tool, DataContext context)