Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Papyrus/Papyrus Developer Guide/How To GMF Diagram Editor
< Papyrus | Papyrus Developer Guide
Revision as of 08:53, 17 April 2014 by Unnamed Poltroon (Talk) (Created page with "= Introduction = Papyrus relies on the GMF framework for the graphical editors. This GMF framework relies on the MVC design pattern (Model-View-Controller). In Papyrus, * Mo...")
Introduction
Papyrus relies on the GMF framework for the graphical editors. This GMF framework relies on the MVC design pattern (Model-View-Controller). In Papyrus,
- Model is the notation model (the representation model, which refers to the semantic model elements)
- View are draw2D figures
- Controllers are the editParts. They create commands in response to requests
Figures in Papyrus
Figures in Papyrus are draw2D figures. When developping new figures for Papyrus editors, several conditions should be filled:
- Figures should not know anything about their controller. They should never have reference to their edit part
- method #paint(Graphics) should never modify the layout. Layout will be handled by the LayoutManager associated to the figure.
Layout
main method to implement here is the layout() method, which will place the children figures
Figure developemnt
A specific view is accessible for Papyrus developers. This view describes the hierarchy of figures in a diagram for a selected element.
Miscelaneous
Comments there should be formatted
- method Figure#paint(Graphics):
- graphics is the pen