Search in sources :

Example 1 with Icon

use of org.jenkins.ui.icon.Icon in project gitlab-branch-source-plugin by Argelbargel.

the class GitLabSCMIcons method iconFileName.

public static String iconFileName(String name, Size size) {
    Icon icon = icons.getIconByClassSpec(classSpec(name, size));
    if (icon == null) {
        return null;
    }
    JellyContext ctx = new JellyContext();
    ctx.setVariable("resURL", Stapler.getCurrentRequest().getContextPath() + Jenkins.RESOURCE_PATH);
    return icon.getQualifiedUrl(ctx);
}
Also used : Icon(org.jenkins.ui.icon.Icon) JellyContext(org.apache.commons.jelly.JellyContext)

Aggregations

JellyContext (org.apache.commons.jelly.JellyContext)1 Icon (org.jenkins.ui.icon.Icon)1