dotty.tools.pc

package dotty.tools.pc

Members list

Type members

Classlikes

object AutoImports

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final class AutoImportsProvider(search: SymbolSearch, driver: InteractiveDriver, name: String, params: OffsetParams, config: PresentationCompilerConfig, buildTargetIdentifier: String)(using x$7: ReportContext)

Attributes

Supertypes
class Object
trait Matchable
class Any
class CompilerSearchVisitor(visitSymbol: Symbol => Boolean)(using ctx: Context, reports: ReportContext) extends SymbolSearchVisitor

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
trait ItemResolver
class Object
trait Matchable
class Any
Self type
final class ConvertToNamedArgumentsProvider(driver: InteractiveDriver, params: OffsetParams, argIndices: Set[Int])

Attributes

Supertypes
class Object
trait Matchable
class Any
case class DefinitionTree(tree: ValDef, pos: SourcePosition)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ExtensionParamOccurence(name: Name, pos: SourcePosition, sym: Symbol, methods: List[Tree])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class ExtractMethodProvider(range: RangeParams, extractionPos: OffsetParams, driver: InteractiveDriver, search: SymbolSearch, noIndent: Boolean)(using x$6: ReportContext) extends ExtractMethodUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
object HoverProvider

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait IndexedContext

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Empty
class LazyWrapper

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
final class InferredTypeProvider(params: OffsetParams, driver: InteractiveDriver, config: PresentationCompilerConfig, symbolSearch: SymbolSearch)(using x$5: ReportContext)

Tries to calculate edits needed to insert the inferred type annotation in all the places that it is possible such as:

Tries to calculate edits needed to insert the inferred type annotation in all the places that it is possible such as:

  • value or variable declaration
  • methods
  • pattern matches
  • for comprehensions
  • lambdas

The provider will not check if the type does not exist, since there is no way to get that data from the presentation compiler. The actual check is being done via scalameta parser in InsertInferredType code action.

Value parameters

config

presentation compielr configuration

driver

Scala 3 interactive compiler driver

params

position and actual source

Attributes

Supertypes
class Object
trait Matchable
class Any
class MetalsDriver(val settings: List[String]) extends InteractiveDriver

MetalsDriver is a wrapper class that provides a compilation cache for InteractiveDriver. MetalsDriver skips running compilation if

MetalsDriver is a wrapper class that provides a compilation cache for InteractiveDriver. MetalsDriver skips running compilation if

  • the target URI of run is the same as the previous target URI
  • the content didn't change since the last compilation.

This compilation cache enables Metals to skip compilation and re-use the typed tree under the situation like developers sequentially hover on the symbols in the same file without any changes.

Note: we decided to cache only if the target URI is the same as in the previous run because of InteractiveDriver.currentCtx that should return the context that refers to the last compiled source file. It would be ideal if we could update currentCtx even when we skip the compilation, but we struggled to do that. See the discussion https://github.com/scalameta/metals/pull/4225#discussion_r941138403 To avoid the complexity related to currentCtx, we decided to cache only when the target URI only if the same as the previous run.

Attributes

Supertypes
class InteractiveDriver
class Driver
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class Occurence(tree: Tree, parent: Option[Tree], pos: SourcePosition)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Params(labels: Seq[String], kind: Kind)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Params

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Params.type
abstract class PcCollector[T](driver: InteractiveDriver, params: VirtualFileParams)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PcCollector

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class PcDefinitionProvider(driver: InteractiveDriver, params: OffsetParams, search: SymbolSearch)

Attributes

Supertypes
class Object
trait Matchable
class Any
final class PcDocumentHighlightProvider(driver: InteractiveDriver, params: OffsetParams) extends PcCollector[DocumentHighlight]

Attributes

Supertypes
class PcCollector[DocumentHighlight]
class Object
trait Matchable
class Any
final class PcInlineValueProviderImpl(val driver: InteractiveDriver, val params: OffsetParams) extends PcCollector[Occurence], InlineValueProvider

Attributes

Supertypes
class Object
trait Matchable
class Any
final class PcRenameProvider(driver: InteractiveDriver, params: OffsetParams, name: Option[String]) extends PcCollector[TextEdit]

Attributes

Supertypes
class PcCollector[TextEdit]
class Object
trait Matchable
class Any
final class PcSemanticTokensProvider(driver: InteractiveDriver, params: VirtualFileParams)

Provides semantic tokens of file(@param params) according to the LSP specification.

Provides semantic tokens of file(@param params) according to the LSP specification.

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class CompilerAccess[StoreReporter, MetalsDriver]
class Object
trait Matchable
class Any
class Scala3CompilerWrapper(driver: MetalsDriver) extends CompilerWrapper[StoreReporter, MetalsDriver]

Attributes

Supertypes
trait CompilerWrapper[StoreReporter, MetalsDriver]
class Object
trait Matchable
class Any
case class ScalaPresentationCompiler(buildTargetIdentifier: String, classpath: Seq[Path], options: List[String], search: SymbolSearch, ec: ExecutionContextExecutor, sh: Option[ScheduledExecutorService], config: PresentationCompilerConfig, folderPath: Option[Path], reportsLevel: ReportLevel) extends PresentationCompiler

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class SelectionRangeProvider(driver: InteractiveDriver, params: List[OffsetParams])

Provides the functionality necessary for the textDocument/selectionRange request.

Provides the functionality necessary for the textDocument/selectionRange request.

Value parameters

compiler

Metals Global presentation compiler wrapper.

params

offset params converted from the selectionRange params.

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class SemanticdbTextDocumentProvider(driver: InteractiveDriver, workspace: Option[Path]) extends WorksheetSemanticdbProvider

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object TastyUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
TastyUtils.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes