Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EML] Standalone: Match Trace from other module
[EML] Standalone: Match Trace from other module [message #730197] Tue, 27 September 2011 16:56 Go to previous message
Horacio Hoyos is currently offline Horacio Hoyos
Messages: 137
Registered: October 2009
Senior Member

Hello,

I am trying to get a stand alone Merge to work. In my case I have a stand alone ECL and a stand alone EML class, which use the respective Epsilon modules. In both cases the initialization procedure is similar: add the correct ecl/eml source file, load the required models, execute the module.

I first use my ECLExecutor to obtain the match trace of two models according to the provided ecl rules. I save this match trace so I an then feed it to my EMLExecutor.

In my EMLExecutor implementation I have added a method to add the match trace:

public void setMatchTrace(Object matchTrace) throws ExecutorException {
		
	if(matchTrace.getClass() != MatchTrace.class) {
			throw new ExecutorException("Match trace is not of the correct type (org.eclipse.epsilon.ecl.trace.MatchTrace");
	}
	if(module == null)
		module = createModule();
	EmlContext context = (EmlContext) module.getContext();
	context.setMatchTrace((MatchTrace)matchTrace);
}

which I call and pass the match trace returned by my ECLExecutor. I add the models to my EMLExecutor and execute it. It all seems to go fine until I look at the merged model, which is not the expected model (compared to the one obtained from running the same rules in an ant).

Debugging my application and looking at the Match Trace and EML module I think I have found the cause of the merge not working as expected. In the MatchTrace, the a match for a an element called "System" references to elements of Type Structural, with ids 547 and 222. However, when I look at the models loaded in the EML module, the "System" elements that are supposed to match have ids 481 and 591.

If ids are used to identify matches then I guess this will never work. Would the solution be somehow reuse the models in the ECL module in the EML module? Like asking the ecl context for the list of models and passing them to the eml context?

Thanks,

Horacio


Horacio Hoyos Rodriguez
EngD Student
University Of York
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:How to create Eclipse like Welcome Page.
Next Topic:The simplest ECL + EML example
Goto Forum:
  


Current Time: Sat May 25 01:58:34 EDT 2013

Powered by FUDForum. Page generated in 0.07184 seconds