Mass / batch refactor

Hi to All,

Is there any way to do mass refactoring tasks efficiently?

For example I would like refactor getSomeValue and setSomeValue methods to
SomeValue property
I can do this with ReSharper. The problem is that I have more than 100 of
this method pairs...

Any Ideas?



3 comments
Comment actions Permalink

Hi,

in the 2.0 version there will be an ability to create plugins for ReSharper
as well as simple
macro scripts in C# and run them against the solution. I believe your task
can be easily accomplish
using such a macro script.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi to All,

Is there any way to do mass refactoring tasks efficiently?

For example I would like refactor getSomeValue and setSomeValue
methods to
SomeValue property
I can do this with ReSharper. The problem is that I have more than 100
of
this method pairs...
Any Ideas?



0
Comment actions Permalink

Dmitry Shaporenkov wrote:

Is there any way to do mass refactoring tasks efficiently?


in the 2.0 version there will be an ability to create plugins for
ReSharper as well as simple macro scripts in C# and run them against
the solution. I believe your task can be easily accomplish using such
a macro script.


Ok but what about simply handling the selection range?

For example I often write code like this

public int A;
public string B;
...

I think selecting all lines and then choose "Encapsulate Field..."
should then handle all the fields in the selected source.

--
Immo Landwerth - Visual Studio 2003 - C# - XanaNews 1.17.5.7

0
Comment actions Permalink

Hello Immo,

the idea about handling selection sounds interesting. However, it looks like
only a limited number of refactorings
can be applied to a selection range without further user interaction. And
you still need to open each file you
want to refactor, so it simply lessens the burden, but does not competely
eliminate it.


Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Dmitry Shaporenkov wrote:

>>> Is there any way to do mass refactoring tasks efficiently?
>>>
>> in the 2.0 version there will be an ability to create plugins for
>> ReSharper as well as simple macro scripts in C# and run them against
>> the solution. I believe your task can be easily accomplish using such
>> a macro script.
>>

Ok but what about simply handling the selection range?

For example I often write code like this

public int A;
public string B;
...
I think selecting all lines and then choose "Encapsulate Field..."
should then handle all the fields in the selected source.



0

Please sign in to leave a comment.