mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Provides fine-grained control on fallback indent options to be used during formatting
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user