Skip to main content

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.

Jump to: navigation, search

MoDisco/ModelBrowser

< MoDisco
Revision as of 07:19, 13 January 2009 by Unnamed Poltroon (Talk) (description of the model browser)

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

The MoDisco model browser is a feature-rich Ecore model browser. You can use it to browse and edit any Ecore model more easily than with the default Ecore editor.

Presentation

The editor surface is separated in two panes. The left one displays a list of meta-classes, and the right one shows instances of the selected meta-class (that is, model elements).

At the top of each pane, a toolbar allows you to quickly change display options relative to that pane.

MoDiscoModelBrowserMainUI.png

Features

Links

You can follow links between model elements by expanding the links tree nodes. Links appear for associations, aggregations and the EMF container. The tree representing the model is infinite.

An icon indicates the link type, and the number of instances under the link is displayed in parentheses.

icon meaning
MoDisco model browser - link.gif bidirectional link
MoDisco model browser - unidirectional link.gif unidirectional link
MoDisco model browser - Aggregation.gif bidirectional aggregation link
MoDisco model browser - unidirectional aggregation.gif unidirectional aggregation link
MoDisco model browser - inverse aggregation.gif bidirectional inverse aggregation link
MoDisco model browser - container link.gif link to the EMF container of the element (eContainer); this link is not defined in the metamodel

The source of the link is always its parent in the tree, and the targets are its children.

Display options

You can use the right toolbar to set the following options (from left to right):

MoDisco model browser - Instances Toolbar.png

  • Show empty links (containing no instances)
  • Show derived links
  • Sort instances by name
  • Sort links by name
  • Display full qualified meta-classes names
  • Display multiplicities on links
  • Show opposite links
  • Show a link to the container (which is not part of the metamodel)
  • Show attributes as tree elements (in addition to the Properties view)
  • Show empty attributes

Meta-class list

The left pane displays all the meta-classes of the opened model, with the number of instances for each meta-class. When you click on a meta-class, its instances are displayed in the right pane. Multi-selection of meta-classes is also supported.

You can use the left toolbar to set the following options (from left to right):

MoDisco model browser - Metaclasses Toolbar.png

  • Sort by name
  • Sort by instance count
  • Show full qualified names
  • Show empty meta-classes
  • Group meta-classes by package
  • Display instances of subclasses (for example, when an abstract meta-class is selected, instances of its derived classes are displayed)
  • Show derivation tree

Browse

Right-click on a model element and select "Browse" to select the meta-class of this element in the left pane and display this model element amongst its siblings of the same type. You can also press <Enter> while an element is selected to trigger this action.

MoDisco model browser - browse action.png

Navigation history

When you navigate from one meta-class to another, or when you browse an instance, you can then go back and forth in navigation history by using the left and right arrows in the toolbar (or the Alt+Left, Alt+Right shortcuts).

Search

Type some text in the search bar and type <Enter> to filter the currently displayed instances by name. Press <Escape> to restore the view. Only instances of the currently selected meta-class are filtered.

Editing

To create a new model element, right-click on an aggregation link and select the name of the meta-class in the "New Child" sub-menu. MoDisco model browser - New Child.png

To change attributes of an element, click on this element and make modifications in the Properties view. To show this view, double-click on the element or right-click and select "Show Properties View".

MoDisco model browser - Properties view.png

Accessibility

The font size can easily be changed by the click of a button in the main toolbar.

MoDisco model browser - font size.png

The first button makes the font larger, the second one smaller, and the third one restores the default font size. The base font is configurable in Eclipse preferences.

Extensibility

The MoDisco model browser currently provides one extension point for the naming of instances, and another one for specifying icons for model elements. More will come in the future.

Back to the top