Bug 6078 - Copy/Move features
Summary: Copy/Move features
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-19 14:40 EST by John Arthorne CLA
Modified: 2001-11-26 09:02 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2001-11-19 14:40:26 EST
From the newsgroup:

eclipse is really a great ide, i use it daily at work. but i still miss some
features of vaj:

- copy / move methods
- copy class , move class only works when xxx.java is seleced not with the
"green" class
- create field
- create method
Comment 1 John Arthorne CLA 2001-11-19 14:49:47 EST
It would be particularly nifty if this was DND-enabled.  That is, I'd like to be 
able to copy/move a set of methods/fields/types from SRC to DEST.  Move would 
possible trigger an appropriate refactoring wizard.

SRC and DEST would be any view that can contain that item, such as: java content 
outline, type hierarchy, packages view.

This could also be used to rearrange methods within the content outline of a 
single type.

Ideally this would be done by exposing java-specific transfer types as API so 
other tools could integrate with it.
Comment 2 John Arthorne CLA 2001-11-21 15:15:04 EST
Jakob Braeuchi wrote:
> i have some additional input for 'create fields':
> - the prefix of the generated variable should be configurable
> ie:  variable m_name  (some customers have naming conventions for variables)
> with accessors getName() setName()  (not getM_Name())
> - selectable visibility (private,public...) of generated accessors
> - support for firePropertyChange() if possible
>
Comment 3 Sidney Monteiro CLA 2001-11-21 22:27:54 EST
Please do not make this more convoluted than it needs to be.
For the create field and method, all that has been asked for is the exact 
functionality that was already provided by Visual Age for Java 3.5 ( which 
accounted for all of that and was straightforward to use.)
Comment 4 Sidney Monteiro CLA 2001-11-21 22:33:21 EST
Shouldn't the "Platform" field say "All" instead of just PC?
Shouldn't the "OS" field say "All" instead of just "Windows 2000"?
Comment 5 Erich Gamma CLA 2001-11-22 09:57:00 EST
>- copy / move methods
work is in progress. we will not use move but cut/copy/paste. In addition we 
will also provide delete and duplicate.

>- copy class , move class only works when xxx.java is seleced not 
>with the "green" class
UI can only change this when the Java model changes and represents the top 
level type as a the compilation unit.

>- create field
time permitting
>- create method
time permitting, duplicate should be a good replacement.

Adam please take care of cut/copy/paste/delete
Comment 6 Adam Kiezun CLA 2001-11-26 08:58:25 EST
implemented cut/copy/paste/delete
a. it works under the compilation unit level 
(paste works also on compilation units)

b. the selection for cut/copy/delete can span across many compilation units
(even closed ones)

c. undo (the editor undo) is supported for the open editors (the editors are 
not saved)

d. copy and cut put the selected elements  to both a local clipboard and 
the OS clipboard (so you can past anywhere - in a text editor too)

e. there's some context validation on paste - e.g. you cannot paste a type over 
a method

f. some more smartness is done when pasting over a compilation unit - it tries 
to put elements in their positions (e.g. a package declaration will go to the 
top of the file, and a type will go before any existing type declarations)

g. it works in the package viewer, outliner and type hierarchy

limitations: 
. not d'n'd enabled (pls see bug#6305 for this)
. no shortcuts are available for there operations (pls see bug#6306 for this)
. dulicate is not implemented (problems with selecting the newly created 
elements - pls see bug#6307 for this)

marking this bug report as fixed
Comment 7 Adam Kiezun CLA 2001-11-26 09:02:08 EST
some verification on e:
you _can_ paste a type over a method - it puts the type below the method as a
nested type of the type that declares that method

same is true for paste type over type (pastes as a nested type) - as
 for other IMembers (field, type, method, initializer)

you cannot, however, for instance, paste a package declaration or an import 
over a method.