mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+15
-1
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.options.newEditor;
|
||||
|
||||
import com.intellij.AbstractBundle;
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder;
|
||||
import com.intellij.ide.ui.laf.darcula.ui.DarculaTextFieldUI;
|
||||
@@ -1220,7 +1222,7 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
|
||||
JPanel box = new JPanel();
|
||||
box.setLayout(new BoxLayout(box, BoxLayout.Y_AXIS));
|
||||
try {
|
||||
box.add(new JLabel(OptionsBundle.message(searchable.getId() + ".settings.description")));
|
||||
box.add(new JLabel(getDefaultDescription(searchable)));
|
||||
}
|
||||
catch (AssertionError error) {
|
||||
return null; // description is not set
|
||||
@@ -1240,6 +1242,18 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
|
||||
return box;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getDefaultDescription(SearchableConfigurable configurable) {
|
||||
String key = configurable.getId() + ".settings.description";
|
||||
if (configurable instanceof ConfigurableWrapper) {
|
||||
ConfigurableWrapper wrapper = (ConfigurableWrapper) configurable;
|
||||
ConfigurableEP ep = wrapper.getExtensionPoint();
|
||||
ResourceBundle resourceBundle = AbstractBundle.getResourceBundle(ep.bundle, ep.getPluginDescriptor().getPluginClassLoader());
|
||||
return CommonBundle.message(resourceBundle, key);
|
||||
}
|
||||
return OptionsBundle.message(key);
|
||||
}
|
||||
|
||||
private class Simple extends ConfigurableContent {
|
||||
JComponent myComponent;
|
||||
Configurable myConfigurable;
|
||||
|
||||
Reference in New Issue
Block a user