Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package mulesoft
    Definition Classes
    org
  • package als
    Definition Classes
    mulesoft
  • package actions
    Definition Classes
    als
  • package formatting
    Definition Classes
    actions
  • object SyamlImpl

    Utility object for YAML AST formatting and reformatting operations.

    Utility object for YAML AST formatting and reformatting operations.

    Responsibility

    This object provides implicit extensions for formatting YAML AST parts with proper indentation and whitespace handling. It handles:

    • Formatting YPart elements (YDocument, YMap, YSequence, YMapEntry, YNode, YScalar, YComment)
    • Managing indentation levels during formatting
    • Handling flow vs block style YAML structures
    • Token manipulation for whitespace, line breaks, and indentation
    • Preserving comments during formatting

    Flow Style Handling

    YAML flow structures (using [] and {}) are left mostly untouched to preserve user formatting preferences. Block style structures are reformatted with proper indentation.

    Usage

    Import the implicit class to enable .format() method on YPart instances:

    import org.mulesoft.als.actions.formatting.SyamlImpl._
    val formatted = yDocument.format(indentSize = 2, currentIndentation = 0)

    Related Classes

    • org.mulesoft.als.common.edits.YamlEditBuilder - Building TextEdits for YAML modifications
    • org.mulesoft.als.common.YamlUtils - Position-based YAML navigation
    • org.yaml.render.YamlRender - SYAML's built-in rendering (used for scalar values)
    Definition Classes
    formatting
  • FlowableFormat
  • YCommImpl
  • YMapEntryImpl
  • YMapImpl
  • YNodeImpl
  • YNonContImpl
  • YPartImpl
  • YScalarImpl
  • YSeqImpl

implicit sealed class YMapImpl extends FlowableFormat[YMap]

Linear Supertypes
FlowableFormat[YMap], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. YMapImpl
  2. FlowableFormat
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new YMapImpl(m: YMap)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. def emptyPart(children: IndexedSeq[YPart]): YMap
    Definition Classes
    YMapImpl → FlowableFormat
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def format(indentSize: Int, indent: Int, shouldCleanSpaces: Boolean): YMap
    Definition Classes
    FlowableFormat
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. def indentSeparators(seq: IndexedSeq[YPart], indentSize: Int, isFlow: Boolean): IndexedSeq[YPart]
    Attributes
    protected
    Definition Classes
    FlowableFormat
  13. val isEmpty: Boolean
    Definition Classes
    YMapImpl → FlowableFormat
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def lineBreakBlocks(children: IndexedSeq[YPart]): IndexedSeq[YPart]
    Attributes
    protected
    Definition Classes
    FlowableFormat
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def nonEmptyPart(children: IndexedSeq[YPart], indentSize: Int, indent: Int): YMap
    Definition Classes
    YMapImpl → FlowableFormat
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. val part: YMap
    Definition Classes
    YMapImpl → FlowableFormat
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from FlowableFormat[YMap]

Inherited from AnyRef

Inherited from Any

Ungrouped