Class

org.scalafmt.internal

FormatOps

Related Doc: package internal

Permalink

class FormatOps extends AnyRef

Helper functions for generating splits/policies for a given tree.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FormatOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FormatOps(tree: Tree, baseStyle: ScalafmtConfig, filename: String = "")

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. object :owner:

    Permalink
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def UnindentAtExclude(exclude: Set[Token], indent: Length): Pf

    Permalink
  6. val argumentStarts: Map[TokenHash, Tree]

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def beforeInfixSplit(owner: ApplyInfix, formatToken: FormatToken)(implicit style: ScalafmtConfig): Seq[Split]

    Permalink
  9. def binPackParentConstructorSplits(chain: Either[Template, Seq[With]], lastToken: Token, indentLen: Int)(implicit line: Line, style: ScalafmtConfig): Seq[Split]

    Permalink
  10. def canStartSelectChain(thisSelect: Select, nextSelect: Option[Select], lastApply: Tree)(implicit style: ScalafmtConfig): Boolean

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def couldUseConfigStyle(ft: FormatToken, allowForce: ⇒ Boolean = true)(implicit style: ScalafmtConfig): Boolean

    Permalink
  13. def ctorWithChain(ownerSet: Set[Tree], lastToken: Token)(implicit style: ScalafmtConfig): Policy

    Permalink
  14. def decideNewlinesOnlyAfterClose(split: Split)(close: Token)(implicit line: Line): Policy

    Permalink
  15. def decideNewlinesOnlyAfterToken(token: Token)(implicit line: Line): Policy

    Permalink
  16. def decideNewlinesOnlyBeforeClose(split: Split)(close: Token)(implicit line: Line): Policy

    Permalink
  17. def decideNewlinesOnlyBeforeClose(close: Token)(implicit line: Line): Policy

    Permalink
  18. def defnSiteLastToken(close: FormatToken, tree: Tree): Token

    Permalink
  19. def delayedBreakPolicy(end: Option[WithPos] = None)(onBreakPolicy: Policy)(implicit line: Line): Policy

    Permalink
  20. def delayedBreakPolicy(end: WithPos)(onBreakPolicy: Policy)(implicit line: Line): Policy

    Permalink
  21. def delayedBreakPolicyFactory(onBreakPolicy: Policy): Pf

    Permalink
  22. val dequeueSpots: Set[TokenHash]

    Permalink
  23. implicit val dialect: Dialect

    Permalink
  24. def distance(left: Token, right: Token): Int

    Permalink
  25. val emptyQueueSpots: Set[TokenHash]

    Permalink
  26. final def endOfSingleLineBlock(start: FormatToken)(implicit style: ScalafmtConfig): Token

    Permalink
    Annotations
    @tailrec()
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. val filename: String

    Permalink
  30. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def findArgsFor[A <: Tree](token: Token, argss: Seq[Seq[A]]): Option[Seq[A]]

    Permalink
  32. final def findFirst(start: FormatToken, end: Int)(f: (FormatToken) ⇒ Boolean): Option[FormatToken]

    Permalink
    Annotations
    @tailrec()
  33. final def findFirst(start: FormatToken, end: Token)(f: (FormatToken) ⇒ Boolean): Option[FormatToken]

    Permalink
  34. final def findLastApplyAndNextSelect(tree: Tree, enclosed: Boolean): (Tree, Option[Select])

    Permalink
  35. final def findLeftInfix(app: InfixApp): InfixApp

    Permalink
    Annotations
    @tailrec()
  36. def findPrevSelect(tree: Select, enclosed: Boolean = true): Option[Select]

    Permalink
  37. final def findPrevSelect(tree: Tree, enclosed: Boolean): Option[Select]

    Permalink
    Annotations
    @tailrec()
  38. final def findToken(ft: FormatToken, iter: (FormatToken) ⇒ FormatToken)(f: (FormatToken) ⇒ Boolean): Either[FormatToken, FormatToken]

    Permalink
  39. final def findTokenWith[A](ft: FormatToken, iter: (FormatToken) ⇒ FormatToken)(f: (FormatToken) ⇒ Option[A]): Either[FormatToken, A]

    Permalink
    Annotations
    @tailrec()
  40. final def findXmlLastLineIndent(ft: FormatToken): Int

    Permalink
    Annotations
    @tailrec()
  41. val forceConfigStyle: Set[Tree]

    Permalink
  42. def functionExpire(function: Function): (Token, ExpiresOn)

    Permalink
  43. def getApplyArgs(ft: FormatToken, isRight: Boolean)(implicit style: ScalafmtConfig): (Tree, Seq[Tree])

    Permalink
  44. def getApplyIndent(leftOwner: Tree, isConfigStyle: Boolean = false)(implicit style: ScalafmtConfig): Num

    Permalink
  45. def getCaseArrow(term: Case): FormatToken

    Permalink
  46. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  47. def getClosingIfEnclosedInMatching(tree: Tree): Option[Token]

    Permalink
  48. def getElseChain(term: If): Seq[Token]

    Permalink
    Annotations
    @inline()
  49. def getExcludeIf(end: Token, cond: (Token) ⇒ Boolean = _.is[T.RightBrace]): Set[Range]

    Permalink
  50. def getForceConfigStyle: (Set[Tree], Set[TokenHash])

    Permalink
  51. def getFuncArrow(term: Function): Option[FormatToken]

    Permalink
  52. def getInfixSplitsBeforeLhs(lhsApp: InfixApp, ft: FormatToken, newStmtModOrBody: Either[Modification, Tree])(implicit style: ScalafmtConfig): Seq[Split]

    Permalink
  53. def getLambdaAtSingleArgCallSite(ft: FormatToken)(implicit style: ScalafmtConfig): Option[Function]

    Permalink
  54. def getMidInfixToken(app: InfixApp): Token

    Permalink
  55. def getNoSplit(ft: FormatToken, spaceOk: Boolean)(implicit style: ScalafmtConfig): Modification

    Permalink
  56. def getOptimalTokenFor(ft: FormatToken): Token

    Permalink
  57. def getOptimalTokenFor(token: Token): Token

    Permalink
  58. def getSingleLineInfixPolicy(end: Token): Policy

    Permalink
  59. def getSpaceAndNewlineAfterCurlyLambda(newlines: Int)(implicit style: ScalafmtConfig): (Boolean, NewlineT)

    Permalink
  60. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  61. val importTokens: Set[Token]

    Permalink
  62. final def inSelectChain(prevSelect: Option[Select], thisSelect: Select, lastApply: Tree)(implicit style: ScalafmtConfig): Boolean

    Permalink

    Checks if an earlier select started the chain

    Checks if an earlier select started the chain

    Annotations
    @tailrec()
  63. def infixIndent(app: InfixApp, formatToken: FormatToken, isNewline: Boolean)(implicit style: ScalafmtConfig): Int

    Permalink
  64. val initStyle: ScalafmtConfig

    Permalink
  65. def insideBlock(start: FormatToken, end: Token, matches: (FormatToken) ⇒ Boolean): Map[Token, Token]

    Permalink
  66. def insideBlock[A](start: FormatToken, end: Token)(implicit classifier: Classifier[Token, A]): Map[Token, Token]

    Permalink
  67. def insideBlockRanges(start: FormatToken, end: Token, matches: (FormatToken) ⇒ Boolean): Set[Range]

    Permalink
  68. def insideBlockRanges[A](start: FormatToken, end: Token)(implicit classifier: Classifier[Token, A]): Set[Range]

    Permalink
  69. def insideInfixSplit(app: InfixApp, ft: FormatToken)(implicit style: ScalafmtConfig): Seq[Split]

    Permalink
  70. def isBinPack(owner: Tree): Boolean

    Permalink
  71. def isEmptyFunctionBody(tree: Tree): Boolean

    Permalink
  72. def isEnclosedInMatching(tree: Tree): Boolean

    Permalink
  73. def isEnclosedInMatching(tree: Tree, open: Token, close: Token): Boolean

    Permalink
  74. final def isInfixRhs(ft: FormatToken): Boolean

    Permalink
  75. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  76. def isJsNative(body: Tree): Boolean

    Permalink

    js.native is very special in Scala.js.

    js.native is very special in Scala.js.

    Context: https://github.com/scalameta/scalafmt/issues/108

  77. def isSingleIdentifierAnnotation(tok: FormatToken): Boolean

    Permalink
  78. final def leadingComment(formatToken: FormatToken): FormatToken

    Permalink
  79. def matching(token: Token): Token

    Permalink
    Annotations
    @inline()
  80. def matchingOpt(token: Token): Option[Token]

    Permalink
    Annotations
    @inline()
  81. def matchingParensRange(token: Token, other: Token): Range

    Permalink
  82. def mustUseConfigStyle(ft: FormatToken, allowForce: ⇒ Boolean = true)(implicit style: ScalafmtConfig): Boolean

    Permalink
  83. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  84. def next(tok: FormatToken): FormatToken

    Permalink
    Annotations
    @inline()
  85. final def nextNonComment(curr: FormatToken): FormatToken

    Permalink
  86. final def nextNonCommentSameLine(curr: FormatToken): FormatToken

    Permalink
  87. def noOptimizationZones(tree: Tree): Set[Token]

    Permalink
  88. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  89. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  90. def opensConfigStyle(ft: ⇒ FormatToken, whenSourceIgnored: Boolean = false)(implicit style: ScalafmtConfig): Boolean

    Permalink
  91. def opensConfigStyleImplicitParamList(formatToken: FormatToken)(implicit style: ScalafmtConfig): Boolean

    Permalink
  92. def opensImplicitParamList(ft: FormatToken, args: Seq[Tree]): Boolean

    Permalink
  93. def opensImplicitParamList(ft: FormatToken): Option[Seq[Param]]

    Permalink
  94. val optionalNewlines: Set[TokenHash]

    Permalink
  95. def owners(token: Token): Tree

    Permalink
    Annotations
    @inline()
  96. val packageTokens: Set[Token]

    Permalink
  97. def parensRange(token: Token): Option[Range]

    Permalink
  98. def penalizeNewlineByNesting(from: Token, to: Token)(implicit line: Line): Policy

    Permalink
  99. def prev(tok: FormatToken): FormatToken

    Permalink
    Annotations
    @inline()
  100. final def prevNonComment(curr: FormatToken): FormatToken

    Permalink
  101. final def rhsOptimalToken(start: FormatToken)(implicit style: ScalafmtConfig): Token

    Permalink
  102. val runner: ScalafmtRunner

    Permalink
  103. def splitOneArgOneLine(close: Token, owner: Tree)(implicit line: Line, style: ScalafmtConfig): Policy

    Permalink
    Annotations
    @inline()
  104. def splitOneArgPerLineAfterComma(owner: Tree)(implicit style: ScalafmtConfig): Pf

    Permalink
  105. def splitOneArgPerLineBeforeComma(owner: Tree)(implicit style: ScalafmtConfig): Pf

    Permalink
  106. final def startsNewBlockOnRight(ft: FormatToken): Boolean

    Permalink
  107. final def startsStatement(token: Token): Option[Tree]

    Permalink
    Annotations
    @inline()
  108. final def startsStatement(tok: FormatToken): Option[Tree]

    Permalink
    Annotations
    @inline()
  109. def styleAt(tree: Tree): ScalafmtConfig

    Permalink
  110. val styleMap: StyleMap

    Permalink
  111. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  112. def templateCurly(template: Template): Option[Token]

    Permalink
  113. def templateCurly(owner: Tree): Token

    Permalink
  114. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  115. val tokens: FormatTokens

    Permalink
  116. val tree: Tree

    Permalink
  117. def verticalMultiline(owner: Tree, ft: FormatToken)(implicit style: ScalafmtConfig): Seq[Split]

    Permalink

    Implementation for verticalMultiline

  118. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  121. def withIndentOnXmlSpliceStart(ft: FormatToken, splits: Seq[Split])(implicit style: ScalafmtConfig): Seq[Split]

    Permalink
  122. def withIndentOnXmlStart(tok: Start, splits: Seq[Split])(implicit style: ScalafmtConfig): Seq[Split]

    Permalink
  123. def xmlSpace(owner: Tree): Modification

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped