public class CodeStyleFacadeImpl extends CodeStyleFacade
| Constructor and Description |
|---|
CodeStyleFacadeImpl() |
CodeStyleFacadeImpl(Project project) |
| Modifier and Type | Method and Description |
|---|---|
int |
getIndentSize(FileType fileType)
Deprecated.
|
int |
getJoinedLinesSpacing(Editor editor,
Language language,
int offset,
boolean allowDocCommit)
Calculates the spacing (in columns) for joined lines at given offset after join lines or smart backspace actions.
|
java.lang.String |
getLineIndent(Document document,
int offset)
Deprecated.
|
java.lang.String |
getLineIndent(Editor editor,
Language language,
int offset,
boolean allowDocCommit)
Calculates the indent that should be used for the line at specified offset in the specified
editor.
|
java.lang.String |
getLineSeparator() |
int |
getTabSize(FileType fileType) |
boolean |
useSpaceAfterComma(PsiFile psiFile,
Language language)
Determines whether a comma after space is needed for given
PsiFile in given Language context. |
boolean |
useSpaceAroundAssignmentOperators(PsiFile psiFile,
Language language)
Determines whether assignment operator should be surrounded with spaces for given
PsiFile in given Language context. |
boolean |
useSpaceBeforeComma(PsiFile psiFile,
Language language)
Determines whether a comma before space is needed for given
PsiFile in given Language context. |
boolean |
useTabCharacter(FileType fileType) |
getInstance, getInstancepublic CodeStyleFacadeImpl()
public CodeStyleFacadeImpl(Project project)
@Deprecated public int getIndentSize(FileType fileType)
getIndentSize in class CodeStyleFacade@Deprecated public java.lang.String getLineIndent(Document document, int offset)
CodeStyleFacadegetLineIndent in class CodeStyleFacadedocument - the document for which the indent should be calculated.offset - the caret offset in the editor.public java.lang.String getLineIndent(Editor editor, Language language, int offset, boolean allowDocCommit)
CodeStyleFacadeLineIndentProvider for the language, it will be used to calculate the indent. Otherwise, if
allowDocCommit flag is true, the method will use formatter on committed document.getLineIndent in class CodeStyleFacadeeditor - The editor for which the indent must be returned.language - Context languageoffset - The caret offset in the editor.allowDocCommit - Allow calculation using committed document.
NOTE: Committing the document may be slow an cause performance issues on large files.
public int getJoinedLinesSpacing(Editor editor, Language language, int offset, boolean allowDocCommit)
CodeStyleFacadeLineIndentProvider for the language,
it will be used to calculate the spacing. Otherwise, if
allowDocCommit flag is true, the method will use formatter on committed document.getJoinedLinesSpacing in class CodeStyleFacadeeditor - The editor for which the spacing must be returned.language - Context languageoffset - Offset in the editor after the indent in the second joining line.allowDocCommit - Allow calculation using committed document.
NOTE: Committing the document may be slow an cause performance issues on large files.
public java.lang.String getLineSeparator()
getLineSeparator in class CodeStyleFacadepublic int getTabSize(FileType fileType)
getTabSize in class CodeStyleFacadepublic boolean useTabCharacter(FileType fileType)
useTabCharacter in class CodeStyleFacadepublic boolean useSpaceBeforeComma(PsiFile psiFile, Language language)
CodeStyleFacadePsiFile in given Language context.useSpaceBeforeComma in class CodeStyleFacadepsiFile - File to determine settingslanguage - Context languagepublic boolean useSpaceAfterComma(PsiFile psiFile, Language language)
CodeStyleFacadePsiFile in given Language context.useSpaceAfterComma in class CodeStyleFacadepsiFile - File to determine settingslanguage - Context languagepublic boolean useSpaceAroundAssignmentOperators(PsiFile psiFile, Language language)
CodeStyleFacadePsiFile in given Language context.useSpaceAroundAssignmentOperators in class CodeStyleFacadepsiFile - File to determine settingslanguage - Context language