Declaring the emitter extensions
In this step, you specify the extension point required to implement the CSV report rendering extension and add the extension element details. The extension point, org.eclipse.birt.report.engine.emitters, specifies the following properties that identify the extension point:
*ID
Optional identifier of the extension instance
*Name
Optional name of the extension instance
The extension point defines an emitter that specifies the output format for the plug-in, requiring definition of the following extension element properties:
*class
Java class that implements the IContentEmitter interface.
*format
Output format that the emitter supports, such as csv.
*mimeType
MIME type for the supported output format, such as text/csv.
*id
Optional identifier of the emitter extension.
*icon
Optional icon path of the emitter extension.
*pagination
Optional setting that controls page breaks. When page-break-pagination is set, the pagination is based on the page break configuration. When no‑pagination is set, the report output is on one page. When paper‑size‑pagination is set, the pagination is based on the content size.
*supportedImageFormats
The supported format for images. The CSV emitter in this example does not support images.
*outputDisplayNone
This property controls whether the hidden content is output in the final report. For example, if the user set the display to hidden, the content will not display in the final output.
On the client side, the user has the option to invoke scripts that reset the display to block or show the hidden content. To choose not to display the output, set outputDisplayNone to true. This setting is valid only for
HTML/XHTML.
*isHidden
Used to determine whether the format is shown in UI. This property is not used in the current release.
*needOutputResultSet
Represents whether the emitter needs to output the query result set in the final output. If the property is set to true, the emitter implementation can access the result set in the content object.
To specify the extension point and extension element details use the Eclipse PDE.
How to specify the extensions
1 On PDE Manifest Editor, choose Extensions.
2 In All Extensions, choose Add. New Extension—Extension Point Selection appears.
3 In Extension Points, select the following plug-in:
org.eclipse.birt.report.engine.emitters
Choose Finish.
All Extensions lists the extension point, org.eclipse.birt.report.engine.emitters, and the extension element, emitter1(emitter). Extension Element Details contains the element details list specified in the XML schema file, emitters.exsd.
4 In Extension Element Details, specify the properties for the CSV emitter extension element, emitter, as shown in Table 24‑3.
Table 24‑3 Property values for the CSV emitter extension element
Property
Value
class
org.eclipse.birt.report.engine.emitter.csv
.CSVReportEmitter
format
csv
mimeType
text/csv
id
org.eclipse.birt.report.engine.emitter.csv
icon
 
supportedImageFormats
 
pagination
 
outputDisplayNone
 
isHidden
 
needOutputResultSet
 
Extension Element Details appears as shown in Figure 24‑3.
Figure 24‑3 Property values for the emitter extension
PDE Manifest Editor automatically updates plugin.xml.