Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318957 - Flow Example: DND Broken
Summary: Flow Example: DND Broken
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.6.2 (Helios SR2)   Edit
Assignee: Alexander Nyßen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-06 03:23 EDT by Daniel Hirscher CLA
Modified: 2016-12-14 11:18 EST (History)
2 users (show)

See Also:


Attachments
stack trace (4.33 KB, text/plain)
2010-07-06 03:23 EDT, Daniel Hirscher CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hirscher CLA 2010-07-06 03:23:01 EDT
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
Comment 1 Daniel Hirscher CLA 2010-07-06 03:23:53 EDT
Created attachment 173503 [details]
stack trace
Comment 2 Daniel Hirscher CLA 2010-07-06 04:35:41 EDT
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.
Comment 3 Anthony Hunter CLA 2010-09-28 10:10:41 EDT
Which Linux is this?
Comment 4 Daniel Hirscher CLA 2010-09-29 01:48:45 EDT
This is on: Ubuntu 10.04 LTS - Lucid Lynx 64bit with Gnome Desktop 2.30.2
Comment 5 Alexander Nyßen CLA 2010-11-14 15:50:38 EST
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).