Bug 134721 - [move static members] unable to move static member from one inner class to another [refactoring]
Summary: [move static members] unable to move static member from one inner class to an...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-04 07:52 EDT by Max Gilead CLA
Modified: 2011-06-09 06:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Gilead CLA 2006-04-04 07:52:46 EDT
It's impossible to move static member from one inner class to another -- on below example CONSTANT can't be moved from class A to B using Refactor->Move tool:


public class Foo {
  public static class A {
    public static final String CONSTANT = "";
  }
  public static class B {}
}
Comment 1 Markus Keller CLA 2011-06-09 06:38:46 EDT
This works fine if you enter the fully-qualified name for B (e.g. using Content Assist). Only thing to do is to support the unqualified type name.

The fix is to use declaring.resolveType() in MoveMembersWizard.MoveMembersInputPage#addDestinationControls(Composite) and in MoveStaticMembersProcessor#resolveType(String).