com.intellij.formatting
Interface FormattingModelBuilder
public interface FormattingModelBuilder
Allows a custom language plugin to build a formatting model for a file in the language, or
for a portion of a file.
A formatting model defines how a file is broken into non-whitespace blocks and different
types of whitespace (alignment, indents and wraps) between them.
- See Also:
Language.getFormattingModelBuilder(),
FormattingModelProvider.createFormattingModelForPsiFile(com.intellij.psi.PsiFile, Block, com.intellij.psi.codeStyle.CodeStyleSettings)
createModel
@NotNull
FormattingModel createModel(PsiElement element,
CodeStyleSettings settings)
- Requests building the formatting model for a section of the file containing
the specified PSI element and its children.
- Parameters:
element - the top element for which formatting is requested.settings - the code style settings used for formatting.
- Returns:
- the formatting model for the file.