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, initStyle: ScalafmtConfig)

    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 :chain:

    Permalink
  4. object :owner:

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

    Permalink
    Definition Classes
    AnyRef → Any
  6. def OneArgOneLineSplit(open: Token, noTrailingCommas: Boolean = false)(implicit line: Line): Policy

    Permalink
  7. def UnindentAtExclude(exclude: Set[Token], indent: Length): PartialFunction[Decision, Decision]

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

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def binPackParentConstructorSplits(owners: Set[Tree], lastToken: Token, indent: Int)(implicit line: Line): Seq[Split]

    Permalink
  11. def chainOptimalToken(chain: Vector[Select]): Token

    Permalink
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def ctorWithChain(owners: Set[Tree], lastToken: Token): Policy

    Permalink
  14. def defnSiteLastToken(open: Token, tree: Tree): Token

    Permalink
  15. val dequeueSpots: Set[TokenHash]

    Permalink
  16. implicit val dialect: Dialect

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

    Permalink
  18. val emptyQueueSpots: Set[TokenHash]

    Permalink
  19. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def findFirst(start: FormatToken, end: Token)(f: (FormatToken) ⇒ Boolean): Option[FormatToken]

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

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

    Permalink
  25. def getApplyIndent(leftOwner: Tree, isConfigStyle: Boolean = false): Num

    Permalink
  26. def getArrow(caseStat: Case): Token

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def getElseChain(term: If): Vector[KwElse]

    Permalink
  29. def getExcludeIf(end: Token, cond: (Token) ⇒ Boolean = _.is[RightBrace]): Set[Range]

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

    Permalink
  31. def getRightAttachedComment(token: Token): Token

    Permalink
  32. def getSelectsLastToken(dot: Dot): Token

    Permalink

    Returns last token of select, handles case when select's parent is apply.

    Returns last token of select, handles case when select's parent is apply.

    For example, in: foo.bar[T](1, 2) the last token is the final )

    dot

    the dot owned by the select.

  33. def hashCode(): Int

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

    Permalink
  35. def infixSplit(owner: Tree, op: Name, rhsArgs: Seq[Tree], formatToken: FormatToken)(implicit line: Line): Split

    Permalink
  36. def infixSplit(owner: ApplyInfix, formatToken: FormatToken)(implicit line: Line): Split

    Permalink
  37. val initStyle: ScalafmtConfig

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

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

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

    Permalink
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def isJsNative(jsToken: Token): 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

  43. def isMarginizedString(token: Token): Boolean

    Permalink
  44. def isSingleIdentifierAnnotation(tok: FormatToken): Boolean

    Permalink
  45. def isTripleQuote(token: Token): Boolean

    Permalink
  46. def lastTokenInChain(chain: Vector[Select]): Token

    Permalink
  47. final def leadingComment(formatToken: FormatToken): Token

    Permalink
    Annotations
    @tailrec()
  48. lazy val leftTok2tok: Map[Token, FormatToken]

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

    Permalink
    Annotations
    @inline()
  50. val matchingParentheses: Map[TokenHash, Token]

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

    Permalink
    Definition Classes
    AnyRef
  52. def newlineBeforeClosingCurlyPolicy(close: Token): Policy

    Permalink
  53. def next(tok: FormatToken): FormatToken

    Permalink
  54. def next(tok: Token): Token

    Permalink
  55. def nextNonComment(curr: FormatToken): FormatToken

    Permalink
  56. final def nextNonCommentWithCount(curr: FormatToken, accum: Int = 0): (Int, FormatToken)

    Permalink
    Annotations
    @tailrec()
  57. def noOptimizationZones(tree: Tree): Set[Token]

    Permalink
  58. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  60. def opensConfigStyle(formatToken: FormatToken): Boolean

    Permalink
  61. val optionalNewlines: Set[TokenHash]

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

    Permalink
    Annotations
    @inline()
  63. val ownersMap: Map[TokenHash, Tree]

    Permalink
  64. val packageTokens: Set[Token]

    Permalink
  65. def parensRange(open: Token): Range

    Permalink
  66. def penalizeAllNewlines(expire: Token, penalty: Int, penalizeLambdas: Boolean = true, ignore: (FormatToken) ⇒ Boolean = _ => false, penaliseNewlinesInsideTokens: Boolean = false)(implicit line: Line): Policy

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

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

    Permalink
  69. def prev(tok: Token): Token

    Permalink
  70. def prevNonComment(curr: FormatToken): FormatToken

    Permalink
  71. final def prevNonCommentWithCount(curr: FormatToken, accum: Int = 0): (Int, FormatToken)

    Permalink
    Annotations
    @tailrec()
  72. final def rhsOptimalToken(start: FormatToken): Token

    Permalink
    Annotations
    @tailrec()
  73. val runner: ScalafmtRunner

    Permalink
  74. def safeFilterNewlines(splits: Seq[Split])(implicit line: Line): Seq[Split]

    Permalink
  75. def selectExpire(dot: Dot): Token

    Permalink

    Returns the expire token for the owner of dot.

    Returns the expire token for the owner of dot.

    If the select is part of an apply like

    foo.bar { ... }

    the expire token is the closing }, otherwise it's bar.

  76. def skipUnindent(token: Token): Boolean

    Permalink
  77. final def startsNewBlock(t: Token): Boolean

    Permalink
  78. final def startsStatement(tok: FormatToken): Boolean

    Permalink
    Annotations
    @tailrec()
  79. val statementStarts: Map[TokenHash, Tree]

    Permalink
  80. def styleAt(tree: Tree): ScalafmtConfig

    Permalink
  81. val styleMap: StyleMap

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

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

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

    Permalink
  85. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  86. lazy val tok2idx: Map[FormatToken, Int]

    Permalink
  87. val tokens: Array[FormatToken]

    Permalink
  88. val tree: Tree

    Permalink
  89. final def vAlignDepth(tree: Tree): Int

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

    Permalink

    Implementation for verticalMultiline

  91. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. def xmlSpace(owner: Tree): Modification

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped