Chapter 17. Plug-Ins

QuickRev provides a plug-in mechanism to plug-in own file viewers for different file types, so the content of the files can be shown in a user defined way.

A file viewer to display UML state machine diagrams is shipped with QuickRev already, which shows an UML diagram graphically and allows assignment of comments to the different UML elements.

To create an own plug-in, which displays an UML sate machine diagram, the read file format has to be transformed in the internal UML model.
The provided UML example plug-in (UMLExamplePlugin.jar) serves as an example for a plug-in implementation, which reads an own UML file format. To check out the example plug-in start QuickRev with the options --plugin UMLExamplePlugin.jar and load the provided uml example project file (UMLExampleProject.qrx), which contains an UML state machine diagram in the QuickRev-UML format. Take a look at the screenshot below for an example of this plug-in.

The UML elements delivered with QuickRev are for state machine diagrams up to now, but the elements can be extended for use of other UML elements as well.

To create different file viewers for other kind of files you have to implement the net.tomse.quickRev.files.FileViewerPlugin interface. A default implementation for common tasks is available via the abstract sub-class net.tomse.quickRev.files.AbstractFileViewerPlugin which may simplify the work.

For knowing the entry point of a plug-in the corresponding jar file has to contain a META-INF/services directory, which contains a text file with the name net.tomse.quickRev.files.FileViewerPlugin. The content of the file has to be the name of the implementing class, e.g. Multiple plug-ins can be specified in different lines. A # serves as comment.

To include the plug-in into the QuickRev.jar file put the .class files into the jar file and add a META-INF/services directory with the content as described above to define the entry point of the plug-in.

Figure 17.1. The UML file plug-in in action

The UML file plug-in in action

Get QuickRev at Fast, secure and Free Open Source software downloadsCopyright 2008 - 2016 Tom SeidelLast Update: 2016-11-5