Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 7520274
Show file tree
Hide file tree
Showing 24 changed files with 54 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pom.xml
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Down
47 changes: 47 additions & 0 deletions src/main/java/de/tracetronic/jenkins/plugins/ecutest/ETPlugin.java
Expand Up @@ -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.
Expand Down Expand Up @@ -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 added src/main/webapp/icons/16x16/atx-trend.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/atx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/ecu-test-pkg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/ecu-test-prj.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/ecu-test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/report-generator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/test-guide.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/16x16/trf.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/webapp/icons/24x24/ecu-test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/24x24/test-guide.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/atx-trend.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/atx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/ecu-test-pkg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/ecu-test-prj.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/ecu-test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/report-generator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/test-guide.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/32x32/trf.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/48x48/atx-trend.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/icons/48x48/atx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/webapp/icons/48x48/ecu-test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/webapp/icons/48x48/test-guide.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7520274

Please sign in to comment.