Community
Participate
Working Groups
Build Identifier: I20100608-0911/Helios/3.6 When dragging from the palette and dropping anywhere in the diagram, an exception occures. Clicking to the palette and clicking in the diagram, it works. Reproducible: Always Steps to Reproduce: 1. Install GEF Examples 2. Open the Flow Example 3. Drag an "Activity" from the palette 4. Drop anywhere on diagram -> Exception: java.lang.IllegalArgumentException: CreateRequest has unspecified CreationFactory
Created attachment 173503 [details] stack trace
In the type: FlowEditor, in method: initializeGraphicalViewer() the drop target listener is wrong. The template of the TemplateTransferDragSourceListener is the creation tool an not a CreationFactory. So the factory is null and a model object cannot be created. And just for your information: the type FlowElementFactory is not used and can be deleted.
Which Linux is this?
This is on: Ubuntu 10.04 LTS - Lucid Lynx 64bit with Gnome Desktop 2.30.2
Changed implementation of TemplateTransferDropTargetListener#getFactory(Object) to use a SimpleFactory in case the provided template is a class, which seems to be a common use case. This way, the reported problem in the flow example is covered by the default behavior of TemplateTransferDropTargetListener, and a custom implementation does not have to be provided. Removed FlowElementFactory from example, which is not used (and was identical to SimpleFactory). Committed changes to R_3_6_maintenance branch as well as cvs HEAD (3.7).