public static String indexedMessage(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) { StringBuilder sb = new StringBuilder(); String sep = ""; int index = 0; while (true) { String message = messageOrNull(BUNDLE, index++ > 0 ? String.format("%s-%d", key, index) : key, params); if (message == null) { if (index > 0) break; } else { sb.append(sep).append(message); sep = "\n"; } } return sb.toString(); }
public static String getPresentableName(@NotNull FindModel.SearchContext searchContext) { @PropertyKey(resourceBundle = "messages.FindBundle") String messageKey = null; if (searchContext == FindModel.SearchContext.ANY) { messageKey = "find.context.anywhere.scope.label"; } else if (searchContext == FindModel.SearchContext.EXCEPT_COMMENTS) { messageKey = "find.context.except.comments.scope.label"; } else if (searchContext == FindModel.SearchContext.EXCEPT_STRING_LITERALS) { messageKey = "find.context.except.literals.scope.label"; } else if (searchContext == FindModel.SearchContext.EXCEPT_COMMENTS_AND_STRING_LITERALS) { messageKey = "find.context.except.comments.and.literals.scope.label"; } else if (searchContext == FindModel.SearchContext.IN_COMMENTS) { messageKey = "find.context.in.comments.scope.label"; } else if (searchContext == FindModel.SearchContext.IN_STRING_LITERALS) { messageKey = "find.context.in.literals.scope.label"; } return messageKey != null ? FindBundle.message(messageKey) : searchContext.toString(); }
public static String getValue (@PropertyKey(resourceBundle = BUNDLE_PATH) String key, Object... params) { String value = bundle.getString(key); if (params.length > 0) { return MessageFormat.format(value, params); } return value; }
public static synchronized String translate(@PropertyKey(resourceBundle = BUNDLE) String tag, Object... arguments) { final Locale locale = Locale.getDefault(); final ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE, locale); String value; try { value = bundle.getString(tag); if (value.trim().length() == 0) { value = tag; } if (arguments != null && arguments.length > 0) { value = formatValue(locale, value, tag, arguments); } } catch (MissingResourceException ignored) { value = tag; if (arguments != null && arguments.length > 0) { value = formatValue(locale, value, tag, arguments); } } if (value != null) { value = value.trim(); } return value; }
CreateXmlElementIntentionAction( @PropertyKey(resourceBundle = XmlBundle.PATH_TO_BUNDLE) String messageKey, @NonNls @NotNull String declarationTagName, TypeOrElementOrAttributeReference ref) { myMessageKey = messageKey; myRef = ref; myDeclarationTagName = declarationTagName; }
public static boolean expectOrError(PsiBuilder builder, TokenSet expected, @PropertyKey(resourceBundle = JavaErrorMessages.BUNDLE) String key) { if (!PsiBuilderUtil.expect(builder, expected)) { error(builder, JavaErrorMessages.message(key)); return false; } return true; }
public static boolean expectOrError(PsiBuilder builder, IElementType expected, @PropertyKey(resourceBundle = JavaErrorMessages.BUNDLE) String key) { if (!PsiBuilderUtil.expect(builder, expected)) { error(builder, JavaErrorMessages.message(key)); return false; } return true; }
ComponentType(Class<? extends BaseComponent> clazz, @NonNls String name, @PropertyKey(resourceBundle = "org.jetbrains.idea.devkit.DevKitBundle") String propertyKey) { myPropertyKey = propertyKey; myClassName = clazz.getName(); myName = name; }
public static boolean is(@PropertyKey(resourceBundle = REGISTRY_BUNDLE) @NotNull String key, boolean defaultValue) { try { return get(key).asBoolean(); } catch (MissingResourceException ex) { return defaultValue; } }
public AddDtdDeclarationFix( @PropertyKey(resourceBundle = XmlBundle.PATH_TO_BUNDLE) String messageKey, @NotNull String elementDeclarationName, @NotNull PsiReference reference) { myMessageKey = messageKey; myElementDeclarationName = elementDeclarationName; myReference = reference.getCanonicalText(); }
@Nonnull @CheckReturnValue public String message(@Nonnull @PropertyKey(resourceBundle = BUNDLE) String key, @Nonnull Object... objects) { return getMessage(key, objects); }
@Nonnull @CheckReturnValue private JRadioButtonFixture findRadioButtonByName(@Nonnull @PropertyKey(resourceBundle = "messages.Json2Java4IdeaBundle") String key) { return window.radioButton(bundle.message(key)); }
@Nonnull @CheckReturnValue private JTextComponentFixture findTextFieldByName(@Nonnull @PropertyKey(resourceBundle = "messages.Json2Java4IdeaBundle") String key) { return window.textBox(bundle.message(key)); }
@NotNull public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) { return CommonBundle.message(BUNDLE, key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = "de.halirutan.keypromoterx.messages.KeyPromoterBundle") String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) { return INSTANCE.getMessage(key, params); }
public static String message( @PropertyKey(resourceBundle = BUNDLE) String key, Object... params ) { return CommonBundle.message( ResourceBundle.getBundle( BUNDLE ), key, params ); }
public static String message(@NotNull @PropertyKey(resourceBundle = "main.resource.Messages") String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@PropertyKey(resourceBundle = BUNDLE) String key, Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) { return Holder.INSTANCE.getMessage(key, params); }
public static String message(@PropertyKey(resourceBundle = "com.sylvanaar.idea.errorreporting.PluginErrorReportSubmitterBundle") String key, Object... params) { return CommonBundle.message(OUR_BUNDLE, key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull @Nullable Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) { return CommonBundle.message(BUNDLE, key, params); }
public static String messageOrBlank(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) { return CommonBundle.messageOrDefault(BUNDLE, key, "", params); }
public static String getString(@PropertyKey(resourceBundle = BUNDLE) final String key) { return getBundle().getString(key); }
public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, @NotNull Object... params) { return INSTANCE.internalMessage(key, params); }
public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); }
public static String message(@org.jetbrains.annotations.NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @org.jetbrains.annotations.NotNull Object... params) { return ""; }
Feature(@NotNull LanguageLevel level, @NotNull @PropertyKey(resourceBundle = JavaErrorMessages.BUNDLE) String key) { this.level = level; this.key = key; }
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE_NAME) String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); }