| // Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. |
| |
| package org.jetbrains.plugins.grails; |
| |
| import com.intellij.DynamicBundle; |
| import org.jetbrains.annotations.Nls; |
| import org.jetbrains.annotations.NotNull; |
| import org.jetbrains.annotations.PropertyKey; |
| |
| import java.util.function.Supplier; |
| |
| public final class GrailsBundle { |
| public static final String BUNDLE = "messages.GrailsBundle"; |
| |
| private static final DynamicBundle INSTANCE = new DynamicBundle(GrailsBundle.class, BUNDLE); |
| |
| private GrailsBundle() {} |
| |
| public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { |
| return INSTANCE.getMessage(key, params); |
| } |
| |
| public static @NotNull Supplier<@Nls String> messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { |
| return INSTANCE.getLazyMessage(key, params); |
| } |
| } |