mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Most of the used conditional features (i.e. the features that require a capability check) are now implemented as dynamic features, meaning they can be registered through the `registerCapability` request while the client is running. The capability check is replaced by a feature registration check instead. GitOrigin-RevId: 0601feb9f5f14c58a8b30c66bae65940e53166c6
36 lines
1.2 KiB
Kotlin
36 lines
1.2 KiB
Kotlin
package com.jetbrains.lsp.protocol
|
|
|
|
import kotlinx.serialization.Serializable
|
|
import kotlinx.serialization.builtins.ListSerializer
|
|
import kotlinx.serialization.builtins.nullable
|
|
import kotlinx.serialization.builtins.serializer
|
|
|
|
|
|
interface ReferenceOptions : WorkDoneProgressOptions
|
|
|
|
@Serializable
|
|
data class ReferenceRegistrationOptions(
|
|
override val workDoneProgress: Boolean? = null,
|
|
override val documentSelector: DocumentSelector? = null,
|
|
) : ReferenceOptions, TextDocumentRegistrationOptions
|
|
|
|
@Serializable
|
|
data class ReferenceParams(
|
|
override val textDocument: TextDocumentIdentifier,
|
|
override val position: Position,
|
|
val context: ReferenceContext,
|
|
override val workDoneToken: ProgressToken? = null,
|
|
override val partialResultToken: ProgressToken? = null,
|
|
) : TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams
|
|
|
|
@Serializable
|
|
data class ReferenceContext(
|
|
/**
|
|
* Include the declaration of the current symbol.
|
|
*/
|
|
val includeDeclaration: Boolean,
|
|
)
|
|
|
|
val ReferenceRequestType: RequestType<ReferenceParams, List<Location>?, Unit> =
|
|
RequestType("textDocument/references", ReferenceParams.serializer(), ListSerializer(Location.serializer()).nullable, Unit.serializer())
|