final class DefinitionProvider extends AnyRef
Implements goto definition that works even in code that doesn't parse.
Uses token edit-distance to align identifiers in the current open buffer with symbol occurrences from the latest SemanticDB snapshot.
The implementation logic for converting positions between the latest SemanticDB snapshot and current open buffer is quite hairy. We need to convert positions in both the "source" (where definition request is made) and the "destination" (location of the symbol definition). This requires using token edit distance twice:
- source: dirty buffer -> snapshot - destination: snapshot -> dirty buffer
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DefinitionProvider
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new DefinitionProvider(workspace: io.AbsolutePath, mtags: Mtags, buffers: Buffers, index: GlobalSymbolIndex, semanticdbs: Semanticdbs, warnings: Warnings, compilers: () ⇒ Compilers, remote: RemoteLanguageServer)(implicit ec: ExecutionContext)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def definition(path: io.AbsolutePath, params: TextDocumentPositionParams, token: CancelToken): Future[DefinitionResult]
-
def
definitionPathInputFromSymbol(sym: String): Option[VirtualFile]
Returns VirtualFile that contains the definition of the given symbol (of semanticdb).
- val destinationProvider: DestinationProvider
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def fromSymbol(sym: String): java.util.List[Location]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def positionOccurrence(source: io.AbsolutePath, dirtyPosition: org.eclipse.lsp4j.Position, snapshot: TextDocument): ResolvedSymbolOccurrence
- def symbolOccurrence(source: io.AbsolutePath, dirtyPosition: org.eclipse.lsp4j.Position): Option[(SymbolOccurrence, TextDocument)]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()