Subversion Repositories DevTools

Rev

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

Rev 2155 Rev 2157
Line 286... Line 286...
286
 
286
 
287
               if (new_ea_element != null)
287
               if (new_ea_element != null)
288
               {
288
               {
289
                  totalRequirements++;
289
                  totalRequirements++;
290
 
290
 
-
 
291
                  // tie the new EA element back to the facsimile of the req pro requirement that led to its creation.
-
 
292
                  // This will support the writing of trace info later on.
291
                  rq_obj.ea_element_ID = new_ea_element.ElementID;
293
                  rq_obj.ea_element_ID = new_ea_element.ElementID;
292
 
294
 
-
 
295
                  // NOTE: deliberately dont do TreePos in copyReq() because copyReq() may be called in other
-
 
296
                  // contexts where the caller does not want any fiddling with the tree position in the EA browser.
293
                  new_ea_element.TreePos = rq_obj.treePos; // deliberately dont do TreePos in copyReq()
297
                  new_ea_element.TreePos = rq_obj.treePos; 
294
 
298
 
295
                  copyReq(new_ea_element, rq_obj);
299
                  copyReq(new_ea_element, rq_obj);
296
 
300
 
297
                  new_ea_element.Update();
301
                  new_ea_element.Update();
298
 
302
 
Line 307... Line 311...
307
               }
311
               }
308
            }
312
            }
309
         }
313
         }
310
      }
314
      }
311
 
315
 
-
 
316
      /// <summary>
-
 
317
      /// Copy the details of the reqpro based requirement facsimile, into an EA element
-
 
318
      /// </summary>
-
 
319
      /// <param name="new_ea_element"></param>
-
 
320
      /// <param name="rq_obj"></param>
312
      public static void copyReq(EA.Element new_ea_element, ReqPro_object rq_obj)
321
      public static void copyReq(EA.Element new_ea_element, ReqPro_object rq_obj)
313
      {
322
      {
314
         // If the ReqPro requirements detailed text is more than what the name already contains (allowing for it
323
         // If the ReqPro requirements detailed text is more than what the name already contains (allowing for it
315
         // to have a stop character that the name may not have) then copy it over, otherwise ignore it. This
324
         // to have a stop character that the name may not have) then copy it over, otherwise ignore it. This
316
         // prevents the same text appearing twice in any generated document made using EA_DocGen.
325
         // prevents the same text appearing twice in any generated document made using EA_DocGen.
Line 339... Line 348...
339
            EA_TaggedValues.Write(new_ea_element,Constants.TAG_SUBSYSTEM, rq_obj.subsystem);
348
            EA_TaggedValues.Write(new_ea_element,Constants.TAG_SUBSYSTEM, rq_obj.subsystem);
340
 
349
 
341
         if (rq_obj.stability != null && rq_obj.stability.Length > 0)
350
         if (rq_obj.stability != null && rq_obj.stability.Length > 0)
342
            EA_TaggedValues.Write(new_ea_element,Constants.TAG_STABILITY, rq_obj.stability);
351
            EA_TaggedValues.Write(new_ea_element,Constants.TAG_STABILITY, rq_obj.stability);
343
 
352
 
344
         if (0 > new_ea_element.StereotypeEx.IndexOf(rq_obj.type))
353
         // for requirement type attribute, enforce just a single stereotype in the EA element, even though
345
         {
-
 
346
            if (new_ea_element.StereotypeEx.Length > 0)
354
         // StereotypeEx can be a comma seperated list.
347
               new_ea_element.StereotypeEx = rq_obj.type + "," + new_ea_element.StereotypeEx;
-
 
348
            else
-
 
349
               new_ea_element.StereotypeEx = rq_obj.type;
355
         new_ea_element.StereotypeEx = rq_obj.type;
350
         }
-
 
351
         if (new_ea_element.Stereotype.Length == 0)
356
         new_ea_element.Stereotype = rq_obj.type;
352
         {
-
 
353
            new_ea_element.Stereotype = new_ea_element.StereotypeEx.Split(",".ToCharArray())[0];
-
 
354
         }
-
 
355
 
357
 
356
      }
358
      }
357
 
359
 
358
 
360
 
359
	}
361
	}