Community
Participate
Working Groups
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.
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.