|Question about Connections with EReference [message #565791]
||Sat, 28 August 2010 08:30
| Tijs Rademakers
Registered: August 2010
I'm working on a simple version of a BPMN 2.0 editor based on the EMF model of the BPMN2 subproject of MDT. In this EMF model you have for example a StartEvent and EndEvent that are eventually EObjects. I'm able to use the Graphiti tutorial example code together with these Start and End Event objects and that looks great.
But now I run into an issue with connecting a StartEvent with an EndEvent. According to the BPMN2 EMF model I should use a SequenceFlow, with is eventually also a EObject. Now I'm trying to create a Connection between a Start and End Event with a SequenceFlow. Everything goes well until the link method of the AbstractFeature class is invoked from the public PictogramElement add(IAddContext context) method in the TutorialCreateEReferenceFeature equivalent class. There I get a NullPointer on the following line (600) of the AbstractFeatureProvider class:
ResourceSet resourceSet = bo.eResource().getResourceSet();
In the tutorial a EReference instance is used to implement the Connection, and that's working okay ofcourse.
But can I also use a EMF object that extends EObject to implement such a Connection? Am I doing something wrong here?
Powered by FUDForum
. Page generated in 0.01476 seconds