From 0a3f397ff1b064ab5bb616835812ed758bd8bfe0 Mon Sep 17 00:00:00 2001 From: Rustam Vishnyakov Date: Tue, 2 Sep 2014 11:30:59 +0400 Subject: [PATCH] Remove usages of deprecated CodeStyleSettings.RIGHT_MARGIN field --- .../com/intellij/formatting/GeneralCodeFormatterTest.java | 4 ++-- .../plugins/relaxNG/convert/ConvertSchemaSettingsImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/formatting/GeneralCodeFormatterTest.java b/platform/platform-tests/testSrc/com/intellij/formatting/GeneralCodeFormatterTest.java index 7814e6e5f109..861a4b2c6e4b 100644 --- a/platform/platform-tests/testSrc/com/intellij/formatting/GeneralCodeFormatterTest.java +++ b/platform/platform-tests/testSrc/com/intellij/formatting/GeneralCodeFormatterTest.java @@ -109,7 +109,7 @@ import java.io.IOException; indentOptions.INDENT_SIZE = 4; indentOptions.LABEL_INDENT_SIZE = 1; final CodeStyleSettings settings = new CodeStyleSettings(false); - settings.RIGHT_MARGIN = myRightMargin; + settings.setDefaultRightMargin(myRightMargin); try { FormatterEx.getInstanceEx().adjustLineIndent(model, settings, indentOptions, initialText.length() - 1, new TextRange(0, initialText.length())); } @@ -200,7 +200,7 @@ import java.io.IOException; indentOptions.INDENT_SIZE = 4; indentOptions.LABEL_INDENT_SIZE = 1; final CodeStyleSettings settings = new CodeStyleSettings(false); - settings.RIGHT_MARGIN = myRightMargin; + settings.setDefaultRightMargin(myRightMargin); try { FormatterEx.getInstanceEx().format(model, settings, indentOptions, indentOptions, null); } diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaSettingsImpl.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaSettingsImpl.java index 56fe4c92f733..3161c522b586 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaSettingsImpl.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaSettingsImpl.java @@ -131,7 +131,7 @@ public class ConvertSchemaSettingsImpl implements ConvertSchemaSettings { final int indent = styleSettings.getIndentSize(type); myIndent.setText(String.valueOf(indent)); - myLineLength.setText(String.valueOf(styleSettings.RIGHT_MARGIN)); + myLineLength.setText(String.valueOf(styleSettings.getDefaultRightMargin())); final SchemaType outputType = getOutputType(); myLineLength.setEnabled(outputType == SchemaType.DTD || outputType == SchemaType.RNC);