Esempio n. 1
0
 internal static Control CreateView(this FunctionId target, SourceView master)
 {
     var name = target.ToString();
     var result = name.CreateView();
     result.Click += (a, b) => master.SignalClickedFunction(target.Index);
     return result;
 }
Esempio n. 2
0
 protected ChildView(SourceView master, string name, string configFileName = null)
     : base(master, configFileName)
 {
     Title = name;
     Master = master;
     Frame.Activated += (a, b) => Master.SelectSource(Source);
 }
Esempio n. 3
0
 internal static Control CreateView(this CodeArgs exts, SourceView master)
     => false.CreateLineupView
         (
             exts
                 .Data
                 .Select(item => item.CreateLink(master))
                 .ToArray()
         );
Esempio n. 4
0
        internal static Control CreateTypeLineView(this Result target, SourceView master)
        {
            if(!target.HasType && !target.HasSize && !target.HasHllw)
                return null;

            return true.CreateLineupView
                (target.CreateSizeView(), target.Type.CheckedCreateView(master));
        }
Esempio n. 5
0
 public ResultCachesViewsPanel
     (IDictionary<ContextBase, ResultCache> target, SourceView master)
 {
     Target = target;
     Master = master;
     var selector = true.CreateLineupView
         (Target.Keys.Select(i => i.CreateLink(this)).ToArray());
     Client = false.CreateLineupView(selector, Target.First().CreateView(Master));
 }
Esempio n. 6
0
 internal static Control CreateClient
     (this FunctionCache<ContextBase, ResultCache> target, SourceView master)
     =>
         target.Count == 1
             ? target.First().CreateView(master)
             : new ResultCachesViewsPanel(target, master).Client;
Esempio n. 7
0
 internal static Control CreateTypeLineView(this TypeBase target, SourceView master)
     => true.CreateLineupView(target.Size.CreateView(), target.CheckedCreateView(master));
Esempio n. 8
0
 internal static Control CreateView(this object target, SourceView master)
     => target
         .ParentChain()
         .Select(item => item.CreateChildView(master))
         .CreateRowView();
Esempio n. 9
0
 internal static Control CreateView(this Result result, SourceView master)
 {
     var clients = new List<Control>();
     if(result.HasType || result.HasSize || result.HasHllw)
         clients.Add(result.CreateTypeLineView(master));
     clients.Add(result.Exts?.CreateView(master));
     clients.Add(result.Code?.CreateView(master));
     return clients.CreateRowView();
 }
Esempio n. 10
0
 public CodeView(CodeBase item, SourceView master)
     : base(master, "Code: " + item.NodeDump)
 {
     Client = item.CreateView(Master);
     Source = item.GetSource();
 }
Esempio n. 11
0
        static Control CreateChildView(this FunctionType target, SourceView master)
        {
            if(target == null)
                return null;

            var indexView = target.Index.CreateView(2);
            var argsTypeView = target.ArgsType.CreateLink(master).CreateGroup("args");
            var extsView = target.Exts.CreateView(master).CreateGroup("exts");
            var valueTypeView = target.ValueType.CreateLink(master).CreateGroup("value");
            var setterView = target.Setter?.CreateView(master);
            var getterView = target.Getter.CreateView(master);

            return false.CreateLineupView
                (
                    true.CreateLineupView(indexView, argsTypeView, extsView, valueTypeView),
                    setterView?.CreateGroup("Set"),
                    getterView?.CreateGroup("Get")
                );
        }
Esempio n. 12
0
 public FunctionView(FunctionType item, SourceView master)
     : base(master, "Function: " + item.NodeDump)
 {
     Client = item.CreateView(Master);
     Source = item.Body.SourcePart;
 }
Esempio n. 13
0
        static Control CreateView(this Compound compound, int viewPosition, SourceView master)
        {
            var x = compound
                .CachedResults
                .Select(i => i.Data.CreateView(master))
                .ToArray();

            var result = new TableLayoutPanel
            {
                AutoSize = true,
                AutoSizeMode = AutoSizeMode.GrowAndShrink,
                ColumnCount = 2,
                RowCount = x.Length,
                CellBorderStyle = TableLayoutPanelCellBorderStyle.Single
            };

            for(var i = 0; i < x.Length; i++)
            {
                var control = ((i < viewPosition ? "" : "?") + i).CreateView(1.5);
                var sourcePart = compound.Syntax.Statements[i].SourcePart;
                control.Click += (a, b) => master.SelectSource(sourcePart);
                result.Controls.Add(control, 0, i);
                result.Controls.Add(x[i], 1, i);
            }

            return result;
        }
Esempio n. 14
0
 static Control CreateView(this Reni.Struct.CompoundView target, SourceView master)
     => target.Compound.CreateView(target.ViewPosition, master);
Esempio n. 15
0
 static Control CreateChildView(this Compound target, SourceView master)
     => target?.CompoundView.CreateView(master);
Esempio n. 16
0
 static Control CreateChildView(this Reni.Context.Function target, SourceView master)
     => target?.ArgsType.CreateLink(master).CreateGroup("Args");
Esempio n. 17
0
 internal static Control CreateView(this CodeBase code, SourceView master)
 {
     var control = code.Visit(new CodeViewVisitor(master));
     var title = code.Size.ToInt() + " " + code.GetType().Name + "." + code.ObjectId + "i";
     return control.CreateGroup(title);
 }
Esempio n. 18
0
 internal static TableLayoutPanel CreateView
     (this KeyValuePair<ContextBase, ResultCache> item, SourceView master)
 {
     var control = false.ForceLineupView
         (
             item.Key.CreateLink(master),
             item.Value.Data.CreateView(master)
         )
         ;
     control.CellBorderStyle = TableLayoutPanelCellBorderStyle.OutsetPartial;
     return control;
 }
Esempio n. 19
0
 internal BrowseTraceCollector(SourceView sourceView) { SourceView = sourceView; }
Esempio n. 20
0
        static Control CreateChildView(this object target, SourceView master)
        {
            var head = true.CreateLineupView
                (GetSize(target)?.CreateView(), target.CreateLink(master));

            var childView = CreateChildView(target as FunctionBodyType)
                ?? CreateChildView(target as AlignType)
                    ?? CreateChildView(target as NumberType)
                        ?? CreateChildView(target as FunctionType, master)
                            ?? CreateChildView(target as CompoundContext, master)
                                ?? CreateChildView(target as Compound, master)
                                    ?? CreateChildView(target as CompoundType)
                                        ?? CreateChildView(target as ArrayType)
                                            ?? CreateChildView(target as ArrayReferenceType)
                                                ?? CreateChildView(target as PointerType)
                                                    ?? CreateChildView
                                                        (target as Reni.Context.Function, master)
                                                        ?? CreateChildView(target as Root)
                                                            ?? CreateChildView(target as BitType)
                                                                ?? NotImplemented(target);
            return false.CreateLineupView(head, childView);
        }
Esempio n. 21
0
 public TraceLogItem(IEnumerable<Step> data, SourceView master)
 {
     Master = master;
     Data = data.ToArray();
 }
Esempio n. 22
0
 internal static Control CreateView(this FunctionInstance target, SourceView master)
     => target.BodyCode.CreateView(master);
Esempio n. 23
0
 public ResultCachesView(Value syntax, SourceView master)
     : base(master, "ResultCaches: " + syntax.GetType().PrettyName() + "-" + syntax.ObjectId)
 {
     Client = syntax.ResultCache.CreateClient(Master);
     Source = syntax.SourcePart;
 }
Esempio n. 24
0
 internal static Control CheckedCreateView(this TypeBase type, SourceView master)
 {
     if(type == null)
         return "".CreateView();
     return type.CreateLink(master);
 }
Esempio n. 25
0
 internal static Control CreateView(this Call target, SourceView master)
     => target.FunctionId.CreateView(master);
Esempio n. 26
0
 internal StepView(Step item, SourceView master)
     : base(master, "Step " + item.Index + ": "+ item.CodeBase.GetIdText(), "Step"+item.Index)
 {
     Index = item.Index;
     Client = item.CreateView(Master);
 }