Community
Participate
Working Groups
A UML profile has been registered using a pathmap that is registered as follows: <extension point="org.eclipse.gmf.runtime.emf.core.Pathmaps"> <pathmap name="PROFILE_PATH" plugin="com.xyz.abc" path="profiles"> </pathmap> </extension> When the Eclipse plug-in "com.xyz.abc" is installed in the directory c:\Program Files\MyProduct\eclipse\plugins, the resulting entry in the PathmapManager's PATH_MAP table is as follows: key = "PROFILE_PATH" value = "c:/Program Files/MyProduct/eclipse/plugins/com.xyz.abc" The PathmapManager stores this key/value pair in its configure() method. The entries in the PATH_MAP are resolved and added to the map by the following code: URL url = bundle.getEntry(path); if (url == null) continue; try { url = FileLocator.resolve(url); if (url == null) continue; paths.put(var, url.toString()); The URL returned from FileLocator.resolve() is not encoded (e.g., c:/Program Files/... instead of c:/Program%20Files/...) and when a URI converter tries to normalize a profile URI that uses a pathmap, the resulting URI is also not encoded. When an attempt is made to resolve the profile URI, the code in org.eclipse.gmf.runtime.emf.core.internal.util.Util.denormalizeURI(...), takes the normalized uri.toString() value and passes it to java.net.URI.create(String uri), which throws an exception. This exception prevents the profile from being resolved. According to the Eclipse FileLocator.resolve() documentation, the returned URL does not have to be encoded but when that pathmap value is used in URI's, it may need to be encoded.
Is this problem related to Bug 150521?
*** Bug 150521 has been marked as a duplicate of this bug. ***
Created attachment 46639 [details] A small patch to fix pathmap manager encoding problems
Reviewed and committed the patch. CVS change set: [149220] gmf_R1_0_maintenance cbmcgee 060724 Pathmap URI contains non-encoded segments which cause exceptions
Reviewed and committed the patch.
[GMF Restructure] Bug 319140 : product GMF and component Runtime EMF was the original product and component for this bug