Bug 54834 - Improve Drag & Drop in the jmeter tree
Improve Drag & Drop in the jmeter tree
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.9
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-04-12 20:49 UTC by benoit.wiart
Modified: 2013-07-13 21:02 UTC (History)
1 user (show)



Attachments
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
Details
example2 (18.11 KB, image/jpeg)
2013-04-12 20:50 UTC, benoit.wiart
Details
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]
patch

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]
example1
Comment 2 benoit.wiart 2013-04-12 20:50:33 UTC
Created attachment 30186 [details]
example2
Comment 3 Philippe Mouawad 2013-04-13 16:01:24 UTC
Created attachment 30189 [details]
Just made it standard patch

Hello,
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:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560955
http://stackoverflow.com/questions/4850988/drop-nodes-in-a-jtree-at-different-nesting-levels

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
Log:
Bug 54834 - Improve Drag & Drop in the jmeter tree
Bugzilla Id: 54834

Added:
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java   (with props)
Removed:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/DragNDrop.java
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java
    jmeter/trunk/xdocs/changes.xml


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

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

Modified:
    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
Log:
Bug 54834 - Improve Drag & Drop in the jmeter tree
Select dropped nodes
Bugzilla Id: 54834

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java
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
Log:
Bug 54834 - Improve Drag & Drop in the jmeter tree
http://mail-archives.apache.org/mod_mbox/jmeter-dev/201307.mbox/%3CCAOGo0VZ0z3GMbfsq_gSB%2Bp7nTUqLng6Gy2ecvYbD8_AKb-Dt5w%40mail.gmail.com%3E
Bugzilla Id: 54834

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Move.java