Skip to content

Commit

Permalink
fix: Java file diagnostics is not refreshed when properties file is
Browse files Browse the repository at this point in the history
saved

Fixes #860

Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr committed Sep 8, 2023
1 parent 5d3b511 commit 01f8e19
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ public List<MarkupContent> getMarkupContents(PsiElement element, @Nullable PsiEl
// (LSP textDocument/completion request)
return ((LSPPsiElementForLookupItem) element).getDocumentation();
}
if (originalElement == null || !Objects.equals(element.getContainingFile(), originalElement.getContainingFile())) {
return null;
}
Editor editor = LSPIJUtils.editorForElement(element);

Editor editor = LSPIJUtils.editorForElement(originalElement);
if (editor == null) {
return null;
}
Expand All @@ -111,7 +109,7 @@ public List<MarkupContent> getMarkupContents(PsiElement element, @Nullable PsiEl
VirtualFile file = originalElement.getContainingFile().getVirtualFile();
if (LSPVirtualFileWrapper.hasWrapper(file)) {
int targetOffset = getTargetOffset(originalElement);
return LSPVirtualFileWrapper.getLSPVirtualFileWrapper(file).getHoverContent(element, targetOffset, editor);
return LSPVirtualFileWrapper.getLSPVirtualFileWrapper(file).getHoverContent(originalElement, targetOffset, editor);
}
return null;
}
Expand Down
Loading

0 comments on commit 01f8e19

Please sign in to comment.