t

scala.meta.metals.search

SymbolIndexer

trait SymbolIndexer extends AnyRef

A key/value store with String keys (by symbol syntax) and SymbolData as values.

A good implementation of this trait should be: - Fast: lookups should be instant to be useful from the editor. - Compact: memory footprint should be small to fit in-memory even for large corpora (>millions of loc) on commodity hardware (dev laptop). - Incremental: can register references to a symbol without the symbol's definition, and vice-versa. - Parallel: all updates are thread safe. - Persistable: it's possible to dump this index to file, and load up later. (TODO(olafur) not yet implemented) All of these features may not be fully implemented yet, but the plan is to reach there eventually.

It's possible to rebuild a scala.meta.Database from a SymbolIndexer with InverseSymbolIndexer.

Self Type
SymbolIndexer
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SymbolIndexer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addDefinition(symbol: String, position: index.Position): Unit

    Register the definition of a symbol at a given position.

    Register the definition of a symbol at a given position.

    Overrides existing registered definition.

  2. abstract def addDenotation(symbol: String, flags: Long, name: String, signature: String): Unit

    Register metadata about a symbol.

    Register metadata about a symbol.

    flags

    the modifiers of this symbol, see org.langmeta.semanticdb.HasFlags

    name

    the name of the symbol, example "get" for scala.Option.get

    signature

    the type signature of this symbol, example "List[T]" for List.tail

  3. abstract def addReference(filename: String, range: index.Range, symbol: String): Unit

    Reguster a reference/call-site to this symbol.

    Reguster a reference/call-site to this symbol.

    filename

    must be URI, can either be file on local disk or entry in jar/zip.

    range

    start/end offset where this symbol is referenced.

  4. abstract def allSymbols: Traversable[SymbolData]

    Iterator for all indexed symbols

  5. abstract def get(symbol: String): Option[SymbolData]

    Lookup symbol by its syntax.

  6. abstract def get(symbol: org.langmeta.semanticdb.Symbol): Option[SymbolData]

    Lookup scala.meta.Symbol

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. def unapply(arg: Any): Option[SymbolData]

    Lookup symbol from inside a pattern match

  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped