Using the Flash object library : Tutorial 4: Creating a Flash chart that gets data through the dataURL variable : Task 6: Define an extension
 
Task 6: Define an extension
In this procedure, define an extension that customizes the data extraction functionality provided by the org.eclipse.birt.report.engine.dataextraction plug‑in. This plug-in defines an extension point, which your plug‑in uses to define a custom extension to retrieve data from the data set and generate the XML data required by the Flash chart.
1 In the Plug-in editor, choose the Extensions tab. If an Extension tab is not available, do the following:
1 In the Overview page, in the Extension/Extension Point Content section, choose the Extensions link.
2 In the message that appears, choose Yes.
2 In the Extensions page, choose Add.
3 In New Extension, perform the following steps:
1 Deselect Show only extension points from the required plug-ins.
2 Select org.eclipse.birt.report.engine.dataExtraction from the list of extension points, as shown in Figure 15‑28.
Figure 15‑28 Selecting an extension point
Choose Finish. A message asks if you want to add a dependency to the org.eclipse.birt.report.engine plug‑in. Choose Yes. The Extensions page displays the new extension to the plug‑in.
4 In Extension Element Details, edit the extension properties using the values shown in Table 15‑1.
Table 15‑1 Extension properties
Property
Value
Description
id
com.actuate.birt.flash.library.sample.combchart.XMLGenerator
The extension identifier.
format
CombChartXMLFormat
The supported format of this data extraction extension. Later, when you create the Flash chart’s dataURL variable, you pass the format value as an argument to the createDataURL( ) method.
class
com.actuate.birt.flash.library.sample.combchart.XMLGenerator
The Java class that implements the IDataExtractionExtension interface. You create this class later.
mimeType
text/xml
Mime type of the file generated by the extension.
name
Combination Chart XML Format
The name of the extension. This name appears in the user interface.
isHidden
true
Specifies whether format is shown in the user interface.
Figure 15‑29 shows the specified properties in the Extensions page.
Figure 15‑29 Properties of the extension
5 Save the plug‑in. Package Explorer displays the folder structure of the plug‑in, as shown in Figure 15‑30.
Figure 15‑30 Package Explorer displaying the folder structure of the plug‑in