Property constraint violations in concourse editor are warnings.

This commit is contained in:
Kris De Volder
2017-03-01 16:49:18 -08:00
parent f2486c1a8b
commit 3267d1de7c
6 changed files with 88 additions and 23 deletions

View File

@@ -193,20 +193,6 @@ public abstract class SimpleLanguageServer implements LanguageServer, LanguageCl
LOG.log(Level.WARNING, "Invalid reconcile problem ignored", e);
}
}
private DiagnosticSeverity getDiagnosticSeverity(ReconcileProblem problem) {
ProblemSeverity severity = problem.getType().getDefaultSeverity();
switch (severity) {
case ERROR:
return DiagnosticSeverity.Error;
case WARNING:
return DiagnosticSeverity.Warning;
case IGNORE:
return null;
default:
throw new IllegalStateException("Bug! Missing switch case?");
}
}
};
// Avoid running in the same thread as lsp4j as it can result
@@ -221,6 +207,20 @@ public abstract class SimpleLanguageServer implements LanguageServer, LanguageCl
.subscribe();
}
protected DiagnosticSeverity getDiagnosticSeverity(ReconcileProblem problem) {
ProblemSeverity severity = problem.getType().getDefaultSeverity();
switch (severity) {
case ERROR:
return DiagnosticSeverity.Error;
case WARNING:
return DiagnosticSeverity.Warning;
case IGNORE:
return null;
default:
throw new IllegalStateException("Bug! Missing switch case?");
}
}
public void waitForReconcile() throws Exception {
while (!this.busyReconcile.isDone()) {
this.busyReconcile.get();