Four new menu items are added to the popup menu of the Viatra Model Editor:
By using any of the described methods when adding a relation to the graph, it makes sure, that both ends of the relation are present in the graph viewer, while removing any model element will make sure that any connected relations will also be removed.
It is also possible to use the Visualise Model Space menu item in the popup menu of the model space in Viatra2 Model Spaces view. This item will add the entire model space to the graph viewer (the same result can be reached when using the Add Selected Subtree to the Graph View menu item of the root element in the menu editor)
Warning! If a lot of model elements are selected for inclusion, the addition process can hang the computer/Eclipse instance for quite a lot of time. To avoid this it is not recommended to select more than a few dozens of model elements.
The selected elements in the Model Space Visualisation view can be removed by pressing the Del or Backspace keys.
The Filter submenu in the pulldown menu of the view contains options to remove the built-in relationships from the graph view: if checked, the elements respectively will hide the containment, the inheritance and the typeOf relationships.
It is possible to set some display options in the view pulldown menu. These options include the setting of the automatic layout algorithm, setting a visualisation type and changing the zoom level.
To change to zoom level, use the predefined levels in the pulldown menu of the view (these are Page, 50%, 75%, 100%, 150%, 200%, 250%, 300%, 400%), the changes will be visible instantly.
Currently five layout algorithms are included: Radial, Spring, Grid, Hierarchy and Simulated Cooling layout.
The system allows representing the relations either as nodes or arcs in the graph. To achieve this, you have to choose between the available content providers: full provider and reduced provider.
It is possible to save the graph as a PNG graphics file using the Save image as file menu item in the pulldown menu.
The view synchronises the selection of the graph model and the model editor: it tries to select exactly the same elements in both representations (it is possible that some elements are selected in the model editor that are not present in the graph - in this case it is not guaranteed that the selection is kept the same in the editor and the view).
If a new model element is added in the model editor it will not be automatically added to the graph viewer - but it is possible that after changing it's settings it will appear (if one of it's containers contained elements are added to the graph previously).
The Properties view can also be used together with the Model Space Visualiser: the selected elements properties will appear there in the same way as they would when using the Model Editor.