Eclipse - Ctrl-空格键生成“instanceof”

发布于 2025-01-05 02:54:35 字数 312 浏览 5 评论 0原文

在 Netbeans 中,如果我在以下条件之一按 Ctrl-space

  • 在字段之后 + 至少一个空格;
  • 或者在返回值的方法之后(不是 void);

然后 NetBeans 生成 instanceof。有这个功能吗?或者我如何在 Eclipse 中配置它?

谢谢:-)

已编辑

抱歉,我已经很长时间没有使用 NetBeans 了。但如果我没记错的话,上面至少有两个条件是对的。

In Netbeans, if I press Ctrl-space in one of these conditions:

  • after a field + at least one space;
  • or after a method which returns a value (not void);

Then NetBeans produces instanceof. Is there that feature, or how can I configure it in Eclipse?

Thanks :-)

Edited

I'm sorry, it's a long time I haven't used NetBeans. But if I remember right, at least two above conditions are right.

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

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

发布评论

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

评论(1

土豪 2025-01-12 02:54:35

我不知道这可以配置,除了创建您自己的文本模板(在首选项中搜索“模板”)。

对我来说, if( field inCtrl+Space 有效。

并且可能会提出功能请求。

I'm not aware that this can be configured, except maybe creating your own text template (search for "templates" in the preferences).

For me, if( field inCtrl+Space works.

And probably file a feature request.

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