Subversion Repositories DevTools

Rev

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

Rev 2145 Rev 2147
Line 178... Line 178...
178
         // Update the change log
178
         // Update the change log
179
         changeLog.Notes = newList;
179
         changeLog.Notes = newList;
180
         changeLog.Update();
180
         changeLog.Update();
181
      }
181
      }
182
 
182
 
-
 
183
 
-
 
184
      /// <summary>
-
 
185
      /// Rid a string of any : char because we use that as a delimiter in the change log and so we 
-
 
186
      /// do not want a users use of the character to confuse the change log display mechanism.
-
 
187
      /// </summary>
-
 
188
      /// <param name="s"></param>
-
 
189
      /// <returns></returns>
-
 
190
      private string NO_COLONS(string s)
-
 
191
      {
-
 
192
         string sc =  s.Replace(':', ' ');
-
 
193
         sc = sc.Replace('\r' , ' ');
-
 
194
         sc = sc.Replace('\n' , ' ');
-
 
195
         
-
 
196
         return sc;
-
 
197
      }
183
 
198
 
184
 
199
 
185
      /// <summary>
200
      /// <summary>
186
      /// A method that imports requirements from a ReqPro database into EA for the purpose
201
      /// A method that imports requirements from a ReqPro database into EA for the purpose
187
      /// of supporting requirement-to-design traceability.
202
      /// of supporting requirement-to-design traceability.
Line 262... Line 277...
262
                     
277
                     
263
                     string ea_req_name = rq_obj.tag + " " + rq_obj.name;
278
                     string ea_req_name = rq_obj.tag + " " + rq_obj.name;
264
 
279
 
265
                     if ( ea_req.Name.CompareTo(ea_req_name) != 0 )
280
                     if ( ea_req.Name.CompareTo(ea_req_name) != 0 )
266
                     {
281
                     {
267
                        changeLog.Notes += ea_req.ElementGUID + ":Name:" + ea_req.Name + ":" + ea_req_name + "\r\n";
282
                        changeLog.Notes += ea_req.ElementGUID + ":Name:" + NO_COLONS(ea_req.Name) + ":" + NO_COLONS(ea_req_name) + "\r\n";
268
                        changeLog.Update();
283
                        changeLog.Update();
269
                        meaningMayHaveChanged = true;
284
                        meaningMayHaveChanged = true;
270
                        ea_req.Name  = ea_req_name;
285
                        ea_req.Name  = ea_req_name;
271
                     }
286
                     }
272
 
287
 
273
                     if ( ea_req.Notes.CompareTo(rq_obj.text) != 0 )
288
                     if ( ea_req.Notes.CompareTo(rq_obj.text) != 0 )
274
                     {
289
                     {
275
                        changeLog.Notes += ea_req.ElementGUID + ":Notes:" + ea_req.Notes + ":" + rq_obj.text + "\r\n";
290
                        changeLog.Notes += ea_req.ElementGUID + ":Notes:" + NO_COLONS(ea_req.Notes) + ":" + NO_COLONS(rq_obj.text) + "\r\n";
276
                        changeLog.Update();
291
                        changeLog.Update();
277
                        meaningMayHaveChanged = true;
292
                        meaningMayHaveChanged = true;
278
                        ea_req.Notes = rq_obj.text;
293
                        ea_req.Notes = rq_obj.text;
279
                     }
294
                     }
280
 
295
 
Line 412... Line 427...
412
                                         ref ArrayList rq_req_collection,
427
                                         ref ArrayList rq_req_collection,
413
                                         ReqPro_object rq_obj )
428
                                         ReqPro_object rq_obj )
414
      {
429
      {
415
         if (rq_obj.isPackage)
430
         if (rq_obj.isPackage)
416
         {
431
         {
-
 
432
            // if the package is not filtered, or if we are allowed to dig beneath filtered
-
 
433
            // packages...
417
            if (rq_obj.filtered == false)
434
            if (rq_obj.filtered == false || base.allowPackageStructureFragments)
418
            {
435
            {
419
               // Using recursion, scan this objects sub-objects
436
               // Using recursion, scan this objects sub-objects
420
               foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
437
               foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
421
               {
438
               {
-
 
439
                  // if the sub-object is a package, always recurse to process it, else
-
 
440
                  // if the sub-object is a requirement, only recurse if the containing package
-
 
441
                  // is not filtered, so that requirements of filtered packages are themselves
-
 
442
                  // filtered out by virtue of their parent packages filtering state.
-
 
443
                  if (  sub_obj.isPackage
-
 
444
                     || (sub_obj.isRequirement && rq_obj.filtered == false))
-
 
445
                  {
422
                  get_rq_req_collection(ea_repository, ref rq_req_collection, sub_obj);
446
                     get_rq_req_collection(ea_repository, ref rq_req_collection, sub_obj);
-
 
447
                  }
423
               }
448
               }
424
            }
449
            }
425
         }
450
         }
426
         else if (rq_obj.isRequirement)
451
         else if (rq_obj.isRequirement)
427
         {
452
         {
428
            if ( ! (reqTypeIsFiltered(rq_obj) || reqStatusTypeIsFiltered(rq_obj)) )
453
            if ( ! (reqTypeIsFiltered(rq_obj) || reqStatusTypeIsFiltered(rq_obj)) )
429
            {
454
            {
430
               // Add this requirement to the flattened list we are accumulating
455
               // Add this requirement to the flattened list we are accumulating
431
               rq_req_collection.Add(rq_obj);
456
               rq_req_collection.Add(rq_obj);
432
 
457
 
433
               // Using recursion, scan this objects sub-objects
458
               // Using recursion, scan this objects sub-objects, which in practise will all
-
 
459
               // be requirement objects. At this time requirement objects cannot have packages 
-
 
460
               // as children.
434
               foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
461
               foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
435
               {
462
               {
436
                  get_rq_req_collection(ea_repository, ref rq_req_collection, sub_obj);
463
                  get_rq_req_collection(ea_repository, ref rq_req_collection, sub_obj);
437
               }
464
               }
438
            }
465
            }