Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 27957 - Problems with drag-rearranging methods [dnd]
Summary: Problems with drag-rearranging methods [dnd]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 72807
Blocks:
  Show dependency tree
 
Reported: 2002-12-09 11:52 EST by Nick Edgar CLA
Modified: 2007-01-04 09:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2002-12-09 11:52:36 EST
build I20021204

I tried using drag and drop in the outline to reorder methods in a CU 
(FilteredList.java).  I saw two problems:

1. it always copies, resulting in errors
  - it should move unless I have Ctrl held down
  - this should work the same whether copying/moving in the same CU or between 
CUs
  - need proper feedback in the cursor for this too (show plus for copy, but 
not for move)

2. if I drag a method at the end of the list earlier in the CU, it is 
positioned correctly in the source, but both occurrences are listed at the end 
in the outline (I have sort by name turned off)
  - the outline should always reflect the order in the source
Comment 1 Nick Edgar CLA 2002-12-09 11:57:50 EST
To make the case more concrete: 
- FilteredList.java had several accessor methods at the end of the CU
- it originally had all get methods first, followed by the set methods
- I wanted to rearrange them so that the get/set methods were paired
- I dragged the first set method up to be under the matching get method
- repeat for the remaining items

Comment 2 Dirk Baeumer CLA 2003-01-07 08:19:04 EST
Currently there isn't any support for reordering methods in the Outline view 
(and there aren't any plans to support this for 2.1). 

IMO the fedback is correct using M4. It is as follows:

- start D&D in outline view
- feedback is Copy
- press Shift to turn DnD operation into Move
- feedback is Stop sign indicating that move is not allowed.

Couldn't reproduce the problem described under item 2.

Moving to later since no action is planned for 2.1. Nick, please move back to 
inbox if you disagree.
Comment 3 Nick Edgar CLA 2003-01-07 08:51:07 EST
I confirm that the feedback is correct: it shows the plus.
I must admit that I didn't notice this the first time though - I just assumed 
that unshifted drag is a move.
But this can wait.
Comment 4 Dirk Baeumer CLA 2003-04-02 08:37:35 EST
WE should think about supporting rearranging methods via DnD. I used it in 
WSAD for HTML files in tables and it was very handy.
Comment 5 Dani Megert CLA 2007-01-04 09:19:14 EST
.
Comment 6 Dani Megert CLA 2007-01-04 09:19:59 EST
Methods can now be rearranged. There's one remaining feedback problem, see bug 72807.