Trait

scala.meta.internal.pc.completions

InterpolatorCompletions

Related Doc: package completions

Permalink

trait InterpolatorCompletions extends AnyRef

Self Type
MetalsGlobal
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InterpolatorCompletions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class InterpolationSplice(dollar: Int, name: String, needsBraces: Boolean) extends Product with Serializable

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

    Permalink

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

    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_.

  3. case class InterpolatorTypeCompletion(query: String, ident: MetalsGlobal.Ident, literalPart: MetalsGlobal.Literal, cursor: MetalsGlobal.Position, text: String) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    A completion to select type members inside string interpolators.

    A completion to select type members inside string interpolators.

    Example:

    // before
    s"Hello $name.len@@!"
    // after
    s"Hello ${name.length()$0}"
    query

    the member query, "len" in the example above.

    ident

    the identifier from where we select a member from, "name" above.

    literalPart

    the string literal part of the interpolator trailing the identifier including cursor instrumentation, "len_CURSOR_!" in the example above.

    cursor

    the cursor position where the completion is triggered, @@ in the example above.

    text

    the text of the original source file without _CURSOR_ instrumentation.

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def isPossibleInterpolatorMember(lit: MetalsGlobal.Literal, parent: MetalsGlobal.Tree, text: String, cursor: MetalsGlobal.Position): Option[MetalsGlobal.InterpolatorTypeCompletion]

    Permalink
  13. def isPossibleInterpolatorSplice(pos: MetalsGlobal.Position, text: String): Option[MetalsGlobal.InterpolationSplice]

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

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped