|
Re: The value of semanticAdapter [message #1017040 is a reply to message #1017001] |
Fri, 08 March 2013 17:54 |
Thomas Beyer Messages: 55 Registered: February 2013 |
Member |
|
|
Hi Mary,
the semanticAdapter is an IAdaptable-Wrapper of your diagram's domain element (the root). The IAdaptable is built in order to be handled by the Eclipse Platform API.
If you check your generated
XXXDiagramEditorUtil.createDiagram(URI diagramURI, URI modelURI,IProgressMonitor progressMonitor)
you will find the declarations:
XXX model = createInitialModel();
and
Diagram diagram = ViewService.createDiagram(model,XXXEditPart.MODEL_ID,XXXDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
The first call creates your diagrams domain element, the "model"-element you are looking for.
Follow the second call and you will find where this model is wrapped as an EObjectAdapter (the semanticAdapter).
Yes, you can modify the model. But, make sure not to replace the model by a different interface, as it would break your element-hierarchy.
Regards
Thomas
|
|
|
|
Powered by
FUDForum. Page generated in 0.02455 seconds