Skip to content

Commit

Permalink
[JENKINS-31162] A different way to do the same. Asked by @jglick
Browse files Browse the repository at this point in the history
  • Loading branch information
recena committed Mar 23, 2016
1 parent fb110f8 commit afbd888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions core/src/main/java/hudson/model/FreeStyleProject.java
Expand Up @@ -87,11 +87,7 @@ public String getCategoryId() {

@Override
public String getIconFilePathPattern() {
if (Jenkins.RESOURCE_PATH.isEmpty()) {
return "images/:size/freestyleproject.png";
} else {
return Jenkins.RESOURCE_PATH.substring(1) + "/images/:size/freestyleproject.png";
}
return (Jenkins.RESOURCE_PATH + "/images/:size/freestyleproject.png").replaceFirst("^/", "");
}

}
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/TopLevelItemDescriptor.java
Expand Up @@ -184,6 +184,8 @@ public String getCategoryId() {
* For example: plugin/plugin-shortname/images/:size/item.png, where {@code :size} represents the different
* icon sizes used commonly in Jenkins project: 16x16, 24x24, 32x32 or 48x48
*
* @see {@link FreeStyleProject.DescriptorImpl#getIconFilePathPattern()}
*
* @return A string or null if it is not defined.
*
* @since TODO
Expand Down

0 comments on commit afbd888

Please sign in to comment.