views:

182

answers:

1

And if so are there Eclipse plugins that add those types of code refactoring to eclipse?

note:for C#/Java respectively.

+3  A: 

Most of the JetBrains ReSharper refactoring features are already in Eclipse.

But Eclipse Helios 3.6 (to be released in July) actually introduce one revised refactoring:

3.6-M6:

The Convert Member Type to Top Level refactoring has been renamed to Move Type to New File and now allows any secondary type in a file to be moved into its own file. The action continues to work for member types.

alt text

and it improves the Extract Method:

3.6-M1

The Extract Method refactoring now handles selections that contain continue statements. To preserve the semantics of the existing code, the selection needs to include the last statement of the loop. In the extracted method, continue statements are changed to return

alt text

For a selection that would need multiple return values in the extracted method, Eclipse now lists the conflicting variables in the error message:

alt text

VonC
This is one area where I just don't get it. This refactoring support has been in other IDE's for a long time. MS really needs to increase there support for this type of workflow. I haven't used VS2010 yet, but from what I have been reading, it doesn't look like it's too much better.
Casey
@Casey: the logic is often to allow third-party to come up with (paying) plugins to provide additional feature to the Visual Studio IDE. Quite a different approach than in an open source open platform like Eclipse, where refactoring, if absent, would have been implemented as a (free) plugin anyway.
VonC
@VonC You describe the situation accurately. A cynic could claim Microsoft is complicit in it's efforts to make their business model fit the world. People who use Eclipse (myself included) wonder why the free product for a competing platform seems to be more up-to-date then the pay-to-play one from Micro$oft. It would seem that the capitalistic model is failing in this case.
Kelly French
Note that open source can be very capitalistic. I believe IBM funds most of eclipse development.
Roman A. Taycher