Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 12083 - Move static field does not allow interfaces as target type [refactoring]
Summary: Move static field does not allow interfaces as target type [refactoring]
Status: RESOLVED DUPLICATE of bug 28022
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-21 19:20 EST by Jeff Brown CLA
Modified: 2003-04-25 13:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Brown CLA 2002-03-21 19:20:31 EST
public class Foo implements IFoo {
  public static int FIELD = 1;
}

public interface IFoo {
}

The Move refactoring should let me move FIELD to IFoo (or
to any other interface for that matter though that might generate
errors), but this does not appear to be supported.
Comment 1 Jeff Brown CLA 2002-03-21 19:31:30 EST
Oops!
I just tried this out again and it worked fine.  When I filed this
report, I had just selected a static field and did Refactor->Move.
The class picker dialog was not showing me any interfaces, however.
Comment 2 Adam Kiezun CLA 2002-03-22 04:45:46 EST
it should actually be disabled (i'm surprised you managed to move it)

as of now, only interface fields can be moved to another interface
it'd be possible to move also public static final fields

or, check that there's no write accesses to the field (except for the 
initializer) and make the field final myself.

but these are feature requests
Comment 3 Adam Kiezun CLA 2002-03-25 05:24:35 EST
P3
Comment 4 Adam Kiezun CLA 2002-04-05 05:32:06 EST
improvements after 2.0
Comment 5 Adam Kiezun CLA 2003-04-25 12:27:47 EDT
reop 
Comment 6 Adam Kiezun CLA 2003-04-25 13:26:46 EDT

*** This bug has been marked as a duplicate of 28022 ***