| Summary: | [extract method] extract method from enum constant declaration | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | leokom leokom <lrozenblyum> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta, stephan.herrmann |
| Version: | 4.5.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 431300 *** |
SCENARIO: public enum SomeEnum { FIRST( "hello" ); SomeEnum( String param ) { }; } Select "hello", Call Refactor -> Extract Method EXPECTED: a) private method created: private static String getSmth() { return "hello"; } b) enum declaration changed to FIRST( getSmth() ); ACTUALLY: Error "Cannot extract new method since the selection is not valid"