Defining a generator handler

From Event-B
Revision as of 12:46, 29 December 2011 by imported>Colin (New page: To link the Generator Action to your GMF diagram editor add an extension point like this to your plugin.xml (replace "PUT YOUR DIAGRAM EDITOR ID HERE" with your own id (usually found in yo...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

To link the Generator Action to your GMF diagram editor add an extension point like this to your plugin.xml (replace "PUT YOUR DIAGRAM EDITOR ID HERE" with your own id (usually found in your Diagram Editor Class (in package part).

<extension
    point="org.eclipse.ui.handlers">
 <handler
       class="ac.soton.eventb.emf.diagrams.generator.GenerateAction"
       commandId="ac.soton.eventb.emf.diagrams.generator.generateEventB">
    <enabledWhen>
       <and>
          <with
                variable="activePartId">
             <equals
                   value="PUT YOUR DIAGRAM EDITOR ID HERE">
             </equals>
          </with>
       </and>
    </enabledWhen>
 </handler>
</extension>