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

Bug 330316

Summary: "Change Method Signature" 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
fixed
alex.panchenko: iplog+
support for renaming methods (functions which are properties)
alex.panchenko: iplog+
fixes to some issues
alex.panchenko: iplog+
support for one more declaration type
none
support for two more declaration types
alex.panchenko: iplog+
fix alex.panchenko: iplog+

Description Vladislav Kuzkokov CLA 2010-11-16 03:28:07 EST
Build Identifier: M20100909-0800

"Change method signature" functionality resembling the one with the same name from JDT.

Reproducible: Always

Steps to Reproduce:
inapplicable
Comment 1 Vladislav Kuzkokov CLA 2010-11-16 03:33:04 EST
Created attachment 183195 [details]
implementation
Comment 2 Vladislav Kuzkokov CLA 2010-11-16 05:06:49 EST
Created attachment 183205 [details]
fixed
Comment 3 Alex Panchenko CLA 2010-11-18 07:26:26 EST
committed the patch. Thanks!
Comment 4 Vladislav Kuzkokov CLA 2010-11-26 04:52:06 EST
Created attachment 183906 [details]
support for renaming methods (functions which are properties)
Comment 5 Vladislav Kuzkokov CLA 2010-11-26 04:55:18 EST
Renaming for methods is needed:

var obj = {
    // declaration
    id : function(x) { return x }
}
// reference
obj.id(7)
Comment 6 Alex Panchenko CLA 2010-11-29 11:53:16 EST
Committed. Thank you
Comment 7 Vladislav Kuzkokov CLA 2010-11-30 11:20:13 EST
Created attachment 184141 [details]
fixes to some issues

Didn't work if function had 0 parameters.
Didn't work when parameters are both added and removed.
Better indentation handling.
Comment 8 Vladislav Kuzkokov CLA 2010-11-30 12:27:20 EST
Created attachment 184152 [details]
support for one more declaration type

Declarations of

var x = function() {}

kind are supported with this patch.
Comment 9 Vladislav Kuzkokov CLA 2010-11-30 12:37:15 EST
Created attachment 184154 [details]
support for two more declaration types

Declarations of

var x = function() {}
this.x = function() {}

kinds are supported with this patch.
Comment 10 Vladislav Kuzkokov CLA 2011-02-09 09:11:22 EST
Created attachment 188589 [details]
fix

didn't add comma in case
  function f() { }
becoming:
  function f(s,t) { }
same thing with newline between statements in other refactorings.