Query Result Renderer

Identifier:
org.eclipse.mat.api.renderer

Since:
0.7.0

Description:
The Memory Analyzer report generator utilizes the renderer to create a textual representation of the query results, e.g. the table, trees, histograms, etc. Out of the box, HTML, CSV and TXT are supported. This is the extension point to add an 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 three renderers: one for HTML, one for CSV (comma separated values) and one for TXT (plain text).


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