Completer

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

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

Value Params
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

class Object
trait Matchable
class Any

Value members

Concrete methods

Completions for members of qual's type. These include inherited definitions but not members added by extensions or implicit conversions

Completions for members of qual's type. These include inherited definitions but not members added by extensions or implicit conversions

Completions for terms and types that are currently in scope: the members of the current class, local definitions and the symbols that have been imported, recursively adding completions from outer scopes. In case a name is ambiguous, no completions are returned for it. This mimics the logic for deciding what is ambiguous used by the compiler. In general in case of a name clash symbols introduced in more deeply nested scopes have higher priority and shadow previous definitions with the same name although:

Completions for terms and types that are currently in scope: the members of the current class, local definitions and the symbols that have been imported, recursively adding completions from outer scopes. In case a name is ambiguous, no completions are returned for it. This mimics the logic for deciding what is ambiguous used by the compiler. In general in case of a name clash symbols introduced in more deeply nested scopes have higher priority and shadow previous definitions with the same name although:

  • imports with the same level of nesting cause an ambiguity
  • members and local definitions with the same level of nesting are allowed for overloading
  • an import is ignored if there is a local definition or a member introduced in the same scope (even if the import follows it syntactically)
  • a more deeply nested import shadowing a member or a local definition causes an ambiguity

Completions for selections from a term. Direct members take priority over members from extensions and so do members from extensions over members from implicit conversions

Completions for selections from a term. Direct members take priority over members from extensions and so do members from extensions over members from implicit conversions

Concrete fields

val mode: Mode

Extensions

Extensions

extension (denotations: Seq[SingleDenotation])
extension (namedDenotations: Seq[(N, SingleDenotation)])
@targetName("groupByNameTupled")