implements PLN-0023

This commit is contained in:
2026-03-31 16:57:31 +01:00
parent 53552ca012
commit 8dd3b58f39
24 changed files with 297 additions and 9 deletions
@@ -0,0 +1,20 @@
package p.lsp.v1;
import p.lsp.PrometeuLspProjectContext;
import p.lsp.PrometeuLspService;
import p.lsp.PrometeuLspServiceFactory;
import p.lsp.v1.internal.PrometeuLspV1Service;
import p.studio.vfs.ProjectDocumentVfs;
import java.util.Objects;
public final class PrometeuLspV1ServiceFactory implements PrometeuLspServiceFactory {
@Override
public PrometeuLspService open(
final PrometeuLspProjectContext projectContext,
final ProjectDocumentVfs projectDocumentVfs) {
return new PrometeuLspV1Service(
Objects.requireNonNull(projectContext, "projectContext"),
Objects.requireNonNull(projectDocumentVfs, "projectDocumentVfs"));
}
}
@@ -0,0 +1,38 @@
package p.lsp.v1.internal;
import p.lsp.PrometeuLspProjectContext;
import p.lsp.PrometeuLspService;
import p.lsp.dtos.PrometeuLspSessionStateDTO;
import p.studio.vfs.ProjectDocumentVfs;
import java.util.List;
import java.util.Objects;
public final class PrometeuLspV1Service implements PrometeuLspService {
private final PrometeuLspProjectContext projectContext;
private final ProjectDocumentVfs projectDocumentVfs;
public PrometeuLspV1Service(
final PrometeuLspProjectContext projectContext,
final ProjectDocumentVfs projectDocumentVfs) {
this.projectContext = Objects.requireNonNull(projectContext, "projectContext");
this.projectDocumentVfs = Objects.requireNonNull(projectDocumentVfs, "projectDocumentVfs");
}
@Override
public PrometeuLspProjectContext projectContext() {
return projectContext;
}
@Override
public ProjectDocumentVfs projectDocumentVfs() {
return projectDocumentVfs;
}
@Override
public PrometeuLspSessionStateDTO snapshot() {
return new PrometeuLspSessionStateDTO(
true,
List.of("diagnostics", "symbols", "definition", "highlight"));
}
}