package common

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class ASTElementPartBranch(node: ASTNode, position: Position, stack: Seq[ASTNode]) extends ASTPartBranch with Product with Serializable
  2. trait ASTPartBranch extends AnyRef
  3. trait DirectoryResolver extends AlsPlatformSecrets
  4. case class ElementWithIndentation(ast: ASTElement, indentation: Option[Int]) extends Product with Serializable

    Wrapper for an AST element with its calculated indentation level.

    Wrapper for an AST element with its calculated indentation level.

    ast

    The AST element

    indentation

    The indentation level in spaces, if determinable

  5. case class ObjectInTree(obj: AmfObject, stack: Seq[AmfObject], fieldEntry: Option[FieldEntry], astPartBranch: ASTPartBranch) extends Product with Serializable
  6. class PlatformDirectoryResolver extends DirectoryResolver
  7. trait SyncFunction extends AnyRef
  8. case class YPartBranch(node: YPart, position: Position, stack: Seq[YPart], strict: Boolean) extends ASTPartBranch with Product with Serializable

    Represents a branch in the YAML AST with position context and navigation stack.

    Represents a branch in the YAML AST with position context and navigation stack.

    Responsibility

    This case class wraps a YPart node with its position context and ancestor stack, providing rich navigation and query capabilities. It handles:

    • Determining if the current position is at a key, value, or array element
    • Accessing parent entries, maps, and ancestor nodes
    • Querying node properties (isMultiline, isEmptyNode, isAtRoot, etc.)
    • Finding siblings and array elements
    • Extracting key paths and string values

    Stack Navigation

    The stack parameter contains ancestor nodes from innermost to outermost, enabling efficient parent/ancestor lookups without re-traversing the AST.

    Related Classes

    node

    The current YPart node at the position

    position

    The cursor/document position (1-indexed, AMF format)

    stack

    Ancestor nodes from innermost to outermost

    strict

    Whether to use strict containment checks (for flow structures)

Value Members

  1. object ASTElementWrapper

    Provides implicit extensions for AST element containment checks and conversions.

    Provides implicit extensions for AST element containment checks and conversions.

    Responsibility

    This object contains implicit classes that extend AST elements (both YAML and generic) with position containment and range conversion capabilities. It handles:

    • Position containment checks for various AST element types
    • Range conversions between AMF and internal position formats
    • Location conversions for LSP responses
    • Special handling for flow structures, quoted scalars, and null values

    Implicit Classes

    • CommonASTOps - Basic containment for any ASTElement
    • AlsPositionRange - Range conversions and containment
    • YSequenceOps, YMapEntryOps, AlsYMapOps, etc. - YAML-specific containment

    Position Indexing

    AMF positions are 1-indexed, while internal Position is 0-indexed. The implicit conversions handle this transparently.

    Related Classes

    • org.mulesoft.als.common.YPartBranch - Branch navigation with stack context
    • org.mulesoft.als.common.YamlUtils - Position-based YAML navigation
    • org.mulesoft.als.common.dtoTypes.PositionRange - Internal range representation
  2. object ASTNodeWrapper

    Implicit extensions for generic ASTNode containment checks.

  3. object AlsAmfElement
  4. object AmfConfigurationPatcher
  5. object AmfSonElementFinder
  6. object NodeBranchBuilder

    Factory object for building AST branch structures from document positions.

    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

  7. object ObjectInTreeBuilder
  8. object SemanticNamedElement
  9. object URIImplicits
  10. object YPartASTWrapper

    Provides YAML-specific implicit extensions for position containment.

    Provides YAML-specific implicit extensions for position containment.

    Responsibility

    This object contains implicit classes for YAML AST elements (YPart subclasses) with specialized containment logic that handles:

    • Flow structures ([] and {}) with adjusted boundaries
    • Indentation-aware containment for block structures
    • Quoted scalar handling
    • Null value edge cases
    • Map entry key/value distinction

    Flow Structure Handling

    For flow structures, the containment boundaries are adjusted to exclude the opening/closing brackets, allowing proper cursor positioning inside.

  11. object YamlUtils

    Utility object for position-based YAML AST navigation and queries.

    Utility object for position-based YAML AST navigation and queries.

    Responsibility

    This object provides utilities for navigating and querying YAML AST structures based on cursor/document positions. It handles:

    • Checking if a position is at a key vs value
    • Finding nodes at specific positions
    • Navigating parent/child relationships
    • Finding siblings of nodes
    • Detecting JSON vs YAML format from BaseUnit

    Position Containment

    Uses PositionRange for containment checks, converting between AMF positions (1-indexed) and internal positions (0-indexed).

    Related Classes

    • org.mulesoft.als.common.edits.YamlEditBuilder - Building TextEdits for YAML modifications
    • org.mulesoft.als.common.YPartBranch - AST branch context with stack navigation
    • org.mulesoft.als.common.ASTElementWrapper - Implicit extensions for AST elements
    Note

    For branch-based navigation with context stack, use NodeBranchBuilder instead.

Ungrouped