Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL and User defined operation(EGL and User defined operation)
EGL and User defined operation [message #1227299] Sat, 04 January 2014 04:09 Go to next message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 118
Registered: May 2012
Senior Member
Hello

I have following egl template:

[%
import "platform:/plugin/org.tura.metamodel.wizard.generation/template/commons/typeElementUtil.eol";

var util := new Native("org.tura.metamodel.commons.Util");

if (model_mapper.getQueries().size()<> 0) {
var query = model_mapper.getQueries().get(0);
var type = util.runQuery(query,model_mapper);

type.getMappedJavaType();

}
%]

where getMappedJavaType is user defined operation. This operation is described in the typeElementUtil.eol :

operation Type getMappedJavaType() : String {
return "qwerty";
}



During execution egl template I am getting following exception: Caused by: Method 'getMappedJavaType' not found.
I debug epsilon code EolImport.class and find out typeElementUtil.eol successfully imported.
Can you explain why user operation is not recognized


Thanks
Arseniy Isakov
Re: EGL and User defined operation [message #1229971 is a reply to message #1227299] Fri, 10 January 2014 17:37 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Sorry for the delay! Everyone's busy with the new year :-/.

Could you tell us what is the type of the value returned by util.runQuery? It sounds as if it does not match the "Type" model element type.
Re: EGL and User defined operation [message #1230320 is a reply to message #1229971] Sat, 11 January 2014 17:00 Go to previous message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 118
Registered: May 2012
Senior Member
Hi Antonio
you are right. util.runQuery is not return "Type" model element.

Happy new year
Thanks
Arseniy Isakov
Previous Topic:EGL imports
Next Topic:[Eugenia] Labels for references
Goto Forum:
  


Current Time: Fri Apr 26 12:23:05 GMT 2024

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

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

Back to the top