private @NotNull TextAttributes tuneAttributesForLink(@NotNull TextAttributes attributes) {
    EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
    TextAttributes defaultText = globalScheme.getAttributes(HighlighterColors.TEXT);
    TextAttributes identifier = globalScheme.getAttributes(DefaultLanguageHighlighterColors.IDENTIFIER);

    if (!myIsSignatureGenerationInProgress &&
        (Objects.equals(attributes.getForegroundColor(), defaultText.getForegroundColor())
         || Objects.equals(attributes.getForegroundColor(), identifier.getForegroundColor()))) {
      TextAttributes tuned = attributes.clone();
      if (ApplicationManager.getApplication().isUnitTestMode()) {
        tuned.setForegroundColor(globalScheme.getAttributes(CodeInsightColors.HYPERLINK_ATTRIBUTES).getForegroundColor());
      }
      else {
        tuned.setForegroundColor(globalScheme.getColor(DefaultLanguageHighlighterColors.DOC_COMMENT_LINK));
      }
      return tuned;
    }
    return attributes;
  }
private @NotNull TextAttributes tuneAttributesForLink(@NotNull TextAttributes attributes)