class
FormatOps extends AnyRef
Instance Constructors
-
new
FormatOps(tree: Tree, initStyle: ScalafmtConfig)
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
-
final
def
==(arg0: Any): Boolean
-
def
OneArgOneLineSplit(open: Token, noTrailingCommas: Boolean = false)(implicit line: Line): Policy
-
def
UnindentAtExclude(exclude: Set[Token], indent: Length): PartialFunction[Decision, Decision]
-
val
argumentStarts: Map[TokenHash, Tree]
-
final
def
asInstanceOf[T0]: T0
-
def
binPackParentConstructorSplits(owners: Set[Tree], lastToken: Token, indent: Int)(implicit line: Line): Seq[Split]
-
def
chainOptimalToken(chain: Vector[Select]): Token
-
def
clone(): AnyRef
-
def
ctorWithChain(owners: Set[Tree], lastToken: Token): Policy
-
def
decideNewlineAfterToken(close: Token): PartialFunction[Decision, Decision]
-
def
defnSiteLastToken(open: Token, tree: Tree): Token
-
val
dequeueSpots: Set[TokenHash]
-
implicit
val
dialect: Dialect
-
def
distance(left: Token, right: Token): Int
-
val
emptyQueueSpots: Set[TokenHash]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
findFirst(start: FormatToken, end: Token)(f: (FormatToken) ⇒ Boolean): Option[FormatToken]
-
val
forceConfigStyle: Set[Tree]
-
def
functionExpire(function: Function): (Token, ExpiresOn)
-
def
getApplyIndent(leftOwner: Tree, isConfigStyle: Boolean = false): Num
-
def
getArrow(caseStat: Case): Token
-
final
def
getClass(): Class[_]
-
final
def
getElseChain(term: If): Vector[KwElse]
-
def
getExcludeIf(end: Token, cond: (Token) ⇒ Boolean = _.is[T.RightBrace]): Set[Range]
-
def
getForceConfigStyle: (Set[Tree], Set[TokenHash])
-
def
getRightAttachedComment(token: Token): Token
-
def
getSelectsLastToken(dot: Dot): Token
-
def
hashCode(): Int
-
val
importTokens: Set[Token]
-
def
infixSplit(owner: Tree, op: Name, rhsArgs: Seq[Tree], formatToken: FormatToken)(implicit line: Line): Split
-
def
infixSplit(owner: ApplyInfix, formatToken: FormatToken)(implicit line: Line): Split
-
-
def
insideBlock(start: FormatToken, end: Token, matches: (Token) ⇒ Boolean): Set[Token]
-
def
isBinPack(owner: Tree): Boolean
-
def
isEmptyFunctionBody(tree: Tree): Boolean
-
final
def
isInstanceOf[T0]: Boolean
-
def
isJsNative(jsToken: Token): Boolean
-
def
isMarginizedString(token: Token): Boolean
-
def
isSingleIdentifierAnnotation(tok: FormatToken): Boolean
-
def
isTripleQuote(token: Token): Boolean
-
def
lastTokenInChain(chain: Vector[Select]): Token
-
final
def
leadingComment(formatToken: FormatToken): Token
-
lazy val
leftTok2tok: Map[Token, FormatToken]
-
def
matching(token: Token): Token
-
val
matchingParentheses: Map[TokenHash, Token]
-
final
def
ne(arg0: AnyRef): Boolean
-
def
newlineOnTokenPolicy(close: Token): Policy
-
-
def
next(tok: Token): Token
-
-
final
def
nextNonCommentWithCount(curr: FormatToken, accum: Int = 0): (Int, FormatToken)
-
def
noOptimizationZones(tree: Tree): Set[Token]
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
opensConfigStyle(formatToken: FormatToken): Boolean
-
val
optionalNewlines: Set[TokenHash]
-
def
owners(token: Token): Tree
-
val
ownersMap: Map[TokenHash, Tree]
-
val
packageTokens: Set[Token]
-
def
parensRange(open: Token): Range
-
def
penalizeAllNewlines(expire: Token, penalty: Int, penalizeLambdas: Boolean = true, ignore: (FormatToken) ⇒ Boolean = _ => false, penaliseNewlinesInsideTokens: Boolean = false)(implicit line: Line): Policy
-
def
penalizeNewlineByNesting(from: Token, to: Token)(implicit line: Line): Policy
-
-
def
prev(tok: Token): Token
-
-
final
def
prevNonCommentWithCount(curr: FormatToken, accum: Int = 0): (Int, FormatToken)
-
final
def
rhsOptimalToken(start: FormatToken): Token
-
-
def
safeFilterNewlines(splits: Seq[Split])(implicit line: Line): Seq[Split]
-
def
selectExpire(dot: Dot): Token
-
def
skipUnindent(token: Token): Boolean
-
final
def
startsNewBlock(t: Token): Boolean
-
final
def
startsStatement(tok: FormatToken): Boolean
-
val
statementStarts: Map[TokenHash, Tree]
-
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
templateCurly(template: Template): Option[Token]
-
def
templateCurly(owner: Tree): Token
-
def
toString(): String
-
lazy val
tok2idx: Map[FormatToken, Int]
-
-
val
tree: Tree
-
final
def
vAlignDepth(tree: Tree): Int
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
xmlSpace(owner: Tree): Modification
Helper functions for generating splits/policies for a given tree.