Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Connecting two Figures on a Canvas
Connecting two Figures on a Canvas [message #1007806] Thu, 07 February 2013 14:52 Go to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Hi,

I'm using Jubula with an RCP AUT containing a canvas.
I'm dragging and dropping figures from a Tree on the canvas (that works).

However, on the canvas I can usually connect two figures with little Attached Anchors.

I found out the names of those via the GEF Inspector, they are called org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_1/org.eclipse.graphiti.ui.internal.parts.AdvancedAnchorEditPart_1

So it's always the same way, dependent of the name of the Editpart of course.

I want to connect two anchors.
I thought ub_fcv_ClickConnection_byTextpaths would exactly be what I was looking for,
but when I try it, it says the Test failed, it couldn't find the textpaths.
When I try another simple action with the textpath like "Click in Figure", it works.

What is Click Connection doing?

My second approach was to use "Drag and Drop", since it is nearly the same approach, you click on an anchor, and drag it to the second anchor, where you can finally let go of the mouse.
I tried ub_fcv_dragFigure_byTextpath(TEXT,OPERATOR) and fcv_dropOnFigure_by Textpath(TEXT,OPERATOR).
The test suceeds although nothing happened, I guess the drag and drop action is too fast for my AUT.

To get a delay, I choose the version of ub_fcv_dragFigure_byTextpath with the many parameters ( TEXTPATH,OPERATOR,MOUSE_BUTTON,MODIFIER_KEYS,X_POSITION;X_UNITS,Y_POSITION;Y_UNITS)
and ub_fcv_dropFigure_byTextpath(TEXTPATH,OPERATOR,MOUSE_BUTTON,MODIFIER_KEYS,X_POSITION;X_UNITS,Y_POSITION;Y_UNITS,DELAY_BEFORE_DROP).

However, it seems it does not select the Anchor correctly, it is always a bit off the edges. I tried several combinations of X_POSITION/Y_POSITION but nothing worked.

How can I connect my anchors? If that worked, it would be the perfect testing tool;)

Jubula Standalone Version: Version: 1.3.0
on Windows 7.

Thanks for your help in advance,
Virginia
Re: Connecting two Figures on a Canvas [message #1007933 is a reply to message #1007806] Fri, 08 February 2013 09:53 Go to previous messageGo to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Is it possible that Jubula works too fast for my application? When I start the testcase, it drags the anchor and when I move the mouse a bit during the testcase before the drop happens, the connection line appears and the two figures are connected.
Is there a way to implement this in Jubula? It seems to me that Jubula is kind of too fast.
Re: Connecting two Figures on a Canvas [message #1008365 is a reply to message #1007933] Tue, 12 February 2013 08:09 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The Click Connection is designed to click an already existing connection, so its not working is correct Wink

I have a feeling that you may need a more specific action than what is currently offered out of the box. Can you add a screenshot of the canvas and information on how the anchors are realised?

HTH,
Alex
Re: Connecting two Figures on a Canvas [message #1012485 is a reply to message #1008365] Thu, 21 February 2013 16:41 Go to previous messageGo to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Hi,
thank you very much for your reply, unfortunately I didn't notice it earlier.

I have no access to the system at the moment, but I tried to sketch it quickly:

(oh no, I can't use Links yet....well, try this one Smile
i1045.photobucket.com/albums/b455/birkenblatt/screenshot.jpg
There are two (ore more) figures with each of them with an anchor. You can use both for connecting.
When you click (and hold) on one of the anchors, an orange line appears which you can drag to another anchor and drop. Then the real line appears and the connection is made.

With the drag and drop action in Jubula, it selects the right anchor, but that orange line doesn't appear, only when I move the mouse a bit during delay.

I don't know much about the internals, it is just a canvas created with Graphiti as far as I know, and the description of the Anchor in the GEF Inspector is in my first post.

Please ask if you need further details, I would be really happy to solve that problem Smile

Best regards,
Virginia
Re: Connecting two Figures on a Canvas [message #1012806 is a reply to message #1012485] Fri, 22 February 2013 08:57 Go to previous messageGo to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Oh, and thanks for pointing out what "Click Connection" actually does, I was really wrong.
This action will become important later, but first of all I need to get a connection... Wink
Re: Connecting two Figures on a Canvas [message #1012989 is a reply to message #1012485] Fri, 22 February 2013 15:21 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-ReitzFriend
Messages: 33
Registered: November 2010
Member
Hi Virginia,

It sounds like the AUT's UI isn't picking up on the mouse's location before dragging and/or dropping. We've had similar sounding drag and drop problems in the past (see https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=129 - full disclosure, that link points to the GUIdancer bugzilla, as this bug was never reported for Jubula). The solution (in code, unfortunately, rather than configuration) was generally what we started referring to as a "mouse shake" (i.e. displacing the mouse cursor slightly and then moving it back in order to ensure that the UI is caught up), which compensates for the general instability of "warping" the mouse cursor from point A to point B with no intermediate stops. The bug that I linked to doesn't describe your problem exactly, but the fix would probably be similar (i.e. "shake" the mouse before dragging, in addition to before dropping).

If this is something reproducible, then it's probably worth filing a bug with Jubula, optimally with a small AUT that demonstrates the problem.

- Zeb
Re: Connecting two Figures on a Canvas [message #1013084 is a reply to message #1012989] Fri, 22 February 2013 18:38 Go to previous messageGo to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Hey,
that sounds interesting! This is the same as I experienced, it works with a little mouse-shake .
I'll have a closer look to the link and might get back to you, thank you very much!

[Updated on: Fri, 22 February 2013 19:12]

Report message to a moderator

Re: Connecting two Figures on a Canvas [message #1015621 is a reply to message #1013084] Fri, 01 March 2013 12:24 Go to previous messageGo to next message
Virginia Weidhaas is currently offline Virginia WeidhaasFriend
Messages: 6
Registered: February 2013
Junior Member
Hi,
today I had time to have a closer look to your page.
How can I change that in my Jubula, are the class names equal?
And where do I get the code and what do I need to do to get it run, change it, and have it in Jubula finally?
Maybe that sounds like stupid questions, but I'm not experienced in that area.
help would be great!
Greetings,
Virginia
Re: Connecting two Figures on a Canvas [message #1070811 is a reply to message #1015621] Thu, 18 July 2013 18:19 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
I hope that there is an answer for how to get around this in Jubula, because I am having the same issue in an RCP application. The drop action does not happen until the mouse is manually moved off of the first object; otherwise, the drag cursor just hovers over the first object indefinitely. I cannot find any unbound module in my copy of Jubula that simply performs a "move mouse" action.

Thanks!
Re: Connecting two Figures on a Canvas [message #1070857 is a reply to message #1070811] Thu, 18 July 2013 20:38 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
I have some more information about my instance of the problem:

Through experimentation, I have discovered that the problem only seems to exist when the figure being dragged is at the right edge of the canvas, and starting to drag it highlights it in a way that increases its horizontal size, such that the canvas scrolls to the right. When the canvas is large enough for everything (including the highlighted figure) to fit on it without scrolling, the drag/drop works as it should.
Re: Connecting two Figures on a Canvas [message #1072617 is a reply to message #1070857] Tue, 23 July 2013 06:43 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi David,

Thanks for the update on this. I wonder whether Virginia's problem has the same workaround.
As Zeb suggested earlier, you could enter an issue for this - with the description you have given we could try to reproduce it here. If you have a small example AUT that shows the behaviour, even better.

Best regards,
Alex
Re: Connecting two Figures on a Canvas [message #1079962 is a reply to message #1072617] Mon, 05 August 2013 09:40 Go to previous messageGo to next message
Sanjay Krishnankutty is currently offline Sanjay KrishnankuttyFriend
Messages: 1
Registered: August 2013
Junior Member
Hi,

I'm experiencing the same problem as Virginia when trying to connect two figures using Drag and Drop. This is my test case:

Drag:
<ub_fcv_dragFigure_byTextpath> [org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_4/org.eclipse.graphiti.ui.internal.parts.FixPointAnchorEditPart_1, equals, 1, none, 50, percent, 50, percent]

Drop:
<ub_fcv_dropOnFigure_byTextpath> [org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_3, equals, 50, percent, 50, percent, 5000]

The mouse moves onto the second object and stays there, it's as if the drop action never happened. But if I move the mouse during the 5000ms interval, then the connection is successfully made in the diagram.
David's workaround is not applicable to my problem, my canvas is small and the drag&drop action doesn't involve scrolling through the diagram.
Re: Connecting two Figures on a Canvas [message #1086385 is a reply to message #1079962] Wed, 14 August 2013 06:41 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Thanks for the updates guys. This is behaviour that doesn't seem to happen in our tests. I don't think anyone has entered an issue for this yet, which would be a good place to add details about Eclipse / SWT version, platform etc. And, like Zeb suggested - if anyone has an example application where it is reproducible, that would help a lot.
Previous Topic:Eclipse variables
Next Topic:Testing the close application without save
Goto Forum:
  


Current Time: Thu Mar 28 20:44:18 GMT 2024

Powered by FUDForum. Page generated in 0.04322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top