diff options
author | 2010-12-14 21:10:19 +0000 | |
---|---|---|
committer | 2010-12-14 21:10:19 +0000 | |
commit | 53e487c93f0c0bbb26ea6cabad175507021a8f8a (patch) | |
tree | ec1628129f9662d38bf851d1a7aebf5aef89dc65 /Source/ModelViewer/Main.cs | |
parent | 39f3b449d071a14286117072d3520a7233a7547f (diff) |
Support arrays and & pseudo-field
Diffstat (limited to 'Source/ModelViewer/Main.cs')
-rw-r--r-- | Source/ModelViewer/Main.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/ModelViewer/Main.cs b/Source/ModelViewer/Main.cs index 28744ac8..a226ed6c 100644 --- a/Source/ModelViewer/Main.cs +++ b/Source/ModelViewer/Main.cs @@ -541,13 +541,15 @@ namespace Microsoft.Boogie.ModelViewer AddMenuItems(NamesFor(x), t.DropDownItems, "= ", 20);
}
- var selName = langModel.CanonicalName(sel.Element);
- items.Add("Find uses...", null, (s, _) => SetSearch("use:" + selName));
-
- var aliases = NamesFor(sel.Element).Where(s => s != skel).ToArray();
- if (aliases.Length > 0) {
- items.Add("Aliases...", null, (s, _) => SetSearch("eq:" + selName));
- AddMenuItems(aliases, items, " = ", 10);
+ if (sel.Element != null) {
+ var selName = langModel.CanonicalName(sel.Element);
+ items.Add("Find uses...", null, (s, _) => SetSearch("use:" + selName));
+
+ var aliases = NamesFor(sel.Element).Where(s => s != skel).ToArray();
+ if (aliases.Length > 0) {
+ items.Add("Aliases...", null, (s, _) => SetSearch("eq:" + selName));
+ AddMenuItems(aliases, items, " = ", 10);
+ }
}
}
|