当前位置: 首页>>代码示例>>Java>>正文


Java CodeStyleSettingsCustomizable.renameStandardOption方法代码示例

本文整理汇总了Java中com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable.renameStandardOption方法的典型用法代码示例。如果您正苦于以下问题:Java CodeStyleSettingsCustomizable.renameStandardOption方法的具体用法?Java CodeStyleSettingsCustomizable.renameStandardOption怎么用?Java CodeStyleSettingsCustomizable.renameStandardOption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable的用法示例。


在下文中一共展示了CodeStyleSettingsCustomizable.renameStandardOption方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
    if (settingsType == SettingsType.INDENT_SETTINGS) {
        consumer.showAllStandardOptions();
    } else if (settingsType == SettingsType.SPACING_SETTINGS) {
        consumer.showStandardOptions("SPACE_AROUND_ASSIGNMENT_OPERATORS",
                "SPACE_AROUND_EQUALITY_OPERATORS",
                "SPACE_BEFORE_CLASS_LBRACE",
                "SPACE_BEFORE_METHOD_LBRACE",
                "SPACE_BEFORE_METHOD_LBRACE",
                "SPACE_WITHIN_BRACKETS",
                "SPACE_AFTER_SEMICOLON",
                "SPACE_BEFORE_SEMICOLON",
                "SPACE_AFTER_COLON");
        consumer.renameStandardOption("SPACE_AROUND_ASSIGNMENT_OPERATORS", "Attribute operator");
        consumer.renameStandardOption("SPACE_BEFORE_CLASS_LBRACE", "Space before {");
        consumer.renameStandardOption("SPACE_BEFORE_METHOD_LBRACE", "Space before [");
    } else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
        consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
    }
}
 
开发者ID:bzixilu,项目名称:dotplugin,代码行数:22,代码来源:DotLanguageCodeStyleSettingsProvider.java

示例2: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
	if (settingsType == SettingsType.SPACING_SETTINGS) {
		consumer.showStandardOptions(SPACE_AROUND_ASSIGNMENT_OPERATORS.name());
		consumer.renameStandardOption(SPACE_AROUND_ASSIGNMENT_OPERATORS.name(), "Separator");
		consumer.showStandardOptions(SPACE_AROUND_LAMBDA_ARROW.name());
		consumer.renameStandardOption(SPACE_AROUND_LAMBDA_ARROW.name(), "Mapping arrow");
	} else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
		consumer.showStandardOptions(ALIGN_GROUP_FIELD_DECLARATIONS.name());
	} else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
		consumer.showStandardOptions(KEEP_BLANK_LINES_IN_CODE.name());
	}
}
 
开发者ID:xylo,项目名称:intellij-postfix-templates,代码行数:14,代码来源:CptLanguageCodeStyleSettingsProvider.java

示例3: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
    if (settingsType == SettingsType.SPACING_SETTINGS) {
        consumer.showStandardOptions("SPACE_AROUND_ASSIGNMENT_OPERATORS");
        consumer.renameStandardOption("SPACE_AROUND_ASSIGNMENT_OPERATORS", "Assignment Operators");
        consumer.showStandardOptions("SPACES_BEFORE_LEFT_BRACE");
        consumer.showStandardOptions("SPACE_AFTER_COMMA");
        consumer.showStandardOptions("SPACE_BEFORE_COMMA");
    } else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
        consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
    }
}
 
开发者ID:cvette,项目名称:intellij-neos,代码行数:13,代码来源:FusionLanguageCodeStyleSettingsProvider.java

示例4: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
    if (settingsType == SettingsType.SPACING_SETTINGS) {
        consumer.showStandardOptions("SPACE_AROUND_ASSIGNMENT_OPERATORS");
        consumer.renameStandardOption("SPACE_AROUND_ASSIGNMENT_OPERATORS", "Separator");
    } else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
        consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");

    }
}
 
开发者ID:scireum-incubator,项目名称:rythm_plugin,代码行数:11,代码来源:RythmLanguageCodeStyleSettingsProvider.java

示例5: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
  if (settingsType == SettingsType.SPACING_SETTINGS) {
    consumer.showStandardOptions("SPACE_WITHIN_BRACKETS",
                                 "SPACE_WITHIN_BRACES",
                                 "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);
  }
  else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
    consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
  }
  else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
    consumer.showStandardOptions("RIGHT_MARGIN",
                                 "WRAP_ON_TYPING",
                                 "KEEP_LINE_BREAKS",
                                 "WRAP_LONG_LINES");

    consumer.showCustomOption(JsonCodeStyleSettings.class,
                              "ARRAY_WRAPPING",
                              "Arrays",
                              null,
                              CodeStyleSettingsCustomizable.WRAP_OPTIONS,
                              CodeStyleSettingsCustomizable.WRAP_VALUES);

    consumer.showCustomOption(JsonCodeStyleSettings.class,
                              "OBJECT_WRAPPING",
                              "Objects",
                              null,
                              CodeStyleSettingsCustomizable.WRAP_OPTIONS,
                              CodeStyleSettingsCustomizable.WRAP_VALUES);

  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:JsonLanguageCodeStyleSettingsProvider.java

示例6: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull LanguageCodeStyleSettingsProvider.SettingsType settingsType)
{
    if (consumer == null) throw new IllegalArgumentException("Argument 0 for @NotNull parameter of org/livescriptidea/formatter/LiveScriptLanguageCodeStyleSettingsProvider.customizeSettings must not be null");
    if (settingsType == null) throw new IllegalArgumentException("Argument 1 for @NotNull parameter of org/livescriptidea/formatter/LiveScriptLanguageCodeStyleSettingsProvider.customizeSettings must not be null");

    if (settingsType == LanguageCodeStyleSettingsProvider.SettingsType.SPACING_SETTINGS) {
        consumer.showStandardOptions(STANDARD_SPACING_OPTIONS);
        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "SPACE_BEFORE_PROPERTY_COLON", "Before property name-value separator ':'", CodeStyleSettingsCustomizable.SPACES_OTHER, new Object[0]);

        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "SPACE_AFTER_PROPERTY_COLON", "After property name-value separator ':'", CodeStyleSettingsCustomizable.SPACES_OTHER, new Object[0]);

        consumer.renameStandardOption("SPACE_WITHIN_ARRAY_INITIALIZER_BRACES", "Array initializer brackets");
        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "SPACE_WITHIN_INDEX_BRACKETS", "Array index brackets", CodeStyleSettingsCustomizable.SPACES_WITHIN, new Object[0]);

        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "SPACE_WITHIN_RANGE_BRACKETS", "Range brackets", CodeStyleSettingsCustomizable.SPACES_WITHIN, new Object[0]);

        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "SPACE_WITHIN_OBJECT_BRACES", "Object braces", CodeStyleSettingsCustomizable.SPACES_WITHIN, new Object[0]);

    } else if (settingsType == LanguageCodeStyleSettingsProvider.SettingsType.WRAPPING_AND_BRACES_SETTINGS) {

        consumer.showStandardOptions(STANDARD_WRAPPING_OPTIONS);
        consumer.renameStandardOption("ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE", "New line after '['");
        consumer.renameStandardOption("ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE", "Place ']' on new line");
        consumer.renameStandardOption("METHOD_PARAMETERS_WRAP", "Function declaration parameters");
        consumer.renameStandardOption("CALL_PARAMETERS_WRAP", "Function call arguments inside parenthesis");

        consumer.showCustomOption(LiveScriptCodeStyleSettings.class, "ALIGN_FUNCTION_BODY", "Align function body", CodeStyleSettingsCustomizable.SPACES_OTHER, new Object[0]);

    } else if (settingsType == LanguageCodeStyleSettingsProvider.SettingsType.BLANK_LINES_SETTINGS) {
        consumer.showStandardOptions(STANDARD_BLANK_LINES_OPTIONS);
    }
}
 
开发者ID:racklin,项目名称:livescript-idea,代码行数:33,代码来源:LiveScriptLanguageCodeStyleSettingsProvider.java

示例7: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
  if (settingsType == SettingsType.SPACING_SETTINGS) {
    consumer.showStandardOptions("SPACE_BEFORE_METHOD_CALL_PARENTHESES",
                                 "SPACE_BEFORE_METHOD_PARENTHESES",
                                 "SPACE_AROUND_ASSIGNMENT_OPERATORS",
                                 "SPACE_AROUND_EQUALITY_OPERATORS",
                                 "SPACE_AROUND_RELATIONAL_OPERATORS",
                                 "SPACE_AROUND_BITWISE_OPERATORS",
                                 "SPACE_AROUND_ADDITIVE_OPERATORS",
                                 "SPACE_AROUND_MULTIPLICATIVE_OPERATORS",
                                 "SPACE_AROUND_SHIFT_OPERATORS",
                                 "SPACE_WITHIN_METHOD_CALL_PARENTHESES",
                                 "SPACE_WITHIN_METHOD_PARENTHESES",
                                 "SPACE_WITHIN_BRACKETS",
                                 "SPACE_AFTER_COMMA",
                                 "SPACE_BEFORE_COMMA",
                                 "SPACE_BEFORE_SEMICOLON");
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_LBRACKET",
                              PyBundle.message("formatter.left.bracket"), SPACES_BEFORE_PARENTHESES);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AROUND_EQ_IN_NAMED_PARAMETER",
                              PyBundle.message("formatter.around.eq.in.named.parameter"), 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);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_PY_COLON",
                              ApplicationBundle.message("checkbox.spaces.before.colon"), SPACES_OTHER);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AFTER_PY_COLON",
                              ApplicationBundle.message("checkbox.spaces.after.colon"), SPACES_OTHER);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_BACKSLASH",
                              PyBundle.message("formatter.before.backslash"), SPACES_OTHER);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_BEFORE_NUMBER_SIGN",
                              PyBundle.message("formatter.before.hash"), SPACES_OTHER);
    consumer.showCustomOption(PyCodeStyleSettings.class, "SPACE_AFTER_NUMBER_SIGN",
                              PyBundle.message("formatter.after.hash"), SPACES_OTHER);
  }
  else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
    consumer.showStandardOptions("BLANK_LINES_AROUND_CLASS",
                                 "BLANK_LINES_AROUND_METHOD",
                                 "BLANK_LINES_AFTER_IMPORTS",
                                 "KEEP_BLANK_LINES_IN_DECLARATIONS",
                                 "KEEP_BLANK_LINES_IN_CODE");
    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);
    consumer.showCustomOption(PyCodeStyleSettings.class, "BLANK_LINES_AFTER_LOCAL_IMPORTS",
                              PyBundle.message("formatter.after.local.imports"), BLANK_LINES);
  }
  else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
    consumer.showStandardOptions("RIGHT_MARGIN",
                                 "WRAP_ON_TYPING",
                                 "KEEP_LINE_BREAKS",
                                 "WRAP_LONG_LINES",
                                 "ALIGN_MULTILINE_PARAMETERS",
                                 "ALIGN_MULTILINE_PARAMETERS_IN_CALLS");
    consumer.showCustomOption(PyCodeStyleSettings.class, "NEW_LINE_AFTER_COLON",
                              PyBundle.message("formatter.single.clause.statements"),
                              PyBundle.message("formatter.force.new.line.after.colon"));
    consumer.showCustomOption(PyCodeStyleSettings.class, "NEW_LINE_AFTER_COLON_MULTI_CLAUSE",
                              PyBundle.message("formatter.multi.clause.statements"),
                              PyBundle.message("formatter.force.new.line.after.colon"));
    consumer.showCustomOption(PyCodeStyleSettings.class, "ALIGN_COLLECTIONS_AND_COMPREHENSIONS",
                              PyBundle.message("formatter.align.when.multiline"),
                              PyBundle.message("formatter.collections.and.comprehensions"));
    consumer.showCustomOption(PyCodeStyleSettings.class, "ALIGN_MULTILINE_IMPORTS",
                              PyBundle.message("formatter.align.when.multiline"),
                              PyBundle.message("formatter.import.statements"));

    consumer.showCustomOption(PyCodeStyleSettings.class, "DICT_WRAPPING",
                              PyBundle.message("formatter.dictionary.literals"), null, 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"));
    consumer.showCustomOption(PyCodeStyleSettings.class, "DICT_NEW_LINE_BEFORE_RIGHT_BRACE",
                              ApplicationBundle.message("wrapping.rbrace.on.new.line"),
                              PyBundle.message("formatter.dictionary.literals"));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:80,代码来源:PyLanguageCodeStyleSettingsProvider.java

示例8: customizeSettings

import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable; //导入方法依赖的package包/类
@Override
public void customizeSettings(@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) {
    if (settingsType == SettingsType.SPACING_SETTINGS) {
        consumer.showStandardOptions(
                "SPACE_AROUND_ASSIGNMENT_OPERATORS",
                "SPACE_AROUND_EQUALITY_OPERATORS",
                "SPACE_AROUND_RELATIONAL_OPERATORS",
                "SPACE_AROUND_ADDITIVE_OPERATORS",
                "SPACE_AROUND_MULTIPLICATIVE_OPERATORS",
                "SPACE_AROUND_UNARY_OPERATOR",
                "SPACE_AFTER_COMMA",
                "SPACE_BEFORE_COMMA",
                "SPACE_BEFORE_IF_PARENTHESES",
                "SPACE_BEFORE_SWITCH_PARENTHESES"
        );

        consumer.renameStandardOption("SPACE_AROUND_ASSIGNMENT_OPERATORS", "Assignment operator (:=)");
        consumer.renameStandardOption("SPACE_AROUND_EQUALITY_OPERATORS", "Equality operators (=, !=)");
        consumer.renameStandardOption("SPACE_AROUND_RELATIONAL_OPERATORS", "Relational operators (<, <=, >, >=)");
        consumer.renameStandardOption("SPACE_AROUND_ADDITIVE_OPERATORS", "Additive operators (+, -)");
        consumer.renameStandardOption("SPACE_AROUND_MULTIPLICATIVE_OPERATORS", "Multiplicative operator (*)");
        consumer.renameStandardOption("SPACE_AROUND_UNARY_OPERATOR", "Unary operators (+, -)");

        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_AROUND_AXIS_OPERATOR",
                "Axis operator (::)", CodeStyleSettingsCustomizable.SPACES_AROUND_OPERATORS);

        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_AROUND_ASSIGNMENT_IN_PROLOG",
                "Around '=' in declarations", CodeStyleSettingsCustomizable.SPACES_OTHER);
        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_AROUND_ASSIGNMENT_IN_XML_ATTRIBUTE",
                "Around '=' inside XML attributes", CodeStyleSettingsCustomizable.SPACES_OTHER);

        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_BEFORE_TYPESWITCH_PARENTHESES",
                "'typeswitch' parentheses", CodeStyleSettingsCustomizable.SPACES_BEFORE_PARENTHESES);
        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_BEFORE_TYPE_TEST_PARENTHESES",
                "SequenceType and NodeTest parentheses", CodeStyleSettingsCustomizable.SPACES_BEFORE_PARENTHESES);
        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_BEFORE_FUNCTION_DECLARATION_PARENTHESES",
                "Function declaration parentheses", CodeStyleSettingsCustomizable.SPACES_BEFORE_PARENTHESES);
        consumer.showCustomOption(XQueryCodeStyleSettings.class, "SPACE_BEFORE_FUNCTION_CALL_PARENTHESES",
                "Function call parentheses", CodeStyleSettingsCustomizable.SPACES_BEFORE_PARENTHESES);
    } else if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) {
        consumer.showStandardOptions("KEEP_LINE_BREAKS");
    } else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
        consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
    }
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:46,代码来源:XQueryLanguageCodeStyleSettingsProvider.java


注:本文中的com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable.renameStandardOption方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。