Class

scala.meta.internal.pc.Completions.CompletionPosition

InterpolatorScope

Related Doc: package CompletionPosition

Permalink

case class InterpolatorScope(lit: MetalsGlobal.Literal, pos: MetalsGlobal.Position, interpolator: MetalsGlobal.InterpolationSplice, text: String) extends MetalsGlobal.CompletionPosition with Product with Serializable

A completion to convert a string literal into a string literal, example "Hello $na@@".

When converting a string literal into an interpolator we need to ensure a few cases:

- escape existing $ characters into $$, which are printed as $$ in order to escape the TextMate snippet syntax. - wrap completed name in curly braces s"Hello ${name}_ when the trailing character can be treated as an identifier part. - insert the leading s interpolator. - place the cursor at the end of the completed name using TextMate $0 snippet syntax.

lit

The string literal, includes an instrumented _CURSOR_ that we need to handle.

pos

The offset position of the cursor, right below @@_CURSOR_.

interpolator

Metadata about this interpolation, the location of the leading dollar character and whether the completed name needs to be wrapped in curly braces.

text

The text of the original source code without the instrumented _CURSOR_.

Linear Supertypes
Serializable, java.io.Serializable, Product, Equals, MetalsGlobal.CompletionPosition, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InterpolatorScope
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. CompletionPosition
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InterpolatorScope(lit: MetalsGlobal.Literal, pos: MetalsGlobal.Position, interpolator: MetalsGlobal.InterpolationSplice, text: String)

    Permalink

    lit

    The string literal, includes an instrumented _CURSOR_ that we need to handle.

    pos

    The offset position of the cursor, right below @@_CURSOR_.

    interpolator

    Metadata about this interpolation, the location of the leading dollar character and whether the completed name needs to be wrapped in curly braces.

    text

    The text of the original source code without the instrumented _CURSOR_.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def additionalEdits(): List[TextEdit]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. final lazy val cache: Map[MetalsGlobal.Symbol, Boolean]

    Permalink
    Definition Classes
    CompletionPosition
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def compare(o1: MetalsGlobal.Member, o2: MetalsGlobal.Member): Int

    Permalink

    Returns ordering between two candidate completions.

    Returns ordering between two candidate completions.

    - negative number if o1 member should be sorted before o2 - positive number if o2 member should be sorted before o1 - zero 0 if o1 and o2 are equal

    Definition Classes
    CompletionPosition
  9. def contribute: List[MetalsGlobal.Member]

    Permalink

    Returns true if this member should be sorted at the top of completion items.

    Returns true if this member should be sorted at the top of completion items.

    Definition Classes
    InterpolatorScopeCompletionPosition
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. val filter: String

    Permalink
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. val hasClosingBrace: Boolean

    Permalink
  15. val hasOpeningBrace: Boolean

    Permalink
  16. val interpolator: MetalsGlobal.InterpolationSplice

    Permalink

    Metadata about this interpolation, the location of the leading dollar character and whether the completed name needs to be wrapped in curly braces.

  17. def isCandidate(member: MetalsGlobal.Member): Boolean

    Permalink

    Returns false if this member should be excluded from completion items.

    Returns false if this member should be excluded from completion items.

    Definition Classes
    CompletionPosition
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isNew: Boolean

    Permalink
    Definition Classes
    CompletionPosition
  20. def isPrioritized(m: MetalsGlobal.Member): Boolean

    Permalink
    Definition Classes
    CompletionPosition
  21. final def isPrioritizedCached(m: MetalsGlobal.Member): Boolean

    Permalink
    Definition Classes
    CompletionPosition
  22. def isType: Boolean

    Permalink
    Definition Classes
    CompletionPosition
  23. val lit: MetalsGlobal.Literal

    Permalink

    The string literal, includes an instrumented _CURSOR_ that we need to handle.

  24. val nameRange: org.eclipse.lsp4j.Range

    Permalink
  25. val nameStart: reflect.internal.util.Position

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

    Permalink
    Definition Classes
    AnyRef
  27. def newText(sym: MetalsGlobal.Symbol): String

    Permalink
  28. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  30. val offset: Int

    Permalink
  31. val pos: MetalsGlobal.Position

    Permalink

    The offset position of the cursor, right below @@_CURSOR_.

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

    Permalink
    Definition Classes
    AnyRef
  33. val text: String

    Permalink

    The text of the original source code without the instrumented _CURSOR_.

  34. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from java.io.Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped