Completion

dotty.tools.dotc.interactive.Completion
See theCompletion companion class
object Completion

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Completion.type

Members list

Type members

Classlikes

class Completer(val mode: Mode, val prefix: String, pos: SourcePosition)

Computes code completions depending on the context in which completion is requested

Computes code completions depending on the context in which completion is requested

Value parameters

mode

Should complete names of terms, types or both

pos

Cursor position where completion was requested For the results of all xyzCompletions methods term names and type names are always treated as different keys in the same map and they never conflict with each other.

prefix

The prefix that all suggested completions should start with

Attributes

Supertypes
class Object
trait Matchable
class Any
final class Mode(val bits: Int) extends AnyVal

The completion mode: defines what kinds of symbols should be included in the completion results.

The completion mode: defines what kinds of symbols should be included in the completion results.

Attributes

Companion
object
Supertypes
class AnyVal
trait Matchable
class Any
object Mode

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Mode.type

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def backtickCompletions(completion: Completion, hasBackTick: Boolean): Completion

Inspect path to determine what kinds of symbols should be considered.

Inspect path to determine what kinds of symbols should be considered.

If the path starts with:

  • a RefTree, then accept symbols of the same kind as its name;
  • a renaming import, and the cursor is on the renamee, accept both terms and types;
  • an import, accept both terms and types;

Otherwise, provide no completion suggestion.

Attributes

def completionOffset(path: List[Tree]): Int

Inspect path to determine the offset where the completion result should be inserted.

Inspect path to determine the offset where the completion result should be inserted.

Attributes

Inspect path to determine the completion prefix. Only symbols whose name start with the returned prefix should be considered.

Inspect path to determine the completion prefix. Only symbols whose name start with the returned prefix should be considered.

Attributes

Get possible completions from tree at pos

Get possible completions from tree at pos

Attributes

Returns

offset and list of symbols for possible completions

Return the list of code completions with descriptions based on a mapping from names to the denotations they refer to. If several denotations share the same name, each denotation will be transformed into a separate completion item.

Return the list of code completions with descriptions based on a mapping from names to the denotations they refer to. If several denotations share the same name, each denotation will be transformed into a separate completion item.

Attributes