Working with the Column Extension sample

This sample demonstrates how to extend and add columns to the TPTP statistics views (Coverage, Memory, and Execution Time) using the extension point org.eclipse.hyades.trace.views.columnExtension.

If you have not already done so, create the example by File > New > Example... > Column Extension Sample.

The sample shows how to implement a sample column extension for the Coverage Statistics view. However, additions can be made to any other TPTP statistics views using the applyTo element of the extension point (Refer to the schema columnExtension.exsd of the org.eclipse.hyades.trace.views plug-in for details). Three new columns were added to the Coverage Statistics view, which show calculated statistical data for items in the table view.

The plugin.xml file in the sample plug-in contains the extension point contribution. The Java class, ColumnExtensionProvider.java, implements the interface that is required for the additional columns.

The following procedure outlines the steps needed to view the additional columns in the view:

  1. Launch an instance of a runtime workbench by selecting Run > Run As > Eclipse Application.
  2. Collect profiling data by profiling an application. Ensure that the Method Code Coverage profiling set is selected.
  3. Open the Coverage Statistics view on the profiling agent created in Profiling Monitor view.
  4. See the last three columns added by the sample extension (lines missed, lines hit, and % lines hit).