@Override
  public PsiElement getGotoDeclarationTarget(@Nullable PsiElement element, Editor editor) {
    if (!(element instanceof LeafPsiElement)) return null;
    FoldRegion region = editor.getFoldingModel().getCollapsedRegionAtOffset(element.getTextRange().getStartOffset());
    if (region == null) return null;

    PsiElement editableElement = EditPropertyValueAction.getEditableElement(region);
    UElement uElement = UastContextKt.toUElement(editableElement);
    //case: "literalAnnotatedWithPropertyKey"
    if (uElement instanceof ULiteralExpression) {
      return JavaI18nUtil.resolveProperty((ULiteralExpression)uElement);
    }

    if (uElement instanceof UQualifiedReferenceExpression) {
      uElement = ((UQualifiedReferenceExpression)uElement).getSelector();
    }

    //case: MyBundle.message("literalAnnotatedWithPropertyKey", param1, param2)
    if (uElement instanceof UCallExpression call) {
      for (UExpression expression : call.getValueArguments()) {
        if (expression instanceof UInjectionHost injectionHost && PropertyFoldingBuilder.isI18nProperty(injectionHost)) {
          Property property = JavaI18nUtil.resolveProperty(expression);
          if (property != null) {
            return property;
          }
        }
      }
    }

    return null;
  }
@Override
  public PsiElement getGotoDeclarationTarget(@Nullable PsiElement element, Editor editor)