Fix advanced settings in DataGrip: use ApplicationBundle for platform even if <resource-bundle> is specified in platform plugin

GitOrigin-RevId: 60024d3ed8ab427aac7766ef670a002a2b9fa082
This commit is contained in:
Dmitry Jemerov
2021-05-26 11:19:54 +02:00
committed by intellij-monorepo-bot
parent 0de4b2d666
commit 5853add304

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.options.advanced
import com.intellij.DynamicBundle
@@ -126,8 +126,9 @@ class AdvancedSettingBean : PluginAware {
val defaultValueObject by lazy { valueFromString(defaultValue) }
private fun findBundle(): ResourceBundle? {
val bundleName = bundle.nullize() ?: pluginDescriptor?.resourceBundleBaseName
val bundleName = bundle.nullize()
?: pluginDescriptor?.takeIf { it.pluginId.idString == "com.intellij" } ?.let { ApplicationBundle.BUNDLE }
?: pluginDescriptor?.resourceBundleBaseName
?: return null
val classLoader = pluginDescriptor?.pluginClassLoader ?: javaClass.classLoader
return DynamicBundle.INSTANCE.getResourceBundle(bundleName, classLoader)