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. object CtrlBodySplits

    Permalink
  6. def UnindentAtExclude(exclude: Set[Token], indent: Length): Pf

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

    Permalink
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  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: WithPos)(onBreakPolicy: Policy)(implicit line: Line): Policy

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

    Permalink
  21. val dequeueSpots: Set[TokenHash]

    Permalink
  22. implicit val dialect: Dialect

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

    Permalink
  24. val emptyQueueSpots: Set[TokenHash]

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

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

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

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

    Permalink
  29. def finalize(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
  51. def getInfixSplitsBeforeLhs(lhsApp: InfixApp, ft: FormatToken, newStmtMod: Option[Modification] = None)(implicit style: ScalafmtConfig): Seq[Split]

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

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

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

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

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

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

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

    Permalink
  59. def hasMatching(token: Token): Boolean

    Permalink
    Annotations
    @inline()
  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. val initStyle: ScalafmtConfig

    Permalink
  64. def insideBlock(start: FormatToken, end: Token, matches: (FormatToken) ⇒ Boolean): TokenRanges

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

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

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

    Permalink
  68. def isCaseBodyEnclosedAsBlock(ft: FormatToken, caseStat: Case)(implicit style: ScalafmtConfig): Boolean

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

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

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

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

    Permalink
  73. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  74. 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

  75. def isSingleIdentifierAnnotation(tok: FormatToken): Boolean

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

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

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

    Permalink
    Annotations
    @inline()
  79. def mustUseConfigStyle(ft: FormatToken, allowForce: ⇒ Boolean = true)(implicit style: ScalafmtConfig): Boolean

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

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

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

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

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

    Permalink
  85. final def notify(): Unit

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

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

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

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

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

    Permalink
  91. val optionalNewlines: Set[TokenHash]

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

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

    Permalink
  94. def parensTuple(token: Token): TokenRanges

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

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

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

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

    Permalink
  99. val runner: ScalafmtRunner

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

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

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

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

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

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

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

    Permalink
  107. val styleMap: StyleMap

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

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

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

    Permalink
  111. def toString(): String

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

    Permalink
  113. val tree: Tree

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

    Permalink

    Implementation for verticalMultiline

  115. final def wait(): Unit

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

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

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

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

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped