public StandardValuesCollection GetValues(ReqRef req) { FinderRepository.INSTANCE.ClearCache(); List <string> retVal = new List <string>(); if (req.Model is Rule) { Rule rule = req.Model as Rule; foreach (Paragraph paragraph in rule.ApplicableParagraphs) { retVal.Add(paragraph.getId()); } } else { foreach (Dictionary dictionary in req.EFSSystem.Dictionaries) { foreach (Specification specification in dictionary.Specifications) { foreach (string paragraph in specification.ParagraphList()) { retVal.Add(paragraph); } } } } return(new StandardValuesCollection(retVal)); }
public override void visit(Generated.ReqRef obj, bool visitSubNodes) { ReqRef reqRef = (ReqRef)obj; if (reqRef.Paragraph == Paragraph) { Implementations.Add(reqRef); } base.visit(obj, visitSubNodes); }
public override void visit(Generated.ReqRef obj, bool visitSubNodes) { ReqRef reqRef = (ReqRef)obj; if (reqRef.Paragraph == Paragraph) { reqRef.Delete(); } base.visit(obj, visitSubNodes); }
/// <summary> /// Indicates that the requirement is already present in the step /// </summary> /// <param name="step"></param> /// <param name="reqRef"></param> /// <returns></returns> private bool IsRequirementPresent(Step step, ReqRef reqRef) { bool retVal = false; foreach (ReqRef stepReqRef in step.Requirements) { if (reqRef.Paragraph == stepReqRef.Paragraph) { retVal = true; break; } } return(retVal); }
/// <summary> /// Refreshes the displayed model /// </summary> private void RefreshModel() { specBrowserRuleView.Nodes.Clear(); Paragraph paragraph = EnclosingFinder <Paragraph> .find(DisplayedModel, true); if (paragraph == null) { ReqRef reqRef = DisplayedModel as ReqRef; if (reqRef != null) { paragraph = reqRef.Paragraph; } } if (paragraph != null) { foreach (ReqRef reqRef in paragraph.Implementations) { specBrowserRuleView.Nodes.Add(new ReqRefTreeNode(reqRef, true, false, reqRef.Model.Name)); } functionalBlocksTreeView.SetRoot(paragraph); } specBrowserTreeView.RefreshModel(null); }
public override Generated.ReqRef createReqRef() { Generated.ReqRef retVal = new ReqRef(); _defaultValueSetter.SetDefaultValue(retVal); return retVal; }