mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Changes according IDEA-CR-8085 comments
This commit is contained in:
+1
-1
@@ -218,7 +218,7 @@
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="checkbox.line.comment.prepend.with.space"/>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="checkbox.line.comment.add.space"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
|
||||
+5
-5
@@ -222,7 +222,7 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
if (!block.skip) {
|
||||
if (!allLinesCommented) {
|
||||
if (!block.commentWithIndent) {
|
||||
doDefaultCommenting(block, block.addSpace);
|
||||
doDefaultCommenting(block);
|
||||
}
|
||||
else {
|
||||
doIndentCommenting(block);
|
||||
@@ -433,7 +433,7 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
return CharArrayUtil.regionMatches(chars, offset, prefix) ? offset : -1;
|
||||
}
|
||||
|
||||
public void doDefaultCommenting(final Block block, final boolean addSpace) {
|
||||
public void doDefaultCommenting(final Block block) {
|
||||
final Document document = block.editor.getDocument();
|
||||
DocumentUtil.executeInBulk(
|
||||
document, block.endLine - block.startLine >= Registry.intValue("comment.by.line.bulk.lines.trigger"), new Runnable() {
|
||||
@@ -441,7 +441,7 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
public void run() {
|
||||
for (int line = block.endLine; line >= block.startLine; line--) {
|
||||
int offset = document.getLineStartOffset(line);
|
||||
commentLine(block, line, offset, addSpace);
|
||||
commentLine(block, line, offset);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -475,7 +475,7 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
buffer.append(c);
|
||||
offset++;
|
||||
}
|
||||
commentLine(block, line, offset, false);
|
||||
commentLine(block, line, offset);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -597,7 +597,7 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void commentLine(Block block, int line, int offset, boolean addSpace) {
|
||||
private static void commentLine(Block block, int line, int offset) {
|
||||
Commenter commenter = block.blockSuitableCommenter;
|
||||
Document document = block.editor.getDocument();
|
||||
if (commenter == null) commenter = findCommenter(block.editor, block.psiFile, line);
|
||||
|
||||
@@ -733,4 +733,4 @@ code.style.other.label=Text files and unsupported file types\:
|
||||
|
||||
remote.desktop.detected.title=Remote desktop detected
|
||||
remote.desktop.detected.message=Animation disabled
|
||||
checkbox.line.comment.prepend.with.space=Prepend with space
|
||||
checkbox.line.comment.add.space=Add a space at comment start
|
||||
Reference in New Issue
Block a user