mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-13412 Settings | Deployment: Please add icons to the list of deployment entries (like it was in v4)
(cherry picked from commit d6c54820f69b55bfd045a5515c38a129bf9a01b2)
This commit is contained in:
@@ -49,6 +49,7 @@ public abstract class NamedItemsListEditor<T> extends MasterDetailsComponent {
|
||||
private final Equality<T> myComparer;
|
||||
private List<T> myResultItems;
|
||||
private final List<T> myOriginalItems;
|
||||
private boolean myShowIcons;
|
||||
|
||||
protected NamedItemsListEditor(Namer<T> namer,
|
||||
Factory<T> factory,
|
||||
@@ -160,6 +161,10 @@ public abstract class NamedItemsListEditor<T> extends MasterDetailsComponent {
|
||||
myNamer.setName(item, name);
|
||||
}
|
||||
|
||||
public void setShowIcons(boolean showIcons) {
|
||||
myShowIcons = showIcons;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected UnnamedConfigurable getItemConfigurable(final T item) {
|
||||
final Ref<UnnamedConfigurable> result = new Ref<UnnamedConfigurable>();
|
||||
@@ -213,6 +218,14 @@ public abstract class NamedItemsListEditor<T> extends MasterDetailsComponent {
|
||||
return myNamer.getName(myItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(boolean expanded) {
|
||||
if (myShowIcons && myConfigurable instanceof Iconable) {
|
||||
return ((Iconable)myConfigurable).getIcon(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user