mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
j2ee+friends
GitOrigin-RevId: 87311a766a0c9365c0c0e6eedbb4a5ec7d7c323a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4da249a31a
commit
20fff61d3a
@@ -15,35 +15,19 @@
|
||||
*/
|
||||
package org.jetbrains.plugins.gradle.codeInspection;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.DynamicBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.ResourceBundle;
|
||||
public class GradleInspectionBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "i18n.GradleInspectionBundle";
|
||||
private static final GradleInspectionBundle INSTANCE = new GradleInspectionBundle();
|
||||
|
||||
/**
|
||||
* @author Vladislav.Soroka
|
||||
*/
|
||||
public class GradleInspectionBundle {
|
||||
private GradleInspectionBundle() { super(BUNDLE); }
|
||||
|
||||
@NotNull
|
||||
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
|
||||
return CommonBundle.message(getBundle(), key, params);
|
||||
}
|
||||
|
||||
private static Reference<ResourceBundle> ourBundle;
|
||||
@NonNls
|
||||
private static final String BUNDLE = "i18n.GradleInspectionBundle";
|
||||
|
||||
private static ResourceBundle getBundle() {
|
||||
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
|
||||
|
||||
if (bundle == null) {
|
||||
bundle = ResourceBundle.getBundle(BUNDLE);
|
||||
ourBundle = new SoftReference<>(bundle);
|
||||
}
|
||||
return bundle;
|
||||
return INSTANCE.getMessage(key, params);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user