Skip to content

Commit

Permalink
Fix Rewrite quick fix/assist on Win
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Aug 2, 2022
1 parent 1017555 commit 3515bca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public WorkspaceEdit createEdit(JsonElement o) {
private WorkspaceEdit applyRecipe(Recipe r, IJavaProject project, List<J.CompilationUnit> cus) {
List<Result> results = r.run(cus);
List<Either<TextDocumentEdit, ResourceOperation>> edits = results.stream().filter(res -> res.getAfter() != null).map(res -> {
URI docUri = project.getLocationUri().resolve(res.getAfter().getSourcePath().toString());
URI docUri = res.getAfter().getSourcePath().isAbsolute() ? res.getAfter().getSourcePath().toUri() : project.getLocationUri().resolve(res.getAfter().getSourcePath().toString());
TextDocument doc = documents.getLatestSnapshot(docUri.toString());
if (doc == null) {
doc = new TextDocument(docUri.toString(), LanguageId.JAVA, 0, res.getBefore() == null ? "" : res.getBefore().printAll());
Expand Down

0 comments on commit 3515bca

Please sign in to comment.