Bug 318560 - [extract method] should offer to make method static
Summary: [extract method] should offer to make method static
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 450978 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-01 04:37 EDT by Lars Svensson CLA
Modified: 2014-11-12 08:57 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Svensson CLA 2010-07-01 04:37:52 EDT
Build Identifier: 

Extracted method will not be set as a static method even if it do not use any Fileds from the class or class methods

Reproducible: Always

Steps to Reproduce:
1.Write:
System.out.println("Hello");
2. Use Refactoring and Extract Method for this line
3.A method is created but it is not set as a static method, even if it does not use any class-specific code
Comment 1 Markus Keller CLA 2010-07-01 10:49:38 EDT
We could add a checkbox to make the method static. Checkbox should only be enabled when the static modifier is not added by default and does not refer to 'this' (i.e. do bug 10605, not bug 118032).
Comment 2 Noopur Gupta CLA 2014-11-12 05:12:28 EST
*** Bug 450978 has been marked as a duplicate of this bug. ***
Comment 3 Stephan Herrmann CLA 2014-11-12 08:57:31 EST
For reference: I understood bug 450978 as requesting s.t. closer to bug 118032 than to bug 10605.