From c9fe2ab306a977d2946c6d44724fc062fd5391b7 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Wed, 11 Dec 2024 15:55:59 +0000 Subject: [PATCH] Add icons for search --- .../cloudbees/hudson/plugins/folder/AbstractFolder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java b/src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java index a2ddd4fd..35ecee28 100644 --- a/src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java +++ b/src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java @@ -101,6 +101,7 @@ import jenkins.model.ProjectNamingStrategy; import jenkins.model.TransientActionFactory; import net.sf.json.JSONObject; +import org.jenkins.ui.icon.IconSpec; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.Beta; import org.kohsuke.accmod.restrictions.NoExternalUse; @@ -134,7 +135,7 @@ */ @SuppressWarnings({"unchecked", "rawtypes"}) // mistakes in various places @SuppressFBWarnings("DMI_RANDOM_USED_ONLY_ONCE") // https://github.com/spotbugs/spotbugs/issues/1539 -public abstract class AbstractFolder extends AbstractItem implements TopLevelItem, ItemGroup, ModifiableViewGroup, StaplerFallback, ModelObjectWithChildren, StaplerOverridable { +public abstract class AbstractFolder extends AbstractItem implements TopLevelItem, ItemGroup, ModifiableViewGroup, StaplerFallback, ModelObjectWithChildren, StaplerOverridable, IconSpec { /** * Our logger. @@ -305,6 +306,11 @@ protected AbstractFolderViewHolder newFolderViewHolder() { return new DefaultFolderViewHolder(views, null, newDefaultViewsTabBar()); } + @Override + public String getIconClassName() { + return icon.getIconClassName(); + } + protected FolderIcon newDefaultFolderIcon() { return new StockFolderIcon(); }