Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330316 - "Change Method Signature" refactoring support
Summary: "Change Method Signature" 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-11-16 03:28 EST by Vladislav Kuzkokov CLA
Modified: 2011-05-25 14:53 EDT (History)
1 user (show)

See Also:


Attachments
implementation (297.59 KB, patch)
2010-11-16 03:33 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
fixed (302.93 KB, patch)
2010-11-16 05:06 EST, Vladislav Kuzkokov CLA
alex.panchenko: iplog+
Details | Diff
support for renaming methods (functions which are properties) (24.90 KB, patch)
2010-11-26 04:52 EST, Vladislav Kuzkokov CLA
alex.panchenko: iplog+
Details | Diff
fixes to some issues (4.61 KB, patch)
2010-11-30 11:20 EST, Vladislav Kuzkokov CLA
alex.panchenko: iplog+
Details | Diff
support for one more declaration type (1.63 KB, patch)
2010-11-30 12:27 EST, Vladislav Kuzkokov CLA
no flags Details | Diff
support for two more declaration types (2.69 KB, patch)
2010-11-30 12:37 EST, Vladislav Kuzkokov CLA
alex.panchenko: iplog+
Details | Diff
fix (10.99 KB, patch)
2011-02-09 09:11 EST, Vladislav Kuzkokov CLA
alex.panchenko: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.