Bug 54834 - Improve Drag & Drop in the jmeter tree
Summary: Improve Drag & Drop in the jmeter tree
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Keywords: PatchAvailable
Depends on:
Reported: 2013-04-12 20:49 UTC by benoit.wiart
Modified: 2013-07-13 21:02 UTC (History)
1 user (show)

patch (25.19 KB, patch)
2013-04-12 20:49 UTC, benoit.wiart
Details | Diff
example1 (15.11 KB, image/jpeg)
2013-04-12 20:50 UTC, benoit.wiart
example2 (18.11 KB, image/jpeg)
2013-04-12 20:50 UTC, benoit.wiart
Just made it standard patch (24.78 KB, patch)
2013-04-13 16:01 UTC, Philippe Mouawad
Details | Diff
better version (25.21 KB, patch)
2013-04-14 13:48 UTC, benoit.wiart
Details | Diff
last version (26.82 KB, patch)
2013-04-14 17:13 UTC, benoit.wiart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description benoit.wiart 2013-04-12 20:49:37 UTC
Created attachment 30184 [details]

Because mice are awesome

I find the current implementation awkward :
- No visual clue of where the node will be dropped
- a popup with "insert before" , etc..
- no automatic scrolling when draging a node
- no automatic expanding

this patch replace the drag and drop implementation with a TransferHandler

You can only move 1 node but it's also broken in trunk

tests were made on a Mac
Comment 1 benoit.wiart 2013-04-12 20:50:10 UTC
Created attachment 30185 [details]
Comment 2 benoit.wiart 2013-04-12 20:50:33 UTC
Created attachment 30186 [details]
Comment 3 Philippe Mouawad 2013-04-13 16:01:24 UTC
Created attachment 30189 [details]
Just made it standard patch

My tests on Mac are fine. 
There is only one thing, you cannot drop an element as last child of a parent, Benoit W. reported this was a limitation:

Using it I feel it improves usability particularly:
- The visual indicator for drop position
- The unfolding of non leaf nodes
- The little time gain that comes from removed popup (insert before, after ,as child)

So I vote for its integration.
Comment 4 Philippe Mouawad 2013-04-13 16:14:41 UTC
Works fine on Windows 7
Comment 5 Milamber 2013-04-13 16:33:53 UTC
+1 for apply patch.

Works on my Linux (Debian Wheezy with Gnome 3)
Comment 6 benoit.wiart 2013-04-14 13:48:54 UTC
Created attachment 30192 [details]
better version

better naming of variables
you can also move a node to its parent : the node is then moved as the last child
Comment 7 benoit.wiart 2013-04-14 17:13:28 UTC
Created attachment 30194 [details]
last version

remove unused drag&drop code from mainframe
Comment 8 benoit.wiart 2013-04-14 22:34:39 UTC
Note that my comment about multi-selection D&D in trunk is not correct : it is only partially broken :
- it's difficult to use (see https://issues.apache.org/bugzilla/show_bug.cgi?id=51823)
- elements order can be lost
- parent-child relation can be lost

Jmeter commiters / users : do you use multi-selection D&D in its current implementation ?

I had a look at non discontiguous multi-selection D&D and... it can be tricky.
btw Cut-Paste and Copy-Paste do not work as intended with non discontiguous multi-selection :-(

I think that even without the ability to move more than one node, this patch improves usability (see comment 3)

I plan to work on a restricted form of D&D for multi-selection but I don't know when.

Benoit WIART
Comment 9 Philippe Mouawad 2013-04-15 19:56:28 UTC
As for me, I was not aware it was possible and I must say I don't understand how multi-selection DnD works.
So still +1 for me.
Comment 10 benoit.wiart 2013-04-15 22:12:49 UTC
I comment 8 : replace non discontiguous by discontiguous ....
Comment 11 Philippe Mouawad 2013-04-17 20:18:59 UTC
Date: Wed Apr 17 20:16:53 2013
New Revision: 1469057

URL: http://svn.apache.org/r1469057
Bug 54834 - Improve Drag & Drop in the jmeter tree
Bugzilla Id: 54834

    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java   (with props)

Date: Wed Apr 17 20:17:48 2013
New Revision: 1469058

URL: http://svn.apache.org/r1469058
Bug 54834 - Improve Drag & Drop in the jmeter tree
Bugzilla Id: 54834

    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java   (props changed)
Comment 12 Philippe Mouawad 2013-04-17 20:19:18 UTC
Thanks, applied
Comment 13 Philippe Mouawad 2013-07-12 18:36:49 UTC
Date: Fri Jul 12 18:36:08 2013
New Revision: 1502645

URL: http://svn.apache.org/r1502645
Bug 54834 - Improve Drag & Drop in the jmeter tree
Select dropped nodes
Bugzilla Id: 54834

Comment 14 Philippe Mouawad 2013-07-13 21:02:59 UTC
Date: Sat Jul 13 21:02:01 2013
New Revision: 1502878

URL: http://svn.apache.org/r1502878
Bug 54834 - Improve Drag & Drop in the jmeter tree
Bugzilla Id: 54834