Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » [GMF XPand templates ] targetDef.proceed() fails
[GMF XPand templates ] targetDef.proceed() fails [message #504084] Thu, 17 December 2009 03:16 Go to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hi,

In Galileo, I want to use «targetDef.proceed()» to "call" the parent rule to proceed with the transformation, but I get an error when do the transformation:

Exception (Can't evaluate expression: retured value is OclInvalid:in aspects::xpt::diagram::commands::CreateNodeCommand, line 23) while generating code
Can't evaluate expression: retured value is OclInvalid:in aspects::xpt::diagram::commands::CreateNodeCommand, line 23

My template code is:

«AROUND CreateNodeCommand FOR gmfgen::GenNode-»
«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
package «getDiagram().editCommandsPackageName»;

«EXPAND xpt::Common::generatedClassComment»
public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
	«targetDef.proceed()»

	«EXPAND getEClassToEdit-»
	
	...
}
«ENDAROUND»


I asked in the M2T news, but they redirect me to GMF news. Could anybody help me please?

Thanks!!
Marc
Re: [GMF XPand templates ] targetDef.proceed() fails [message #504296 is a reply to message #504084] Fri, 18 December 2009 02:26 Go to previous message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Well, I know what's happening...
XPand is aspect oriented, so you can:
1. redefine a rule to run your oun definition instead of the parent one;
2. execute the parent rule with targetDef.proceed() and when finishes execute your code;
3. or execute your own code and then execute the parent code with targetDef.proceed().

What is not available, i to combine 2 and 3, executing first your code, then the code of the parent, then another time your code...

I'm understanding XPand step by step Smile

Marc
Previous Topic:Shrinking a child figure in a Compartment
Next Topic:org.eclipse.ui.ide dependency
Goto Forum:
  


Current Time: Tue Apr 20 02:30:39 GMT 2021

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

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

Back to the top