This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144640 - [65cat] Copy classes to another package don't change the packages
Summary: [65cat] Copy classes to another package don't change the packages
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-20 20:50 UTC by Michel Graciano
Modified: 2008-08-26 06:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-08-20 20:50:26 UTC
[ BUILD # : 200808141419 ]
[ JDK VERSION : 1.6.0_07 ]

Copy classes from a folder to another don't update the package in the
class files
Comment 1 Michel Graciano 2008-08-20 21:07:02 UTC
1-Create a new GUIFormExamples sample project;
2-Create a new class at 'examples' package
3-Create a new package named 'newpackage' in the same level of 'examples' package
4-Copy all the classes from 'examples' to 'newpackage' using Ctrl+C and Ctrl+V

All the packages entries on the ALL classes are broken. BTW, if you just copy the simple class, it works. The problem is
still just for form files.
Comment 2 Jiri Prox 2008-08-21 08:04:43 UTC
The refactoring is not triggered when copy&pasting more files at once
Comment 3 Jan Pokorsky 2008-08-21 13:42:28 UTC
Yes, the Refactoring->Copy action for packages and selection of multiple files has never been implemented yet. The Copy
action only updated package and top level class declaration as a side effect. References was not updated at all.

The plain copy does really plain copy in NB 6.5 after issue 141093. I can try to implement a java refactoring plugin to
6.5 that will work at least the same way as the plain copy of java files in previous versions.
Comment 4 Jan Pokorsky 2008-08-25 15:39:18 UTC
fixed as http://hg.netbeans.org/main/rev/21b8ae9addc0
Comment 5 Quality Engineering 2008-08-26 06:01:10 UTC
Integrated into 'main-golden', available in build *200808260201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/21b8ae9addc0
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #144640: classes copied to another package do not update the package declaration