Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Epsilon Mac problem(Program runs under windows but not Mac)
Epsilon Mac problem [message #650326] Mon, 24 January 2011 07:18 Go to next message
Andy Ed is currently offline Andy Ed
Messages: 41
Registered: December 2009
Member
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
Re: Epsilon Mac problem [message #650344 is a reply to message #650326] Mon, 24 January 2011 08:36 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andy,

Thanks for the report. I think this is a regression, caused by fixing a bug in HUTN. I'll take a look at this now. In the meantime, would you open a bug report?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT& component=Epsilon

Cheers,
Louis.
Re: Epsilon Mac problem [message #650375 is a reply to message #650344] Mon, 24 January 2011 11:43 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andy,

I've checked in a fix for this problem now. Details are on the bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=335214

This fix will make it into the next release.

Thanks for finding and reporting the problem, and I'm sorry for any headaches this must have caused.

Cheers,
Louis.
Previous Topic:Backquotes/Backticks
Next Topic:Execution of ETL transformations from Java code
Goto Forum:
  


Current Time: Sat Aug 23 16:05:29 EDT 2014

Powered by FUDForum. Page generated in 0.01604 seconds