Skip to content

Commit

Permalink
Deriving severity from e.getSeverity()
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Bläsing <mblaesing@doppel-helix.eu>
  • Loading branch information
jtulach and matthiasblaesing authored Jul 24, 2024
1 parent cba6ef2 commit 9ba53da
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,17 @@ private void computeHints(final ErrorProvider.Kind type, ErrorProvider p, final
List<? extends Diagnostic> errors = p.computeErrors(errorCtx);
if (errors != null) {
for (Diagnostic e : errors) {
final Severity s = Severity.ERROR;
final Severity s;
switch(e.getSeverity()) {
case Error:
s = Severity.ERROR; break;
case Warning:
s = Severity.WARNING; break;
case Information:
case Hint:
default:
s = Severity.HINT; break;
}
ErrorDescription descr = ErrorDescriptionFactory.createErrorDescription(s,
e.getDescription(),
file,
Expand Down

0 comments on commit 9ba53da

Please sign in to comment.