Skip to content

Commit

Permalink
Post-merge fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlahoda committed Dec 28, 2024
1 parent 324336a commit 65445e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=b24ae66c
build.xml.data.CRC32=23eb7847
build.xml.script.CRC32=c719fe4b
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b24ae66c
nbproject/build-impl.xml.data.CRC32=23eb7847
nbproject/build-impl.xml.script.CRC32=6193aafa
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,15 @@ public void notifyProgress(ProgressParams params) {

@Override
public void publishDiagnostics(PublishDiagnosticsParams pdp) {
try {
FileObject file = Utils.fromURI(bindings, pdp.getUri());
EditorCookie ec = file != null ? file.getLookup().lookup(EditorCookie.class) : null;
Document doc = ec != null ? ec.getDocument() : null;
if (doc == null) {
return ; //ignore...
}
assert file != null;
List<ErrorDescription> diags = pdp.getDiagnostics().stream().map(d -> {
LazyFixList fixList = allowCodeActions ? new DiagnosticFixList(doc, pdp.getUri(), d) : ErrorDescriptionFactory.lazyListForFixes(Collections.emptyList());
return ErrorDescriptionFactory.createErrorDescription(severityMap.get(d.getSeverity()), d.getMessage(), fixList, file, Utils.getOffset(doc, d.getRange().getStart()), Utils.getOffset(doc, d.getRange().getEnd()));
}).collect(Collectors.toList());
HintsController.setErrors(doc, LanguageClientImpl.class.getName(), diags);
} catch (URISyntaxException | MalformedURLException ex) {
LOG.log(Level.FINE, null, ex);
FileObject file = Utils.fromURI(bindings, pdp.getUri());
EditorCookie ec = file != null ? file.getLookup().lookup(EditorCookie.class) : null;
Document doc = ec != null ? ec.getDocument() : null;
if (doc == null) {
return ; //ignore...
}
assert file != null;
List<ErrorDescription> diags = pdp.getDiagnostics().stream().map(d -> {
LazyFixList fixList = allowCodeActions ? new DiagnosticFixList(pdp.getUri(), d) : ErrorDescriptionFactory.lazyListForFixes(Collections.emptyList());
LazyFixList fixList = allowCodeActions ? new DiagnosticFixList(doc, pdp.getUri(), d) : ErrorDescriptionFactory.lazyListForFixes(Collections.emptyList());
return ErrorDescriptionFactory.createErrorDescription(severityMap.get(d.getSeverity()), d.getMessage(), fixList, file, Utils.getOffset(doc, d.getRange().getStart()), Utils.getOffset(doc, d.getRange().getEnd()));
}).collect(Collectors.toList());
HintsController.setErrors(doc, LanguageClientImpl.class.getName(), diags);
Expand Down

0 comments on commit 65445e2

Please sign in to comment.