Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343140

Summary: Recursive loop when using D&D in navigator
Product: [Modeling] ECP Reporter: Otto von Wesendonk <ottovonwesendonk>
Component: NavigatorAssignee: Jonas Helming <jhelming>
Status: CLOSED INVALID QA Contact:
Severity: major    
Priority: P3 CC: mkoegel, ottovonwesendonk
Version: unspecified   
Target Milestone: 0.8.9   
Hardware: PC   
OS: All   
Whiteboard:

Description Otto von Wesendonk CLA 2011-04-18 08:06:56 EDT
If you try to D&D an element in the navigator, a stack overflow error occurs due to a recursive loop in the drop adapter:

	at org.eclipse.emf.ecp.common.dnd.ComposedDropAdapter.getTargetDropAdapter(ComposedDropAdapter.java:227)
	at org.eclipse.emf.ecp.common.dnd.ComposedDropAdapter.getTargetDropAdapter(ComposedDropAdapter.java:227)
	at org.eclipse.emf.ecp.common.dnd.ComposedDropAdapter.getTargetDropAdapter(ComposedDropAdapter.java:227)
	at org.eclipse.emf.ecp.common.dnd.ComposedDropAdapter.getTargetDropAdapter(ComposedDropAdapter.java:227)
	at org.eclipse.emf.ecp.common.dnd.ComposedDropAdapter.getTargetDropAdapter(ComposedDropAdapter.java:227)
Comment 1 Jonas Helming CLA 2011-05-26 09:30:46 EDT
Can you provide more details please? Which model, which drop?
Comment 2 Maximilian Koegel CLA 2011-05-26 10:31:50 EDT
I do not have any, I just found it in my console, but it is a loop and I guess that it should be possible to make sure that the method cannot loop
Comment 3 Otto von Wesendonk CLA 2011-05-26 11:29:02 EDT
Without having looked at the code, could it relate to an element being contained by an element of the same type?
Comment 4 Kang-Hunn Lee CLA 2011-07-18 08:47:18 EDT
I tried to recreate this bug, but the d&d doesn't work at all in my emfcp instance. I can drag an element from the navigator, but I can't drop it on any other element.

I checked in the plug-in registry view of the emfcp instance and it looks like the extension point for the dropadapter (org.eclipse.emf.ecp.common.dropadapter) is correctly instanciated, but the default implementation of the dropadapter (org.eclipse.emf.ecp.common.dnd.DefaultMEDropAdapter) is not registered to that extension point.

Since I couldn't find the reason for this I created a new plugin, copied the DefaultMEDropAdapter class into that plugin and registered it to the extension point from there. The DefaultDropAdapter is still not found in the plugin-registry.
Comment 5 Otto von Wesendonk CLA 2011-07-28 13:12:21 EDT
(In reply to comment #4)

This is due to a id-string mismatch, which probably occurred while the namespace change. Besides that there are other issues and we should probably open new bugs
Comment 6 Jonas Helming CLA 2011-09-19 11:40:24 EDT
cannot repoduce in master