History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-14075
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Amir Kolsky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

Extend MethodParemeters Class (see #11019)

Created: 05 Aug 06 20:19   Updated: 08 Oct 07 20:22
Component/s: Refactorings - Extract Class from Method Parameters
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 210
Old URL: http://www.intellij.net/tracker/resharper/viewSCR?publicId=14075


 Description  « Hide
See: http://www.intellij.net/tracker/resharper/viewSCR?publicId=11019

Given

public class SomeFunctionClass
{
  public double X;
  ...
}

public void SomeMethod(SomeMethodParameters params, int i) 
{
  Use(i);
  ...
}

I can add a method parameter:
public void SomeMethod(SomeMethodParameters params) {...}

It would be nice to add a context action to add the new parameter to the parameter class:

public class SomeFunctionClass
{
  public double X;
  ...
  public int i; // <--------- new parameter
}

public void SomeMethod(SomeMethodParameters params, int i) 
{
  Use(params.i);
  ...
}

(assuming i is not already in the parameters class...)



 All   Comments   Work Log   Change History      Sort Order:
Andrey Simanovsky - 08 Aug 06 14:32
Re: #14075- Extend MethodParemeters Class (see #11019)
As a context action it will too interfering because it is supposed to be available at almost any parameter. And the number of such context actions will have quadratic dependency on number of parameters.

Andrey Simanovsky - 08 Aug 06 14:32
Re: #14075- Extend MethodParemeters Class (see #11019)
We will implement it as an option to Extract Class from Parameters. It will be able not to create class but reuse one of the types of the parameters.