@Override
  public PsiReference @NotNull [] getReferencesForInjectionHost(@NotNull UExpression element,
                                                                @NotNull PsiLanguageInjectionHost host,
                                                                @NotNull ProcessingContext context) {
    UExpression parent = StringFlowUtil.goUp(element, false, NlsInfo.factory());
    UElement gParent = parent.getUastParent();
    if (gParent instanceof UPolyadicExpression uPolyadicExpression &&
        uPolyadicExpression.getOperator() != UastBinaryOperator.ASSIGN &&
        (!(uPolyadicExpression instanceof UBinaryExpression) || ((UBinaryExpression)uPolyadicExpression).resolveOperator() == null)) {
      return PsiReference.EMPTY_ARRAY;
    }
    Object value = element.evaluate();
    if (!(value instanceof String text)) {
      return PsiReference.EMPTY_ARRAY;
    }
    if (text.indexOf('\n') != -1) {
      return PsiReference.EMPTY_ARRAY;
    }
    final String bundleName;
    final boolean soft;
    final Ref<UExpression> resourceBundleValue = Ref.create();
    if (JavaI18nUtil.mustBePropertyKey(element, resourceBundleValue)) {
      soft = false;
      UExpression resourceBundleName = resourceBundleValue.get();
      if (resourceBundleName != null) {
        final Object bundleValue = resourceBundleName.evaluate();
        bundleName = bundleValue == null ? null : bundleValue.toString();
      }
      else {
        bundleName = null;
      }
    }
    else {
      if (gParent instanceof UBinaryExpression) {
        return PsiReference.EMPTY_ARRAY;
      }
      soft = myDefaultSoft;
      bundleName = null;
    }
    PsiReference reference = new PropertyReference(text, host, bundleName, soft);
    return new PsiReference[]{reference};
  }
@Override
  public PsiReference @NotNull [] getReferencesForInjectionHost(@NotNull UExpression element,
                                                                @NotNull PsiLanguageInjectionHost host,
                                                                @NotNull ProcessingContext context)