This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 183433 - Extract variable refactoring
Summary: Extract variable refactoring
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-03 16:21 UTC by pupeno
Modified: 2014-03-30 14:05 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pupeno 2010-04-03 16:21:43 UTC
I think it would be great to have extract variable refactoring working like this:

1 - select exrpession
2 - refactor -> extract variable
3 - give a name to the variable
4 - a variable with that name is create above the expression
5 - the expression gets replaced with the variable
6 - other expressions that are replaced too

It's the most common refactoring I want and it seems doable and it's not there. It seems like a low-hanging fruit.
Comment 1 ceklock 2014-03-30 14:05:14 UTC
Not there? I am not a Ruby developer so I didn't test it. But for Java it works exactly as you described.