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 183077

Summary: A useful refactor: move fields and methods to another class
Product: java Reporter: twolf2919 <twolf2919>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal CC: i30817, nico_debeissat
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 204440    

Description twolf2919 2010-03-29 13:12:49 UTC
I have a constant that is defined in a local class and I'd like to move it into a class higher up the package structure since it turns out that it is useful across multiple packages.  Unlike other IDEs, Netbeans "Refactor->Move" seems to only allow me to move the whole class.

The ability to move fields and methods to other existing classes would be a very helpful refactoring.
Comment 1 dlichtenberger 2010-06-23 07:50:15 UTC
At first I thought it was a bug that I couldn't move methods or fields. This is a really essential refactoring that I used all the time in IDEA, it would be great if Netbeans had this too.
Comment 2 nico_debeissat 2010-06-25 07:41:42 UTC
That is an important feature which is present in Eclipse but not in Netbeans
Comment 3 sguha 2011-02-18 00:51:39 UTC
This is a very useful refactoring, thought netbeans already implemented it, but was surprised to find out that it did not.
Thanks sguha.
Comment 4 Ralph Ruijs 2011-10-31 14:35:45 UTC
*** Bug 179400 has been marked as a duplicate of this bug. ***
Comment 5 Ralph Ruijs 2012-02-08 15:03:47 UTC
Fixed by http://hg.netbeans.org/jet-main/rev/7366a9a6ccf3