有没有开源的命令行工具来重构java代码?

发布于 2024-07-15 13:22:05 字数 1542 浏览 3 评论 0原文

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

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

发布评论

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

评论(5

澉约 2024-07-22 13:22:06

查看 jrefactory 及其 命令行选项

Check out jrefactory, and its command line option.

分開簡單 2024-07-22 13:22:06

代码重构是一个上下文敏感且交互繁重的过程,不太适合命令行界面。 您可以对特定文件(或一组文件)进行数十种类型的重构,并且提出一个 vim 界面来集成所有这些将是一个重大挑战。

如果您想要 IDE 功能,为什么不使用 IDE? 尤其是 Java,它非常适合通过像 Eclipse 这样的复杂软件进行自动重构。

Code refactoring is a very context-sensitive and interaction-heavy process which doesn't lend itself very well to command-line interfaces. There can be dozens of types of refactorings you could do to a particular file (or set of files) and coming up with a vim interface to integrate all of this would be a major challenge.

If you want IDE functionality, why not use an IDE? Especially with Java, which lends itself so well to automatic refactoring by a complex piece of software like Eclipse.

卖梦商人 2024-07-22 13:22:06

我强烈建议您在 IDE 中使用 VIM(例如 VIMPlugin 和 Eclipse - 这是我使用的组合,它效果很好)。

我曾经是VIM的死忠。 然而,现代 IDE 中的重构和代码分析将远远超过 VIM 提供的任何功能(通过插件等)。

别误会我的意思。 我喜欢 VIM 并且仍然用它来做各种各样的事情。 然而,现代 IDE 是最富有成效的前进道路。

I would strongly advise you to use VIM within an IDE (e.g. VIMPlugin and Eclipse - this is the combination I use and it works very well).

I used to be a VIM diehard. However the refactoring and code analysis within a modern IDE will far surpass any capabilities that VIM will provide (with plugins etc.).

Don't get me wrong. I love VIM and still use it for all sorts of stuff. Modern IDEs are the most productive route forward, however.

勿挽旧人 2024-07-22 13:22:06

我知道这是一个较旧的问题,但我后来问自己这个问题并决定写一个。 它是新的,而且还不是“超级棒”,但它是用 GOLANG 编写的,并且是开源的。 免责声明,这是我的项目,但我不是自我推销。 我只是想与其他关心这种性质的事情的人分享。

https://github.com/asharif/ref

I know this is an older question, but I was asking myself this question a bit back and decided to write one. It's new and it not "super awesome yet" but it's written in GOLANG and it's open source. DISCLAIMER, this is my project but I am not self promoting. I just thought I'd share with others that care about something of this nature.

https://github.com/asharif/ref

眼前雾蒙蒙 2024-07-22 13:22:05

您可以尝试 Eclim。 Eclim 的目标是在 Vim 中公开 Eclipse 的功能。 特别是,有一些支持的重构命令

You could try Eclim. The goal of Eclim is to expose the functionality of Eclipse within Vim. In particular, there are a few commands for refactoring that are supported.

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