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 138303

Summary: Change Method Parameters doesn't perform import
Product: java Reporter: Torbjorn Norbye <tor>
Component: RefactoringAssignee: Max Sauer <msauer>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 164764    
Bug Blocks: 152192    

Description Torbjorn Norbye 2008-06-26 01:33:43 UTC
I used the change method parameters refactoring to remove a couple of old parameters, and add a new parameter.

For the type of the new parameter, I typed in the fully qualified name (package+class) of the type.  But when I applied
the refactoring, it would insert the FQN name in the method declarations. I don't want that, I want it imported in the
import section like all the other classes in the same file.

So, I went back and typed in only the class name in the refactoring dialog (without the package). Refactoring succeeded,
but it did -not- add an import statement in the various client classes, so I had to go through all of them and do an import.

I think refactoring should use the class without the package name in the parameter list, and do an import instead
(unless there is a name conflict in the class). I don't think anybody considers inlining FQNs is good style.
Comment 1 Max Sauer 2009-02-20 09:22:13 UTC
Implemented.
---
http://hg.netbeans.org/jet-main/rev/fb568f734e82
Comment 2 Quality Engineering 2009-02-22 07:55:32 UTC
Integrated into 'main-golden', will be available in build *200902220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fb568f734e82
User: Max Sauer <msauer@netbeans.org>
Log: #138303: Change Method Parameters doesnt perform import