Bug 274019 - [reorg] After copy & paste or drag & drop, the copy should be selected
Summary: [reorg] After copy & paste or drag & drop, the copy should be selected
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard: fix candidate
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-28 08:24 EDT by Aaron Digulla CLA
Modified: 2010-03-08 09:10 EST (History)
3 users (show)

See Also:


Attachments
Work in Progress (15.68 KB, patch)
2010-03-02 14:49 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Digulla CLA 2009-04-28 08:24:29 EDT
When you copy and paste a file in the Package Explorer, after the paste, the original file is still selected instead of the new copy. It would be better to select the new file(s) instead since I probably want to do something with them (like opening them for editing).
Comment 1 Francis Upton IV CLA 2009-04-28 10:37:50 EDT
Package Explorer is JDT UI.
Comment 2 Dani Megert CLA 2009-04-28 11:51:59 EDT
Navigator has same behavior. They should be kept in sync.
Comment 3 Markus Keller CLA 2009-04-28 14:24:36 EDT
Same problem after drag and drop (with copy and with move operations).
Comment 4 Markus Keller CLA 2010-03-02 14:49:23 EST
Created attachment 160672 [details]
Work in Progress

Patch does not work and has compile errors, but I need to suspend work I started on this.

A problem is that we need to handle 2 different cases, which can even occur at the same time:

a) Paste creates files, folders, Java elements
   => need to select the new elements in Package Explorer, etc. *after* they have been pasted. Nontrivial part is to find the new elements.

b) Paste adds text to a single compilation unit
   => need to open the editor *before* executing the refactoring, such that the user can easily undo the change