private void VisitPropertiesTabs(IGroupListPropertiesTabs parent, List <IPropertiesTab> lst) { this.Visit(parent, lst); foreach (var t in lst) { this.Visit(t); if (t.IsDeleted()) { continue; } this.currPropTabStack.Push(t); if (_act != null) { _act(this, t); } this.VisitProperties(t.GroupProperties, new DiffLists <IProperty>( t.GroupProperties.ListProperties, ((IPropertiesTab)t[DiffEnumHistoryAnnotation.PrevVersion.ToString()])?.GroupProperties.ListProperties, ((IPropertiesTab)t[DiffEnumHistoryAnnotation.OldVersion.ToString()])?.GroupProperties.ListProperties ).ListAll); this.VisitPropertiesTabs(t.GroupPropertiesTabs, new DiffLists <IPropertiesTab>( t.GroupPropertiesTabs.ListPropertiesTabs, ((IPropertiesTab)t[DiffEnumHistoryAnnotation.PrevVersion.ToString()])?.GroupPropertiesTabs.ListPropertiesTabs, ((IPropertiesTab)t[DiffEnumHistoryAnnotation.OldVersion.ToString()])?.GroupPropertiesTabs.ListPropertiesTabs ).ListAll); this.currPropTabStack.Pop(); } }
protected override void BeginVisit(IGroupListPropertiesTabs t) { if (t is INodeGenSettings) { _act(t as INodeGenSettings); } }
private void ScanPropertiesTabs(ModelNode md, IGroupListPropertiesTabs t) { foreach (var tt in t.ListPropertiesTabs) { ScanProperties(md, tt.GroupProperties.ListProperties); ScanPropertiesTabs(md, tt.GroupPropertiesTabs); } }
protected override void EndVisit(IGroupListPropertiesTabs cn) { var p = (GroupListPropertiesTabs)cn; foreach (var t in p.ListPropertiesTabs) { t.IsMarkedForDeletion = false; t.IsNew = false; } }
protected override void Visit(IGroupListPropertiesTabs parent, List <IPropertiesTab> diff_lst) { Contract.Requires(diff_lst != null); Contract.Requires(parent != null); List <PropertiesTab> lst = new List <PropertiesTab>(); foreach (var t in diff_lst) { lst.Add((PropertiesTab)t); } var grp = (GroupListPropertiesTabs)parent; grp.ListPropertiesTabs.Clear(); grp.ListPropertiesTabs.AddRange(lst); }
protected override void EndVisit(IGroupListPropertiesTabs cn) { var p = (GroupListPropertiesTabs)cn; if (p.IsHasMarkedForDeletion && p.IsHasNew) { var lst = p.ListPropertiesTabs.ToList(); foreach (var t in lst) { if (t.IsMarkedForDeletion && t.IsNew) { p.ListPropertiesTabs.Remove(t); } } } }
private void VisitPropertiesTabs(IGroupListPropertiesTabs parent, IEnumerable <IPropertiesTab> lst) { this.BeginVisit(parent); if (_act != null) { _act(this, parent); } foreach (var t in lst) { this.BeginVisit(t); //if (t.IsDeleted()) // continue; this.currPropTabStack.Push(t); if (_act != null) { _act(this, t); } this.VisitProperties(t.GroupProperties, t.GroupProperties.ListProperties); this.VisitPropertiesTabs(t.GroupPropertiesTabs, t.GroupPropertiesTabs.ListPropertiesTabs); this.currPropTabStack.Pop(); this.EndVisit(t); } this.EndVisit(parent); }
private static void CheckTabs(ValidationContext <Model> cntx, Dictionary <string, ITreeConfigNode> dic, IGroupListPropertiesTabs tabs, string recom) { foreach (var t in tabs.ListPropertiesTabs) { if (string.IsNullOrWhiteSpace(t.CompositeName)) { continue; } if (dic.ContainsKey(t.CompositeName)) { var sb = GenMessage(dic, t, t.CompositeName); sb.Append("'."); sb.Append(recom); cntx.AddFailure(sb.ToString()); } else { dic[t.CompositeName] = t; } CheckTabs(cntx, dic, t.GroupPropertiesTabs, recom); } }
protected virtual void Visit(IGroupListPropertiesTabs parent, List <IPropertiesTab> diff_lst) { }
protected virtual void EndVisit(IGroupListPropertiesTabs cn) { }