Bug 331516 - "Extract Method" refactoring support
Summary: "Extract Method" refactoring support
Status: RESOLVED FIXED
Alias: None
Product: DLTK
Classification: Technology
Component: JavaScript (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dltk.common-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 05:12 EST by Vladislav Kuzkokov CLA
Modified: 2010-12-06 10:04 EST (History)
1 user (show)

See Also:


Attachments
implementation (212.21 KB, patch)
2010-12-01 05:21 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
Support for optional types (15.24 KB, patch)
2010-12-02 06:15 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
fix (4.50 KB, patch)
2010-12-06 05:59 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
fix (4.50 KB, patch)
2010-12-06 06:06 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
closures (8.55 KB, patch)
2010-12-06 10:04 EST, Vladislav Kuzkokov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav Kuzkokov CLA 2010-12-01 05:12:48 EST
Build Identifier: M20100909-0800

"Extract Method" functionality resembling the one with the same name from JDT.

Reproducible: Always

Steps to Reproduce:
Inapplicable
Comment 1 Vladislav Kuzkokov CLA 2010-12-01 05:21:32 EST
Created attachment 184233 [details]
implementation

Significant part is data/control flow analysis.
Not all use-cases I could think of are addressed in this patch.
Comment 2 Alex Panchenko CLA 2010-12-02 05:05:54 EST
Applied. Thanks
Comment 3 Vladislav Kuzkokov CLA 2010-12-02 06:15:26 EST
Created attachment 184337 [details]
Support for optional types

Refactoring now defines parameter and return types if possible.
Comment 4 Vladislav Kuzkokov CLA 2010-12-06 05:59:20 EST
Created attachment 184581 [details]
fix

Adds next line before new method definition.
Fixed bordercase in control flow analysis.
Comment 5 Vladislav Kuzkokov CLA 2010-12-06 06:06:17 EST
Created attachment 184582 [details]
fix
Comment 6 Vladislav Kuzkokov CLA 2010-12-06 10:04:39 EST
Created attachment 184609 [details]
closures

Adds a warning if there's a variable captured by closure so that refactoring may change semantics.