Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » integrating EMFT JET into GMF
integrating EMFT JET into GMF [message #65955] Fri, 29 December 2006 02:01 Go to next message
Eclipse UserFriend
Originally posted by: peter.kovari.gmail.com

Hello,
I am trying to use JET2 (EMFT JET) in a GMF diagram editor. The plan is
to transform the model from the editor using JET2 and write the result
into a file (using the <ws:file> tags).
In GMF I get the following error:

java.lang.IllegalArgumentException: Attempted to beginRule: R/, does not
match outer scope rule:
MultiRule[L/test/model/default.statemachine_diagram,L/test/m odel/default.statemachine]
....

Alex Shatalin from the GMF newsgroup suggested to modify the
..getSaveRule() method to accomodate the new resource for JET2. I managed
to get the rule in, however the problem persists:

java.lang.IllegalArgumentException: Attempted to beginRule: R/, does not
match outer scope rule:
MultiRule[L/test/dump.xml,L/test/model/default.statemachine_ diagram,L/test/model/default.statemachine]
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:62)

It is interesting that the application is complaining about the "/" URL
and not the "/test/dump.xml".

I did several debug runs with the application and found that the JET2
engine sets the baseURL (descriptor:JETBundleDescriptor) to "/" which is
exactly the URI the application is complaining about. I suspect it
happens because the transformation is executed programmatically and it
takes the defaultRoot value which is the workspace root. This value is
checked in the JobManager but of course it is not registered.

Any ideas how to resolv this?

Thanks,
PETER
Re: integrating EMFT JET into GMF [message #66105 is a reply to message #65955] Tue, 02 January 2007 14:13 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Peter:

The problem is that JET is doing IWorkspace.run(IWorkspaceRunnable,
IProgressMonitor), which creates a scheduling rule on the workspace root
("/"). Such a rule is incompatible with the more strict MultiRule specified
in the outer workspace run operation.

I have submitted Bug 169332
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=169332) to track this issue.

In the meantime, you can work around the issue by adding the workspace root
to your MultiRule:

// create your scheduling rule the way it ought to be
ISchedulingRule schedulingRule = ...;
// Need this workaround until JET bug 169332 is fixed
schedulingRule = new MultiRule(new ISchedulingRule[] {schedulingRule,
ResourcesPlugin.getWorkspace.getRoot()});

Paul
Re: integrating EMFT JET into GMF [message #600452 is a reply to message #65955] Tue, 02 January 2007 14:13 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Peter:

The problem is that JET is doing IWorkspace.run(IWorkspaceRunnable,
IProgressMonitor), which creates a scheduling rule on the workspace root
("/"). Such a rule is incompatible with the more strict MultiRule specified
in the outer workspace run operation.

I have submitted Bug 169332
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=169332) to track this issue.

In the meantime, you can work around the issue by adding the workspace root
to your MultiRule:

// create your scheduling rule the way it ought to be
ISchedulingRule schedulingRule = ...;
// Need this workaround until JET bug 169332 is fixed
schedulingRule = new MultiRule(new ISchedulingRule[] {schedulingRule,
ResourcesPlugin.getWorkspace.getRoot()});

Paul
Previous Topic:teneo - @OrderBy not processed?
Next Topic:teneo - performance problem with new impl of HibernatePersistableEList.isLoaded()
Goto Forum:
  


Current Time: Thu Sep 26 06:10:17 GMT 2024

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

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

Back to the top