Developer Documentation

Open Source

This system is open source, please feel free to edit and add to the source code. However, it would be a mark of politeness if you would make it clear that you have implemented your own version of the system or part of the system and attribute the original design.

Architecture

The system architecture

This system uses Eclipse's modular plugin architecture to provide easy to extend functionality. This architecture is built directly onto Eclipse and makes use of the standard core functionality, the SWT and jFace libraries, and the JDT.

As a system, it is currently designed to specifically provide augmentations to the JDT's java editor; however, it is possible to extend this functionality.

System Pipeline

This system runs a fairly linear pipeline. It follows these steps:

  1. The JDT is updated by user action.
  2. The EditorListener package listens to this update and using and Observer provides a notification to any listening MetricsDataProviders
  3. Each MetricDataProvider provides updated metrics data and updates the MetricsOverlay plugin by attaching and notifying an Observer of the updates.
  4. The metrics information can be provided to MetricsOverlay in the form of programmatic representation of MetricsOverlay's model or using XML.
  5. The MetricOverlay plugin rationalises the provided data from different MetricDataProviders and current user preferences.
  6. The MetricOverlay plugin takes the completed augmentation request and adds that information to the JavaEditor.

Providing Metric Information with a Plugin

In order to provide metrics information to the system, one must add a new MetricsDataProvider plugin. This plugin needs attach itself Metric Overlay's observer and provide new Metrics information each time it is updated.

In order to update, it may either use its own listeners or use the provided EditorListener package to provide update information. Note, if you decide to roll your own listeners, you will need to be able to extract certain parts of the Java Editor that you want to update. These are the IDocument and the IWorkbenchPart of the editor.

XML Specification Format

The DTD can be found here.