From 0d68eea92a642e3e78e23f285a142c9e92e0a1a5 Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Wed, 30 Jan 2013 17:21:45 +0400 Subject: [PATCH] Provides fine-grained control on fallback indent options to be used during formatting --- .../python/formatter/PythonFormattingModelBuilder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java b/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java index 4e075d5075e8..fd215072fe78 100644 --- a/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java +++ b/python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java @@ -14,6 +14,7 @@ import com.intellij.psi.tree.TokenSet; import com.jetbrains.python.PythonDialectsTokenSetProvider; import com.jetbrains.python.PythonLanguage; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import static com.jetbrains.python.PyElementTypes.*; import static com.jetbrains.python.PyTokenTypes.*; @@ -43,6 +44,15 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), block, settings); } + @Nullable + @Override + public CommonCodeStyleSettings.IndentOptions getIndentOptionsToUse(@NotNull PsiFile file, + @NotNull FormatTextRanges ranges, + @NotNull CodeStyleSettings settings) + { + return null; + } + @NotNull public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) { return createModel(element, settings, FormattingMode.REFORMAT);