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

Bug 318722

Summary: [All Diagrams] Abstract figures PapyrusNodeFigure and NodeNamedElementFigure can not be extended by a composite figure
Product: [Modeling] Papyrus Reporter: Vincent Hémery <vincent.hemery>
Component: CoreAssignee: Vincent Hémery <vincent.hemery>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: 0.7.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 318566    

Description Vincent Hémery CLA 2010-07-02 09:55:37 EDT
The classes
org.eclipse.papyrus.diagram.common.figure.node.NodeNamedElementFigure
and
org.eclipse.papyrus.diagram.common.figure.node.PapyrusNodeFigure
impose too many constraints. They can be extended only by a basic figure, since they create all content directly in the top figure and rely on this fact.

These figure must be parameterizable, in order to enable extending them in case of composite figures. (Instead of duplicating all their code to adapt it to the composite figure implementing the corresponding interface)
They should also allow children to separate labels and compartments in different figures.

For examples, the lifeline figure of sequence diagram should be able to extend NodeNamedElementFigure, and configure it in order the top rectangle only has the border and contains labels.

These modifications must of course not impact the current default behavior.
Comment 1 Vincent Hémery CLA 2010-07-02 10:25:47 EDT
Overrideable methods  have been added to make both classes a lot more parameterizable.
Default implementation does not ipact current behavior. The API has only been enriched.

An example of usage can be found in org.eclipse.papyrus.diagram.sequence.edit.parts.LifelineEditPart.LifelineFigure.