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:
+16
-9
@@ -47,16 +47,17 @@ public class ConfigurableWrapper implements SearchableConfigurable {
|
||||
|
||||
@Nullable
|
||||
public static <T extends UnnamedConfigurable> T wrapConfigurable(ConfigurableEP<T> ep) {
|
||||
if (ep.displayName != null || ep.key != null) {
|
||||
if (ep.children != null || ep.childrenEPName != null || ep.dynamic) {
|
||||
T configurable = ep.createConfigurable();
|
||||
return configurable != null
|
||||
? (T)new CompositeWrapper(ep, configurable)
|
||||
: null;
|
||||
}
|
||||
else {
|
||||
return (T)new ConfigurableWrapper(ep, null);
|
||||
if (ep.displayName != null || ep.key != null || ep.groupId != null) {
|
||||
T configurable = null;
|
||||
if (ep.providerClass != null) {
|
||||
configurable = ep.createConfigurable();
|
||||
if (configurable == null) {
|
||||
return null; // it is allowed to return null from provider
|
||||
}
|
||||
}
|
||||
return ep.children != null || ep.childrenEPName != null || ep.dynamic
|
||||
? (T)new CompositeWrapper(ep, configurable)
|
||||
: (T)new ConfigurableWrapper(ep, configurable);
|
||||
}
|
||||
else {
|
||||
return ep.createConfigurable();
|
||||
@@ -104,6 +105,12 @@ public class ConfigurableWrapper implements SearchableConfigurable {
|
||||
@Nls
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
if (myEp.displayName == null && myEp.key == null) {
|
||||
UnnamedConfigurable configurable = getConfigurable();
|
||||
if (configurable instanceof Configurable) {
|
||||
return ((Configurable)configurable).getDisplayName();
|
||||
}
|
||||
}
|
||||
return myEp.getDisplayName();
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ public class OptionsTree extends JPanel implements Disposable, OptionsEditorColl
|
||||
myHandle.setOpaque(false);
|
||||
content.add(myHandle, BorderLayout.WEST);
|
||||
content.add(myComponent, BorderLayout.CENTER);
|
||||
myProjectIcon = new JLabel(AllIcons.General.ProjectConfigurable);
|
||||
myProjectIcon = new JLabel(" ", AllIcons.General.ProjectConfigurable, SwingConstants.LEFT);
|
||||
myProjectIcon.setOpaque(true);
|
||||
content.add(myProjectIcon, BorderLayout.EAST);
|
||||
myRendererComponent.add(content, BorderLayout.CENTER);
|
||||
@@ -399,6 +399,9 @@ public class OptionsTree extends JPanel implements Disposable, OptionsEditorColl
|
||||
myTextLabel.setForeground(selected ? UIUtil.getTreeSelectionForeground() : fg);
|
||||
|
||||
myTextLabel.setOpaque(selected);
|
||||
if (Registry.is("ide.file.settings.order.new")) {
|
||||
myTextLabel.setBorder(new EmptyBorder(1,2,1,0));
|
||||
}
|
||||
|
||||
myProjectIcon.setVisible(Registry.is("ide.file.settings.order.new") && getConfigurableProject(base) != null);
|
||||
if (myProjectIcon.isVisible()) {
|
||||
|
||||
Reference in New Issue
Block a user