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

Bug 321626

Summary: Methods on SWTBotGefEditor taking a SWTBotGefEditPart as Input are wrong
Product: [Technology] SWTBot Reporter: Mickael Istria <mistria>
Component: GEFBotAssignee: Mariot Chauvin <mariot.chauvin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: apupier, baptiste.mesta, mariot.chauvin
Version: 2.0.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test Bundle for gef finder
none
Patch mariot.chauvin: iplog+

Description Mickael Istria CLA 2010-08-03 12:11:03 EDT
Using 2.0.0.568-dev-e36.

All methods on SWTBotGefEdtor taking a SWTBotGefEditPart as input seem to be erroneous. They all delegate the event creation to SWTBotGefFigureCanvas giving it the part().getFigure().getBounds() which is a location *relative* to the parent, whereas the SWTBotGefFigureCanvas expects locations *absolute* to the canvas.
This issue makes drag'n'drop in GEF diagrams.
Comment 1 Mickael Istria CLA 2010-08-04 07:51:32 EDT
Created attachment 175829 [details]
Test Bundle for gef finder

This is a bundle to test GEF finder.
It currently contains a test case for this bug.

It uses the STP-BPMN diagram editor to execute test actions. It assumes that this editor works well, and test SWTBot operations against it.
Comment 2 Mickael Istria CLA 2010-08-04 07:53:01 EDT
Created attachment 175830 [details]
Patch

Replace relative locations to absolute, and make test turn to green.
Comment 3 Mariot Chauvin CLA 2010-08-30 05:54:31 EDT
Thanks for the patch !
Committed patch with a unit test in org.eclipse.gef.examples.logic.test project.
Revision 599
Comment 4 Aurelien Pupier CLA 2011-09-01 04:07:21 EDT
(In reply to comment #3)
> Thanks for the patch !
> Committed patch with a unit test in org.eclipse.gef.examples.logic.test
> project.
> Revision 599


Cool :)
When will be the next release including the patch?
Comment 5 Mariot Chauvin CLA 2011-09-01 05:04:34 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Thanks for the patch !
> > Committed patch with a unit test in org.eclipse.gef.examples.logic.test
> > project.
> > Revision 599
> 
> 
> Cool :)
> When will be the next release including the patch?

I am pretty sure there is already one.
Comment 6 Aurelien Pupier CLA 2011-09-01 05:13:02 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Thanks for the patch !
> > > Committed patch with a unit test in org.eclipse.gef.examples.logic.test
> > > project.
> > > Revision 599
> > 
> > 
> > Cool :)
> > When will be the next release including the patch?
> 
> I am pretty sure there is already one.

oh god, I see the wrong year... But it seems that I had the same issue. I will check.
Comment 7 Mariot Chauvin CLA 2011-09-01 05:20:23 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > > Thanks for the patch !
> > > > Committed patch with a unit test in org.eclipse.gef.examples.logic.test
> > > > project.
> > > > Revision 599
> > > 
> > > 
> > > Cool :)
> > > When will be the next release including the patch?
> > 
> > I am pretty sure there is already one.
> 
> oh god, I see the wrong year... But it seems that I had the same issue. I will
> check.

ok do not hesitate to reopen in this cas, I will fix it rapidely.