mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
WEB-46949 insert leading/trailing space within block comment
GitOrigin-RevId: 14f63a01c4eca077762b1426939aa0abc8594dda
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc3807df6e
commit
c3264f785c
@@ -48,6 +48,7 @@
|
||||
"blank_lines_before_method_body": 0,
|
||||
"blank_lines_before_package": 0,
|
||||
"block_brace_style": "end_of_line",
|
||||
"block_comment_add_space": false,
|
||||
"block_comment_at_first_column": true,
|
||||
"builder_methods": [
|
||||
""
|
||||
|
||||
@@ -209,7 +209,8 @@ public interface CodeStyleSettingsCustomizable {
|
||||
enum CommenterOption {
|
||||
LINE_COMMENT_ADD_SPACE,
|
||||
LINE_COMMENT_AT_FIRST_COLUMN,
|
||||
BLOCK_COMMENT_AT_FIRST_COLUMN
|
||||
BLOCK_COMMENT_AT_FIRST_COLUMN,
|
||||
BLOCK_COMMENT_ADD_SPACE
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -240,6 +240,7 @@ public class CommonCodeStyleSettings {
|
||||
* Tells if a space is added when commenting/uncommenting lines with a line comment.
|
||||
*/
|
||||
public boolean LINE_COMMENT_ADD_SPACE = false;
|
||||
public boolean BLOCK_COMMENT_ADD_SPACE = false;
|
||||
|
||||
public boolean KEEP_LINE_BREAKS = true;
|
||||
|
||||
|
||||
@@ -600,7 +600,8 @@ editorsearch.in.selection.with.hint=Search in selection. {0} to search for selec
|
||||
code.style.other.file.types=Other File Types
|
||||
code.style.other.label=Text files and unsupported file types\:
|
||||
|
||||
checkbox.line.comment.add.space=Add a space at comment start
|
||||
checkbox.line.comment.add.space=Add a space at line comment start
|
||||
checkbox.block.comment.add.space=Add a space at block comment start
|
||||
|
||||
rainbow.option.panel.display.name=Semantic highlighting
|
||||
checkbox.stop.1=Color #1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.application.options.codeStyle.CommenterForm">
|
||||
<grid id="27dc6" binding="myCommenterPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="27dc6" binding="myCommenterPanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
@@ -18,7 +18,7 @@
|
||||
</component>
|
||||
<vspacer id="c2a8d">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="98a1c" class="com.intellij.ui.components.JBCheckBox" binding="myLineCommentAddSpaceCb">
|
||||
@@ -37,6 +37,14 @@
|
||||
<text resource-bundle="messages/ApplicationBundle" key="checkbox.block.comment.at.first.column"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9d907" class="com.intellij.ui.components.JBCheckBox" binding="myBlockCommentAddSpaceCb">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="checkbox.block.comment.add.space"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
@@ -37,7 +37,8 @@ public class CommenterForm implements CodeStyleSettingsCustomizable {
|
||||
private JBCheckBox myLineCommentAtFirstColumnCb;
|
||||
private JBCheckBox myLineCommentAddSpaceCb;
|
||||
private JBCheckBox myBlockCommentAtFirstJBCheckBox;
|
||||
|
||||
private JBCheckBox myBlockCommentAddSpaceCb;
|
||||
|
||||
private final Language myLanguage;
|
||||
|
||||
public CommenterForm(Language language) {
|
||||
@@ -64,21 +65,24 @@ public class CommenterForm implements CodeStyleSettingsCustomizable {
|
||||
myBlockCommentAtFirstJBCheckBox.setSelected(langSettings.BLOCK_COMMENT_AT_FIRST_COLUMN);
|
||||
myLineCommentAddSpaceCb.setSelected(langSettings.LINE_COMMENT_ADD_SPACE && !langSettings.LINE_COMMENT_AT_FIRST_COLUMN);
|
||||
myLineCommentAddSpaceCb.setEnabled(!langSettings .LINE_COMMENT_AT_FIRST_COLUMN);
|
||||
myBlockCommentAddSpaceCb.setSelected(langSettings.BLOCK_COMMENT_ADD_SPACE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void apply(@NotNull CodeStyleSettings settings) {
|
||||
CommonCodeStyleSettings langSettings = settings.getCommonSettings(myLanguage);
|
||||
langSettings.LINE_COMMENT_AT_FIRST_COLUMN = myLineCommentAtFirstColumnCb.isSelected();
|
||||
langSettings.BLOCK_COMMENT_AT_FIRST_COLUMN = myBlockCommentAtFirstJBCheckBox.isSelected();
|
||||
langSettings.LINE_COMMENT_ADD_SPACE = myLineCommentAddSpaceCb.isSelected();
|
||||
langSettings.BLOCK_COMMENT_ADD_SPACE = myBlockCommentAddSpaceCb.isSelected();
|
||||
}
|
||||
|
||||
|
||||
public boolean isModified(@NotNull CodeStyleSettings settings) {
|
||||
CommonCodeStyleSettings langSettings = settings.getCommonSettings(myLanguage);
|
||||
return myLineCommentAtFirstColumnCb.isSelected() != langSettings.LINE_COMMENT_AT_FIRST_COLUMN
|
||||
|| myBlockCommentAtFirstJBCheckBox.isSelected() != langSettings.BLOCK_COMMENT_AT_FIRST_COLUMN
|
||||
|| myLineCommentAddSpaceCb.isSelected() != langSettings.LINE_COMMENT_ADD_SPACE;
|
||||
|| myLineCommentAddSpaceCb.isSelected() != langSettings.LINE_COMMENT_ADD_SPACE
|
||||
|| myBlockCommentAddSpaceCb.isSelected() != langSettings.BLOCK_COMMENT_ADD_SPACE;
|
||||
}
|
||||
|
||||
public JPanel getCommenterPanel() {
|
||||
@@ -102,15 +106,19 @@ public class CommenterForm implements CodeStyleSettingsCustomizable {
|
||||
else if (CommenterOption.BLOCK_COMMENT_AT_FIRST_COLUMN.name().equals(optionName)) {
|
||||
myBlockCommentAtFirstJBCheckBox.setVisible(true);
|
||||
}
|
||||
else if (CommenterOption.BLOCK_COMMENT_ADD_SPACE.name().equals(optionName)) {
|
||||
myBlockCommentAddSpaceCb.setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setAllOptionsVisible(boolean isVisible) {
|
||||
myLineCommentAtFirstColumnCb.setVisible(isVisible);
|
||||
myLineCommentAddSpaceCb.setVisible(isVisible);
|
||||
myBlockCommentAtFirstJBCheckBox.setVisible(isVisible);
|
||||
myBlockCommentAddSpaceCb.setVisible(isVisible);
|
||||
}
|
||||
|
||||
|
||||
private void customizeSettings() {
|
||||
setAllOptionsVisible(false);
|
||||
LanguageCodeStyleSettingsProvider settingsProvider = LanguageCodeStyleSettingsProvider.forLanguage(myLanguage);
|
||||
@@ -118,6 +126,10 @@ public class CommenterForm implements CodeStyleSettingsCustomizable {
|
||||
settingsProvider.customizeSettings(this, LanguageCodeStyleSettingsProvider.SettingsType.COMMENTER_SETTINGS);
|
||||
}
|
||||
myCommenterPanel.setVisible(
|
||||
myLineCommentAtFirstColumnCb.isVisible() || myLineCommentAddSpaceCb.isVisible() || myBlockCommentAtFirstJBCheckBox.isVisible());
|
||||
myLineCommentAtFirstColumnCb.isVisible()
|
||||
|| myLineCommentAddSpaceCb.isVisible()
|
||||
|| myBlockCommentAtFirstJBCheckBox.isVisible()
|
||||
|| myBlockCommentAddSpaceCb.isVisible()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
private Editor myEditor;
|
||||
private Caret myCaret;
|
||||
private PsiFile myFile;
|
||||
private Language myLanguage;
|
||||
private Document myDocument;
|
||||
private Commenter myCommenter;
|
||||
private CommenterDataHolder mySelfManagedCommenterData;
|
||||
@@ -63,6 +64,7 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
myWarningLocation = null;
|
||||
|
||||
myDocument = editor.getDocument();
|
||||
myLanguage = getLanguage(caret, file);
|
||||
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed("codeassists.comment.block");
|
||||
final Commenter commenter = findCommenter(myFile, myEditor, caret);
|
||||
@@ -138,8 +140,11 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
}
|
||||
}
|
||||
if (selectionStart == selectionEnd) {
|
||||
myDocument.insertString(selectionStart, prefix + suffix);
|
||||
myCaret.moveToOffset(selectionStart + prefix.length());
|
||||
CommonCodeStyleSettings settings = getLanguageSettings();
|
||||
int offset = settings.BLOCK_COMMENT_ADD_SPACE ? prefix.length() + 1 : prefix.length();
|
||||
String comment = settings.BLOCK_COMMENT_ADD_SPACE ? prefix + " " + suffix : prefix + suffix;
|
||||
myDocument.insertString(selectionStart, comment);
|
||||
myCaret.moveToOffset(selectionStart + offset);
|
||||
}
|
||||
else {
|
||||
commentRange(selectionStart, selectionEnd, prefix, suffix, commenter);
|
||||
@@ -149,6 +154,15 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
showMessageIfNeeded();
|
||||
}
|
||||
|
||||
private static @NotNull Language getLanguage(@NotNull Caret caret, @NotNull PsiFile file) {
|
||||
Language language = PsiUtilBase.getLanguageInEditor(caret, file.getProject());
|
||||
return language != null ? language : file.getLanguage();
|
||||
}
|
||||
|
||||
private @NotNull CommonCodeStyleSettings getLanguageSettings() {
|
||||
return CodeStyle.getLanguageSettings(myFile, myLanguage);
|
||||
}
|
||||
|
||||
private void showMessageIfNeeded() {
|
||||
if (myWarning != null) {
|
||||
myEditor.getScrollingModel().disableAnimation();
|
||||
@@ -397,9 +411,9 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
final CharSequence chars = myDocument.getCharsSequence();
|
||||
LogicalPosition caretPosition = myCaret.getLogicalPosition();
|
||||
|
||||
CommonCodeStyleSettings settings = getLanguageSettings();
|
||||
if (startOffset == 0 || chars.charAt(startOffset - 1) == '\n') {
|
||||
if (endOffset == myDocument.getTextLength() || endOffset > 0 && chars.charAt(endOffset - 1) == '\n') {
|
||||
CommonCodeStyleSettings settings = CodeStyle.getLanguageSettings(myFile);
|
||||
String space;
|
||||
Boolean forced = commenter instanceof IndentedCommenter ? ((IndentedCommenter)commenter).forceIndentedBlockComment() : null;
|
||||
if ((forced == null && !settings.BLOCK_COMMENT_AT_FIRST_COLUMN) || forced == Boolean.TRUE) {
|
||||
@@ -430,10 +444,17 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
}
|
||||
}
|
||||
|
||||
TextRange range = insertNestedComments(startOffset, endOffset, commentPrefix, commentSuffix, commenter);
|
||||
String nestingPrefix = commentPrefix;
|
||||
String nestingSuffix = commentSuffix;
|
||||
if (settings.BLOCK_COMMENT_ADD_SPACE) {
|
||||
nestingPrefix += " ";
|
||||
nestingSuffix = " " + nestingSuffix;
|
||||
}
|
||||
|
||||
TextRange range = insertNestedComments(startOffset, endOffset, nestingPrefix, nestingSuffix, commenter);
|
||||
if (range != null) {
|
||||
myCaret.setSelection(range.getStartOffset(), range.getEndOffset());
|
||||
LogicalPosition pos = new LogicalPosition(caretPosition.line, caretPosition.column + commentPrefix.length());
|
||||
LogicalPosition pos = new LogicalPosition(caretPosition.line, caretPosition.column + nestingPrefix.length());
|
||||
myCaret.moveToLogicalPosition(pos);
|
||||
}
|
||||
}
|
||||
@@ -683,7 +704,7 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
}
|
||||
}
|
||||
|
||||
private TextRange expandRange(int delOffset1, int delOffset2) {
|
||||
private @NotNull TextRange expandRange(int delOffset1, int delOffset2) {
|
||||
CharSequence chars = myDocument.getCharsSequence();
|
||||
int offset1 = CharArrayUtil.shiftBackward(chars, delOffset1 - 1, " \t");
|
||||
if (offset1 < 0 || chars.charAt(offset1) == '\n' || chars.charAt(offset1) == '\r') {
|
||||
@@ -702,20 +723,37 @@ public final class CommentByBlockCommentHandler extends MultiCaretCodeInsightAct
|
||||
}
|
||||
|
||||
private Couple<TextRange> findCommentBlock(TextRange range, String commentPrefix, String commentSuffix) {
|
||||
CommonCodeStyleSettings settings = getLanguageSettings();
|
||||
CharSequence chars = myDocument.getCharsSequence();
|
||||
int startOffset = range.getStartOffset();
|
||||
boolean endsProperly = CharArrayUtil.regionMatches(chars, range.getEndOffset() - commentSuffix.length(), commentSuffix);
|
||||
|
||||
TextRange start = expandRange(startOffset, startOffset + commentPrefix.length());
|
||||
TextRange end;
|
||||
if (endsProperly) {
|
||||
end = expandRange(range.getEndOffset() - commentSuffix.length(), range.getEndOffset());
|
||||
}
|
||||
else {
|
||||
end = new TextRange(range.getEndOffset(), range.getEndOffset());
|
||||
TextRange initialPrefix = TextRange.create(startOffset, startOffset + commentPrefix.length());
|
||||
TextRange prefix = expandRange(initialPrefix.getStartOffset(), initialPrefix.getEndOffset());
|
||||
// is expanded only in cases when the comment prefix or suffix are the only characters in the line except whitespaces
|
||||
// so there's no need to remove block white space
|
||||
if (settings.BLOCK_COMMENT_ADD_SPACE && initialPrefix.equals(prefix)) {
|
||||
if (StringUtil.isChar(chars, prefix.getEndOffset(), ' ')) {
|
||||
prefix = prefix.grown(1);
|
||||
}
|
||||
}
|
||||
|
||||
return Couple.of(start, end);
|
||||
TextRange suffix;
|
||||
if (endsProperly) {
|
||||
TextRange initialSuffix = TextRange.create(range.getEndOffset() - commentSuffix.length(), range.getEndOffset());
|
||||
suffix = expandRange(initialSuffix.getStartOffset(), initialSuffix.getEndOffset());
|
||||
if (settings.BLOCK_COMMENT_ADD_SPACE && initialSuffix.equals(suffix)) {
|
||||
int suffixSpaceIdx = suffix.getStartOffset() - 1;
|
||||
if (prefix.getEndOffset() <= suffixSpaceIdx && StringUtil.isChar(chars, suffixSpaceIdx, ' ')) {
|
||||
suffix = TextRange.create(suffixSpaceIdx, suffix.getEndOffset());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
suffix = new TextRange(range.getEndOffset(), range.getEndOffset());
|
||||
}
|
||||
|
||||
return Couple.of(prefix, suffix);
|
||||
}
|
||||
|
||||
public void uncommentRange(TextRange range, String commentPrefix, String commentSuffix, Commenter commenter) {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"align_attributes": true,
|
||||
"align_text": false,
|
||||
"attribute_wrap": "normal",
|
||||
"block_comment_add_space": false,
|
||||
"block_comment_at_first_column": true,
|
||||
"continuation_indent_size": 8,
|
||||
"do_not_align_children_of_min_lines": 0,
|
||||
|
||||
@@ -16955,12 +16955,20 @@
|
||||
<option name="absolute" path="Tabs and Indents" hit="Absolute label indent" />
|
||||
<option name="indent" path="Tabs and Indents" hit="Absolute label indent" />
|
||||
<option name="label" path="Tabs and Indents" hit="Absolute label indent" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="after" path="Blank Lines" hit="After anonymous class header:" />
|
||||
<option name="anonymous" path="Blank Lines" hit="After anonymous class header:" />
|
||||
<option name="class" path="Blank Lines" hit="After anonymous class header:" />
|
||||
@@ -17810,12 +17818,20 @@
|
||||
<option name="package" path="Tabs and Indents" hit=" Indent package statement children" />
|
||||
<option name="statement" path="Tabs and Indents" hit=" Indent package statement children" />
|
||||
<option name="actionscript" hit="ActionScript" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="after" path="Blank Lines" hit="After imports:" />
|
||||
<option name="imports" path="Blank Lines" hit="After imports:" />
|
||||
<option name="after" path="Blank Lines" hit="After package statement:" />
|
||||
@@ -24658,12 +24674,20 @@
|
||||
</configurable>
|
||||
<configurable id="preferences.sourceCode.Groovy" configurable_name="Groovy">
|
||||
<option name="absolute" path="Tabs and Indents" hit="Absolute" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="after" path="Blank Lines" hit="After class header:" />
|
||||
<option name="class" path="Blank Lines" hit="After class header:" />
|
||||
<option name="header" path="Blank Lines" hit="After class header:" />
|
||||
@@ -25332,12 +25356,20 @@
|
||||
<option name="use" path="Tabs and Indents" hit="Use tab character" />
|
||||
</configurable>
|
||||
<configurable id="preferences.sourceCode.HTML" configurable_name="HTML">
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Other" hit="Add for JSX attributes:" />
|
||||
<option name="attributes" path="Other" hit="Add for JSX attributes:" />
|
||||
<option name="for" path="Other" hit="Add for JSX attributes:" />
|
||||
@@ -25512,12 +25544,20 @@
|
||||
</configurable>
|
||||
<configurable id="preferences.sourceCode.JavaScript" configurable_name="JavaScript">
|
||||
<option name="" path="Punctuation" hit="" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Punctuation" hit="Add when multiline" />
|
||||
<option name="multiline" path="Punctuation" hit="Add when multiline" />
|
||||
<option name="when" path="Punctuation" hit="Add when multiline" />
|
||||
@@ -26626,12 +26666,20 @@
|
||||
<option name="" path="Imports" hit=" names used" />
|
||||
<option name="names" path="Imports" hit=" names used" />
|
||||
<option name="used" path="Imports" hit=" names used" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="after" path="Blank Lines" hit="After class header:" />
|
||||
<option name="class" path="Blank Lines" hit="After class header:" />
|
||||
<option name="header" path="Blank Lines" hit="After class header:" />
|
||||
@@ -27481,12 +27529,20 @@
|
||||
<option name="in" path="Code Conversion" hit="Add a comma after last element in multiline array" />
|
||||
<option name="last" path="Code Conversion" hit="Add a comma after last element in multiline array" />
|
||||
<option name="multiline" path="Code Conversion" hit="Add a comma after last element in multiline array" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="after" path="Blank Lines" hit="After 'use' statements:" />
|
||||
<option name="statements" path="Blank Lines" hit="After 'use' statements:" />
|
||||
<option name="use" path="Blank Lines" hit="After 'use' statements:" />
|
||||
@@ -29215,12 +29271,20 @@
|
||||
</configurable>
|
||||
<configurable id="preferences.sourceCode.TypeScript" configurable_name="TypeScript">
|
||||
<option name="" path="Punctuation" hit="" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Punctuation" hit="Add when multiline" />
|
||||
<option name="multiline" path="Punctuation" hit="Add when multiline" />
|
||||
<option name="when" path="Punctuation" hit="Add when multiline" />
|
||||
@@ -29947,12 +30011,20 @@
|
||||
<option name="velocity" hit="Velocity" />
|
||||
</configurable>
|
||||
<configurable id="preferences.sourceCode.XML" configurable_name="XML">
|
||||
<option name="a" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="block" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at block comment start" />
|
||||
<option name="a" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="at" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="comment" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="line" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="space" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="start" path="Code Generation" hit="Add a space at line comment start" />
|
||||
<option name="add" path="Other" hit="Add new lines" />
|
||||
<option name="lines" path="Other" hit="Add new lines" />
|
||||
<option name="new" path="Other" hit="Add new lines" />
|
||||
|
||||
@@ -82,7 +82,8 @@ public class XmlLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti
|
||||
}
|
||||
if (settingsType == SettingsType.COMMENTER_SETTINGS) {
|
||||
consumer.showStandardOptions(CodeStyleSettingsCustomizable.CommenterOption.LINE_COMMENT_AT_FIRST_COLUMN.name(),
|
||||
CodeStyleSettingsCustomizable.CommenterOption.BLOCK_COMMENT_AT_FIRST_COLUMN.name());
|
||||
CodeStyleSettingsCustomizable.CommenterOption.BLOCK_COMMENT_AT_FIRST_COLUMN.name(),
|
||||
CodeStyleSettingsCustomizable.CommenterOption.BLOCK_COMMENT_ADD_SPACE.name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user