/// <summary> /// Create structure based on the subsystem structure /// </summary> /// <param name="SourceNode"></param> public override void AcceptDrop(BaseTreeNode SourceNode) { base.AcceptDrop(SourceNode); if (SourceNode is RuleConditionTreeNode) { RuleConditionTreeNode node = SourceNode as RuleConditionTreeNode; DataDictionary.Rules.RuleCondition ruleCondition = node.Item; node.Delete(); AddRuleCondition(ruleCondition); } else if (SourceNode is SpecificationView.ParagraphTreeNode) { SpecificationView.ParagraphTreeNode node = SourceNode as SpecificationView.ParagraphTreeNode; DataDictionary.Specification.Paragraph paragaph = node.Item; DataDictionary.Rules.RuleCondition ruleCondition = (DataDictionary.Rules.RuleCondition)DataDictionary.Generated.acceptor.getFactory().createRuleCondition(); ruleCondition.Name = paragaph.Name; DataDictionary.ReqRef reqRef = (DataDictionary.ReqRef)DataDictionary.Generated.acceptor.getFactory().createReqRef(); reqRef.Name = paragaph.FullId; ruleCondition.appendRequirements(reqRef); AddRuleCondition(ruleCondition); } }
/// <summary> /// Create structure based on the subsystem structure /// </summary> /// <param name="sourceNode"></param> public override void AcceptDrop(BaseTreeNode sourceNode) { base.AcceptDrop(sourceNode); if (sourceNode is RuleConditionTreeNode) { RuleConditionTreeNode node = sourceNode as RuleConditionTreeNode; RuleCondition ruleCondition = node.Item; node.Delete(); Item.appendConditions(ruleCondition); } else if (sourceNode is ParagraphTreeNode) { ParagraphTreeNode node = sourceNode as ParagraphTreeNode; Paragraph paragraph = node.Item; RuleCondition ruleCondition = RuleCondition.CreateDefault(Item.RuleConditions); Item.appendConditions(ruleCondition); ruleCondition.FindOrCreateReqRef(paragraph); } }