@NotNull
  private static List<HighlightInfo> convertUnusedImportsToInfos(@NotNull List<? extends HighlightInfo> unusedDeclarations,
                                                                 @NotNull Set<? extends GrImportStatement> unusedImports) {
    List<HighlightInfo> infos = new ArrayList<>(unusedDeclarations);
    for (GrImportStatement unusedImport : unusedImports) {
      IntentionAction action = GroovyQuickFixFactory.getInstance().createOptimizeImportsFix(false);
      HighlightInfo info = HighlightInfo.newHighlightInfo(HighlightInfoType.UNUSED_SYMBOL).range(calculateRangeToUse(unusedImport))
        .descriptionAndTooltip(GroovyBundle.message("unused.import"))
        .registerFix(action, List.of(), null, null, null)
        .create();
      if (info != null) {
        infos.add(info);
      }
    }
    return infos;
  }
@NotNull
  private static List<HighlightInfo> convertUnusedImportsToInfos(@NotNull List<? extends HighlightInfo> unusedDeclarations,
                                                                 @NotNull Set<? extends GrImportStatement> unusedImports)