Bug 52791 - [refactoring] provide new extract field refactoring
Summary: [refactoring] provide new extract field refactoring
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 11 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 10656 32996 118136 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-22 22:23 EST by Jason Yip CLA
Modified: 2011-10-15 11:15 EDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Yip CLA 2004-02-22 22:23:53 EST
Essentially a combination of Extract Local Variable and Convert Local Variable 
to Field.  I do this a lot and it would be much more convenient if it was all 
one step.
Comment 1 Nikolay Metchev CLA 2004-06-24 07:59:34 EDT
there is a special case of extract field and that is when you are extracting it 
from the initialization code of a field e.g:
----------------A.java -------------------
package a;

public class A
{
   public static final String SECOND_CONSTANT = "Global constant".substring
("Global constant".lastIndexOf(' ') + 1); 
}
---------------------------------------------
should get converted to:
----------------------------A.java-----------------------------------------
package a;

public class A
{
   public static final String GLOBAL_CONSTANT = "Global constant";
   public static final String SECOND_CONSTANT = GLOBAL_CONSTANT.substring
(GLOBAL_CONSTANT.lastIndexOf(' ') + 1); 
}
--------------------------------------------------------------------------
Comment 2 Martin Aeschlimann CLA 2005-11-28 12:10:24 EST
*** Bug 118136 has been marked as a duplicate of this bug. ***
Comment 3 Dirk Baeumer CLA 2005-11-28 12:43:23 EST
Tobias, I am reassigning this to you since you are the owner of extract local and convert local to field. IMO extending extract local a little should do the trick ;-).
Comment 4 Martin Aeschlimann CLA 2007-06-21 04:25:22 EDT
*** Bug 10656 has been marked as a duplicate of this bug. ***
Comment 5 Martin Aeschlimann CLA 2007-06-21 04:26:20 EDT
*** Bug 32996 has been marked as a duplicate of this bug. ***
Comment 6 Martin Aeschlimann CLA 2008-04-24 10:16:50 EDT
not for 3.4
Comment 7 Miles Parker CLA 2011-10-14 14:26:58 EDT
Wondering if there is any chance of this happening from jdt or if 'helpwanted' is sort of enhancement purgatory. :) It does seem silly to have to go through two steps to do this common task.
Comment 8 Dani Megert CLA 2011-10-14 16:30:54 EDT
(In reply to comment #7)
> Wondering if there is any chance of this happening from jdt or if 'helpwanted'
> is sort of enhancement purgatory. :) It does seem silly to have to go through
> two steps to do this common task.

What part of 'helpwanted' do you not understand? ;-)
Comment 9 Miles Parker CLA 2011-10-14 18:02:52 EDT
(In reply to comment #8)
> What part of 'helpwanted' do you not understand? ;-)

Well, since you asked.. ;) I realize that there is a huge backlog of stuff that JDT would love to do. I'm just trying to understand how community feedback is involved in that process in this case. There are currently 340 valid, open JDT 'helpwanted' bugs.* There have only been 26 'helpwanted' bugs fixed since the dawn of time.** We'd all like to think that there is more potential for outside contribution, but the barriers for contributions as far as knowledge and time go are high -- but that gives a 7.1% closure rate. This one has been open for 7 1/2 years. So 'helpwanted' looks like where features go to die. :)

So my question is, does 'helpwanted' mean "never going to do it"? Is there any difference between 'helpwanted' ASSIGNED and 'helpwanted' WONTFIX? Is there some process whereby these bugs are reviewed over time and can be put back to active development? 

The reason I'm pushing on this in hopefully a constructive way is that I think these seemingly small usability improvements that can make a big difference for the average eclipse developer.

*https://bugs.eclipse.org/bugs/buglist.cgi?keywords=helpwanted;query_format=advanced;keywords_type=allwords;resolution=---;resolution=WONTFIX;product=JDT

**https://bugs.eclipse.org/bugs/buglist.cgi?keywords=helpwanted;query_format=advanced;keywords_type=allwords;resolution=FIXED;product=JDT
Comment 10 Deepak Azad CLA 2011-10-14 20:57:56 EDT
Miles, the picture you paint is not complete, you should also look at bugs which are no longer tagged as helpwanted because one of the committers fixed it.

https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&product=JDT&resolution=FIXED&field0-0-0=keywords&type0-0-0=changedfrom&value0-0-0=helpwanted

So 'helpwanted' clearly does NOT mean "never going to do it" :)
Comment 11 Miles Parker CLA 2011-10-14 21:11:50 EDT
(In reply to comment #10)
> Miles, the picture you paint is not complete, you should also look at bugs
> which are no longer tagged as helpwanted because one of the committers fixed
> 
> So 'helpwanted' clearly does NOT mean "never going to do it" :)

Good point. 12.5% clearance rate, and of course many of the remaining could simply not be that useful. Again, I hope it's clear that I'm not criticizing, just curious..

So this is the part that I don't understand about what exactly 'helpwanted' means. :D My assumption has been that when an enhancement is put in that bucket that it is has low priority than other bugs. In other words, I read "helpwanted" to mean "if you want to see this fixed, do it yerself." Is that wrong?
Comment 12 Dani Megert CLA 2011-10-15 03:50:25 EDT
> So my question is, does 'helpwanted' mean "never going to do it"? Is there any
> difference between 'helpwanted' ASSIGNED and 'helpwanted' WONTFIX? Is there
> some process whereby these bugs are reviewed over time and can be put back to
> active development? 

Miles, helpwanted-WONTFIX is not set on purpose but happened when the 'LATER' state got removed in bugzilla. All 'LATER' bugs became 'WONTFIX'. We could mass change all such bugs back to ASSIGNED-helpwanted but that would just cause noise in my opinion.

'helpwanted' really means in most cases that we won't do it unless
a) someone contributes a patch
b) we get more resources
c) there is new information/data that makes it more interesting for us to fix it
Comment 13 Miles Parker CLA 2011-10-15 11:15:49 EDT
(In reply to comment #12)
> 'helpwanted' really means in most cases that we won't do it unless
> a) someone contributes a patch
> b) we get more resources
> c) there is new information/data that makes it more interesting for us to fix
> it

Thanks Dani, that's really quite helpful..and for your patience w/ my Qs. Perhaps I could suggest one more -- it might be implied under c..

d) when the community demonstrates continued high interest through votes and comments.

After all, that's the only real metric for user priorities that we have. Not suggesting what that threshold should be or whether this particular bug meets it. OK, probably enough from me on this one.