o

org.mulesoft.als.common

NodeBranchBuilder

object NodeBranchBuilder

Factory object for building AST branch structures from document positions.

Responsibility

This object provides factory methods for creating YPartBranch and ASTElementPartBranch instances from AST elements and positions. It handles:

  • Building branch structures with ancestor stacks
  • Finding nodes at specific positions with proper containment logic
  • Handling both YAML (YPart) and generic AST (ASTNode) structures
  • Calculating indentation from stack context
  • Finding mutual parents for range selections

Flow Structure Handling

The strict parameter controls containment behavior for flow structures (inline [] and {}). When strict is true, exact position matching is used.

Related Classes

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

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 astFromBaseUnit(bu: BaseUnit): ASTElement
  6. def build(bu: BaseUnit, position: Position, strict: Boolean): ASTPartBranch
  7. def build(ast: YPart, position: Position, strict: Boolean): YPartBranch
  8. def buildAST(astElement: ASTNode, position: Position, strict: Boolean): ASTElementPartBranch
  9. def buildElement(ast: ASTElement, position: Position, strict: Boolean): ASTPartBranch
  10. def childWithPosition(ast: YPart, amfPosition: Position, strict: Boolean): Option[YPart]
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  12. def containsFlow(s: YPart): Boolean
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def getAstForRange(ast: ASTElement, startPosition: Position, endPosition: Position, strict: Boolean): ElementWithIndentation
  16. def getChildren(node: Node, position: Position, stack: Seq[ASTNode], strict: Boolean): Seq[ASTNode]
    Annotations
    @tailrec()
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  18. def getStack(ast: ASTNode, position: Position, strict: Boolean): Seq[ASTNode]
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. 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 AnyRef

Inherited from Any

Ungrouped