Java refactoring tools [duplicate]
Asked Answered
F

3

8

Possible Duplicate:
A tool like ReSharper, but for Java?

I make very heavy use of the Java code refactoring tools provided by Eclipse (extract interface, rename method, etc.). Does anyone knows of other similar tools (preferably Eclipse plugins) that can perform Java code refactorings that are not available in Eclipse by default, or that can perform the same refactorings better?

I'm aware of various Eclipse plugins that can identify code in need of refactoring (e.g. FindBugs, UCDetector), but I'm looking for tools that can actually do the refactoring.

Fellini answered 2/4, 2009 at 3:23 Comment(1)
See this questionTrombone
T
3

RefactorIT... Is available as standalone product and Eclipse plugin. Only con is that for non-open source projects you are limited to 50 classes (but can get around that by splitting into multiple Eclipse projects, and using dependencies). RefactorIT also has code generation tools, like 'Encapsulate Field', where you select (multiple) fields in the package view (wherever) and it automatically creates getters and/or setters, also same thing for Constructors... Great tool!

Totalitarianism answered 2/4, 2009 at 4:9 Comment(1)
It looks like it is open source and free, at sourceforge.net/projects/refactorit (standalone and Eclipse plugin). Or is there a different tool with the same name?Road
A
1

I agree with nevster that IntelliJ is much more complete and subtle in its set of refactoring tools. I have been using it for quite a while, and, with automatic code generation (which is essentially the same thing), an extensive refactoring toolkint is the feature that makes it really stand out compared to Eclipse.

However, I would not advise so readily moving to IntelliJ, for a number of reasons that can get really irking over time:

  • it's not free (I would even say it is expensive)
  • it has a HUGE memory footprint (half a Gb? wtf?) and is slow to start
  • it does not interact well with X-based window managers (to the point of silent data corruption, in some extreme cases)

So you would have to balance the advantages of a better (admittedly, outstandingly so) refactoring toolkit against the weight (literally) of IntelliJ.

Aisha answered 2/4, 2009 at 3:40 Comment(2)
I used IntelliJ under Gnome, and KDE both with OpenSUSE. It was fine, you can invoke garbage collection from within the IDE. And it works almost all of the time. The startup time is approximately same for all three; Eclipse, IntelliJ and Netbeans.Laresa
I had a weird, and so far unsolved, focus-grabbing bug: IntelliJ would grab back the focus after running background task... while I was typing in another app. I often didn't notice, and this resulted in random stuff being typed in the editor. BAD!Aisha
T
0

Well you can try out IntelliJ for free to get a feel for everything it can do. It satisfies your "not available in Eclipse" and "perform the same refactorings better" but obviously not the "preferably Eclipse plugins" :)

Here's an overview : http://www.jetbrains.com/idea/features/refactoring.html

Tolmann answered 2/4, 2009 at 3:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.