mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more bundles
GitOrigin-RevId: 5f1d33872141e8a0b14596a030e144ec27c55b03
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ad36981e0a
commit
d73aa0a711
+7
-21
@@ -15,33 +15,19 @@
|
||||
*/
|
||||
package org.jetbrains.plugins.groovy.actions.generate;
|
||||
|
||||
import com.intellij.DynamicBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
public class GroovyCodeInsightBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "org.jetbrains.plugins.groovy.actions.generate.GroovyCodeInsightBundle";
|
||||
private static final GroovyCodeInsightBundle INSTANCE = new GroovyCodeInsightBundle();
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
|
||||
public class GroovyCodeInsightBundle {
|
||||
private GroovyCodeInsightBundle() { 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 = "org.jetbrains.plugins.groovy.actions.generate.GroovyCodeInsightBundle";
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,33 +16,20 @@
|
||||
|
||||
package org.jetbrains.plugins.groovy.doc;
|
||||
|
||||
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 GroovyDocBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "org.jetbrains.plugins.groovy.doc.GroovyDocBundle";
|
||||
private static final GroovyDocBundle INSTANCE = new GroovyDocBundle();
|
||||
|
||||
public class GroovyDocBundle {
|
||||
private GroovyDocBundle() { 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 = "org.jetbrains.plugins.groovy.doc.GroovyDocBundle";
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-25
@@ -16,36 +16,19 @@
|
||||
|
||||
package org.jetbrains.plugins.groovy.refactoring;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.DynamicBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
public class GroovyRefactoringBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "org.jetbrains.plugins.groovy.refactoring.GroovyRefactoringBundle";
|
||||
private static final GroovyRefactoringBundle INSTANCE = new GroovyRefactoringBundle();
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
|
||||
/**
|
||||
* @author ilyas
|
||||
*/
|
||||
public class GroovyRefactoringBundle {
|
||||
private GroovyRefactoringBundle() { 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 = "org.jetbrains.plugins.groovy.refactoring.GroovyRefactoringBundle";
|
||||
|
||||
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