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): Pf

    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(ownerSet: Set[Tree], lastToken: Token): Policy

    Permalink
  14. def decideNewlinesOnlyAfterClose(split: Split)(close: Token): Pf

    Permalink
  15. def decideNewlinesOnlyAfterToken(token: Token): Pf

    Permalink
  16. def decideNewlinesOnlyBeforeClose(split: Split)(close: Token): Pf

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

    Permalink
  18. def delayedBreakPolicy(leftCheck: Option[(Token) ⇒ Boolean])(onBreakPolicy: Policy): Policy

    Permalink
  19. val dequeueSpots: Set[TokenHash]

    Permalink
  20. implicit val dialect: Dialect

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

    Permalink
  22. val emptyQueueSpots: Set[TokenHash]

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. def getElseChain(term: If): Seq[Token]

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

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

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

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

    Permalink
  37. 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.

  38. def hashCode(): Int

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

    Permalink
  40. def infixIndent(owner: Tree, op: Name, rhsArgs: Seq[Tree], formatToken: FormatToken, isNewline: Boolean)(implicit style: ScalafmtConfig): Int

    Permalink
  41. def infixIndent(owner: ApplyInfix, formatToken: FormatToken, isNewline: Boolean)(implicit style: ScalafmtConfig): Int

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

    Permalink
  43. def infixSplit(owner: ApplyInfix, formatToken: FormatToken)(implicit line: Line, style: ScalafmtConfig): Seq[Split]

    Permalink
  44. val initStyle: ScalafmtConfig

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

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

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

    Permalink
  48. final def isInstanceOf[T0]: Boolean

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

  50. def isMarginizedString(token: Token): Boolean

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

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

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

    Permalink
    Annotations
    @tailrec()
  54. def matching(token: Token): Token

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

    Permalink
    Annotations
    @inline()
  56. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  57. def newlinesOnlyBeforeClosePolicy(close: Token)(implicit line: Line): Policy

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

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

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

    Permalink
    Annotations
    @tailrec()
  61. final def nextNonCommentWithCount(curr: FormatToken, accum: Int = 0): (Int, FormatToken)

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

    Permalink
  63. final def notify(): Unit

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

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

    Permalink
  66. val optionalNewlines: Set[TokenHash]

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

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

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

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

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

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

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

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

    Permalink
    Annotations
    @tailrec()
  75. final def rhsOptimalToken(start: FormatToken)(implicit style: ScalafmtConfig): Token

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

    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. val tokens: FormatTokens

    Permalink
  87. val tree: Tree

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

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

    Permalink

    Implementation for verticalMultiline

  90. final def wait(): Unit

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

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

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped