diff options
author | MichalMoskal <unknown> | 2011-01-26 02:22:07 +0000 |
---|---|---|
committer | MichalMoskal <unknown> | 2011-01-26 02:22:07 +0000 |
commit | d10092583e4f3ee31772300ca097a616ca2713a2 (patch) | |
tree | de5015aa4b934b38e12101873f2a9ca0101832ee /Source/ModelViewer/BaseProvider.cs | |
parent | d50a591fabea54378ae073b705869c05ccfc5f61 (diff) |
Right-clicking on a state allows to display the source code for it
Diffstat (limited to 'Source/ModelViewer/BaseProvider.cs')
-rw-r--r-- | Source/ModelViewer/BaseProvider.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/ModelViewer/BaseProvider.cs b/Source/ModelViewer/BaseProvider.cs index 80d2e3c9..7f8e4ae2 100644 --- a/Source/ModelViewer/BaseProvider.cs +++ b/Source/ModelViewer/BaseProvider.cs @@ -23,13 +23,11 @@ namespace Microsoft.Boogie.ModelViewer.Base public class GenericModel : LanguageModel
{
- internal Model m;
List<BaseState> states = new List<BaseState>();
public GenericModel(Model m, ViewOptions opts)
- : base(opts)
+ : base(m, opts)
{
- this.m = m;
foreach (var s in m.States)
states.Add(new BaseState(this, s) { Name = s.Name });
foreach (var s in states)
@@ -69,8 +67,13 @@ namespace Microsoft.Boogie.ModelViewer.Base }
}
- nodes.Add(new ContainerNode<Model.Func>("[Functions]", f => f.Arity == 0 ? null : Function(f), m.m.Functions));
- nodes.Add(new ContainerNode<Model.Func>("[Constants]", f => f.Arity != 0 ? null : new AppNode(this, f.Apps.First()), m.m.Functions));
+ nodes.Add(new ContainerNode<Model.Func>("[Functions]", f => f.Arity == 0 ? null : Function(f), m.model.Functions));
+ nodes.Add(new ContainerNode<Model.Func>("[Constants]", f => f.Arity != 0 ? null : new AppNode(this, f.Apps.First()), m.model.Functions));
+ }
+
+ public virtual SourceLocation ShowSource()
+ {
+ return null;
}
IDisplayNode Function(Model.Func f)
|