Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/Papyrus Developer Guide/How To GMF Diagram Editor

< Papyrus‎ | Papyrus Developer Guide
Revision as of 08:53, 17 April 2014 by Remi.schnekenburger.cea.fr (Talk | contribs) (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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Back to the top