Java重构工具

发布于 2024-07-16 01:48:15 字数 398 浏览 7 评论 0原文

可能的重复:
类似于 ReSharper 的工具,但适用于 Java?

我经常使用Eclipse提供的Java代码重构工具(提取接口、重命名方法等)。 有谁知道其他类似的工具(最好是 Eclipse 插件)可以执行 Eclipse 默认情况下不可用的 Java 代码重构,或者可以更好地执行相同的重构?

我知道各种 Eclipse 插件可以识别需要重构的代码(例如 FindBugs、UCDetector),但我正在寻找实际上可以进行重构的工具。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

遗心遗梦遗幸福 2024-07-23 01:48:15

RefactorIT... 可作为独立产品和 Eclipse 插件使用。 唯一的缺点是,对于非开源项目,您只能使用 50 个类(但可以通过拆分为多个 Eclipse 项目并使用依赖项来解决这个问题)。
RefactorIT 还具有代码生成工具,例如“封装字段”,您可以在包视图(无论何处)中选择(多个)字段,它会自动创建 getter 和/或 setter,对于构造函数也是如此...
很棒的工具!

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!

痴情换悲伤 2024-07-23 01:48:15

我同意 nevster 的观点,即 IntelliJ 的重构工具集更加完整和微妙。 我已经使用它很长一段时间了,并且,通过自动代码生成(本质上是同一件事),广泛的重构工具是使其与 Eclipse 相比真正脱颖而出的功能。

然而,我不建议如此轻易地转向 IntelliJ,因为随着时间的推移,这些原因可能会变得非常烦人:

  • 它不是免费的(我什至会说它很昂贵),
  • 它有巨大的内存占用(半 GB?wtf? )并且启动速度很慢,
  • 它与基于 X 的窗口管理器不能很好地交互(在某些极端情况下,会导致静默数据损坏),

因此您必须权衡更好的(诚然,非常出色)重构工具包的优势与 IntelliJ 的重量(字面意思)相比。

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.

娜些时光,永不杰束 2024-07-23 01:48:15

您可以免费试用 IntelliJ,感受它的一切功能。
它满足你的“在 Eclipse 中不可用”和“更好地执行相同的重构”,但显然不是“最好是 Eclipse 插件”:)

这是一个概述:
http://www.jetbrains.com/idea/features/refactoring.html

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文