Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 285281

Summary: [Generative Tools] Managing graphical element without containment relationship to its graphical parent
Product: [Modeling] Papyrus Reporter: Yann Tanguy <yann.tanguy>
Component: CoreAssignee: Yann Tanguy <yann.tanguy>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: plan
Version: 0.7.0   
Target Milestone: M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Yann Tanguy CLA 2009-07-31 10:01:51 EDT
When the graphical element has no direct containment relationship with its graphical parent (ex: Port on Property in CSD), the code generated by GMF is erroneous.
In particular:
- the creation command should be corrected
- the DiagramUpdater should be customized

The creation command issue can be solved by overriding the default SEMANTIC_ROLE edit policy (and using this to pass a custom CreationCommand).
The customisation of DiagramUpdater class requires some adaptation in the gmfgen extension and gmf templates.

A new element is added to gmfgenextension : "SpecificDiagramUpdater" that reference a GenNode and specifies a custom class that will be used to evaluate the DiagramUpdater::getXXXSemanticChildren(View view), where XXX matches the referenced GenNode.

The custom class is expected to implement the interface : org.eclipse.papyrus.diagram.common.part.ICustomDiagramUpdater
Comment 1 Yann Tanguy CLA 2009-07-31 10:06:46 EDT
Done in r429
Comment 2 Yann Tanguy CLA 2009-09-01 11:19:45 EDT
SpecificDiagramUpdater extension should reference GenCommonBase and not be resctricted to GenChildNode.
Comment 3 Yann Tanguy CLA 2009-09-02 04:36:45 EDT
Done in r492.

GMFGENEXTENSION model and related DiagramUpdater.xpt template modified.
Comment 4 Yann Tanguy CLA 2009-09-02 04:36:50 EDT
Created attachment 146265 [details]
mylyn/context/zip