Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Testing the diagram synthesis is most easiest done by means of the test menu contribution created by the project wizard. Thus, start a test Eclipse Application via 'Run As', e.g. via 'Run' in the main menu. Import or create a project with some of your model data. If your model format has been described by means of Ecore, you can open your model with a matching EMF tree editor as shown in the following screenshot (here we used the Ecore format itself, so we used an "arbitrary" Ecore model (wink)).
Open the context menu while an instance of your source model type is selected, and hit the Open ... diagram entry. Btw.: The menu entry is enabled as far as the selected elements are of your source model type. Hence, there may be other ways (views or editors) to open the diagram beyond those EMF tree editors.

Image Added

Alternatively, you might want to create your own menu contribution. Here are some instructions using the Eclipse 3.X API: Register a command with some arbitrary id and a default handler. In the execute() method of your handler call

...

This statements will open an eclipse view part showing your desired diagram. <<someId>> is an the Id that can be used to access, update, or close the view part later on programmatically, and <<someName>> is the name of the view (shown at the view's tab), <<yourConcreteData>> is an instance of the input type of your diagram synthesis implementation. Via the last parameter some additional instructions can be handed over. For those that are not yet familiar with Eclipse menu stuff have a look on at a corresponding tutorial, e.g. at vogella.com.

Exemplary diagram syntheses

Exemplary use case diagrams (created according to by the UML2UseCaseDiagramSynthesis) and circuit diagrams (created by the CircuitDiagramSynthesis) are shown in following screenshots, the source UML & Circuit models are part of the examples project, too. In order to obtain the those diagrams enable the automatic diagram creation by activating Visualize EMF tree editor content (KLighD) as shown below.
 

...

Now you might want to use some advanced features of KLighD diagrams, like sophisticated figure styling or diagram synthesis options. Details on that will follow soon, the EcoreDiagramSynthesis, which allows to create is in charge of creating appealing class diagrams from Ecore models and which you will also find in the examples project, illustrates those features already. The following picture shows such a diagram , and a list of options for tailoring such diagrams in the side bar on the right.

...