Extending : Widget extension : Using the table rendering feature of table widget : Creating customized table generation rules
  
Creating customized table generation rules
The option Auto of the widgetType property works according to the table generation rules. If you want to change the default table generation rules, you must build a plug-in for the customized table generation rules to work in a higher priority level than the default settings.
Create a plug-in project
1 Right-click a workspace and select New > Project to create a Plug-in Project.
2 In the New Plug-in Project window, input a name of the plug-in and keep default values for other options. Click Next.
3 Under the Options section, clear the This plug-in will make contributions to the UI check box and click Next.
4 Clear the Create plug-in using one of the templates check box and click Finish.
5 Click No in the Open Associated Perspective window.
The project is created.
Configure the plug-in settings
1 Select the MANIFEST.MF file of the new project and go to the Dependencies tab.
2 In the Required Plug-in section, click Add to add the com.ibm.btt.tools.xui.edition2 plug-in.
3 Go to the Extensions tab and click Add in the All Extensions section to add the con.ibm.btt.tools.xui.editor2.generator extension point.
4 Right-click the new extension point and select New > widgetGen.
5 Select the widgetGen extension point and configure the fields in Extension Element Details section.
class
Input com.ibm.btt.tools.xui.editor2.generator.TableGenerator.
target
Input com.ibm.btt.tools.xui.editor2.model.impl.TableModel.
priority
Select high or medium. The system default setting is low.
widgetGenRule
Make a copy of the sample table generation rule file toolkit_root\plugins\tooling\com.ibm.btt.tools.xui.editor2_8.2.0.3\configure\table-generate-rule.json and browse for the copied table-generate-rule.json file.
name
Specify a name for the extension.
This graphic is described in the surrounding text.
6 Select the table-generate-rule.json file in the project and modify the code to change the default table generation rules.
For more information about each section of the table generation rules, see Table generation rules.
7 Export the plug-in.
Select the MANIFEST.MF file of the plug-in project and go to the Build tab.
In the Binary Build section, select META-INF folder, plugin.xml file, and the folder that contains the table-generate-rule.json file.
This graphic is described in the surrounding text.
Go to the Overview tab and click Export Wizard in the Exporting section.
This graphic is described in the surrounding text.
Select the plug-in to export and specify the export directory. Click Finish.
The plug-in is exported to a JAR file in the export directory.
8 Copy the exported JAR file to toolkit_root\dropins\BTT\eclipse\plugins for the plug-in to take effect.
Result
When the table widgetType property is Auto, the table generation rules in the JAR file take effect.
Next
To further change the table generation rules, edit the table-generate-rule.json in the JAR file.
See also
Using the table rendering feature of table widget