问题描述
我认为这很容易实现,但到目前为止,我还没有在 Java类编辑器
和 jsf faceted webapp XHTML文件编辑器:
- 快速注释/取消注释一行(如 + 用于删除单行)
- 能够选择多行并注释/取消注释
例如:
单行java代码,来自:
private String name;
into
// private String name;
多行java代码,from:
private String name;
private int age;
into
/ * private String name;
private int age; * /
单行xhtml代码,来自:
< h:inputText ... />
into
<! - h:inputText ... / - >
多行xhtml代码,from:
< h:inputTextarea
rows =xx
cols =yy
...
/>
into
<! - h:inputTextarea
rows =xx
cols =yy
...
/ - >
解决方案对于单行注释,您可以使用 + ,对于多行注释,您可以使用 + +
在Mac / OS X上,您可以使用选择要在Java编辑器中注释的行。 > + 注释掉单行或所选块。
I thought this would be easy to achieve, but so far I haven't found solutions for comment/uncomment shortcut on both
Java class editor
andjsf faceted webapp XHTML file editor
:
- to quickly comment/uncomment a line (like + is for removing single line)
- being able to choose multiple lines and comment/uncomment it
For example :
single line java code, from :
private String name;
into
//private String name;
multiple line java code, from :
private String name; private int age;
into
/*private String name; private int age;*/
single line xhtml code, from :
<h:inputText ... />
into
<!-- h:inputText ... / -->
multiple line xhtml code, from :
<h:inputTextarea rows="xx" cols="yy" ... />
into
<!-- h:inputTextarea rows="xx" cols="yy" ... / -->
解决方案For single line comment you can use + and for multiple line comment you can use + + after selecting the lines you want to comment in java editor.
On Mac/OS X you can use + to comment out single lines or selected blocks.
这篇关于Eclipse评论/取消注释快捷方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!