Indent (String text, FileType fileType) { int indent = IndentHelperImpl.getIndent(CodeStyle.getSettings(myProject).getIndentOptions(fileType), text, true); int indentLevel = indent / IndentHelperImpl.INDENT_FACTOR; int spaceCount = indent - indentLevel * IndentHelperImpl.INDENT_FACTOR; return new IndentImpl(CodeStyle.getSettings(myProject), indentLevel, spaceCount, fileType); }