/// <summary> /// Performs the delta on the specification provided /// </summary> /// <param name="delta"></param> /// <param name="specifications"></param> private void PerformDelta(DataDictionary.Specification.Specification specifications) { foreach (Paragraph p in NewDocument.ChangedParagraphs) { DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id); if (par != null) { par.Text = p.Text; par.AddInfo("Paragraph has been changed"); par.setImplementationStatus(DataDictionary.Generated.acceptor.SPEC_IMPLEMENTED_ENUM.Impl_NewRevisionAvailable); par.setReviewed(false); foreach (DataDictionary.ReqRef reqRef in par.Implementations) { DataDictionary.ReqRelated reqRelated = reqRef.Model as DataDictionary.ReqRelated; if (reqRelated != null) { reqRelated.setImplemented(false); reqRelated.setVerified(false); } } } else { AddError(specifications, p, "Cannot find paragraph " + p.Id + " for modification"); } } foreach (Paragraph p in NewDocument.NewParagraphs) { DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id); if (par != null) { AddError(specifications, p, "Paragraph " + p.Id + " already exists, whereas it has been detected as a new paragraph in the release"); } else { par = specifications.FindParagraph(p.Id, true); if (par != null) { par.setText(p.Text); par.AddInfo("New paragraph"); } else { AddError(specifications, p, "Paragraph " + p.Id + " cannot be found in the specification"); } } } foreach (Paragraph p in NewDocument.RemovedParagraphs) { DataDictionary.Specification.Paragraph par = specifications.FindParagraph(p.Id); if (par != null) { par.Text = "<Removed in current release>"; par.AddInfo("Paragraph has been removed"); } else { AddError(specifications, p, "Cannot find paragraph " + p.Id + " for removal"); } } }