Difference between revisions of "Extending the Rodin Database"

From Event-B
Jump to: navigation, search
m (Adding a New Attribute to Existing Elements)
m (Adding a New Attribute to Existing Elements)
Line 5: Line 5:
  
 
In the example below, we assume that the extensions are developed within a plug-in project with name '''org.eventb.developer.examples'''
 
In the example below, we assume that the extensions are developed within a plug-in project with name '''org.eventb.developer.examples'''
 +
 +
The following extensions declares a new string attribute.
  
 
  <extension
 
  <extension
 
         point="org.rodinp.core.attributeTypes">
 
         point="org.rodinp.core.attributeTypes">
 
       <attributeType
 
       <attributeType
             id="probai"
+
             id="stringAttr"
 
             kind="string"
 
             kind="string"
             name="%eventBConfigurationAttribute">
+
             name="%eventBStringAttribute">
 
       </attributeType>
 
       </attributeType>
 
   </extension>
 
   </extension>
 
 
In order to access an attribute of an internal element
 

Revision as of 17:04, 24 March 2010

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 extensions declares a new string attribute.

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