public class CodeStyleSettings extends LegacyCodeStyleSettings implements java.lang.Cloneable, JDOMExternalizable, ImportsLayoutSettings
getDefault...()
methods. Use getCommonSettings(Language)
to retrieve code style options for a language. Some
languages may have specific options which are stored in a class derived from CustomCodeStyleSettings
.
Use getCustomSettings(Class)
to access them. For indent options use one of getIndentOptions(...)
methods. In most cases
you need getIndentOptionsByFile(PsiFile)
.
Consider also using an utility CodeStyle
class which encapsulates the above methods where possible.
CodeStyleSettings
class is strongly discouraged. These fields,
as well as the inheritance from CommonCodeStyleSettings
, are left only for backwards compatibility and may be removed in the future.Modifier and Type | Class and Description |
---|---|
static class |
CodeStyleSettings.HtmlTagNewLineStyle |
static class |
CodeStyleSettings.QuoteStyle |
CommonCodeStyleSettings.BraceStyleConstant, CommonCodeStyleSettings.ForceBraceConstant, CommonCodeStyleSettings.IndentOptions, CommonCodeStyleSettings.WrapConstant, CommonCodeStyleSettings.WrapOnTyping
Modifier and Type | Field and Description |
---|---|
boolean |
AUTODETECT_INDENTS |
int |
CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND
|
int |
CONSTRUCTORS_ORDER_WEIGHT
Deprecated.
|
static int |
CURR_VERSION |
boolean |
ENABLE_JAVADOC_FORMATTING
Deprecated.
|
java.lang.String |
FIELD_NAME_PREFIX
Deprecated.
|
java.lang.String |
FIELD_NAME_SUFFIX
Deprecated.
|
int |
FIELDS_ORDER_WEIGHT
Deprecated.
|
java.lang.String |
FORMATTER_OFF_TAG |
java.lang.String |
FORMATTER_ON_TAG |
boolean |
FORMATTER_TAGS_ACCEPT_REGEXP |
boolean |
FORMATTER_TAGS_ENABLED |
boolean |
GENERATE_FINAL_LOCALS
Deprecated.
|
boolean |
GENERATE_FINAL_PARAMETERS
Deprecated.
|
boolean |
HTML_ALIGN_ATTRIBUTES
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_ALIGN_TEXT
Deprecated.
Use HtmlCodeStyleSettings
|
int |
HTML_ATTRIBUTE_WRAP
Deprecated.
Use HtmlCodeStyleSettings
|
int |
HTML_DO_NOT_ALIGN_CHILDREN_OF_MIN_LINES
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_DO_NOT_INDENT_CHILDREN_OF
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_ELEMENTS_TO_REMOVE_NEW_LINE_BEFORE
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_ENFORCE_QUOTES
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_INLINE_ELEMENTS
Deprecated.
Use HtmlCodeStyleSettings
|
int |
HTML_KEEP_BLANK_LINES
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_KEEP_LINE_BREAKS
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_KEEP_LINE_BREAKS_IN_TEXT
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_KEEP_WHITESPACES
Deprecated.
Use HtmlCodeStyleSettings
|
java.lang.String |
HTML_KEEP_WHITESPACES_INSIDE
Deprecated.
Use HtmlCodeStyleSettings
|
CodeStyleSettings.HtmlTagNewLineStyle |
HTML_NEWLINE_AFTER_LAST_ATTRIBUTE
Deprecated.
Use HtmlCodeStyleSettings
|
CodeStyleSettings.HtmlTagNewLineStyle |
HTML_NEWLINE_BEFORE_FIRST_ATTRIBUTE
Deprecated.
Use HtmlCodeStyleSettings
|
CodeStyleSettings.QuoteStyle |
HTML_QUOTE_STYLE
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_SPACE_AFTER_TAG_NAME
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_SPACE_AROUND_EQUALITY_IN_ATTRINUTE
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
HTML_SPACE_INSIDE_EMPTY_TAG
Deprecated.
Use HtmlCodeStyleSettings
|
int |
HTML_TEXT_WRAP
Deprecated.
Use HtmlCodeStyleSettings
|
boolean |
IGNORE_SAME_INDENTS_FOR_LANGUAGES |
PackageEntryTable |
IMPORT_LAYOUT_TABLE
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#IMPORT_LAYOUT_TABLE
|
int |
INNER_CLASSES_ORDER_WEIGHT
Deprecated.
|
boolean |
INSERT_INNER_CLASS_IMPORTS
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#INSERT_INNER_CLASS_IMPORTS
|
boolean |
INSERT_OVERRIDE_ANNOTATION
Deprecated.
|
boolean |
JD_LEADING_ASTERISKS_ARE_ENABLED
Deprecated.
|
boolean |
JSP_PREFER_COMMA_SEPARATED_IMPORT_LIST
Deprecated.
Use
com.intellij.application.options.JspCodeStyleSettings#JSP_PREFER_COMMA_SEPARATED_IMPORT_LIST |
boolean |
LAYOUT_STATIC_IMPORTS_SEPARATELY
Deprecated.
|
java.lang.String |
LINE_SEPARATOR
Line separator.
|
java.lang.String |
LOCAL_VARIABLE_NAME_PREFIX
Deprecated.
|
java.lang.String |
LOCAL_VARIABLE_NAME_SUFFIX
Deprecated.
|
int |
METHODS_ORDER_WEIGHT
Deprecated.
|
int |
NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND
|
CommonCodeStyleSettings.IndentOptions |
OTHER_INDENT_OPTIONS |
PackageEntryTable |
PACKAGES_TO_USE_IMPORT_ON_DEMAND
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#PACKAGES_TO_USE_IMPORT_ON_DEMAND
|
java.lang.String |
PARAMETER_NAME_PREFIX
Deprecated.
|
java.lang.String |
PARAMETER_NAME_SUFFIX
Deprecated.
|
boolean |
PARENTHESES_AROUND_METHOD_ARGUMENTS
Deprecated.
Use RubyCodeStyleSettings.PARENTHESES_AROUND_METHOD_ARGUMENTS
|
boolean |
PREFER_LONGER_NAMES
Deprecated.
|
boolean |
REPEAT_SYNCHRONIZED
Deprecated.
|
int |
RIGHT_MARGIN |
java.lang.String |
STATIC_FIELD_NAME_PREFIX
Deprecated.
|
java.lang.String |
STATIC_FIELD_NAME_SUFFIX
Deprecated.
|
int |
STATIC_FIELDS_ORDER_WEIGHT
Deprecated.
|
int |
STATIC_INNER_CLASSES_ORDER_WEIGHT
Deprecated.
|
int |
STATIC_METHODS_ORDER_WEIGHT
Deprecated.
|
boolean |
USE_EXTERNAL_ANNOTATIONS
Deprecated.
|
boolean |
USE_FQ_CLASS_NAMES
Deprecated.
|
boolean |
USE_FQ_CLASS_NAMES_IN_JAVADOC
Deprecated.
use
JavaCodeStyleSettings.CLASS_NAMES_IN_JAVADOC instead |
boolean |
USE_SAME_INDENTS |
boolean |
USE_SINGLE_CLASS_IMPORTS
Deprecated.
Use {@link com.intellij.psi.codeStyle.JavaCodeStyleSettings#USE_SINGLE_CLASS_IMPORTS
|
static java.lang.String |
VERSION_ATTR |
java.lang.String |
VISIBILITY
Deprecated.
|
boolean |
WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN
Do not use this field directly since it doesn't reflect a setting for a specific language which may
overwrite this one.
|
ALIGN_CONSECUTIVE_VARIABLE_DECLARATIONS, ALIGN_GROUP_FIELD_DECLARATIONS, ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION, ALIGN_MULTILINE_ASSIGNMENT, ALIGN_MULTILINE_BINARY_OPERATION, ALIGN_MULTILINE_CHAINED_METHODS, ALIGN_MULTILINE_EXTENDS_LIST, ALIGN_MULTILINE_FOR, ALIGN_MULTILINE_METHOD_BRACKETS, ALIGN_MULTILINE_PARAMETERS, ALIGN_MULTILINE_PARAMETERS_IN_CALLS, ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION, ALIGN_MULTILINE_RESOURCES, ALIGN_MULTILINE_TERNARY_OPERATION, ALIGN_MULTILINE_THROWS_LIST, ALIGN_SUBSEQUENT_SIMPLE_METHODS, ALIGN_THROWS_KEYWORD, ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE, ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE, ARRAY_INITIALIZER_WRAP, ASSERT_STATEMENT_COLON_ON_NEXT_LINE, ASSERT_STATEMENT_WRAP, ASSIGNMENT_WRAP, BINARY_OPERATION_SIGN_ON_NEXT_LINE, BINARY_OPERATION_WRAP, BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER, BLANK_LINES_AFTER_CLASS_HEADER, BLANK_LINES_AFTER_IMPORTS, BLANK_LINES_AFTER_PACKAGE, BLANK_LINES_AROUND_CLASS, BLANK_LINES_AROUND_FIELD, BLANK_LINES_AROUND_FIELD_IN_INTERFACE, BLANK_LINES_AROUND_METHOD, BLANK_LINES_AROUND_METHOD_IN_INTERFACE, BLANK_LINES_BEFORE_IMPORTS, BLANK_LINES_BEFORE_METHOD_BODY, BLANK_LINES_BEFORE_PACKAGE, BLOCK_COMMENT_AT_FIRST_COLUMN, CALL_PARAMETERS_LPAREN_ON_NEXT_LINE, CALL_PARAMETERS_RPAREN_ON_NEXT_LINE, CALL_PARAMETERS_WRAP, CASE_STATEMENT_ON_NEW_LINE, CATCH_ON_NEW_LINE, CLASS_ANNOTATION_WRAP, DO_NOT_INDENT_TOP_LEVEL_CLASS_MEMBERS, DOWHILE_BRACE_FORCE, ELSE_ON_NEW_LINE, ENUM_CONSTANTS_WRAP, EXTENDS_KEYWORD_WRAP, EXTENDS_LIST_WRAP, FIELD_ANNOTATION_WRAP, FINALLY_ON_NEW_LINE, FOR_BRACE_FORCE, FOR_STATEMENT_LPAREN_ON_NEXT_LINE, FOR_STATEMENT_RPAREN_ON_NEXT_LINE, FOR_STATEMENT_WRAP, FORCE_REARRANGE_MODE, IF_BRACE_FORCE, INDENT_BREAK_FROM_CASE, INDENT_CASE_FROM_SWITCH, KEEP_BLANK_LINES_BEFORE_RBRACE, KEEP_BLANK_LINES_IN_CODE, KEEP_BLANK_LINES_IN_DECLARATIONS, KEEP_CONTROL_STATEMENT_IN_ONE_LINE, KEEP_FIRST_COLUMN_COMMENT, KEEP_LINE_BREAKS, KEEP_MULTIPLE_EXPRESSIONS_IN_ONE_LINE, KEEP_SIMPLE_BLOCKS_IN_ONE_LINE, KEEP_SIMPLE_CLASSES_IN_ONE_LINE, KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE, KEEP_SIMPLE_METHODS_IN_ONE_LINE, LABELED_STATEMENT_WRAP, LINE_COMMENT_ADD_SPACE, LINE_COMMENT_AT_FIRST_COLUMN, METHOD_ANNOTATION_WRAP, METHOD_CALL_CHAIN_WRAP, METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE, METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE, METHOD_PARAMETERS_WRAP, MODIFIER_LIST_WRAP, PARAMETER_ANNOTATION_WRAP, PARENTHESES_EXPRESSION_LPAREN_WRAP, PARENTHESES_EXPRESSION_RPAREN_WRAP, PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE, PREFER_PARAMETERS_WRAP, RESOURCE_LIST_LPAREN_ON_NEXT_LINE, RESOURCE_LIST_RPAREN_ON_NEXT_LINE, RESOURCE_LIST_WRAP, SPACE_AFTER_COLON, SPACE_AFTER_COMMA, SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS, SPACE_AFTER_QUEST, SPACE_AFTER_SEMICOLON, SPACE_AFTER_TYPE_CAST, SPACE_AROUND_ADDITIVE_OPERATORS, SPACE_AROUND_ASSIGNMENT_OPERATORS, SPACE_AROUND_BITWISE_OPERATORS, SPACE_AROUND_EQUALITY_OPERATORS, SPACE_AROUND_LAMBDA_ARROW, SPACE_AROUND_LOGICAL_OPERATORS, SPACE_AROUND_METHOD_REF_DBL_COLON, SPACE_AROUND_MULTIPLICATIVE_OPERATORS, SPACE_AROUND_RELATIONAL_OPERATORS, SPACE_AROUND_SHIFT_OPERATORS, SPACE_AROUND_UNARY_OPERATOR, SPACE_BEFORE_ANNOTATION_ARRAY_INITIALIZER_LBRACE, SPACE_BEFORE_ANOTATION_PARAMETER_LIST, SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE, SPACE_BEFORE_CATCH_KEYWORD, SPACE_BEFORE_CATCH_LBRACE, SPACE_BEFORE_CATCH_PARENTHESES, SPACE_BEFORE_CLASS_LBRACE, SPACE_BEFORE_COLON, SPACE_BEFORE_COMMA, SPACE_BEFORE_DO_LBRACE, SPACE_BEFORE_ELSE_KEYWORD, SPACE_BEFORE_ELSE_LBRACE, SPACE_BEFORE_FINALLY_KEYWORD, SPACE_BEFORE_FINALLY_LBRACE, SPACE_BEFORE_FOR_LBRACE, SPACE_BEFORE_FOR_PARENTHESES, SPACE_BEFORE_IF_LBRACE, SPACE_BEFORE_IF_PARENTHESES, SPACE_BEFORE_METHOD_CALL_PARENTHESES, SPACE_BEFORE_METHOD_LBRACE, SPACE_BEFORE_METHOD_PARENTHESES, SPACE_BEFORE_QUEST, SPACE_BEFORE_SEMICOLON, SPACE_BEFORE_SWITCH_LBRACE, SPACE_BEFORE_SWITCH_PARENTHESES, SPACE_BEFORE_SYNCHRONIZED_LBRACE, SPACE_BEFORE_SYNCHRONIZED_PARENTHESES, SPACE_BEFORE_TRY_LBRACE, SPACE_BEFORE_TRY_PARENTHESES, SPACE_BEFORE_TYPE_PARAMETER_LIST, SPACE_BEFORE_WHILE_KEYWORD, SPACE_BEFORE_WHILE_LBRACE, SPACE_BEFORE_WHILE_PARENTHESES, SPACE_WITHIN_ANNOTATION_PARENTHESES, SPACE_WITHIN_ARRAY_INITIALIZER_BRACES, SPACE_WITHIN_BRACES, SPACE_WITHIN_BRACKETS, SPACE_WITHIN_CAST_PARENTHESES, SPACE_WITHIN_CATCH_PARENTHESES, SPACE_WITHIN_EMPTY_ARRAY_INITIALIZER_BRACES, SPACE_WITHIN_EMPTY_METHOD_CALL_PARENTHESES, SPACE_WITHIN_EMPTY_METHOD_PARENTHESES, SPACE_WITHIN_FOR_PARENTHESES, SPACE_WITHIN_IF_PARENTHESES, SPACE_WITHIN_METHOD_CALL_PARENTHESES, SPACE_WITHIN_METHOD_PARENTHESES, SPACE_WITHIN_PARENTHESES, SPACE_WITHIN_SWITCH_PARENTHESES, SPACE_WITHIN_SYNCHRONIZED_PARENTHESES, SPACE_WITHIN_TRY_PARENTHESES, SPACE_WITHIN_WHILE_PARENTHESES, SPECIAL_ELSE_IF_TREATMENT, TERNARY_OPERATION_SIGNS_ON_NEXT_LINE, TERNARY_OPERATION_WRAP, THROWS_KEYWORD_WRAP, THROWS_LIST_WRAP, USE_FLYING_GEESE_BRACES, VARIABLE_ANNOTATION_WRAP, WHILE_BRACE_FORCE, WHILE_ON_NEW_LINE, WRAP_COMMENTS, WRAP_FIRST_METHOD_IN_CALL_CHAIN, WRAP_LONG_LINES, WRAP_ON_TYPING
ALIGN_CONSECUTIVE_ASSIGNMENTS, BLANK_LINES_BEFORE_CLASS_END, BRACE_STYLE, CLASS_BRACE_STYLE, DO_NOT_FORCE, DO_NOT_WRAP, END_OF_LINE, FORCE_BRACES_ALWAYS, FORCE_BRACES_IF_MULTILINE, KEEP_BLANK_LINES_BETWEEN_PACKAGE_DECLARATION_AND_HEADER, LAMBDA_BRACE_STYLE, METHOD_BRACE_STYLE, NEXT_LINE, NEXT_LINE_IF_WRAPPED, NEXT_LINE_SHIFTED, NEXT_LINE_SHIFTED2, REARRANGE_ACCORDIND_TO_DIALOG, REARRANGE_ALWAYS, REARRANGE_NEVER, WRAP_ALWAYS, WRAP_AS_NEEDED, WRAP_ON_EVERY_ITEM
Constructor and Description |
---|
CodeStyleSettings() |
CodeStyleSettings(boolean loadExtensions) |
Modifier and Type | Method and Description |
---|---|
void |
clearCodeStyleSettings() |
CodeStyleSettings |
clone() |
void |
copyFrom(CodeStyleSettings from) |
boolean |
equals(java.lang.Object obj) |
int |
getClassCountToUseImportOnDemand()
Deprecated.
|
CommonCodeStyleSettings |
getCommonSettings(Language lang)
Attempts to get language-specific common settings from
LanguageCodeStyleSettingsProvider . |
CommonCodeStyleSettings |
getCommonSettings(java.lang.String langName) |
int |
getContinuationIndentSize(FileType fileType) |
<T extends CustomCodeStyleSettings> |
getCustomSettings(java.lang.Class<T> aClass) |
int |
getDefaultRightMargin() |
static CodeStyleSettings |
getDefaults() |
java.util.List<java.lang.Integer> |
getDefaultSoftMargins() |
ExcludedFiles |
getExcludedFiles() |
java.util.regex.Pattern |
getFormatterOffPattern() |
java.util.regex.Pattern |
getFormatterOnPattern() |
PackageEntryTable |
getImportLayoutTable()
Deprecated.
|
CommonCodeStyleSettings.IndentOptions |
getIndentOptions() |
CommonCodeStyleSettings.IndentOptions |
getIndentOptions(FileType fileType)
If the file type has an associated language and language indent options are defined, returns these options.
|
CommonCodeStyleSettings.IndentOptions |
getIndentOptionsByDocument(Project project,
Document document)
If the document has an associated PsiFile, returns options for this file.
|
CommonCodeStyleSettings.IndentOptions |
getIndentOptionsByFile(PsiFile file) |
CommonCodeStyleSettings.IndentOptions |
getIndentOptionsByFile(PsiFile file,
TextRange formatRange) |
CommonCodeStyleSettings.IndentOptions |
getIndentOptionsByFile(PsiFile file,
TextRange formatRange,
boolean ignoreDocOptions,
Processor<? super FileIndentOptionsProvider> providerProcessor)
Retrieves indent options for PSI file from an associated document or (if not defined in the document) from file indent options
providers.
|
int |
getIndentSize(FileType fileType) |
CommonCodeStyleSettings.IndentOptions |
getLanguageIndentOptions(Language language)
Returns language indent options or, if the language doesn't have any options of its own, indent options configured for other file
types.
|
java.lang.String |
getLineSeparator() |
SimpleModificationTracker |
getModificationTracker() |
int |
getNamesCountToUseImportOnDemand()
Deprecated.
|
PackageEntryTable |
getPackagesToUseImportOnDemand()
Deprecated.
|
CodeStyleSettings |
getParentSettings() |
java.util.List<java.lang.String> |
getRepeatAnnotations()
Deprecated.
|
int |
getRightMargin(Language language)
Retrieves right margin for the given language.
|
java.util.List<java.lang.Integer> |
getSoftMargins(Language language)
Returns soft margins (visual indent guides positions) for the language.
|
int |
getTabSize(FileType fileType) |
int |
getVersion() |
boolean |
isInsertInnerClassImports()
Deprecated.
|
boolean |
isLayoutStaticImportsSeparately()
Deprecated.
|
boolean |
isSmartTabs(FileType fileType) |
boolean |
isUseFqClassNames()
Deprecated.
|
boolean |
isUseSingleClassImports()
Deprecated.
|
boolean |
isWrapOnTyping(Language language)
Defines whether or not wrapping should occur when typing reaches right margin.
|
void |
readExternal(Element element) |
void |
registerSettings(CodeStyleSettingsProvider provider) |
void |
registerSettings(LanguageCodeStyleSettingsProvider provider) |
void |
removeSettings(CodeStyleSettingsProvider provider) |
void |
removeSettings(LanguageCodeStyleSettingsProvider provider) |
void |
resetDeprecatedFields() |
void |
setClassCountToUseImportOnDemand(int value)
Deprecated.
|
void |
setDefaultRightMargin(int rightMargin) |
void |
setDefaultSoftMargins(java.util.List<java.lang.Integer> softMargins)
Sets the default soft margins used for languages not defining them explicitly.
|
void |
setFormatterOffPattern(java.util.regex.Pattern formatterOffPattern) |
void |
setFormatterOnPattern(java.util.regex.Pattern formatterOnPattern) |
void |
setInsertInnerClassImports(boolean value)
Deprecated.
|
void |
setLayoutStaticImportsSeparately(boolean value)
Deprecated.
|
void |
setNamesCountToUseImportOnDemand(int value)
Deprecated.
|
void |
setParentSettings(CodeStyleSettings parent) |
void |
setRepeatAnnotations(java.util.List<java.lang.String> repeatAnnotations)
Deprecated.
|
void |
setRightMargin(Language language,
int rightMargin)
Assigns another right margin for the language or (if it is null) to root (default) margin.
|
void |
setSoftMargins(Language language,
java.util.List<java.lang.Integer> softMargins)
Set soft margins (visual indent guides) for the language.
|
void |
setUseFqClassNames(boolean value)
Deprecated.
|
void |
setUseSingleClassImports(boolean value)
Deprecated.
|
boolean |
useTabCharacter(FileType fileType) |
void |
writeExternal(Element element) |
arrangementSettingsEqual, clone, copyFrom, getArrangementSettings, getFileType, getLanguage, getLocalCodeStyleSettings, getRootSettings, getSoftMargins, initIndentOptions, isForceArrangeMenuAvailable, setArrangementSettings, setForceArrangeMenuAvailable
public static final int CURR_VERSION
public static final java.lang.String VERSION_ATTR
public boolean USE_SAME_INDENTS
public boolean IGNORE_SAME_INDENTS_FOR_LANGUAGES
public boolean AUTODETECT_INDENTS
public final CommonCodeStyleSettings.IndentOptions OTHER_INDENT_OPTIONS
public java.lang.String LINE_SEPARATOR
@Deprecated public java.lang.String FIELD_NAME_PREFIX
JavaCodeStyleSettings.FIELD_NAME_PREFIX
@Deprecated public java.lang.String STATIC_FIELD_NAME_PREFIX
JavaCodeStyleSettings.STATIC_FIELD_NAME_PREFIX
@Deprecated public java.lang.String PARAMETER_NAME_PREFIX
JavaCodeStyleSettings.PARAMETER_NAME_PREFIX
@Deprecated public java.lang.String LOCAL_VARIABLE_NAME_PREFIX
JavaCodeStyleSettings.LOCAL_VARIABLE_NAME_PREFIX
@Deprecated public java.lang.String FIELD_NAME_SUFFIX
JavaCodeStyleSettings.FIELD_NAME_SUFFIX
@Deprecated public java.lang.String STATIC_FIELD_NAME_SUFFIX
JavaCodeStyleSettings.STATIC_FIELD_NAME_SUFFIX
@Deprecated public java.lang.String PARAMETER_NAME_SUFFIX
JavaCodeStyleSettings.PARAMETER_NAME_SUFFIX
@Deprecated public java.lang.String LOCAL_VARIABLE_NAME_SUFFIX
JavaCodeStyleSettings.LOCAL_VARIABLE_NAME_SUFFIX
@Deprecated public boolean PREFER_LONGER_NAMES
JavaCodeStyleSettings.PREFER_LONGER_NAMES
@Deprecated public boolean GENERATE_FINAL_LOCALS
JavaCodeStyleSettings.GENERATE_FINAL_LOCALS
@Deprecated public boolean GENERATE_FINAL_PARAMETERS
JavaCodeStyleSettings.GENERATE_FINAL_PARAMETERS
@Deprecated public java.lang.String VISIBILITY
JavaCodeStyleSettings.VISIBILITY
@Deprecated public boolean PARENTHESES_AROUND_METHOD_ARGUMENTS
@Deprecated public boolean USE_EXTERNAL_ANNOTATIONS
JavaCodeStyleSettings.USE_EXTERNAL_ANNOTATIONS
@Deprecated public boolean INSERT_OVERRIDE_ANNOTATION
JavaCodeStyleSettings.INSERT_OVERRIDE_ANNOTATION
@Deprecated public boolean REPEAT_SYNCHRONIZED
JavaCodeStyleSettings.REPEAT_SYNCHRONIZED
@Deprecated public boolean LAYOUT_STATIC_IMPORTS_SEPARATELY
JavaCodeStyleSettings.LAYOUT_STATIC_IMPORTS_SEPARATELY
@Deprecated public boolean USE_FQ_CLASS_NAMES
JavaCodeStyleSettings.USE_FQ_CLASS_NAMES
@Deprecated public boolean USE_FQ_CLASS_NAMES_IN_JAVADOC
JavaCodeStyleSettings.CLASS_NAMES_IN_JAVADOC
instead@Deprecated public boolean USE_SINGLE_CLASS_IMPORTS
@Deprecated public boolean INSERT_INNER_CLASS_IMPORTS
@Deprecated public int CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND
@Deprecated public int NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND
@Deprecated public final PackageEntryTable PACKAGES_TO_USE_IMPORT_ON_DEMAND
@Deprecated public final PackageEntryTable IMPORT_LAYOUT_TABLE
@Deprecated public int STATIC_FIELDS_ORDER_WEIGHT
@Deprecated public int FIELDS_ORDER_WEIGHT
@Deprecated public int CONSTRUCTORS_ORDER_WEIGHT
@Deprecated public int STATIC_METHODS_ORDER_WEIGHT
@Deprecated public int METHODS_ORDER_WEIGHT
@Deprecated public int STATIC_INNER_CLASSES_ORDER_WEIGHT
@Deprecated public int INNER_CLASSES_ORDER_WEIGHT
public int RIGHT_MARGIN
public boolean WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN
isWrapOnTyping(Language)
method instead.CommonCodeStyleSettings.WRAP_ON_TYPING
@Deprecated public boolean ENABLE_JAVADOC_FORMATTING
JavaCodeStyleSettings.ENABLE_JAVADOC_FORMATTING
@Deprecated public boolean JD_LEADING_ASTERISKS_ARE_ENABLED
JavaCodeStyleSettings.JD_LEADING_ASTERISKS_ARE_ENABLED
@Deprecated public boolean HTML_KEEP_WHITESPACES
@Deprecated public int HTML_ATTRIBUTE_WRAP
@Deprecated public int HTML_TEXT_WRAP
@Deprecated public boolean HTML_KEEP_LINE_BREAKS
@Deprecated public boolean HTML_KEEP_LINE_BREAKS_IN_TEXT
@Deprecated public int HTML_KEEP_BLANK_LINES
@Deprecated public boolean HTML_ALIGN_ATTRIBUTES
@Deprecated public boolean HTML_ALIGN_TEXT
@Deprecated public boolean HTML_SPACE_AROUND_EQUALITY_IN_ATTRINUTE
@Deprecated public boolean HTML_SPACE_AFTER_TAG_NAME
@Deprecated public boolean HTML_SPACE_INSIDE_EMPTY_TAG
@Deprecated public java.lang.String HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE
@Deprecated public java.lang.String HTML_ELEMENTS_TO_REMOVE_NEW_LINE_BEFORE
@Deprecated public java.lang.String HTML_DO_NOT_INDENT_CHILDREN_OF
@Deprecated public int HTML_DO_NOT_ALIGN_CHILDREN_OF_MIN_LINES
@Deprecated public java.lang.String HTML_KEEP_WHITESPACES_INSIDE
@Deprecated public java.lang.String HTML_INLINE_ELEMENTS
@Deprecated public java.lang.String HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT
@Deprecated public CodeStyleSettings.QuoteStyle HTML_QUOTE_STYLE
@Deprecated public boolean HTML_ENFORCE_QUOTES
@Deprecated public CodeStyleSettings.HtmlTagNewLineStyle HTML_NEWLINE_BEFORE_FIRST_ATTRIBUTE
@Deprecated public CodeStyleSettings.HtmlTagNewLineStyle HTML_NEWLINE_AFTER_LAST_ATTRIBUTE
@Deprecated public boolean JSP_PREFER_COMMA_SEPARATED_IMPORT_LIST
com.intellij.application.options.JspCodeStyleSettings#JSP_PREFER_COMMA_SEPARATED_IMPORT_LIST
public boolean FORMATTER_TAGS_ENABLED
public java.lang.String FORMATTER_ON_TAG
public java.lang.String FORMATTER_OFF_TAG
public volatile boolean FORMATTER_TAGS_ACCEPT_REGEXP
public CodeStyleSettings()
public CodeStyleSettings(boolean loadExtensions)
public void setParentSettings(CodeStyleSettings parent)
public CodeStyleSettings getParentSettings()
public <T extends CustomCodeStyleSettings> T getCustomSettings(java.lang.Class<T> aClass)
public CodeStyleSettings clone()
clone
in class java.lang.Object
public void copyFrom(CodeStyleSettings from)
public java.lang.String getLineSeparator()
@Deprecated public java.util.List<java.lang.String> getRepeatAnnotations()
JavaCodeStyleSettings.getRepeatAnnotations()
@Deprecated public void setRepeatAnnotations(java.util.List<java.lang.String> repeatAnnotations)
JavaCodeStyleSettings.setRepeatAnnotations(List)
@Deprecated public boolean isLayoutStaticImportsSeparately()
JavaCodeStyleSettings.isLayoutStaticImportsSeparately()
isLayoutStaticImportsSeparately
in interface ImportsLayoutSettings
@Deprecated public void setLayoutStaticImportsSeparately(boolean value)
JavaCodeStyleSettings.setLayoutStaticImportsSeparately(boolean)
setLayoutStaticImportsSeparately
in interface ImportsLayoutSettings
@Deprecated public int getNamesCountToUseImportOnDemand()
JavaCodeStyleSettings.getNamesCountToUseImportOnDemand()
getNamesCountToUseImportOnDemand
in interface ImportsLayoutSettings
@Deprecated public void setNamesCountToUseImportOnDemand(int value)
JavaCodeStyleSettings.setNamesCountToUseImportOnDemand(int)
setNamesCountToUseImportOnDemand
in interface ImportsLayoutSettings
@Deprecated public int getClassCountToUseImportOnDemand()
JavaCodeStyleSettings.getClassCountToUseImportOnDemand()
getClassCountToUseImportOnDemand
in interface ImportsLayoutSettings
@Deprecated public void setClassCountToUseImportOnDemand(int value)
JavaCodeStyleSettings.setClassCountToUseImportOnDemand(int)
setClassCountToUseImportOnDemand
in interface ImportsLayoutSettings
@Deprecated public boolean isInsertInnerClassImports()
JavaCodeStyleSettings.isInsertInnerClassImports()
isInsertInnerClassImports
in interface ImportsLayoutSettings
@Deprecated public void setInsertInnerClassImports(boolean value)
JavaCodeStyleSettings.setInsertInnerClassImports(boolean)
setInsertInnerClassImports
in interface ImportsLayoutSettings
@Deprecated public boolean isUseSingleClassImports()
JavaCodeStyleSettings.isUseSingleClassImports()
isUseSingleClassImports
in interface ImportsLayoutSettings
@Deprecated public void setUseSingleClassImports(boolean value)
JavaCodeStyleSettings.setUseSingleClassImports(boolean)
setUseSingleClassImports
in interface ImportsLayoutSettings
@Deprecated public boolean isUseFqClassNames()
JavaCodeStyleSettings.isUseFqClassNames()
isUseFqClassNames
in interface ImportsLayoutSettings
@Deprecated public void setUseFqClassNames(boolean value)
JavaCodeStyleSettings.setUseFqClassNames(boolean)
setUseFqClassNames
in interface ImportsLayoutSettings
@Deprecated public PackageEntryTable getImportLayoutTable()
JavaCodeStyleSettings.getImportLayoutTable()
getImportLayoutTable
in interface ImportsLayoutSettings
@Deprecated public PackageEntryTable getPackagesToUseImportOnDemand()
JavaCodeStyleSettings.getPackagesToUseImportOnDemand()
getPackagesToUseImportOnDemand
in interface ImportsLayoutSettings
public java.util.regex.Pattern getFormatterOffPattern()
public void setFormatterOffPattern(java.util.regex.Pattern formatterOffPattern)
public java.util.regex.Pattern getFormatterOnPattern()
public void setFormatterOnPattern(java.util.regex.Pattern formatterOnPattern)
public void readExternal(Element element) throws InvalidDataException
readExternal
in interface JDOMExternalizable
readExternal
in class CommonCodeStyleSettings
InvalidDataException
public void writeExternal(Element element) throws WriteExternalException
writeExternal
in interface JDOMExternalizable
writeExternal
in class CommonCodeStyleSettings
WriteExternalException
public CommonCodeStyleSettings.IndentOptions getIndentOptions()
getIndentOptions
in class CommonCodeStyleSettings
public CommonCodeStyleSettings.IndentOptions getIndentOptions(FileType fileType)
FileTypeIndentOptionsProvider
. If none are found, other indent options are returned.fileType
- The file type to search indent options for.OTHER_INDENT_OPTIONS
.FileTypeIndentOptionsProvider
,
LanguageCodeStyleSettingsProvider
public CommonCodeStyleSettings.IndentOptions getIndentOptionsByDocument(Project project, Document document)
project
- The project in which PsiFile should be searched.document
- The document to search indent options for.OTHER_INDENT_OPTIONS
.FileIndentOptionsProvider
,
FileTypeIndentOptionsProvider
,
LanguageCodeStyleSettingsProvider
public CommonCodeStyleSettings.IndentOptions getIndentOptionsByFile(PsiFile file)
public CommonCodeStyleSettings.IndentOptions getIndentOptionsByFile(PsiFile file, TextRange formatRange)
public CommonCodeStyleSettings.IndentOptions getIndentOptionsByFile(PsiFile file, TextRange formatRange, boolean ignoreDocOptions, Processor<? super FileIndentOptionsProvider> providerProcessor)
file
- The PSI file to retrieve options for.formatRange
- The text range within the file for formatting purposes or null if there is either no specific range or multiple
ranges. If the range covers the entire file (full reformat), options stored in the document are ignored and
indent options are taken from file indent options providers.ignoreDocOptions
- Ignore options stored in the document and use file indent options providers even if there is no text range
or the text range doesn't cover the entire file.providerProcessor
- A callback object containing a reference to indent option provider which has returned indent options.FileIndentOptionsProvider
public CommonCodeStyleSettings.IndentOptions getLanguageIndentOptions(Language language)
language
- The language to get indent options for.public boolean isSmartTabs(FileType fileType)
public int getIndentSize(FileType fileType)
public int getContinuationIndentSize(FileType fileType)
public int getTabSize(FileType fileType)
public boolean useTabCharacter(FileType fileType)
public void clearCodeStyleSettings()
public CommonCodeStyleSettings getCommonSettings(Language lang)
LanguageCodeStyleSettingsProvider
.lang
- The language to get settings for.LanguageCodeStyleSettingsProvider.getDefaultCommonSettings()
doesn't return null)
returns the instance of settings for this language. Otherwise returns new instance of common code style settings
with default values.public CommonCodeStyleSettings getCommonSettings(java.lang.String langName)
langName
- The language name.CommonCodeStyleSettingsManager.getCommonSettings(com.intellij.lang.Language)
public int getRightMargin(Language language)
language
- The language to get right margin for or null if root (default) right margin is requested.public void setRightMargin(Language language, int rightMargin)
language
- The language to assign the right margin to or null if root (default) right margin is to be changed.rightMargin
- New right margin.public int getDefaultRightMargin()
public void setDefaultRightMargin(int rightMargin)
public boolean isWrapOnTyping(Language language)
language
- The language to check the option for or null for a global option.public boolean equals(java.lang.Object obj)
equals
in class CommonCodeStyleSettings
public static CodeStyleSettings getDefaults()
public void resetDeprecatedFields()
public int getVersion()
public java.util.List<java.lang.Integer> getSoftMargins(Language language)
language
- The language to retrieve soft margins for or null
for default soft margins.getDefaultSoftMargins()
public void setSoftMargins(Language language, java.util.List<java.lang.Integer> softMargins)
language
- The language to set soft margins for.softMargins
- The soft margins to set.public java.util.List<java.lang.Integer> getDefaultSoftMargins()
public void setDefaultSoftMargins(java.util.List<java.lang.Integer> softMargins)
softMargins
- The default soft margins.public ExcludedFiles getExcludedFiles()
public SimpleModificationTracker getModificationTracker()
public void removeSettings(LanguageCodeStyleSettingsProvider provider)
public void registerSettings(LanguageCodeStyleSettingsProvider provider)
public void removeSettings(CodeStyleSettingsProvider provider)
public void registerSettings(CodeStyleSettingsProvider provider)