Bug 318560

Summary: [extract method] should offer to make method static
Product: [Eclipse Project] JDT Reporter: Lars Svensson <oxvalley>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: deepakazad, lukas.eder, markus.kell.r, stephan.herrmann
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.