Subversion Repositories DevTools

Rev

Rev 2161 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2161 Rev 2165
Line 135... Line 135...
135
 
135
 
136
                  DialogResult dlgRes = rq_filter.ShowDialog();
136
                  DialogResult dlgRes = rq_filter.ShowDialog();
137
                  if (dlgRes == DialogResult.OK)
137
                  if (dlgRes == DialogResult.OK)
138
                  {
138
                  {
139
                     allowPackageStructureFragments = rq_filter.allowPackageStructureFragments;
139
                     allowPackageStructureFragments = rq_filter.allowPackageStructureFragments;
140
                     ReqProDatabase.close();
-
 
141
 
140
 
142
                     // Save filter settings to the ReqProDB element if it is available
141
                     // Save filter settings to the ReqProDB element if it is available
143
                     if (RQ_Element != null)
142
                     if (RQ_Element != null)
144
                     {
143
                     {
145
                        RQ_Element.Notes = rq_filter.saveFilterSettings();
144
                        RQ_Element.Notes = rq_filter.saveFilterSettings();
Line 178... Line 177...
178
                  else
177
                  else
179
                  {
178
                  {
180
                     cancelled = true;
179
                     cancelled = true;
181
                  }
180
                  }
182
               }
181
               }
183
               ReqProDatabase.close();
-
 
184
            }
182
            }
185
         }
183
         }
186
         catch (Exception ex)
184
         catch (Exception ex)
187
         {
185
         {
188
            Main.MessageBoxException(ex, "Exception (parse)");
186
            Main.MessageBoxException(ex, "Exception (parse)");
Line 560... Line 558...
560
         bool connectorCollectionNeedsRefreshing = false;
558
         bool connectorCollectionNeedsRefreshing = false;
561
 
559
 
562
         string src_tag = EA_TaggedValues.Read(src_element, Constants.TAG_TAG);
560
         string src_tag = EA_TaggedValues.Read(src_element, Constants.TAG_TAG);
563
         string src_guid = EA_TaggedValues.Read(src_element, Constants.TAG_GUID, "");
561
         string src_guid = EA_TaggedValues.Read(src_element, Constants.TAG_GUID, "");
564
 
562
 
-
 
563
         ReqPro40.Requirement rp_req = null;
-
 
564
 
565
         // Create a list of booleans that will allow us to track which elements in the guids
565
         // Create a list of booleans that will allow us to track which elements in the guids
566
         // list are validated.
566
         // list are validated.
567
         ArrayList traceValidated = null;
567
         ArrayList traceValidated = null;
568
 
568
 
569
         if (guids.Count > 0)
569
         if (guids.Count > 0)
Line 651... Line 651...
651
                        // but we have to check that the object at the other end of the relationship does 
651
                        // but we have to check that the object at the other end of the relationship does 
652
                        // not have a trace back to us first. In EA, we dont care about directionality since
652
                        // not have a trace back to us first. In EA, we dont care about directionality since
653
                        // regardless of direction, all relationships exist in the same collection, but
653
                        // regardless of direction, all relationships exist in the same collection, but
654
                        // this is not so in ReqPro, which has TracesTo and TracesFrom relationships (and
654
                        // this is not so in ReqPro, which has TracesTo and TracesFrom relationships (and
655
                        // other types too).
655
                        // other types too).
-
 
656
                        // Also, if the target is not a reqpro requirement then we should probably leave the relationship
-
 
657
                        // in place since the target may be an element an EA user is preparing to be a ReqPro requirement
-
 
658
                        // but they have yet to export it.
656
                        ReqPro_object tgt_obj = guid_to_obj_dictionary[rp_tgt_req_guid];
659
                        ReqPro_object tgt_obj = guid_to_obj_dictionary[rp_tgt_req_guid];
657
                        if (tgt_obj != null)
660
                        if (tgt_obj != null)
658
                        {
661
                        {
659
                           if (false == tgt_obj.ReqPro_traces.Contains(src_guid))
662
                           if (false == tgt_obj.ReqPro_traces.Contains(src_guid))
660
                           {
663
                           {
-
 
664
                              // Does the current requirement we are dealing with have a relationship with another
-
 
665
                              // requirement with the GUID indicated by the tgt_obj ? If is does, then we cannot
-
 
666
                              // delete the relationship in EA. We have to go to the ReqPro database to ascertain this
-
 
667
                              // since the filter dialog may have filtered out the target object and so our local
-
 
668
                              // structure cannot tell us much in this regard.
-
 
669
                              if (rp_req == null)
-
 
670
                                 rp_req = ReqProDatabase.get_requirement_by_guid(src_guid);
-
 
671
 
-
 
672
                              if (rp_req != null && false == ReqProDatabase.any_relationship_exists(rp_req, tgt_obj.guid))
-
 
673
                              {
661
                              src_element.Connectors.DeleteAt(i_c, false);
674
                                 src_element.Connectors.DeleteAt(i_c, false);
662
                              connectorCollectionNeedsRefreshing = true;
675
                                 connectorCollectionNeedsRefreshing = true;
663
 
676
 
664
                              trace_log.Add("Deleted connection between " + src_tag + " and " + rp_tgt_req_tag);
677
                                 trace_log.Add("Deleted connection between " + src_tag + " and " + rp_tgt_req_tag);
-
 
678
                              }
665
                           }
679
                           }
666
                        }
680
                        }
667
                     }
681
                     }
668
                  }
682
                  }
669
               }
683
               }