-
Notifications
You must be signed in to change notification settings - Fork 2
How to use this
Once the Plug Ins are installed in your Eclipse, you can start developing your model and visualization with our DSLs to define your project. You can find examples on how such configurations can look like in the SPViz Examples Repository. When you create or open the example .spvizmodel
and .spviz
files in Eclipse, confirm to convert the project to an XText project and it will automatically start generating some Plug-Ins with model files following your defined SPViz model. Eclipse will start building these new Plug-Ins and will most likely show some errors. To fix these you have to also load the target platform generated into the spviz.build/de.cau.cs.kieler.spviz.targetplatform/de.cau.cs.kieler.spviz.targetplatform.target
file into your Eclipse and let it build.
Start a runtime Eclipse from your Eclipse with the new Plug Ins enabled and you are good to visualize your project model files! To do this, first open the "Java Perspective" (Window->Perspective->Open Perspective->Java Browsing). There, click the little down arrow next to the Play button, and on "Run configurations". Double click "Eclipse Application" to create a new launch configuration. Name that as you wish and make sure that your new Plug Ins are checked in the "Plug-Ins" tab of the run configuration. In the runtime Eclipse, open your generated model file (see below) via Open with->other...->Sample Ecore Model Editor and open the KLighD Diagram View via Window->Show View->Other...->KIELER Lightweight Diagrams->Diagram. The diagram view should now show the start point of a visualization for your project! (If not, see the FAQ).
To generate a model file, you have to write a model generator yourself to show SPViz the location the artifacts of your software project. For your new project, we already generate a working set-up for a project that you can complete to extract information of your software project into a format readable for SPViz.
You can find this project in <your model name>.generate
in your development Eclipse. See the ReadProjectFiles.java
file for further instructions on how to use and extend this initial generator framework and have a look at the other example generators
You can execute the generator directly from Eclipse by executing its ConfigAndExecuteCli
file as a Java Application with these arguments (fill in the specifics for what you want to generate): -N <project Name>=<project Name> -P <project Name>=<path to your git repo> -S <path to where the generated model file should be placed>
Alternatively, you can also build and execute the generator from the command line. See the next section for the build artifacts for that
While generating the Plug-Ins for your project you may have noticed one of the generated Plug-Ins having your visualization name with a .build
suffix. This contains the starting point of a Maven build, capable of producing artifacts for three use cases:
- a standalone jar file containing a language server with an extension to serve diagrams using KLighD and KLighD-VSCode in VS Code Extensions or in standalone websites
- a P2 repository to provide the diagrams for your projects directly in Eclipse using KLighD
- a standalone jar file containing the model generator.
You can build the language server and repository by calling mvn clean package
and to build the generator by calling mvn clean package -P generator
. The artifacts can be found in the subfolders [your visualizaition ID].language.server.cli/target/exe/
, [your visualization ID].repository/target/repository/
, or [your model id].generate/target
, respectively.
You can start the language server jar via java -jar -Dport=5007 [your visualization name].jar
and directly use it. The easier way to use it though is in combination with the klighd-cli for local documentation. Have a look into the local documentation example for klighd-cli to see how to utilize that.
The repository may be hosted locally and used as a P2 update site to install the visualization Plug-Ins directly into Eclipse. Don't forget to also install the KLighD Diagram view via its P2 update site in Eclipse to be able to use the Plug-Ins.