AutoImportsGenerator

dotty.tools.pc.AutoImports.AutoImportsGenerator
class AutoImportsGenerator(val pos: SourcePosition, importPosition: AutoImportPosition, indexedContext: IndexedContext, renames: Symbol => Option[String])

AutoImportsGenerator generates TextEdits of auto-imports for the given symbols.

Value parameters

importPosition

A position to insert new imports

indexedContext

A context of the position where the autoImport is invoked

pos

A source position where the autoImport is invoked

renames

A function that returns the name of the given symbol which is renamed on import statement.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def editsForSymbol(symbol: Symbol): Option[AutoImportEdits]

Value parameters

symbol

A missing symbol to auto-import

Attributes

def forSymbol(symbol: Symbol): Option[List[TextEdit]]
def inferSymbolImport(symbol: Symbol): SymbolImport
def renderImports(imports: List[ImportSel])(using Context): Option[TextEdit]

Concrete fields

val pos: SourcePosition