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

EMF Compare/Specifications/LogicalModelView

< EMF Compare
Revision as of 08:03, 10 October 2014 by Axel.richard.obeo.fr (Talk | contribs) (How to display the result of the logical model as a flat view / trees ?)

Logical Model View

Functional specification

EMF Compare does not act simply on the selected files, but on their whole logical model (a given model can be split through multiple files through EMF control action). Thanks to that, if you try and compare a model file that reference other model files, the comparison will still be able to take these "other" files into account. For example, if you try and compare a genmodel file (that depends on its underlying ecore file), then both files will be taken into account for the comparison.

The EMF compare Logical Model View allows to see, for a given model (or set of models), the resulting logical model computed by EMF Compare.

EMF Compare LogicalModelView Spec 01.png

  • All models that are part of the logical model will be display as a flat list.
  • The list will be non editable.
  • The model (or set of models) used to compute the logical model will be highlighted in a specific color (to be determined), to remember to the user which model(s) are at the origin of the logical model displayed.
  • A contextual menu with classic actions (as those in the Package Explorer View) will be available for each item of the list.
  • A new action will be added to this contextual menu : Show In Package Explorer. It will allow to select the corresponding model in the Package Explorer (if it is present).
  • A button Link with Editor and Selection will be added in the toolbar of the view. This button will synchronize the Logical Model View to the active editor or the selected element in the Package Explorer View.
    • The editors taken into account to populate the View will be: EMF Compare's comparison models editor, Papyrus editors, and EMF Reflective Model editors.
    • Any EMF model selected in the Package Explorer View will populate the View.
    • This button will be disabled by default.
    • When the Logical Model View is opened for the first time, the button is disabled, and no model is displayed in the view, even if one is selected in the Package Explorer View or the active editor.
    • When the button is enabled, the synchronization becomes active.
    • When the button is disabled, the synchronization becomes inactive. The last logical model computed and displayed in the View will remains until the button was enabled again and a new editor be active or a model was selected, or else the View was closed.

EMF Compare LogicalModelView Spec 03.png

Axis of evolution

As an axis of evolution, the models displayed in the Logical Model View could be presented as trees.

EMF Compare LogicalModelView Spec 02.png

A View Menu button could be added to switch the presentation between flat list and trees.

EMF Compare LogicalModelView Spec 04.png

Technical specification

How to listen to active editor ?

How to listen to current selection ?

How to compute/recompute/retrieve the logical model ?

In case of an active Editor of type :

  • EMF Compare Editor
  • Papyrus Editor
  • EMF Reflective Model Editor

In case of a selected model in the Package Explorer View.

How to display the result of the logical model as a flat view / trees ?

The Common Navigator Framework (CNF) seems to be the appropriate way to display elements in the viewer. The CNF uses the idea of Navigator Content Extensions (NCE) which can refer to a content provider, a label provider and a contextual menu. The Package Explorer View uses the CNF. It will allow us to reuse the label provider and the contextual menu of the Package Explorer View.

More links:

Back to the top