Object/Class

scala.meta.internal.pc.Completions

CompletionPosition

Related Docs: class CompletionPosition | package Completions

Permalink

object CompletionPosition

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

Type Members

  1. case class Arg(ident: MetalsGlobal.Ident, apply: MetalsGlobal.Apply, pos: MetalsGlobal.Position, text: String, completions: MetalsGlobal.CompletionResult) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink
  2. case class CaseKeyword(selector: MetalsGlobal.Tree, editRange: org.eclipse.lsp4j.Range, pos: MetalsGlobal.Position, text: String, parent: MetalsGlobal.Tree) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    A case completion showing the valid subtypes of the type being deconstructed.

    A case completion showing the valid subtypes of the type being deconstructed.

    selector

    the match expression being deconstructed or EmptyTree when not in a match expression (for example List(1).foreach { case@@ }.

    editRange

    the range in the original source file enclosing the case keyword being completed. Used as the position of the main text edit of the completion.

    pos

    the position of the completion in the instrumented source file with _CURSOR_ instrumentation.

    text

    the text of the original source file without _CURSOR_.

    parent

    the parent tree node of the pattern match, for example Apply(_, _) when in List(1).foreach { cas@@ }, used as fallback to compute the type of the selector when it's EmptyTree.

  3. case class CasePattern(isTyped: Boolean, c: MetalsGlobal.CaseDef, m: MetalsGlobal.Match) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink
  4. case class Filename(toplevel: MetalsGlobal.DefTree, pkg: MetalsGlobal.PackageDef, pos: MetalsGlobal.Position, editRange: org.eclipse.lsp4j.Range) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    Completion for the name of a toplevel class, trait or object matching the filename.

    Completion for the name of a toplevel class, trait or object matching the filename.

    Example:

    // src/main/scala/app/UserDatabaseService.scala
    class User@@ // completes "UserDatabaseService"
    toplevel

    the toplevel class, trait or object definition.

    pkg

    the enclosing package definition.

    pos

    the completion position.

    editRange

    the range to replace in the completion.

  5. case class InterpolatorScope(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_.

  6. case class InterpolatorType(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.

  7. case class MatchKeyword(prefix: MetalsGlobal.Type, editRange: org.eclipse.lsp4j.Range, pos: MetalsGlobal.Position, text: String) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    A match keyword completion to generate an exhaustive pattern match for sealed types.

    A match keyword completion to generate an exhaustive pattern match for sealed types.

    prefix

    the type of the qualifier being matched.

  8. case class Override(name: MetalsGlobal.Name, t: MetalsGlobal.Template, pos: MetalsGlobal.Position, text: String, start: Int, isCandidate: (MetalsGlobal.Symbol) ⇒ Boolean) extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    An override def completion to implement methods from the supertype.

    An override def completion to implement methods from the supertype.

    name

    the name of the method being completed including the _CURSOR_ suffix.

    t

    the enclosing template for the class/object/trait we are implementing.

    pos

    the position of the completion request, points to _CURSOR_.

    text

    the text of the original source code without _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. object New extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    A completion inside a new expression, example new Array@@

  5. object None extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink
  6. object Type extends MetalsGlobal.CompletionPosition with Product with Serializable

    Permalink

    A completion inside a type position, example val x: Map[Int, Strin@@]

  7. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hasLeadingBrace(ident: MetalsGlobal.Ident, text: String): Boolean

    Permalink

    Returns true if the identifier comes after an opening brace character '{'

  14. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def toCaseMember(name: String, sym: MetalsGlobal.Symbol, fsym: MetalsGlobal.Symbol, context: MetalsGlobal.Context, editRange: org.eclipse.lsp4j.Range, autoImports: List[TextEdit], isSnippet: Boolean = true): MetalsGlobal.TextEditMember

    Permalink
  21. def toString(): String

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped