private void registerFixes(GrReferenceElement<?> ref, GroovyResolveResult result, @NotNull HighlightInfo.Builder info,
                             @NotNull HighlightSeverity severity) {
    PsiElement element = result.getElement();
    assert element != null;
    if (element instanceof LightElement) return;
    LocalQuickFix[] fixes = buildFixes(ref, result);
    if (fixes.length == 0) {
      String displayName = HighlightDisplayKey.getDisplayNameByKey(myDisplayKey);
      if (displayName != null) {
        IntentionAction action = new EmptyIntentionAction(displayName);
        info.registerFix(action, null, HighlightDisplayKey.getDisplayNameByKey(myDisplayKey), null, myDisplayKey);
      }
    }
    else {
      ProblemDescriptor descriptor = InspectionManager.getInstance(ref.getProject()).
        createProblemDescriptor(element, element, "", HighlightInfo.convertSeverityToProblemHighlight(severity), true,
                                fixes);
      for (int i = 0; i < fixes.length; i++) {
        IntentionAction action = QuickFixWrapper.wrap(descriptor, i);
        info.registerFix(action, null, HighlightDisplayKey.getDisplayNameByKey(myDisplayKey), null, myDisplayKey);
      }
    }
  }
private void registerFixes(GrReferenceElement<?> ref, GroovyResolveResult result, @NotNull HighlightInfo.Builder info,
                             @NotNull HighlightSeverity severity)