Dotty Documentation

0.12.0-bin-SNAPSHOT

object Completion
extends Object

[-] Constructors

[-] Members

[+] private class CompletionBuffer
[+] private final class Mode

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

[+] private object Mode
[+] private class RenameAwareScope

A scope that tracks renames of the entered symbols. Useful for providing completions for renamed symbols in the REPL and the IDE.

[+] private def completionBuffer ( path: List [ Tree ] , pos: SourcePosition ) : CompletionBuffer

Create a new CompletionBuffer for completing at pos.

[+] private def completionMode ( path: List [ Tree ] , pos: SourcePosition ) : Mode

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.

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

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

[+] private def completionPrefix ( path: List [ Tree ] , pos: SourcePosition ) : String

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

[+] def completions ( pos: SourcePosition ) ( implicit ctx: Context ) : ( Int, List [ Completion ] )

Get possible completions from tree at pos

[+] private def computeCompletions ( pos: SourcePosition , path: List [ Tree ] ) ( implicit ctx: Context ) : ( Int, List [ Completion ] )