|Re: The value of semanticAdapter [message #1017040 is a reply to message #1017001]
||Fri, 08 March 2013 17:54
| Thomas Beyer
Registered: February 2013
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();
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.
Powered by FUDForum
. Page generated in 0.02329 seconds