Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] Missing Color Modes

Hey,

another problem I encountered was that my graphical henshin editor didn't use colors. This was due to a bug in org.eclipse.emf.henshin.provider.util.HenshinColorMode. There you call the method URL::toUri() which sometimes produces illegal URIs and should not be used. In my case the installation path of my eclipse contained characters that were not encoded correctly. Because the File constructor that recieves the created URI only allows file URIs anyways it would be better to call URL::getPath(). This solves the problem for me and should not introduce other problems as far as I know. A patch doing this is attached.

Best regards,
Manuel Hegner
Index: plugins/org.eclipse.emf.henshin.edit/src/org/eclipse/emf/henshin/provider/util/HenshinColorMode.java
===================================================================
--- plugins/org.eclipse.emf.henshin.edit/src/org/eclipse/emf/henshin/provider/util/HenshinColorMode.java	(revision 1989)
+++ plugins/org.eclipse.emf.henshin.edit/src/org/eclipse/emf/henshin/provider/util/HenshinColorMode.java	(working copy)
@@ -82,7 +82,7 @@
 		Bundle bundle = Platform.getBundle("org.eclipse.emf.henshin.edit");
 		URL colorModesURL = bundle.getEntry("colorModes");
 		try {
-		    File dir = new File(FileLocator.resolve(colorModesURL).toURI());
+		    File dir = new File(FileLocator.resolve(colorModesURL).getPath());
 		    for (File file : dir.listFiles()) {
 		    	if (file.getAbsolutePath().endsWith(".properties")) {
 		    		Properties properties = new Properties();

Back to the top