Subversion Repositories DevTools

Rev

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

Rev 2151 Rev 2153
Line 80... Line 80...
80
                     }
80
                     }
81
                  }
81
                  }
82
               }
82
               }
83
               catch (Exception ex)
83
               catch (Exception ex)
84
               {
84
               {
85
                  MessageBoxEx.Show(ex.Message, "Error (CopyReqProDatabase)", MessageBoxButtons.OK);
85
                  Main.MessageBoxException(ex, "Exception (CopyReqProDatabase)");
86
               }   
86
               }   
87
 
87
 
88
               Main.EA_Repository.EnsureOutputVisible(Main.GUI_OUTPUT_TAB_NAME);
88
               Main.EA_Repository.EnsureOutputVisible(Main.GUI_OUTPUT_TAB_NAME);
89
 
89
 
90
               if (Main.mustAbort)
90
               if (Main.mustAbort)
Line 101... Line 101...
101
                  return false;
101
                  return false;
102
 
102
 
103
               writeDelayedMessages();
103
               writeDelayedMessages();
104
 
104
 
105
               Main.EA_Repository.WriteOutput( Main.GUI_OUTPUT_TAB_NAME, "Import Completed", -1);
105
               Main.EA_Repository.WriteOutput( Main.GUI_OUTPUT_TAB_NAME, "Import Completed", -1);
106
               MessageBoxEx.Show("Import Completed", MessageBoxButtons.OK);
106
               MessageBoxEx.Show("Import Completed", "Progress");
107
               return true;
107
               return true;
108
            }
108
            }
109
         }
109
         }
110
         catch (Exception ex)
110
         catch (Exception ex)
111
         {
111
         {
112
            MessageBoxEx.Show(ex.Message, "Error (parse)", MessageBoxButtons.OK);
112
            Main.MessageBoxException(ex, "Exception (parse)");
113
         }      
113
         }      
114
         return false;
114
         return false;
115
      }
115
      }
116
 
116
 
117
 
117
 
Line 171... Line 171...
171
            if (rq_obj.filtered == false)
171
            if (rq_obj.filtered == false)
172
            {
172
            {
173
               if (ea_parent_package != null)
173
               if (ea_parent_package != null)
174
               {
174
               {
175
                  // create a representative package in EA
175
                  // create a representative package in EA
176
                  EA.Package new_ea_package = EA_Utils.createPackage(ea_parent_package, rq_obj.name, rq_obj.treePos);
176
                  EA.Package new_ea_package = EA_Utilities.createPackage(ea_parent_package, rq_obj.name, rq_obj.treePos);
177
                  rq_obj.ea_element_ID = new_ea_package.PackageID;
177
                  rq_obj.ea_element_ID = new_ea_package.PackageID;
178
                  Main.EA_Repository.WriteOutput( Main.GUI_OUTPUT_TAB_NAME, "Created Package : " + rq_obj.name, new_ea_package.PackageID );
178
                  Main.EA_Repository.WriteOutput( Main.GUI_OUTPUT_TAB_NAME, "Created Package : " + rq_obj.name, new_ea_package.PackageID );
179
 
179
 
180
                  // Using recursion, scan this objects sub-objects
180
                  // Using recursion, scan this objects sub-objects
181
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
181
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
182
                  {
182
                  {
183
                     if (Main.mustAbort)
183
                     if (Main.mustAbort)
184
                        break;
184
                        break;
185
 
185
 
186
                     write_ea_database(new_ea_package, null, sub_obj);
186
                     write_ea_database(new_ea_package, null, sub_obj);  //recurse
187
                  }
187
                  }
188
               }
188
               }
189
               else
189
               else
190
               {
190
               {
191
                  // should never get here - I have never seen it happen so far.
191
                  // should never get here - I have never seen it happen so far.
Line 199... Line 199...
199
               {
199
               {
200
                  if (Main.mustAbort)
200
                  if (Main.mustAbort)
201
                     break;
201
                     break;
202
 
202
 
203
                  if (sub_obj.isPackage)
203
                  if (sub_obj.isPackage)
204
                     write_ea_database(ea_parent_package, null, sub_obj);
204
                     write_ea_database(ea_parent_package, null, sub_obj);  // recurse
205
               }
205
               }
206
            }
206
            }
207
         }
207
         }
208
         else if (rq_obj.isRequirement)
208
         else if (rq_obj.isRequirement)
209
         {
209
         {
Line 254... Line 254...
254
                  new_ea_element.Update();
254
                  new_ea_element.Update();
255
 
255
 
256
                  // Write EA tag information exactly as is done for the import for traceability use. This 
256
                  // Write EA tag information exactly as is done for the import for traceability use. This 
257
                  // opens up the possibility that a document model import could be converted into a traceability
257
                  // opens up the possibility that a document model import could be converted into a traceability
258
                  // use model in some future update to EA_ReqPro addin.
258
                  // use model in some future update to EA_ReqPro addin.
259
                  EA_Utils.WriteTag(new_ea_element, "GUID", rq_obj.guid);
259
                  EA_Utilities.WriteTag(new_ea_element, "GUID", rq_obj.guid);
260
                  EA_Utils.WriteTag(new_ea_element, "TAG", rq_obj.tag);
260
                  EA_Utilities.WriteTag(new_ea_element, "TAG", rq_obj.tag);
-
 
261
 
-
 
262
                  if (rq_obj.source != null)
-
 
263
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE", rq_obj.source);
-
 
264
                  if (rq_obj.sourceVersion != null)
-
 
265
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE_VERSION", rq_obj.sourceVersion);
-
 
266
                  if (rq_obj.sourceSection != null)
-
 
267
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE_SECTION", rq_obj.sourceSection);
261
 
268
 
262
                  // Using recursion, scan this objects sub-objects
269
                  // Using recursion, scan this objects sub-objects
263
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
270
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
264
                  {
271
                  {
265
                     if (Main.mustAbort)
272
                     if (Main.mustAbort)
266
                        break;
273
                        break;
267
 
274
 
268
                     write_ea_database(null, new_ea_element, sub_obj);
275
                     write_ea_database(null, new_ea_element, sub_obj);  // recurse
269
                  }
276
                  }
270
               }
277
               }
271
               // else create the requirement element as a child of a parent package
278
               // else create the requirement element as a child of a parent package
272
               else if (ea_parent_package != null)
279
               else if (ea_parent_package != null)
273
               {
280
               {
Line 289... Line 296...
289
                  new_ea_element.Update();
296
                  new_ea_element.Update();
290
 
297
 
291
                  // Write EA tag information exactly as is done for the import for traceability use. This 
298
                  // Write EA tag information exactly as is done for the import for traceability use. This 
292
                  // opens up the possibility that a document model import could be converted into a traceability
299
                  // opens up the possibility that a document model import could be converted into a traceability
293
                  // use model in some future update to EA_ReqPro addin.
300
                  // use model in some future update to EA_ReqPro addin.
294
                  EA_Utils.WriteTag(new_ea_element, "GUID", rq_obj.guid);
301
                  EA_Utilities.WriteTag(new_ea_element, "GUID", rq_obj.guid);
295
                  EA_Utils.WriteTag(new_ea_element, "TAG", rq_obj.tag);
302
                  EA_Utilities.WriteTag(new_ea_element, "TAG", rq_obj.tag);
-
 
303
 
-
 
304
                  if (rq_obj.source != null)
-
 
305
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE", rq_obj.source);
-
 
306
                  if (rq_obj.sourceVersion != null)
-
 
307
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE_VERSION", rq_obj.sourceVersion);
-
 
308
                  if (rq_obj.sourceSection != null)
-
 
309
                     EA_Utilities.WriteTag(new_ea_element,"SOURCE_SECTION", rq_obj.sourceSection);
296
 
310
 
297
                  // Using recursion, scan this objects sub-objects
311
                  // Using recursion, scan this objects sub-objects
298
                  
312
                  
299
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
313
                  foreach( ReqPro_object sub_obj in rq_obj.ReqPro_objects )
300
                  {
314
                  {
301
                     if (Main.mustAbort)
315
                     if (Main.mustAbort)
302
                        break;
316
                        break;
303
 
317
 
304
                     write_ea_database(null, new_ea_element, sub_obj);
318
                     write_ea_database(null, new_ea_element, sub_obj);  // recurse
305
                  }
319
                  }
306
               }
320
               }
307
               else
321
               else
308
               {
322
               {
309
                  // should never get here - I have never seen it happen so far.
323
                  // should never get here - I have never seen it happen so far.