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 243217 - Create variable declaration from selected code.
Summary: Create variable declaration from selected code.
Status: RESOLVED INVALID
Alias: None
Product: javascript
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P2 normal with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 14:31 UTC by Christian Lenz
Modified: 2017-06-27 15:34 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 Christian Lenz 2014-03-24 14:31:38 UTC
When I want to refactor some code and maybe I see this:

http://pastebin.com/wkWKKYR2

I want to select the phrase: myObject.thisIsAnArray.length and type a hotkey or right click > refactor > create variable.

and this should be look like this: http://pastebin.com/GX2QLvJp

This feature is already implemented in intelliJ and very helpfull.


Regards

Chris
Comment 1 Christian Lenz 2014-09-30 11:42:54 UTC
Here I mean the part which Java already has: Select a text and press alt + enter and you see the hint: introduce Variable..., field..., member... Assign return value to new Variable. Those options are missing for JavaScript.
Comment 2 Petr Pisl 2014-09-30 19:27:30 UTC
I'm going to look at this. Hope there will be more time to implement this soon.
Comment 3 Christian Lenz 2017-06-27 15:34:58 UTC
I will close it, because it will handled now at the JIRA board: https://issues.apache.org/jira/browse/NETBEANS-14. Please feel free to change the state of the ticket.