| Summary: | Epsilon Mac problem | ||
|---|---|---|---|
| Product: | [Modeling] Epsilon | Reporter: | Andy Ed <ae2> |
| Component: | Core | Assignee: | Louis Rose <louis> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | louis |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | interim | ||
*** Bug 335214 has been marked as a duplicate of this bug. *** As mentioned on #335214: I've checked in a fix for this to SVN, and this appears to work on both Windows and Mac. This allows users to launch Epsilon programs, and to use external object references with HUTN. This has been fixed in the latest interim version. Fixed in 0.9.1 |
My ETL translation runs under windows but not Mac. I think I've tracked the problem to the following code in: /org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf /EmfModel.java rev 1163, at line 196. model = resourceSet.createResource(modelFileUri); This is successful in windows, but not Mac. The difference is as follows: The modelFileURI in Windows is: platform:/resource/sharedbuffer20100819Tasking/sharedbuffer2 0100819b.tasking The modelFileURI on the Mac is, file:/sharedbuffer20100819Tasking/sharedbuffer20100819b.task ing The difference arises during the call to EMFUtil.createURI(metamodelFile) in line 84, org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf/ EmfUtil.java. I hacked the code on the Mac to make the modelFileURI a platform relative resource, then all went well. So a branch like the following could be necessary. ... else if(OperatingSystem.isMac() ){ return URI.createPlatformResourceURI(s, true); } ... within the method, public static URI createURI(String s) { URI uri = URI.createURI(s); if (uri.scheme() != null) { // If we are under Windows and s starts with x: it is an absolute path if (OperatingSystem.isWindows() && uri.scheme().length() == 1) { return URI.createFileURI(s); } // otherwise it is a proper uri else { return uri; } } // Handle paths that start with / under Unix e.g. /local/foo.txt else if (OperatingSystem.isUnix() && s.startsWith("/")) { return URI.createFileURI(s); } // ... otherwise it is a platform resource uri else { return URI.createPlatformResourceURI(s, true); } } Is it possible to fix this? cheers, Andy