IntelliJ 插件可打印任何类中的字段

发布于 2024-10-09 21:18:09 字数 122 浏览 0 评论 0原文

我是 IntelliJ 的新手。有没有 IntelliJ 的插件,我可以在其中选择一些字段并打印它们或创建 jsp 表单元素等。我知道它们有 toStringequals 等。

I am new to IntelliJ. Is there a plugin for IntelliJ where I can select a few fields and print them or create jsp form elements, etc. I know they have toString, equals, etc.

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

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

发布评论

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

评论(1

天冷不及心凉 2024-10-16 21:18:09

不,没有插件可以做到这一点,并且编写一个“正确的插件”将很困难。

但是您可以使用“实时模板”实现类似的功能(至少对于打印字段,创建 JSP 表单是另一回事)

IntelliJ 附带了现成的“实时模板”,如“soutv”...

所以您输入 < code>soutv 在你的 java 编辑器中,然后输入 Tab 键,IntelliJ 将生成一个 System.out.println("myField = " + myField) 并且你可以选择要打印的文件。

查看 IntelliJ 文档以了解如何编写您自己的实时模板并查看一些示例。

No, there's no plugin for doing that, and write a "proper plugin" will be hard.

But you can achieve something similar using "Live Templates" (at least for printing fields, Creating a JSP form is a different story)

IntelliJ comes with ready-to-use "Live Templates" like "soutv"...

So you type soutv in your java editor, then type Tab key and IntelliJ will generate a System.out.println("myField = " + myField) and you can choose what file to print.

Check the IntelliJ docs to know how to write your own Live Templates and see some examples.

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