summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorTony McCrary2013-11-20 11:47:52 (EST)
committer Lars Vogel2013-11-21 08:01:23 (EST)
commit29058a7e3062e4043733b294a9ca8ad49025743a (patch)
treec849401ac7469eed0b9b19561308abd44dc9e933
parentaa3f91fb9d9b573ca8941ac30e564fe07c7a3709 (diff)
downloadeclipse.platform.ui-29058a7e3062e4043733b294a9ca8ad49025743a.zip
eclipse.platform.ui-29058a7e3062e4043733b294a9ca8ad49025743a.tar.gz
eclipse.platform.ui-29058a7e3062e4043733b294a9ca8ad49025743a.tar.bz2
Fixed disabled icon rendering, any directory prefixed with "e" will haverefs/changes/24/18624/3
a disabled folder created containing desaturated icons. Change-Id: I7b1f4a7d3faa326f6ca2700a6cb1185f64ddda11 Signed-off-by: Tony McCrary <tmccrary@gmail.com>
-rw-r--r--bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java26
1 files changed, 16 insertions, 10 deletions
diff --git a/bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java b/bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java
index fc145b9..a597242 100644
--- a/bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java
+++ b/bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java
@@ -537,20 +537,26 @@ public class RenderMojo extends AbstractMojo {
if (parentDirName.startsWith("e")) {
StringBuilder builder = new StringBuilder();
builder.append("d");
- builder.append(parentDirName.substring(1,
- parentDirName.length()));
+ builder.append(parentDirName.substring(1, parentDirName.length()));
+
+ // Disabled variant folder name
String disabledVariant = builder.toString();
+ // The parent's parent, to create the disabled directory in
File setParent = parentFile.getParentFile();
- for (File disabledFolder : setParent.listFiles()) {
- if (disabledFolder.getName()
- .equals(disabledVariant)) {
- String path = rootUri.relativize(
- disabledFolder.toURI()).getPath();
- disabledOutputDir = new File(outputBase, path);
- }
- }
+ // The source directory's disabled folder
+ File disabledSource = new File(setParent, disabledVariant);
+
+ // Compute a relative path, so we can create the output folder
+ String path = rootUri.relativize(
+ disabledSource.toURI()).getPath();
+
+ // Create the output folder, so a disabled icon is generated
+ disabledOutputDir = new File(outputBase, path);
+ if(!disabledOutputDir.exists()) {
+ disabledOutputDir.mkdirs();
+ }
}
}