summaryrefslogtreecommitdiff
path: root/Source/DafnyExtension/ProgressMargin.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-07-10 11:45:08 +0200
committerGravatar wuestholz <unknown>2014-07-10 11:45:08 +0200
commit6f6f12d43ad31b5ae8a3279e413164885206ec8c (patch)
treee5b072833636916c0d98358ed06b9a80c387acd2 /Source/DafnyExtension/ProgressMargin.cs
parentfcbf0190bcee4b0f704d4c1bc646acefaaed492c (diff)
Worked on the more advanced verification result caching.
Diffstat (limited to 'Source/DafnyExtension/ProgressMargin.cs')
-rw-r--r--Source/DafnyExtension/ProgressMargin.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/DafnyExtension/ProgressMargin.cs b/Source/DafnyExtension/ProgressMargin.cs
index 360ee209..c345257e 100644
--- a/Source/DafnyExtension/ProgressMargin.cs
+++ b/Source/DafnyExtension/ProgressMargin.cs
@@ -341,13 +341,21 @@ namespace DafnyLanguage
{
errorInfo.BoogieErrorCode = null;
var recycled = errorInfo.OriginalRequestId != requestId ? " (recycled)" : "";
- if (errorInfo.OriginalRequestId != null && RequestIdToSnapshot.ContainsKey(errorInfo.OriginalRequestId))
+ ITextSnapshot s = null;
+ if (errorInfo.OriginalRequestId != null)
{
- var s = RequestIdToSnapshot[errorInfo.OriginalRequestId];
- errorListHolder.AddError(new DafnyError(errorInfo.Tok.filename, errorInfo.Tok.line - 1, errorInfo.Tok.col - 1, ErrorCategory.VerificationError, errorInfo.FullMsg + recycled, s, errorInfo.Model.ToString(), System.IO.Path.GetFullPath(_document.FilePath) == errorInfo.Tok.filename), errorInfo.ImplementationName, errorInfo.OriginalRequestId);
+ RequestIdToSnapshot.TryGetValue(errorInfo.OriginalRequestId, out s);
+ }
+ if (s == null && errorInfo.RequestId != null)
+ {
+ RequestIdToSnapshot.TryGetValue(errorInfo.RequestId, out s);
+ }
+ if (s != null)
+ {
+ errorListHolder.AddError(new DafnyError(errorInfo.Tok.filename, errorInfo.Tok.line - 1, errorInfo.Tok.col - 1, ErrorCategory.VerificationError, errorInfo.FullMsg + recycled, s, errorInfo.Model.ToString(), System.IO.Path.GetFullPath(_document.FilePath) == errorInfo.Tok.filename), errorInfo.ImplementationName, requestId);
foreach (var aux in errorInfo.Aux)
{
- errorListHolder.AddError(new DafnyError(aux.Tok.filename, aux.Tok.line - 1, aux.Tok.col - 1, ErrorCategory.AuxInformation, aux.FullMsg, s, null, System.IO.Path.GetFullPath(_document.FilePath) == aux.Tok.filename), errorInfo.ImplementationName, errorInfo.OriginalRequestId);
+ errorListHolder.AddError(new DafnyError(aux.Tok.filename, aux.Tok.line - 1, aux.Tok.col - 1, ErrorCategory.AuxInformation, aux.FullMsg, s, null, System.IO.Path.GetFullPath(_document.FilePath) == aux.Tok.filename), errorInfo.ImplementationName, requestId);
}
}
}