mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IDEA-344652 Replace direct access to bundles with getResourceBundles
GitOrigin-RevId: a739e1c7956771675248b19467fed579193bc15e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b0b0ac9527
commit
3d040212b9
@@ -38,8 +38,7 @@ public class DynamicBundle extends AbstractBundle {
|
||||
|
||||
private static @NotNull String ourLangTag = Locale.ENGLISH.toLanguageTag();
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static final ConcurrentMap<String, ResourceBundle> bundles = new ConcurrentHashMap<>();
|
||||
private static final ConcurrentMap<String, ResourceBundle> bundles = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Creates a new instance of the message bundle. It's usually stored in a private static final field, and static methods delegating
|
||||
@@ -376,6 +375,11 @@ public class DynamicBundle extends AbstractBundle {
|
||||
return Locale.forLanguageTag(ourLangTag);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static Map<String, ResourceBundle> getResourceBundles() {
|
||||
return Collections.unmodifiableMap(bundles);
|
||||
}
|
||||
|
||||
private enum BundleOrder {
|
||||
FOLDER_REGION_LEVEL_PLUGIN(0), //localization/zh/CN/
|
||||
FOLDER_REGION_LEVEL_PLATFORM(1),
|
||||
|
||||
@@ -32,7 +32,7 @@ class ShowBundleMessagesDialogAction : AnAction(), DumbAware {
|
||||
}
|
||||
|
||||
override fun createCenterPanel(): JComponent {
|
||||
val bundleMap = DynamicBundle.bundles
|
||||
val bundleMap = DynamicBundle.getResourceBundles()
|
||||
table = JBTable(object : DefaultTableModel(Vector(listOf("Bundle name", "Values")), bundleMap.size) {
|
||||
override fun isCellEditable(row: Int, column: Int): Boolean {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user