Bug 78986 - [extract method] Extract method should allow static method modifier
Summary: [extract method] Extract method should allow static method modifier
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-18 13:08 EST by Randy Hudson CLA
Modified: 2009-05-04 06:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2004-11-18 13:08:12 EST
When extracting a method, it would be nice to create a static method. Any code 
which referred to "this" would be called on a parameter which representing the 
object.
Comment 1 Dirk Baeumer CLA 2004-11-18 13:18:48 EST
Given that J2SE 5.0 is the main focus for 3.1 this has very likely to wait for 3.2
Comment 2 Randy Hudson CLA 2004-11-18 13:20:51 EST
No problem.  What does the [3] mean in the summary?
Comment 3 Missing name Mising name CLA 2006-05-31 16:05:36 EDT
This would be a useful feature, though I suppose one that can be manually worked around without too much trouble in most cases.  If the method contains no instance member references it should be marked static by default.
Comment 4 Markus Keller CLA 2009-05-04 06:36:55 EDT
Not sure if we should pack this into Extract Method. Should probably be a separate refactoring that makes instance methods static (bug 118032).