implements PLN-0131
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 62.22% (17996/28921) * Branch Coverage: 52.87% (6986/13213) * Lines of Code: 28921 * Cyclomatic Complexity: 11624 #### Quality Gates Summary Output truncated.
Test / Build skipped: 15, passed: 659
Intrepid/Prometeu/Studio/pipeline/head This commit looks good

Add PBS go-to-definition as hover editorial lookup plus physical
declaration locations on FrontendLanguageService. Empty results stay
honest when the target is not a regular file, including virtual stdlib
paths.

Housekeep DSC-0039 with LSN-0068.
This commit is contained in:
2026-09-21 07:50:14 +01:00
parent 9896e7c657
commit c2112f6ee1
24 changed files with 885 additions and 81 deletions
@@ -0,0 +1,20 @@
package p.studio.compiler.services;
import java.nio.file.Path;
import java.util.Objects;
public record FrontendDefinitionLocation(
Path path,
int startOffset,
int endOffset) {
public FrontendDefinitionLocation {
path = Objects.requireNonNull(path, "path").toAbsolutePath().normalize();
if (startOffset < 0) {
throw new IllegalArgumentException("startOffset must not be negative");
}
if (endOffset < startOffset) {
throw new IllegalArgumentException("endOffset must not be before startOffset");
}
}
}
@@ -3,5 +3,13 @@ package p.studio.compiler.services;
public record FrontendEditorialContext(
Object syntaxTree,
Object supplementalDeclarations,
Object semanticContext) {
Object semanticContext,
Object sourceFiles) {
public FrontendEditorialContext(
final Object syntaxTree,
final Object supplementalDeclarations,
final Object semanticContext) {
this(syntaxTree, supplementalDeclarations, semanticContext, null);
}
}
@@ -59,4 +59,17 @@ public interface FrontendLanguageService {
final int offset) {
return signatureHelp(request, offset);
}
default List<FrontendDefinitionLocation> definition(
final FrontendDocumentRequest request,
final int offset) {
return List.of();
}
default List<FrontendDefinitionLocation> definition(
final FrontendDocumentRequest request,
final FrontendEditorialContext editorialContext,
final int offset) {
return definition(request, offset);
}
}