Question about the org.eclipse.bpmn2.modeler.runtime extension point [message #793304] |
Wed, 08 February 2012 01:33 |
loic Missing name Messages: 6 Registered: December 2011 |
Junior Member |
|
|
Hi,
I would like to create my own flavor of the bpmn2-modeler. My modeler would actually be simpler, and will only show a subset of all possible BPMN 2.0 elements. Typically, only 2 events (StartEvent and EndEvent), only one task (SimpleTask), etc.
The only extension point (org.eclipse.bpmn2.modeler.runtime) seems to provide a way to do this. I am just not sure exactly how
Here is an example of what I tried:
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.example.ide.editors.editors.XMLEditor"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
default="false"
extensions="xml"
icon="icons/sample.gif"
id="com.example.ide.editors.editors.XMLEditor"
name="Sample XML Editor">
</editor>
</extension>
<extension
point="org.eclipse.bpmn2.modeler.runtime">
<runtime
class="com.example.ide.editors.Bpmn2RuntimeExtension"
description="My Modeler Description"
id="com.example.ide.editors.runtime"
name="MyModeler">
</runtime>
<modelEnablement
runtimeId="com.example.ide.editors.runtime"
type="Process">
<disable object="all"/>
<enable object="Process"/>
<enable object="StartEvent"/>
<enable object="EndEvent"/>
<enable object="ExclusiveGateway"/>
<enable object="InclusiveGateway"/>
<enable object="ParallelGateway"/>
</modelEnablement>
</extension>
</plugin>
Testing this and I get a NPE when I try to create a new BPMN2 file. The wizard starts like expected, but when I hit the Finish buton, I get:
java.lang.NullPointerException
at org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeDescriptor.getEPackage(BaseRuntimeDescriptor.java:37)
at org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor.getEClass(ModelEnablementDescriptor.java:121)
at org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor.setEnabled(ModelEnablementDescriptor.java:135)
at org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor.setEnabled(ModelEnablementDescriptor.java:111)
at org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor.setEnabled(ModelEnablementDescriptor.java:103)
So it seems that a "model" is required in my extension configuration, but I am not sure what it is used for, and what my ResourceFactoryImpl should be.
Any pointers I should look at for the "model" configuration ? or quick explanation ? Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03332 seconds