implements PLN-0027 frontend semantic presentation contract and lsp descriptor
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
package p.studio.lsp.dtos;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspSemanticPresentationDTO(
|
||||
List<String> semanticKeys,
|
||||
List<String> resources) {
|
||||
|
||||
public LspSemanticPresentationDTO {
|
||||
semanticKeys = List.copyOf(Objects.requireNonNull(semanticKeys, "semanticKeys"));
|
||||
resources = List.copyOf(Objects.requireNonNull(resources, "resources"));
|
||||
}
|
||||
}
|
||||
+3
@@ -2,6 +2,7 @@ package p.studio.lsp.messages;
|
||||
|
||||
import p.studio.lsp.dtos.LspDiagnosticDTO;
|
||||
import p.studio.lsp.dtos.LspHighlightSpanDTO;
|
||||
import p.studio.lsp.dtos.LspSemanticPresentationDTO;
|
||||
import p.studio.lsp.dtos.LspSessionStateDTO;
|
||||
import p.studio.lsp.dtos.LspSymbolDTO;
|
||||
|
||||
@@ -10,6 +11,7 @@ import java.util.Objects;
|
||||
|
||||
public record LspAnalyzeDocumentResult(
|
||||
LspSessionStateDTO sessionState,
|
||||
LspSemanticPresentationDTO semanticPresentation,
|
||||
List<LspDiagnosticDTO> diagnostics,
|
||||
List<LspHighlightSpanDTO> semanticHighlights,
|
||||
List<LspSymbolDTO> documentSymbols,
|
||||
@@ -17,6 +19,7 @@ public record LspAnalyzeDocumentResult(
|
||||
|
||||
public LspAnalyzeDocumentResult {
|
||||
Objects.requireNonNull(sessionState, "sessionState");
|
||||
Objects.requireNonNull(semanticPresentation, "semanticPresentation");
|
||||
diagnostics = List.copyOf(Objects.requireNonNull(diagnostics, "diagnostics"));
|
||||
semanticHighlights = List.copyOf(Objects.requireNonNull(semanticHighlights, "semanticHighlights"));
|
||||
documentSymbols = List.copyOf(Objects.requireNonNull(documentSymbols, "documentSymbols"));
|
||||
|
||||
Reference in New Issue
Block a user