Visual representations raise the level of abstraction and help the comprehension of software systems. Thus, especially for modelling languages graphical syntaxes enjoy a high reputation. To ease the time consuming and cumbersome task of building visualisations or even graphical editors, several model-based visualisation frameworks emerged (e.g., Tiger Project, GMF). With JaMoPP providing a model-based representation of Java these technologies can now be applied to build tailored visualisations for Java programs.
Using GMF, we generated the editable diagrammatic representation for Java packages depicted in Figure 1. It provides a comprehensive overview of a package's structure and its type interrelations and could help the exploration of big Java libraries and frameworks. As a simple example we visualised the code generated by an ATL transformation.
GMF provides a model-driven approach for generating editors for EMF-based languages. Graphical primitives like nodes and arrows are used to visualise model instances. These primitives are related to and customised with regard to classes, class properties, and references of our Java metamodel. This adaptable mapping provides flexibility in to ways: First, visualisations can be tailored to the requirements of a specific engineering task. Second, an existing visualisation can easily be extended to other languages by adjusting the visual mappings.
The capabilities of the editors generated with GMF go beyond just visualising models graphically. They also allow for editing models using their graphical representation. Since the JaMoPP printer serializes Java models to source files, these changes are transparently mapped to the underlying source code. Thus, JaMoPP contributes to the development of visual tools for software development with Java.