Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321626 - Methods on SWTBotGefEditor taking a SWTBotGefEditPart as Input are wrong
Summary: Methods on SWTBotGefEditor taking a SWTBotGefEditPart as Input are wrong
Status: RESOLVED FIXED
Alias: None
Product: SWTBot
Classification: Technology
Component: GEFBot (show other bugs)
Version: 2.0.0-dev   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mariot Chauvin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 12:11 EDT by Mickael Istria CLA
Modified: 2011-09-01 05:20 EDT (History)
3 users (show)

See Also:


Attachments
Test Bundle for gef finder (715.27 KB, application/zip)
2010-08-04 07:51 EDT, Mickael Istria CLA
no flags Details
Patch (2.05 KB, patch)
2010-08-04 07:53 EDT, Mickael Istria CLA
mariot.chauvin: iplog+
Details | Diff

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