|
|
Re: Generated Code of ViewMap [message #902581 is a reply to message #902580] |
Sat, 18 August 2012 15:51 |
Rami D. Messages: 14 Registered: August 2012 |
Junior Member |
|
|
Ok, now i'm a step further. top::Descriptor references a template in the templates folder of the "org.eclipse.gmf.graphdef.codegen" plugin.
This calls another template Figure which declares a method ClassBody
«EXPAND Figure::ClassBody(compilationUnitName(self)) FOR actualFigure»
And here is where the figure content is finally created:
«DEFINE ClassBody(cuName : String) FOR gmfgraph::RealFigure-»
/**
* @generated
*/
public «cuName»() {
«clearBorders()-»
«EXPAND Layout::Init('this') FOR layout-»
«EXPAND Attrs::Init('this')-»
«IF not (children)[gmfgraph::Figure]->isEmpty()-»
createContents();
}
«EXPAND Children::CreateChildren-»
«EXPAND Border::InitMethods»
«ELSE-»
}
«ENDIF-»
«EXPAND Extras::extraMethods»
«EXPAND additions-»
«ENDDEFINE»
Now you can extend/modifiy the class body according to your needs. Hope this helps.
Regards,
Rami
[Updated on: Sat, 18 August 2012 16:25] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03389 seconds