Versions Compared

Key

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

...

In order to let the framework draw your desired diagrams for representing given data we need to tell KLighD how obtain nodes, edges, and hierarchy levels from the provided data. To this end we need to implement a so called diagram synthesis. Getting an initial stub of such an implementation is most easiest done by means of our KLighD project wizard (if the entry is not visible, switch the perspective or close and reopen it, or simply choose Other... → KIELER Light-weight diagrams):

Provide the source model type, e.g. via the 'Browse' button. Note that the project containing that class must exist in the workspace or at least any other workspace project must have this class in its class path, e.g. via a bundle dependency. Otherwise it won't be offered by the list of available classes. Of course you might alter the project's name, the name of the diagram synthesis implementation and its containing package. Finally choose your favorite implementation language - we like Xtend very much for this purpose! (smile)

You will get the following implementation template, it is already registered at KLighD's dedicated extension point (see the project's plugin.xml).

Image Added

Before starting with the implementation let us point you at some hints on using Xtend!

Create a KNode (via createNode()) for each element comprised by the given instance model of your data type, here EPackage, and add that nodes to the children of root. Create a KEdge for each relation or link to be contained in your diagram. You can use createEdge() for that purpose. Set source and target node of those edges accordingly, this will implicitly add the edges to the diagram (via EMF's EOpposite mechanism).  UML2UseCaseDiagramSynthesis

Incorporated Technologies

...