Bug 87247 - Copying class does not add required import statements
Copying class does not add required import statements
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Refactoring
5.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@java
issues@java
OSLO
: RELNOTE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-17 00:24 UTC by _ sandipchitale
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ sandipchitale 2006-10-17 00:24:38 UTC
Steps:

1. Create a Java project
2. Create a new java package - newpackage
3. Create a new java class NewClass in newpackage
4. Create a new java class NewClass1 in newpackage
5. Add a statement new NewClass(); in NewClass1 constructor.
6. Create a new java package - newpackage.newsubpackage
7. Copy and paste newpackage.NewClass1 to newpackage.newsubpackage
8. Open newpackage.newsubpackage.NewClass1.
9. See a red sqigly underline under statement new NewClass();

This happens because the import newpackage; statement is missing in 
newpackage.newsubpackage.NewClass1.

Woraround is to invoke Fix Imports action.
Comment 1 Jan Becicka 2006-11-22 13:44:57 UTC
We need to implement copy refactoring for 6.0
Comment 2 Jan Becicka 2006-12-18 17:40:13 UTC
Copy refactoring implemented


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo