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 193344 - Refactor -> copy class should probable retain name
Summary: Refactor -> copy class should probable retain name
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 22:46 UTC by Chiana
Modified: 2011-01-13 08:34 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 Chiana 2010-12-13 22:46:57 UTC
[ BUILD # : 101213 ]
[ JDK VERSION : 1.6.22 ]

When you select refactor->copy on a whole class the dialog suggests the name
"<oldname>1" for the new class, however, if your intent is to copy the class
into an other project this is not always what you want, if you do not notice
this at the first glance you might end up with a class with the wrong name,
also, if you copy from project to project it also might be prudent if the
original packagename was retained.
Comment 1 Jan Becicka 2010-12-21 13:21:20 UTC
You must select target project and package.
Comment 2 Chiana 2010-12-21 15:17:36 UTC
Does not matter, it still changes the name of the class and in 9 out of 10 you would like to retain the package name.
Comment 3 Chiana 2011-01-13 00:19:43 UTC
I still think this should be looked into. Imho if you copy a class from one project to another it should retains both the original classname and the original packagename otherwise you need to do a couple of refactor->move and refactor->rename on the class when it has reached it's target project.
Comment 4 Jan Becicka 2011-01-13 08:34:18 UTC
Please use Ctrl-C and Ctrl-V. The  is the simplest way how to copy things.