Extending the Rodin Database

From Event-B
Revision as of 17:12, 24 March 2010 by Son (talk | contribs) (Adding a New Attribute to Existing Elements)
Jump to: navigation, search

Adding a New Element

Adding a New Attribute to Existing Elements

The extension point org.rodinp.core.attributeTypes to declare a new attribute.

In the example below, we assume that the extensions are developed within a plug-in project with name org.eventb.developer.examples

The following extension declares a new string attribute.

<extension
        point="org.rodinp.core.attributeTypes">
     <attributeType
           id="stringAttr"
           kind="string"
           name="%eventBStringAttribute">
     </attributeType>
 </extension>

The attribute has an id (which should be always unique) which also contain the project name, i.e. org.eventb.developer.examples.stringAttr. The name of the attribute is a string that could be externalised to be used for displaying to the users in the future.