Every domain, project, user or type of file is analyzed or explored under different views or interests. The history flow image offers an good overview over the file's history, but cannot satisfy all special needs due this different views or interest. For these needs the visualization uses the eclipse extension framework to offer de.feu.coeclipse.historyflow.metricProvider as a extension point for user defined metrics, according the rule "You can't control what you can't measure." from Tom DeMarco.

The visualization itself contributes three simple metrics that illustrates three different approaches:

The 3 metric approaches
  • A single line of values. As an example, the metric Time Distance Between Revisions (A) describes the gap between the current revision and his predecessor counted in days. This metric serves the requirement to see more details about the creation time, since the revisions in the flow image are drawn equidistant.

  • Multiple lines, one for each author in the file's history. The colors for the lines are taken from the global author list in the visualization. Like the metric Lines Owned By Author (B), a value for each author and each revision is calculated, and for each author, a line of values is build. Note, that a line of values isn't shown, if the author is deselected in the global author list.

  • Multiple, author independent lines of values with metric defined colors. The metric Changes and Activity (C) is an example for this approach. This metric calculates 3 values for the numbers of modified (blue), new (green) and deleted lines (red).

The metric extension point is defined by the Interface IMetricProvider. In this, the method getElementsFor(.) is called when the metric has to been shown by a user selection. The method returns an array of IMetricElement, one for each line of values. Because the extension point is lazy evaluated, a label for the metric pull down menu has to be provided in the extension point declaration.

The metric extension point

For the calculation of the metric, the contributed metric has access to the history data via the interface IFlowHistory that is an argument of the method getElementsFor(.). Available data are the version data from the repository, evaluated data about the modifications, the annotated line ranges, the content and many more. For more details about the available data see the API or take a closer look on the code of the three contributed metrics.

The history data interface