如何评论一个块在Eclipse? [英] How to comment a block in Eclipse?

查看:124
本文介绍了如何评论一个块在Eclipse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse有热键来注释块吗?并取消注释块?

解决方案

Ctrl - / //注释和 Ctrl - Shift - / 可切换/ * * /至少对于Java,无论如何 - 其他工具可能有不同的快捷方式。



Ctrl - \ 会移除

注意:对于Eclipse CDT 4.4.2, Ctrl - Shift - / 不会取消注释/ * * /块注释。在这种情况下使用 Ctrl - Shift - \



Ctrl ,但在Mac上,快捷键可以全部为 Cmd 。我没有自己的Mac,所以不能轻易检查。


Does Eclipse have a hot key to comment a block? and to uncomment a block?

解决方案

Ctrl-/ to toggle "//" comments and Ctrl-Shift-/ to toggle "/* */" comments. At least for Java, anyway - other tooling may have different shortcuts.

Ctrl-\ will remove a block of either comment, but won't add comments.

Note: As for Eclipse CDT 4.4.2, Ctrl-Shift-/ will not uncomment a "/* */" block comment. Use Ctrl-Shift-\ in that case.

EDIT: It's Ctrl on a PC, but on a Mac the shortcuts may all be Cmd instead. I don't have a Mac myself, so can't easily check.

这篇关于如何评论一个块在Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆