public static Set<GroovyFile> collectFilesForProcessing(PsiElement @NotNull [] elements) {
    Set<GroovyFile> files = new HashSet<>();
    for (PsiElement element : elements) {
      PsiFile containingFile = element.getContainingFile();
      if (containingFile instanceof GroovyFile) {
        files.add((GroovyFile)containingFile);
      }
    }
    return files;
  }
public static Set<GroovyFile> collectFilesForProcessing(PsiElement @NotNull [] elements)