Package

scala.meta.internal

metals

Permalink

package metals

Visibility
  1. Public
  2. All

Type Members

  1. case class Classfile(pkg: String, filename: String) extends Product with Serializable

    Permalink
  2. class ClassfileComparator extends Comparator[Classfile]

    Permalink
  3. case class ClassfileElementPart(name: String) extends ClasspathElementPart with Product with Serializable

    Permalink
  4. sealed abstract class ClasspathElementPart extends AnyRef

    Permalink
  5. class ClasspathSearch extends AnyRef

    Permalink
  6. case class CompilerOffsetParams(uri: URI, text: String, offset: Int, token: CancelToken = EmptyCancelToken) extends OffsetParams with Product with Serializable

    Permalink
  7. case class CompilerVirtualFileParams(uri: URI, text: String, token: CancelToken = EmptyCancelToken) extends VirtualFileParams with Product with Serializable

    Permalink
  8. case class CompressedPackageIndex(packages: Array[String], bloom: StringBloomFilter, memberBytes: Array[Byte]) extends Product with Serializable

    Permalink

    The memory-compressed version of PackageIndex.

    The memory-compressed version of PackageIndex.

    packages

    all packages in the index

    bloom

    the fuzzy search bloom filter for all members of this package.

    memberBytes

    the GZIP compressed bytes representing Array[String] for all members of this package. The members are compressed because the strings consume a lot of memory and most queries only require looking at a few packages. We decompress the members only when a search query matches the bloom filter for this package.

  9. class ConcatSequence extends CharSequence

    Permalink

    A CharSequence which is the concatenation of two strings.

    A CharSequence which is the concatenation of two strings.

    This class is the equivalent of doing string1 + string2 but in constant time and with no copying.

  10. class Docstrings extends AnyRef

    Permalink

    Implementation of the documentation(symbol: String): Option[SymbolDocumentation] method in SymbolSearch.

    Implementation of the documentation(symbol: String): Option[SymbolDocumentation] method in SymbolSearch.

    Handles both javadoc and scaladoc.

  11. class DocumentSymbolProvider extends AnyRef

    Permalink

    Retrieves all the symbols defined in a document

    Retrieves all the symbols defined in a document

    If the document doesn't parse, we fall back to the latest known snapshot of the document, if present.

  12. sealed trait EmptyResult extends AnyRef

    Permalink
  13. case class ExactCharSequence(value: CharSequence) extends CharSequence with Product with Serializable

    Permalink

    A char sequence that represents an exact symbol search.

    A char sequence that represents an exact symbol search.

    For example, ExactSymbolSearch("S") is added to a bloom filter to indicate a souce file has a symbol with the exact name "S".

  14. final class FoldingRangeExtractor extends AnyRef

    Permalink
  15. final class FoldingRangeProvider extends AnyRef

    Permalink
  16. final class FoldingRanges extends AnyRef

    Permalink
  17. class Fuzzy extends AnyRef

    Permalink
  18. class JavadocIndexer extends JavaMtags

    Permalink

    Extracts Javadoc from Java source code.

  19. class MatchingToken extends AnyRef

    Permalink

    A pair of tokens that align with each other across two different files

  20. case class MetalsSymbolDocumentation(symbol: String, displayName: String, docstring: String, defaultValue: String = "", typeParameters: java.util.List[SymbolDocumentation] = Nil.asJava, parameters: java.util.List[SymbolDocumentation] = Nil.asJava) extends SymbolDocumentation with Product with Serializable

    Permalink
  21. case class PackageElementPart(name: String) extends ClasspathElementPart with Product with Serializable

    Permalink
  22. class PackageIndex extends AnyRef

    Permalink

    An index to lookup classfiles contained in a given classpath.

  23. class ScaladocIndexer extends ScalaMtags

    Permalink

    Extracts Scaladoc from Scala source code.

  24. case class SemanticdbDefinition(info: SymbolInformation, occ: SymbolOccurrence, owner: String) extends Product with Serializable

    Permalink

    A definition of a global symbol produced by mtags.

  25. class StringBloomFilter extends AnyRef

    Permalink

    A wrapper around a bloom filter that is optimized for fast insertions of strings with shared prefixes.

    A wrapper around a bloom filter that is optimized for fast insertions of strings with shared prefixes.

    To index a classpath, Metals walks through all possible prefixes of a given classfile path. For example, given the string "InputStream.class" Metals builds a bloom filter containing the set of the following strings: I, In, Inp, Inpu, Input, S, St, Str, Stre, Strea and Stream.

    The naive approach to construct a bloom filter of all those prefix strings is to create a BloomFilter[CharSequence] and insert all those prefixes. This approach has sub-optimal performance because it requires a quadratic number of iterations on the characters of the classfile path.

    This class implements an optimized approach to build that bloom filter in a way that requires only a linear pass on the characters of the classfile path. The trick is to construct a BloomFilter[Long] instead of BloomFilter[CharSequence] and incrementally build the hashcode of each prefix string as we iterate over each character in the string.

    Additionally, this class exposes a mightContain(Long) method that speeds up search queries by allowing the client to pre-compute the hash of the query string and re-use mightContain calls to multiple bloom filters. For every single fuzzy symbol search (which happens on every single scope completion request) we usually perform several thousand bloom filter mightContain calls so should also help avoid a non-trivial amount of unnecessary hashing.

  26. final class TokenEditDistance extends AnyRef

    Permalink

    Helper to map between position between two similar strings.

  27. final class Trees extends AnyRef

    Permalink

    Manages parsing of Scala source files into Scalameta syntax trees.

    Manages parsing of Scala source files into Scalameta syntax trees.

    - provides the latest good Scalameta tree for a given source file similar as Buffers provides the current text content. - produces diagnostics for syntax errors.

  28. case class WorkspaceSymbolInformation(symbol: String, sematicdbKind: Kind, range: org.eclipse.lsp4j.Range) extends Product with Serializable

    Permalink
  29. case class WorkspaceSymbolQuery(query: String, alternatives: Array[AlternativeQuery], isTrailingDot: Boolean, isClasspath: Boolean = true) extends Product with Serializable

    Permalink

    A query for workspace/symbol.

    A query for workspace/symbol.

    query

    the user query itself.

    alternatives

    all query alternatives for this query. For non-lowercase queries this list has always length 1 but for all-lowercase queries we have combinations of query with guesses for which characters in the query should be capitalized.

  30. class ZeroCopySubSequence extends CharSequence

    Permalink

Value Members

  1. object BinarySearch

    Permalink
  2. object BloomFilters

    Permalink
  3. object ClassFinder

    Permalink
  4. object Classfile extends Serializable

    Permalink
  5. object ClasspathSearch

    Permalink
  6. object CompilerOffsetParams extends Serializable

    Permalink
  7. object CompressedPackageIndex extends Serializable

    Permalink
  8. object Compression

    Permalink
  9. object Docstrings

    Permalink
  10. object EmptyCancelToken extends CancelToken

    Permalink
  11. object EmptyResult

    Permalink
  12. object EmptySymbolDocumentation extends SymbolDocumentation

    Permalink

    A symbol documenation with all empty values

  13. object FoldingRangeProvider

    Permalink
  14. object Fuzzy extends Fuzzy

    Permalink

    Metals fuzzy search for strings.

    Metals fuzzy search for strings.

    Goals: - predictable, the user should understand why particular results matched a given query. When the search is too fuzzy the results become noisy and the user has little control over how to narrow the results. - fast, we perform fuzzy search on a lot of string in critical paths on ever user keystroke. We avoid allocations and backtracking when possible even if it comes at the price of less readable code.

    The following pairs of (query, symbol) match. - InStr java/io/InputFileStream# - IFS java/io/InputFileStream# - i.InStr java/io/InputFileStream# - j.i.InStr java/io/InputFileStream# - M.Entry java/util/Map#Entry# (inner classes are like packages)

    The following pairs of (query, symbol) do not match. - IpStr java/io/InputFileStream# (missing leading n before p) - instr java/io/InputFileStream# (lowercase queries are exact, WorkspaceSymbolProvider works around this limitation by guessing multiple capitalizations of all-lowercase queries) - MapEntry java/io/InputFileStream# (missing . separator after "Map") - j.InStr java/io/InputFileStream# (missing io separator, the java/ package must be direct parent)

    Glossary and conventions used in this file: - query, what the user typed to look up a symbol. - symbol, a SemanticDB Java/Scala symbol (https://scalameta.org/docs/semanticdb/specification.html) or a java.util.zip.ZipEntry name pointing to a classfile. - delimiter, one of the characters '.' or '/' or '#' that separate package/class/object/trait names in SemanticDB symbols, or '$' that separates inner classes in classfile names. - name, characters between delimiters like "io" in "java/io/InputStream". - main name, the last name in the query or symbol. For example, "Pos" is the main name in "s.m.Pos". - qa, the start index in the query string. - qb, the end index in the query string. - sa, the start index in the symbol string. - sb, the end index in the symbol string.

  15. object JavadocIndexer

    Permalink
  16. object JdkSources

    Permalink

    Locates zip file on disk that contains the source code for the JDK.

  17. object MultilineStringFormattingProvider

    Permalink
  18. object PackageIndex

    Permalink
  19. object PositionSyntax

    Permalink
  20. object RecursivelyDelete

    Permalink
  21. object ScaladocIndexer

    Permalink
  22. object SemanticdbDefinition extends Serializable

    Permalink
  23. object Testing

    Permalink
  24. object TextEdits

    Permalink

    Client implementation of how to interpret TextEdit from LSP, used for testing purposes.

  25. object TokenEditDistance

    Permalink
  26. object Trees

    Permalink
  27. object TrigramSubstrings

    Permalink
  28. object WorkspaceSymbolQuery extends Serializable

    Permalink

Ungrouped