Bug 276033 - "Feedback line" still visible after moving child
Summary: "Feedback line" still visible after moving child
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.0.2   Edit
Hardware: All All
: P3 normal
Target Milestone: 2.3   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-13 04:18 EDT by Laurent Redor CLA
Modified: 2010-07-19 12:27 EDT (History)
2 users (show)

See Also:


Attachments
An example of the bug (35.10 KB, image/png)
2009-05-13 04:18 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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