Skip to content

Commit

Permalink
Merge pull request #5 from lorchrob/responsive-simulate
Browse files Browse the repository at this point in the history
Use version of simulation that processes program as string rather than filename
  • Loading branch information
daniel-larraz authored May 22, 2024
2 parents ec148dc + 056abf3 commit bce641a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

dependencies {
implementation 'edu.uiowa.cs.clc:kind2-java-api:0.3.8'
implementation 'edu.uiowa.cs.clc:kind2-java-api:0.3.9'
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.13.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/edu/uiowa/kind2/lsp/Kind2LanguageServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,12 @@ public CompletableFuture<String> interpret(String uri, String main,
return CompletableFuture.supplyAsync(() -> {
try {
Kind2Api api = getPresetKind2Api();
return api.interpret(new URI(uri), main, json);
api.includeDir(Paths.get(new URI(uri)).getParent().toString());
String filepath = computeRelativeFilepath(workingDirectory, uri);
api.setFakeFilepath(filepath);
return api.interpret(getText(uri), main, json);
} catch (URISyntaxException | InterruptedException
| ExecutionException e) {
| ExecutionException | IOException e) {
throw new ResponseErrorException(new ResponseError(
ResponseErrorCode.InternalError, e.getMessage(), e));
}
Expand Down

0 comments on commit bce641a

Please sign in to comment.