@NotNull
  private static SortedSet<Integer> getPropertyValueParamsCount(@NotNull final UExpression expression,
                                                                @Nullable final String resourceBundleName) {
    final UInjectionHost injectionHost;
    if (expression instanceof UInjectionHost) {
      injectionHost = (UInjectionHost)expression;
    }
    else if (expression instanceof UReferenceExpression) {
      final PsiElement resolved = ((UReferenceExpression)expression).resolve();
      final PsiField field = resolved == null ? null : (PsiField)resolved;
      injectionHost =
        field != null && field.hasModifierProperty(PsiModifier.FINAL) && field.getInitializer() instanceof PsiLiteralExpression
        ? UastContextKt.toUElement(field.getInitializer(), UInjectionHost.class)
        : null;
    }
    else {
      injectionHost = null;
    }
    final TreeSet<Integer> paramsCount = new TreeSet<>();
    if (injectionHost == null) {
      return paramsCount;
    }
    for (PsiReference reference : UastLiteralUtils.getInjectedReferences(injectionHost)) {
      if (reference instanceof PsiPolyVariantReference) {
        for (ResolveResult result : ((PsiPolyVariantReference)reference).multiResolve(false)) {
          if (result.isValidResult() && result.getElement() instanceof IProperty) {
            try {
              final IProperty property = (IProperty)result.getElement();
              if (resourceBundleName != null) {
                final PsiFile file = property.getPropertiesFile().getContainingFile();
                if (!resourceBundleName.equals(BundleNameEvaluator.DEFAULT.evaluateBundleName(file))) {
                  continue;
                }
              }
              final String propertyValue = property.getValue();
              if (propertyValue == null) {
                continue;
              }
              paramsCount.add(getPropertyValuePlaceholdersCount(propertyValue));
            }
            catch (IllegalArgumentException ignored) {
            }
          }
        }
      }
    }
    return paramsCount;
  }
@NotNull
  private static SortedSet<Integer> getPropertyValueParamsCount(@NotNull final UExpression expression,
                                                                @Nullable final String resourceBundleName)