Skip to content

Commit

Permalink
Add icons for search (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtnord authored Dec 11, 2024
2 parents 7d22c6e + c9fe2ab commit 9a984fd
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<I extends TopLevelItem> extends AbstractItem implements TopLevelItem, ItemGroup<I>, ModifiableViewGroup, StaplerFallback, ModelObjectWithChildren, StaplerOverridable {
public abstract class AbstractFolder<I extends TopLevelItem> extends AbstractItem implements TopLevelItem, ItemGroup<I>, ModifiableViewGroup, StaplerFallback, ModelObjectWithChildren, StaplerOverridable, IconSpec {

/**
* Our logger.
Expand Down Expand Up @@ -305,6 +306,11 @@ protected AbstractFolderViewHolder newFolderViewHolder() {
return new DefaultFolderViewHolder(views, null, newDefaultViewsTabBar());
}

@Override
public String getIconClassName() {
return icon.getIconClassName();

Check warning on line 311 in src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 311 is not covered by tests
}

protected FolderIcon newDefaultFolderIcon() {
return new StockFolderIcon();
}
Expand Down

0 comments on commit 9a984fd

Please sign in to comment.