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

Bug 276033

Summary: "Feedback line" still visible after moving child
Product: [Modeling] GMF-Runtime Reporter: Laurent Redor <laurent.redor>
Component: GeneralAssignee: Inbox <gmf.runtime.diagram-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: apupier, mariot.chauvin
Version: 2.0.2   
Target Milestone: 2.3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
An example of the bug none

Description Laurent Redor CLA 2009-05-13 04:18:01 EDT
Created attachment 135523 [details]
An example of the bug

Build ID: M20080221-1800

Steps To Reproduce:
1.Create a new Logic Diagram (GMF Examples)
2.Create a "Logic Flow" in this diagram
3.Create a "Or Gate" in this Logic flow
4.Create a "And Gate" in this Logic flow (at the right of Or Gate)
5.Create a "Xor Gate" in this Logic flow (at the right of And Gate)
6.Drag and drop the "Or Gate" between "And Gate" and "Xor Gate".
Result : The "Or Gate" is not moved and a "Feedback line" still visible (even if you select another objet).

More information:
Sometimes, after the move of a child, the feedback line, which indicates the future position of the child during the movement, remains visible.
Comment 1 Mariot Chauvin CLA 2010-01-21 07:21:36 EST
Problem was that org.eclipse.gef.LayouEditPolicy does not erase layout target feedback for GMF RequestConstants.REQ_DROP; To correct I added GMF LayoutEditPolicy and FlowEditPolicy classes and modify GMF XYLayoutEditPolicy and ConstrainedToolbarLayouEditPolicy to override org.eclipse.gef.LayouEditPolicy#eraseTargetFeedback. Then I modify all parts which instantiate or extend GEF FlowLayoutEditPolicy to instantiate or extends the GMF one. I did it for instance for org.eclipse.gmf.examples.runtime.diagram.logic.internal.editpolicies.LogicFlowEditPolicy.

For GMF runtime previous versions a workaround is to override manually the method in your layout policies :

	/*
	 * Override to erase in case of GMF drop request, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276033
	 * (non-Javadoc)
	 * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#eraseTargetFeedback(org.eclipse.gef.Request)
	 */
	@Override
	public void eraseTargetFeedback(Request request) {
		super.eraseTargetFeedback(request);
		if (RequestConstants.REQ_DROP.equals(request.getType()))
				eraseLayoutTargetFeedback(request);
	}

Kudos to Aurelien who have found the cause of the problem.
Comment 2 Mariot Chauvin CLA 2010-01-21 09:31:12 EST
opened a bug to modify generation templates : bug 300374
Comment 3 Eclipse Webmaster CLA 2010-07-16 23:38:00 EDT
[target cleanup] 2.3 M5 was the original target milestone for this
bug
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:27:08 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug