Query Result Renderer

Identifier:
org.eclipse.mat.api.renderer

Since:
0.7.0

Description:
The Memory Analyzer reports utilize the renderer to create a textual representation of the query results, e.g. the table, trees, histograms, etc. Out of the box, HTML and CSV are supported. This is the extension point to add alternative renderer.

Configuration Markup:

<!ELEMENT extension (renderer)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT renderer EMPTY>

<!ATTLIST renderer

impl CDATA #REQUIRED

>


Examples:
Following is an example of a renderer declaration:


   <extension point="org.eclipse.mat.report.renderer">
      <renderer impl="org.eclipse.mat.report.internal.CsvRenderer" />
   </extension>

The renderer must implement org.eclipse.mat.report.IOutputter. The @Renderer annotation declares the target format and, optionally, the applicable result type.


@Renderer(target = "csv", result = IResult.class)
public class CsvRenderer implements IOutputter
{
   [...]
}

In the report, use the "format" parameter to specify the output format:


   <query name="Class Histogram">
      <param key="format" value="csv" />
      <command>histogram</command>
   </query>

API Information:
The value of the impl attribute must represent an implementor of org.eclipse.mat.report.IOutputter.

Supplied Implementation:
The Memory Analyzer supplies two renderer: one for HTML, one for CSV (comma separated values).


Copyright (c) 2008 SAP AG and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html