Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331516

Summary: "Extract Method" refactoring support
Product: [Technology] DLTK Reporter: Vladislav Kuzkokov <vladislav.kuzkokov>
Component: JavaScriptAssignee: dltk.common-inbox <dltk.common-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alex.panchenko
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
implementation
none
Support for optional types
none
fix
none
fix
none
closures none

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.