IntelliJ IDEA中类似Eclipse的注释格式? [英] Eclipse-like comment formatting in IntelliJ IDEA?
问题描述
在Eclipse中,我可以通过选择它们并按 Shift + Ctrl + F
格式化注释。例如,当我选择这样的方法注释:
In Eclipse, I can format comments by selecting them and pressing Shift + Ctrl + F
. For example, when I select a method comment like this:
/**
* This method
* does some stuff.
*/
,然后按 Shift + Ctrl + F
,Eclipse自动包装它:
and press Shift + Ctrl + F
, Eclipse automatically wraps it:
/**
* This method does some stuff.
*/
在IDEA中有什么可比的?
Is there anything comparable to this in IDEA?
编辑:要澄清,我正在寻找评论格式,也可以将太多的行分解成多行。
EDIT: To clarify, I'm looking for comment formatting that also breaks lines that are too long into multiple lines.
推荐答案
最接近的是编辑
连线
( Ctrl + Shift + J )。您必须首先选择要加入的行。
The closest thing that you can get is Edit
| Join Lines
(Ctrl+Shift+J). You have to select the lines you want to join first.
要包含长注释,请启用设置
代码样式
| JavaDoc
| 包裹在右边缘
。
To wrap long comments enable Settings
| Code Style
| JavaDoc
| Wrap at right margin
.
这篇关于IntelliJ IDEA中类似Eclipse的注释格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!