Skip to content
Permalink
Browse files
[JENKINS-36472] added dependency to icon-shim-plugin
- added missing icons for all sizes
- registered all plugin icons
  • Loading branch information
cpoenisch committed Jul 15, 2016
1 parent 2e4eca5 commit 75202747b3692d486545fbc6406a43b30aa3a4f5
@@ -84,6 +84,7 @@

<!-- Jenkins plugins -->
<matrix-project.version>1.4</matrix-project.version>
<icon-shim.version>2.0.3</icon-shim.version>
<junit.version>1.3</junit.version>
<job-dsl.version>1.37</job-dsl.version>

@@ -155,6 +156,12 @@
<artifactId>matrix-project</artifactId>
<version>${matrix-project.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.icon-shim</groupId>
<artifactId>icon-shim</artifactId>
<version>${icon-shim.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
@@ -37,6 +37,9 @@
import jenkins.model.Jenkins;

import org.apache.commons.lang.builder.HashCodeBuilder;
import org.jenkins.ui.icon.Icon;
import org.jenkins.ui.icon.IconSet;
import org.jenkins.ui.icon.IconType;

/**
* Main entry point to this plugin for the {@link Jenkins} instance.
@@ -192,4 +195,48 @@ public static ToolVersion parse(final String version) throws IllegalArgumentExce
return new ToolVersion(major, minor, micro, qualifier);
}
}

@Override
public void start() throws Exception {
super.start();

for (final String name : new String[] {
"atx",
"atx-trend",
"ecu-test",
"ecu-test-pkg",
"ecu-test-prj",
"report-generator",
"test-guide",
"trf",
}) {
// Register small (16x16) icons
IconSet.icons.addIcon(new Icon(
String.format("icon-ecutest-%s icon-sm", name),
String.format("ecutest/icons/16x16/%s.png", name),
Icon.ICON_SMALL_STYLE, IconType.PLUGIN)
);

// Register medium (24x24) icons
IconSet.icons.addIcon(new Icon(
String.format("icon-ecutest-%s icon-md", name),
String.format("ecutest/icons/24x24/%s.png", name),
Icon.ICON_MEDIUM_STYLE, IconType.PLUGIN)
);

// Register large (32x32) icons
IconSet.icons.addIcon(new Icon(
String.format("icon-ecutest-%s icon-lg", name),
String.format("ecutest/icons/32x32/%s.png", name),
Icon.ICON_LARGE_STYLE, IconType.PLUGIN)
);

// Register x-large (48x48) icons
IconSet.icons.addIcon(new Icon(
String.format("icon-ecutest-%s icon-xlg", name),
String.format("ecutest/icons/48x48/%s.png", name),
Icon.ICON_XLARGE_STYLE, IconType.PLUGIN)
);
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 7520274

Please sign in to comment.