diff options
author | 2010-11-03 02:11:29 +0000 | |
---|---|---|
committer | 2010-11-03 02:11:29 +0000 | |
commit | 70ce39a7b9ecec3232841e9689f7d5622a9c13f1 (patch) | |
tree | 26caf38391b074654101a59396b65d9184f59062 /Source/ModelViewer/Main.cs | |
parent | 930c874ea09664128d62adda16d0200d930b49cc (diff) |
Rework canonical name computation
Sort fields inteligently (allow for override as well)
Diffstat (limited to 'Source/ModelViewer/Main.cs')
-rw-r--r-- | Source/ModelViewer/Main.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/ModelViewer/Main.cs b/Source/ModelViewer/Main.cs index 08869c17..64160981 100644 --- a/Source/ModelViewer/Main.cs +++ b/Source/ModelViewer/Main.cs @@ -19,6 +19,7 @@ namespace Microsoft.Boogie.ModelViewer SkeletonItem unfoldingRoot;
int currentState;
IState[] states;
+ internal ILanguageProvider langProvider;
// TODO this should be dynamically loaded
IEnumerable<ILanguageProvider> Providers()
@@ -56,16 +57,18 @@ namespace Microsoft.Boogie.ModelViewer m = models[0];
}
- ILanguageProvider prov = null;
+ this.Text = Path.GetFileName(filename) + " - Boogie Model Viewer";
+
+ langProvider = null;
foreach (var p in Providers()) {
if (p.IsMyModel(m)) {
- prov = p;
+ langProvider = p;
break;
}
}
var items = new List<ListViewItem>();
- states = prov.GetStates(m).ToArray();
+ states = langProvider.GetStates(m).ToArray();
unfoldingRoot = new SkeletonItem(this, states.Length);
unfoldingRoot.PopulateRoot(states);
@@ -303,8 +306,9 @@ namespace Microsoft.Boogie.ModelViewer }
this.SubItems[0].Text = dispNode.Name.ShortName();
- this.SubItems[1].Text = dispNode.CanonicalValue;
- this.SubItems[2].Text = aliases;
+ this.SubItems[1].Text = active ? dispNode.CanonicalValue : "";
+ this.SubItems[2].Text = active ? aliases : "";
+
}
internal DisplayItem()
|