IDEA-247635 Adjusted IDEA plugins to use locale-safe options

GitOrigin-RevId: f01c3cd8a4d27bc47999130e218c06df06bf79de
This commit is contained in:
Alexandr Evstigneev
2020-08-20 11:19:07 +03:00
committed by intellij-monorepo-bot
parent 6f3fe697e9
commit 16c23d689e
6 changed files with 76 additions and 83 deletions

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide;
import com.intellij.application.options.*;
@@ -39,6 +25,7 @@ import java.util.Collections;
import java.util.List;
import static com.intellij.application.options.JavaDocFormattingPanel.*;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions.getInstance;
/**
* @author rvishnyakov
@@ -91,21 +78,22 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
if (settingsType == SettingsType.SPACING_SETTINGS) {
consumer.showAllStandardOptions();
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACES_WITHIN_ANGLE_BRACKETS",
JavaBundle.message("code.style.settings.angle.spacing.brackets"), CodeStyleSettingsCustomizable.SPACES_WITHIN);
JavaBundle.message("code.style.settings.angle.spacing.brackets"), getInstance().SPACES_WITHIN);
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_WITHIN_RECORD_HEADER",
JavaBundle.message("checkbox.spaces.record.header"),CodeStyleSettingsCustomizable.SPACES_WITHIN);
JavaBundle.message("checkbox.spaces.record.header"), getInstance().SPACES_WITHIN);
String groupName = CodeStyleSettingsCustomizable.SPACES_IN_TYPE_ARGUMENTS;
String groupName = getInstance().SPACES_IN_TYPE_ARGUMENTS;
consumer.moveStandardOption("SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS", groupName);
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT",
JavaBundle.message("code.style.settings.spacing.after.closing.angle.bracket"), groupName);
groupName = CodeStyleSettingsCustomizable.SPACES_IN_TYPE_PARAMETERS;
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER", ApplicationBundle.message("checkbox.spaces.before.opening.angle.bracket"), groupName);
groupName = getInstance().SPACES_IN_TYPE_PARAMETERS;
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER",
ApplicationBundle.message("checkbox.spaces.before.opening.angle.bracket"), groupName);
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS",
JavaBundle.message("code.style.settings.spacing.around.type.bounds"), groupName);
groupName = CodeStyleSettingsCustomizable.SPACES_OTHER;
groupName = getInstance().SPACES_OTHER;
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_BEFORE_COLON_IN_FOREACH", JavaBundle.message(
"checkbox.spaces.before.colon.in.foreach"), groupName);
consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACE_INSIDE_ONE_LINE_ENUM_BRACES", JavaBundle.message(
@@ -206,7 +194,7 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
"ANNOTATION_PARAMETER_WRAP",
JavaBundle.message("wrapping.annotation.parameters"),
null,
CodeStyleSettingsCustomizable.WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
getInstance().WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
consumer.showCustomOption(JavaCodeStyleSettings.class,
"ALIGN_MULTILINE_ANNOTATION_PARAMETERS",
@@ -227,7 +215,7 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
"RECORD_COMPONENTS_WRAP",
recordComponentsGroup,
null,
CodeStyleSettingsCustomizable.WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
getInstance().WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
consumer.showCustomOption(JavaCodeStyleSettings.class,
"ALIGN_MULTILINE_RECORDS",
ApplicationBundle.message("wrapping.align.when.multiline"),
@@ -243,7 +231,9 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
}
else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
consumer.showAllStandardOptions();
consumer.showCustomOption(JavaCodeStyleSettings.class, "BLANK_LINES_AROUND_INITIALIZER", JavaBundle.message("editbox.blanklines.around.initializer"), CodeStyleSettingsCustomizable.BLANK_LINES);
consumer.showCustomOption(JavaCodeStyleSettings.class, "BLANK_LINES_AROUND_INITIALIZER",
JavaBundle.message("editbox.blanklines.around.initializer"),
getInstance().BLANK_LINES);
}
else if (settingsType == SettingsType.COMMENTER_SETTINGS) {
consumer.showAllStandardOptions();

View File

@@ -1,3 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.json.formatter;
import com.intellij.application.options.IndentOptionsEditor;
@@ -15,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Arrays;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable.SPACES_OTHER;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions.getInstance;
/**
* @author Mikhail Golubev
@@ -47,8 +48,8 @@ public class JsonLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
"SPACE_AFTER_COMMA",
"SPACE_BEFORE_COMMA");
consumer.renameStandardOption("SPACE_WITHIN_BRACES", "Braces");
consumer.showCustomOption(JsonCodeStyleSettings.class, "SPACE_BEFORE_COLON", "Before ':'", SPACES_OTHER);
consumer.showCustomOption(JsonCodeStyleSettings.class, "SPACE_AFTER_COLON", "After ':'", SPACES_OTHER);
consumer.showCustomOption(JsonCodeStyleSettings.class, "SPACE_BEFORE_COLON", "Before ':'", getInstance().SPACES_OTHER);
consumer.showCustomOption(JsonCodeStyleSettings.class, "SPACE_AFTER_COLON", "After ':'", getInstance().SPACES_OTHER);
}
else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
@@ -58,24 +59,24 @@ public class JsonLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
"WRAP_ON_TYPING",
"KEEP_LINE_BREAKS",
"WRAP_LONG_LINES");
consumer.showCustomOption(JsonCodeStyleSettings.class,
"KEEP_TRAILING_COMMA",
"Trailing comma",
CodeStyleSettingsCustomizable.WRAPPING_KEEP);
getInstance().WRAPPING_KEEP);
consumer.showCustomOption(JsonCodeStyleSettings.class,
"ARRAY_WRAPPING",
"Arrays",
null,
CodeStyleSettingsCustomizable.WRAP_OPTIONS,
getInstance().WRAP_OPTIONS,
CodeStyleSettingsCustomizable.WRAP_VALUES);
consumer.showCustomOption(JsonCodeStyleSettings.class,
"OBJECT_WRAPPING",
"Objects",
null,
CodeStyleSettingsCustomizable.WRAP_OPTIONS,
getInstance().WRAP_OPTIONS,
CodeStyleSettingsCustomizable.WRAP_VALUES);
consumer.showCustomOption(JsonCodeStyleSettings.class,

View File

@@ -26,6 +26,7 @@ import java.io.Reader;
import java.lang.reflect.Field;
import static com.intellij.openapi.util.io.StreamUtil.readText;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions.getInstance;
import static com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider.SettingsType.*;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -169,12 +170,14 @@ public class GroovyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSe
"ENUM_CONSTANTS_WRAP"
);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "USE_FLYING_GEESE_BRACES", "Use flying geese braces",
CodeStyleSettingsCustomizable.WRAPPING_BRACES);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_MULTILINE_LIST_OR_MAP", "Align when multiple", "List and map literals");
consumer.showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_NAMED_ARGS_IN_MAP", "Align multiline named arguments", "List and map literals");
getInstance().WRAPPING_BRACES);
consumer
.showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_MULTILINE_LIST_OR_MAP", "Align when multiple", "List and map literals");
consumer.showCustomOption(GroovyCodeStyleSettings.class, "ALIGN_NAMED_ARGS_IN_MAP", "Align multiline named arguments",
"List and map literals");
consumer.showCustomOption(GroovyCodeStyleSettings.class, "IMPORT_ANNOTATION_WRAP", "Import annotations", null,
CodeStyleSettingsCustomizable.OptionAnchor.AFTER, "VARIABLE_ANNOTATION_WRAP",
CodeStyleSettingsCustomizable.WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
getInstance().WRAP_OPTIONS, CodeStyleSettingsCustomizable.WRAP_VALUES);
consumer.renameStandardOption("KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE", "Simple lambdas/closures in one line");
@@ -251,15 +254,24 @@ public class GroovyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSe
consumer.renameStandardOption("SPACE_AROUND_RELATIONAL_OPERATORS", "Relational operators (<, >, <=, >=, <=>)");
consumer.renameStandardOption("SPACE_AROUND_UNARY_OPERATOR", "Unary operators (!, -, +, ++, --, *)");
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT_BEFORE_COLON" , "In named argument before ':'", CodeStyleSettingsCustomizable.SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT", "In named argument after ':'", CodeStyleSettingsCustomizable.SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_LIST_OR_MAP", "List and maps literals", CodeStyleSettingsCustomizable.SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_CLOSURE_LBRACE", "Closure left brace in method calls", CodeStyleSettingsCustomizable.SPACES_BEFORE_LEFT_BRACE);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_GSTRING_INJECTION_BRACES", "GString injection braces", CodeStyleSettingsCustomizable.SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_TUPLE_EXPRESSION", "Tuple assignment expression", CodeStyleSettingsCustomizable.SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AROUND_REGEX_OPERATORS", "Regexp expression (==~, =~)", CodeStyleSettingsCustomizable.SPACES_AROUND_OPERATORS);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_ASSERT_SEPARATOR", "Before 'assert' separator", CodeStyleSettingsCustomizable.SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AFTER_ASSERT_SEPARATOR", "After 'assert' separator", CodeStyleSettingsCustomizable.SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT_BEFORE_COLON", "In named argument before ':'",
getInstance().SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_IN_NAMED_ARGUMENT", "In named argument after ':'",
getInstance().SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_LIST_OR_MAP", "List and maps literals",
getInstance().SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_CLOSURE_LBRACE", "Closure left brace in method calls",
getInstance().SPACES_BEFORE_LEFT_BRACE);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_GSTRING_INJECTION_BRACES", "GString injection braces",
getInstance().SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_WITHIN_TUPLE_EXPRESSION", "Tuple assignment expression",
getInstance().SPACES_WITHIN);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AROUND_REGEX_OPERATORS", "Regexp expression (==~, =~)",
getInstance().SPACES_AROUND_OPERATORS);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_BEFORE_ASSERT_SEPARATOR", "Before 'assert' separator",
getInstance().SPACES_OTHER);
consumer.showCustomOption(GroovyCodeStyleSettings.class, "SPACE_AFTER_ASSERT_SEPARATOR", "After 'assert' separator",
getInstance().SPACES_OTHER);
return;
}
if (settingsType == BLANK_LINES_SETTINGS) {

View File

@@ -25,37 +25,37 @@ internal class MarkdownCodeStyleSettingsProvider : LanguageCodeStyleSettingsProv
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MAX_LINES_AROUND_HEADER.name, "Around header",
CodeStyleSettingsCustomizable.BLANK_LINES
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES
)
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MAX_LINES_AROUND_BLOCK_ELEMENTS.name, "Around block elements",
CodeStyleSettingsCustomizable.BLANK_LINES
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES
)
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MAX_LINES_BETWEEN_PARAGRAPHS.name, "Between paragraphs",
CodeStyleSettingsCustomizable.BLANK_LINES
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES
)
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MIN_LINES_AROUND_HEADER.name, "Around header",
CodeStyleSettingsCustomizable.BLANK_LINES_KEEP
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES_KEEP
)
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MIN_LINES_AROUND_BLOCK_ELEMENTS.name, "Around block elements",
CodeStyleSettingsCustomizable.BLANK_LINES_KEEP
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES_KEEP
)
consumer.showCustomOption(
MarkdownCustomCodeStyleSettings::class.java,
MarkdownCustomCodeStyleSettings::MIN_LINES_BETWEEN_PARAGRAPHS.name, "Between paragraphs",
CodeStyleSettingsCustomizable.BLANK_LINES_KEEP
CodeStyleSettingsCustomizableOptions.getInstance().BLANK_LINES_KEEP
)
}
SettingsType.SPACING_SETTINGS -> {

View File

@@ -15,6 +15,8 @@ import org.jetbrains.yaml.formatter.YAMLCodeStyleSettings;
import javax.swing.*;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions.getInstance;
public class YAMLLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettingsProvider {
private static class Holder {
private static final int[] ALIGN_VALUES = new int[]{
@@ -58,7 +60,7 @@ public class YAMLLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
}
else if (settingsType == SettingsType.SPACING_SETTINGS) {
consumer.showStandardOptions("SPACE_WITHIN_BRACES", "SPACE_WITHIN_BRACKETS");
consumer.showCustomOption(YAMLCodeStyleSettings.class, "SPACE_BEFORE_COLON", "Before ':'", CodeStyleSettingsCustomizable.SPACES_OTHER);
consumer.showCustomOption(YAMLCodeStyleSettings.class, "SPACE_BEFORE_COLON", "Before ':'", getInstance().SPACES_OTHER);
}
else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
consumer.showStandardOptions("KEEP_LINE_BREAKS");

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.formatter;
import com.intellij.application.options.CodeStyleAbstractConfigurable;
@@ -27,7 +13,8 @@ import com.jetbrains.python.PythonLanguage;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable.*;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable.WRAP_VALUES;
import static com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions.getInstance;
/**
* @author yole
@@ -69,24 +56,25 @@ public class PyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettin
"SPACE_BEFORE_COMMA",
"SPACE_BEFORE_SEMICOLON");
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_LBRACKET",
PyBundle.message("formatter.left.bracket"), SPACES_BEFORE_PARENTHESES);
PyBundle.message("formatter.left.bracket"), getInstance().SPACES_BEFORE_PARENTHESES);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AROUND_POWER_OPERATOR",
PyBundle.message("formatter.around.power.operator"), SPACES_AROUND_OPERATORS);
PyBundle.message("formatter.around.power.operator"), getInstance().SPACES_AROUND_OPERATORS);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AROUND_EQ_IN_NAMED_PARAMETER",
PyBundle.message("formatter.around.eq.in.named.parameter"), SPACES_AROUND_OPERATORS);
PyBundle.message("formatter.around.eq.in.named.parameter"), getInstance().SPACES_AROUND_OPERATORS);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AROUND_EQ_IN_KEYWORD_ARGUMENT",
PyBundle.message("formatter.around.eq.in.keyword.argument"), SPACES_AROUND_OPERATORS);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_WITHIN_BRACES", PyBundle.message("formatter.braces"), SPACES_WITHIN);
PyBundle.message("formatter.around.eq.in.keyword.argument"), getInstance().SPACES_AROUND_OPERATORS);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_WITHIN_BRACES", PyBundle.message("formatter.braces"),
getInstance().SPACES_WITHIN);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_PY_COLON",
ApplicationBundle.message("checkbox.spaces.before.colon"), SPACES_OTHER);
ApplicationBundle.message("checkbox.spaces.before.colon"), getInstance().SPACES_OTHER);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AFTER_PY_COLON",
ApplicationBundle.message("checkbox.spaces.after.colon"), SPACES_OTHER);
ApplicationBundle.message("checkbox.spaces.after.colon"), getInstance().SPACES_OTHER);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_BACKSLASH",
PyBundle.message("formatter.before.backslash"), SPACES_OTHER);
PyBundle.message("formatter.before.backslash"), getInstance().SPACES_OTHER);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_NUMBER_SIGN",
PyBundle.message("formatter.before.hash"), SPACES_OTHER);
PyBundle.message("formatter.before.hash"), getInstance().SPACES_OTHER);
consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AFTER_NUMBER_SIGN",
PyBundle.message("formatter.after.hash"), SPACES_OTHER);
PyBundle.message("formatter.after.hash"), getInstance().SPACES_OTHER);
consumer.renameStandardOption("SPACE_AROUND_MULTIPLICATIVE_OPERATORS", PyBundle.message("formatter.around.multiplicative.operators"));
}
else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
@@ -98,11 +86,11 @@ public class PyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettin
consumer.renameStandardOption("BLANK_LINES_AFTER_IMPORTS", PyBundle.message("formatter.around.top.level.imports"));
consumer.showCustomOption(PyCodeStyleSettings.class, "BLANK_LINES_AROUND_TOP_LEVEL_CLASSES_FUNCTIONS",
PyBundle.message("formatter.around.top.level.classes.and.function"), BLANK_LINES);
PyBundle.message("formatter.around.top.level.classes.and.function"), getInstance().BLANK_LINES);
consumer.showCustomOption(PyCodeStyleSettings.class, "BLANK_LINES_AFTER_LOCAL_IMPORTS",
PyBundle.message("formatter.after.local.imports"), BLANK_LINES);
PyBundle.message("formatter.after.local.imports"), getInstance().BLANK_LINES);
consumer.showCustomOption(PyCodeStyleSettings.class, "BLANK_LINES_BEFORE_FIRST_METHOD",
PyBundle.message("formatter.before.first.method"), BLANK_LINES);
PyBundle.message("formatter.before.first.method"), getInstance().BLANK_LINES);
}
else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
consumer.showStandardOptions("RIGHT_MARGIN",
@@ -120,9 +108,9 @@ public class PyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettin
consumer.showCustomOption(PyCodeStyleSettings.class, "ALIGN_COLLECTIONS_AND_COMPREHENSIONS",
PyBundle.message("formatter.align.when.multiline"),
PyBundle.message("formatter.collections.and.comprehensions"));
consumer.showCustomOption(PyCodeStyleSettings.class, "FROM_IMPORT_WRAPPING",
PyBundle.message("formatter.from.import.statements"), null, WRAP_OPTIONS, WRAP_VALUES);
PyBundle.message("formatter.from.import.statements"), null, getInstance().WRAP_OPTIONS, WRAP_VALUES);
consumer.showCustomOption(PyCodeStyleSettings.class, "ALIGN_MULTILINE_IMPORTS",
PyBundle.message("formatter.align.when.multiline"),
PyBundle.message("formatter.from.import.statements"));
@@ -140,7 +128,7 @@ public class PyLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettin
PyBundle.message("formatter.from.import.statements"));
consumer.showCustomOption(PyCodeStyleSettings.class, "DICT_WRAPPING",
PyBundle.message("formatter.dictionary.literals"), null, WRAP_OPTIONS, WRAP_VALUES);
PyBundle.message("formatter.dictionary.literals"), null, getInstance().WRAP_OPTIONS, WRAP_VALUES);
consumer.showCustomOption(PyCodeStyleSettings.class, "DICT_NEW_LINE_AFTER_LEFT_BRACE",
ApplicationBundle.message("wrapping.new.line.after.lbrace"),
PyBundle.message("formatter.dictionary.literals"));