Skip to main content


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 12:18 Go to next message
Andy Ed is currently offline Andy EdFriend
Messages: 64
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 13:36 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
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 16:43 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
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: Thu Mar 28 19:53:25 GMT 2024

Powered by FUDForum. Page generated in 0.04378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top