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 220... Line 220...
220
               break;
220
               break;
221
            }
221
            }
222
 
222
 
223
            case "&Create Requirement Diagram":
223
            case "&Create Requirement Diagram":
224
            {
224
            {
225
               EA_Utilities EA_Utils = new EA_Utilities();
-
 
226
               ArrayList allowedElementTypes = new ArrayList();
225
               ArrayList allowedElementTypes = new ArrayList();
227
               allowedElementTypes.Add("Requirement");
226
               allowedElementTypes.Add("Requirement");
228
               //allowedElementTypes.Add("UseCase");
227
               //allowedElementTypes.Add("UseCase");
229
               ElementAccumulator reqLister = new ElementAccumulator(allowedElementTypes);
228
               ElementAccumulator reqLister = new ElementAccumulator(allowedElementTypes);
230
               EA.Package thePackage = (EA.Package)repository.GetTreeSelectedObject();
229
               EA.Package thePackage = (EA.Package)repository.GetTreeSelectedObject();
231
               EA_Utils.findAndProcessPackageElements( thePackage, reqLister, true );
230
               EA_Utilities.findAndProcessPackageElements( thePackage, reqLister, true );
232
               EA.Diagram newDiagram = (EA.Diagram)thePackage.Diagrams.AddNew("Requirements","Logical");
231
               EA.Diagram newDiagram = (EA.Diagram)thePackage.Diagrams.AddNew("Requirements","Logical");
233
               newDiagram.Update();
232
               newDiagram.Update();
234
               thePackage.Update();
233
               thePackage.Update();
235
 
234
 
236
               foreach (EA.Element element in reqLister.Elements)
235
               foreach (EA.Element element in reqLister.Elements)
Line 256... Line 255...
256
         ImportReqProDatabase import_parser = new ImportReqProDatabase();
255
         ImportReqProDatabase import_parser = new ImportReqProDatabase();
257
         EA_Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
256
         EA_Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
258
         EA_Repository.WriteOutput(GUI_OUTPUT_TAB_NAME,"",-1);
257
         EA_Repository.WriteOutput(GUI_OUTPUT_TAB_NAME,"",-1);
259
         import_parser.prompt_and_parse(ReqProDB_Artifact.MODE.TRACEABILITY); 
258
         import_parser.prompt_and_parse(ReqProDB_Artifact.MODE.TRACEABILITY); 
260
         if (mustAbort)
259
         if (mustAbort)
261
            MessageBoxEx.Show("Import Aborted");
260
            MessageBoxEx.Show("Import Aborted", "Progress");
262
      }
261
      }
263
 
262
 
264
      private static void CopyReqProDatabase_Thread()
263
      private static void CopyReqProDatabase_Thread()
265
      {
264
      {
266
         mustAbort = false;
265
         mustAbort = false;
267
         EA_Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
266
         EA_Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
268
         EA_Repository.WriteOutput(GUI_OUTPUT_TAB_NAME,"",-1);
267
         EA_Repository.WriteOutput(GUI_OUTPUT_TAB_NAME,"",-1);
269
         CopyReqProDatabase copy_parser = new CopyReqProDatabase();
268
         CopyReqProDatabase copy_parser = new CopyReqProDatabase();
270
         copy_parser.prompt_and_parse(ReqProDB_Artifact.MODE.DOC_MODEL);
269
         copy_parser.prompt_and_parse(ReqProDB_Artifact.MODE.DOC_MODEL);
271
         if (mustAbort)
270
         if (mustAbort)
272
            MessageBoxEx.Show("Import Aborted");
271
            MessageBoxEx.Show("Import Aborted", "Progress");
273
      }
272
      }
274
 
273
 
-
 
274
      public static void MessageBoxException(Exception exc)
-
 
275
      {
-
 
276
         MessageBoxException(exc, "Exception");
-
 
277
      }
-
 
278
 
-
 
279
      public static void MessageBoxException(Exception exc, string caption)
-
 
280
      {
-
 
281
         MessageBoxEx.Show(exc.ToString(), caption);
-
 
282
      }
275
   }
283
   }
276
}
284
}