Declaring the report item extensions
On the plug-in manifest, extensions are what this plug-in contributes to the Eclipse environment by using other plug-ins’ extension points. On the plug‑in manifest, extension points are this plug-in’s functionality that can be extended by other plug-ins.
So, specify the extension points required to implement the rotated label report item extension and add the extension element details. The Eclipse PDE uses the XML schema defined for each extension point to provide the list of valid attributes and values specified for the extension elements. The rotated label report item contributes extensions to the following extension points:
*org.eclipse.birt.report.designer.ui.reportitemUI
Registers the graphical user interface (GUI) to use for the report item extension
*org.eclipse.birt.report.model.reportItemModel
Specifies how to represent and persist the report item extension in the ROM
*org.eclipse.birt.report.engine.reportitemPresentation
Specifies how to instantiate, process, and render a new report item at report presentation time
*org.eclipse.birt.report.designer.ui.elementAdapters
Specifies the adapters for the report item property page UI
The XML schema specifies the following properties that identify each extension point in the run-time environment:
*ID
Optional identifier of the extension instance
*Name
Optional name of the extension instance
The extension point, org.eclipse.birt.report.designer.ui.reportitemUI, specifies the following extension elements:
*reportItemFigureUI
Fully qualified name of the Java class that implements the org.eclipse
.birt.report.designer.ui.extensions. IReportItemFigureProvider interface
*reportItemLabelUI
Fully qualified name of the Java class that gets the display text for the report item component in BIRT Report Designer
*reportItemImageUI
Fully qualified name of the Java class that implements the org.eclipse
.birt.report.designer.ui.extensions.IReportItemImageProvider interface
*model
ROM report item extension name that maps to this UI component
*builder
Optional component instantiated when a user drags the extended report item from the BIRT Report Designer palette to the editor
*palette
Icon to show and the category in which the icon appears in the palette
*editor
Flags indicating whether the editor shows in the MasterPage and Designer UI and is resizable in the editor
*outline
Icon to show in the Outline view
*description
Optional element containing text describing what the UI extension does
The extension point, org.eclipse.birt.report.model.reportItemModel, specifies the following extension element properties:
*extensionName
Internal unique name of the report item extension
*class
Fully qualified name of the Java class that implements the org.eclipse
.birt.report.model.api.extension.IReportItemFactory interface
*defaultStyle
Predefined style to use for the report item extension
*isNameRequired
Field indicating whether the report item instance name is required
*displayNameID
Resource key for the display name
*extendsFrom
Parent element from which a report item extends
*hasStyle
Flag that marks whether an extended item can have style
For RotatedLabel, reportItem specifies the following property extension elements:
*displayText
*rotationAngle
These extension elements specify the following properties:
*name
Internal unique name of the property extension element.
*type
Data type, such as integer or string.
*displayNameID
Resource key for the display name.
*detailType
Detail data type, such as Boolean or string.
*subType
When the detailType is a list, the subType is required and must be defined as one of the restriction choices. By default the subtype is string.
*canInherit
Flag indicating whether the property extension element can inherit properties.
*defaultValue
Default value of the property extension element.
*isEncryptable
Flag indicating whether the property is encrypted.
*DisplayName
Display name to use if no localized I18N display name exists.
*isList
Indicates whether the property value is a single structure or a list.
*hasOwnModel
Indicates whether the XML property is the extension model.
*allowExpression
Indicates whether the property can be set as an expression. Each expression contains the value and the type.
The extension point, org.eclipse.birt.report.engine.reportitemPresentation, specifies the following reportItem extension elements:
*name
Unique name of the report item extension.
*class
Fully qualified name of the Java class that implements the org.eclipse
.birt.report.engine.extension. IReportItemPresentation interface.
*supportedFormats
Supported rendering formats for this extended item. The value for this attribute is a comma-separated string, such as "HTML,PDF,EXCEL". The string is case‑insensitive.
The extension point, org.eclipse.birt.report.designer.ui.elementAdapters, creates an adapter class that implements the IPageGenerator interface. The org.eclipse.birt.report.model.api.ExtendedItemHandle class implements the interfaces which make the extension point adaptable. The adapter specifies the following properties for the property pages:
*id
Unique name of ReportDesign.AttributeView
.RotatedLabelPageGenerator
*type
Implements org.eclipse.birt.report.designer.ui.views.IPageGenerator
*factory
Registers and creates the IPageGenerator instance
*singleton
Indicates whether one or more adapter elements can simultaneously exist
*priority
Indicates priority in a run-time environment
How to specify the extensions
1 On PDE Manifest Editor, choose Extensions.
2 In All Extensions, choose Add. New Extension appears.
3 In New Extension—Extension Points, Available extension points, select the following plug-in:
org.eclipse.birt.report.designer.ui.reportitemUI
New Extension—Extension Points appears, as shown in Figure 23‑5.
Figure 23‑5 Extension points in New Extension
In cases when the plug-in does not appear in the list, uncheck the Show only extension points from the required plug‑ins box.
Choose Finish.
4 Repeat steps 2 and 3 to add the following extension points to the list of required extension points in the Extensions page:
*org.eclipse.birt.report.model.reportItemModel
*org.eclipse.birt.report.engine.reportitemPresentation
*org.eclipse.birt.report.designer.ui.elementAdapters
Figure 23‑6 shows the list of extension points required for the report item extension example.
Figure 23‑6 Required extension points for a report item extension
How to add the extension details
Perform the following tasks:
1 On Extensions, in All Extensions, select org.eclipse.birt.report.designer.ui
.reportitemUI.
2 In Extension Details, set the following property values as shown in Table 23‑3.
Table 23‑3 Properties for the reportItemUI extension 
Property
Value
ID
rotatedLabel
Name
Rotated Label Extension
3 Repeat step 2 to add the property values shown in Table 23‑3 to the extension details for the other extension points.