public override PUC.CIO.ConcreteInteractionObject ChooseWidget(GroupNode g) { Decision d = null; PUC.Rules.SpecScan.ListDecision ld = (PUC.Rules.SpecScan.ListDecision) g.Decorations[PUC.Rules.SpecScan.ListDecision.DECISION_KEY]; if (ld == null) { return(null); } d = (Decision)_choices[ld.Dimensions.ToString()]; if (d != null) { return(d.ChooseWidget(g)); } else { return(null); } }
protected int searchHelper(GroupNode g, bool listBelow, Appliance a) { if (g.IsObject()) { return(0); } BranchGroupNode bg = (BranchGroupNode)g; if (bg.Count == 0) { return(0); } ListDecision d = null; if (bg.IsList()) { d = new ListDecision(!listBelow); bg.Decorations[ListDecision.DECISION_KEY] = d; } int dim = 0; for (int i = 0; i < bg.Children.Count; i++) { dim = Math.Max(dim, searchHelper((GroupNode)bg.Children[i], d != null, a)); } if (d != null) { return(d.Dimensions = dim + 1); } return(dim); }