implements PLN-0063
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspAnalyzeDocumentRequest(
|
||||
Path documentPath) {
|
||||
|
||||
public LspAnalyzeDocumentRequest {
|
||||
documentPath = Objects.requireNonNull(documentPath, "documentPath").toAbsolutePath().normalize();
|
||||
}
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import p.studio.lsp.dtos.LspDiagnosticDTO;
|
||||
import p.studio.lsp.dtos.LspHighlightSpanDTO;
|
||||
import p.studio.lsp.dtos.LspInlineHintDTO;
|
||||
import p.studio.lsp.dtos.LspSemanticPresentationDTO;
|
||||
import p.studio.lsp.dtos.LspSessionStateDTO;
|
||||
import p.studio.lsp.dtos.LspStructuralAnchorDTO;
|
||||
import p.studio.lsp.dtos.LspSymbolDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspAnalyzeDocumentResult(
|
||||
LspSessionStateDTO sessionState,
|
||||
LspSemanticPresentationDTO semanticPresentation,
|
||||
List<LspDiagnosticDTO> diagnostics,
|
||||
List<LspHighlightSpanDTO> semanticHighlights,
|
||||
List<LspInlineHintDTO> inlineHints,
|
||||
List<LspSymbolDTO> documentSymbols,
|
||||
List<LspStructuralAnchorDTO> structuralAnchors,
|
||||
List<LspSymbolDTO> workspaceSymbols) {
|
||||
|
||||
public LspAnalyzeDocumentResult {
|
||||
Objects.requireNonNull(sessionState, "sessionState");
|
||||
Objects.requireNonNull(semanticPresentation, "semanticPresentation");
|
||||
diagnostics = List.copyOf(Objects.requireNonNull(diagnostics, "diagnostics"));
|
||||
semanticHighlights = List.copyOf(Objects.requireNonNull(semanticHighlights, "semanticHighlights"));
|
||||
inlineHints = List.copyOf(Objects.requireNonNull(inlineHints, "inlineHints"));
|
||||
documentSymbols = List.copyOf(Objects.requireNonNull(documentSymbols, "documentSymbols"));
|
||||
structuralAnchors = List.copyOf(Objects.requireNonNull(structuralAnchors, "structuralAnchors"));
|
||||
workspaceSymbols = List.copyOf(Objects.requireNonNull(workspaceSymbols, "workspaceSymbols"));
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspDefinitionRequest(
|
||||
Path documentPath,
|
||||
int offset) {
|
||||
|
||||
public LspDefinitionRequest {
|
||||
documentPath = Objects.requireNonNull(documentPath, "documentPath").toAbsolutePath().normalize();
|
||||
offset = Math.max(0, offset);
|
||||
}
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import p.studio.lsp.dtos.LspDefinitionTargetDTO;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspDefinitionResult(
|
||||
Path documentPath,
|
||||
int offset,
|
||||
List<LspDefinitionTargetDTO> targets) {
|
||||
|
||||
public LspDefinitionResult {
|
||||
documentPath = Objects.requireNonNull(documentPath, "documentPath").toAbsolutePath().normalize();
|
||||
offset = Math.max(0, offset);
|
||||
targets = List.copyOf(Objects.requireNonNull(targets, "targets"));
|
||||
}
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
public enum LspDiagnosticSeverity {
|
||||
ERROR,
|
||||
WARNING
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public record LspProjectContext(
|
||||
String projectName,
|
||||
String languageId,
|
||||
Path rootPath) {
|
||||
|
||||
public LspProjectContext {
|
||||
Objects.requireNonNull(projectName, "projectName");
|
||||
Objects.requireNonNull(languageId, "languageId");
|
||||
rootPath = Objects.requireNonNull(rootPath, "rootPath").toAbsolutePath().normalize();
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
public enum LspSymbolKind {
|
||||
FUNCTION,
|
||||
METHOD,
|
||||
CONSTRUCTOR,
|
||||
IF,
|
||||
SWITCH,
|
||||
FOR,
|
||||
WHILE,
|
||||
HANDLE,
|
||||
GLOBAL,
|
||||
CONST,
|
||||
STRUCT,
|
||||
CONTRACT,
|
||||
HOST,
|
||||
BUILTIN_TYPE,
|
||||
SERVICE,
|
||||
ERROR,
|
||||
ENUM,
|
||||
CALLBACK,
|
||||
IMPLEMENTS,
|
||||
UNKNOWN
|
||||
}
|
||||
Reference in New Issue
Block a user