Subversion Repositories DevTools

Rev

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

Rev 2143 Rev 2145
Line 15... Line 15...
15
	{
15
	{
16
      protected bool allowPackageStructureFragments = false;
16
      protected bool allowPackageStructureFragments = false;
17
 
17
 
18
      protected EA_Utilities EA_Utils;
18
      protected EA_Utilities EA_Utils;
19
 
19
 
-
 
20
      // items setup by base class calling into provideReqProDatabaseInfo()
20
      protected ReqPro40.Project RQ_project;
21
      protected ReqPro40.Project RQ_project;
-
 
22
      protected ReqPro40.Application RQ_app;
-
 
23
      protected ReqProDB_Artifact RQ_Artifact;
-
 
24
      protected EA.Element RQ_Element;
21
 
25
 
22
      // Where in an EA database, the copy of the ReqPro database content will be written
26
      // Where in an EA database, the copy of the ReqPro database content will be written
23
      protected EA.Package ea_rootPackage;
27
      protected EA.Package ea_rootPackage;
24
      
28
      
25
      // Hierarchy tracking data for the parsing of a ReqPro database
29
      // Hierarchy tracking data for the parsing of a ReqPro database
Line 201... Line 205...
201
      /// before opening and parsing it. Once parsed, the user is offered a chance to setup
205
      /// before opening and parsing it. Once parsed, the user is offered a chance to setup
202
      /// the filter controls.
206
      /// the filter controls.
203
      /// </summary>
207
      /// </summary>
204
      /// <param name="ea_repository"></param>
208
      /// <param name="ea_repository"></param>
205
      /// <returns></returns>
209
      /// <returns></returns>
206
      public override bool prompt_and_parse(EA.Repository ea_repository)
210
      public override bool prompt_and_parse(EA.Repository ea_repository, ReqProDB_Artifact.MODE mode)
207
      {
211
      {
208
         try
212
         try
209
         {
213
         {
-
 
214
 
210
            pre_parsing();
215
            pre_parsing();
211
            if (true == base.prompt_and_parse(ea_repository))
216
            if (true == base.prompt_and_parse(ea_repository, mode))
212
            {
217
            {
213
               // obtain the requirement types from the reqpro database (need these for
218
               // obtain the requirement types from the reqpro database (need these for
214
               // the filter dialog)
219
               // the filter dialog)
215
               get_rq_req_types_from_database();
220
               get_rq_req_types_from_database();
216
               set_rq_req_types_in_copied_data(rq_root_package);
221
               set_rq_req_types_in_copied_data(rq_root_package);
Line 218... Line 223...
218
               get_rq_req_status_types_from_database();
223
               get_rq_req_status_types_from_database();
219
 
224
 
220
               // bring up the filter dialog to allow user to specify exactly what gets copied
225
               // bring up the filter dialog to allow user to specify exactly what gets copied
221
               ReqProFilterForm rq_filter = new ReqProFilterForm();
226
               ReqProFilterForm rq_filter = new ReqProFilterForm();
222
               rq_filter.populate(rq_root_package, rq_req_types, rq_req_status_types);
227
               rq_filter.populate(rq_root_package, rq_req_types, rq_req_status_types);
-
 
228
 
223
               DialogResult dlgRes = rq_filter.ShowDialog();
229
               // Setup the filter based on the saved filter settings in the ReqProDB element (if any)
224
               if (dlgRes == DialogResult.OK)
230
               if (RQ_Element != null)
225
               {
231
               {
226
                  allowPackageStructureFragments = rq_filter.allowPackageStructureFragments;
-
 
227
                  RQ_project.CloseProject();
232
                  rq_filter.loadFilterSettings(RQ_Element.Notes);
228
                  return true;
-
 
229
               }
233
               }
230
               RQ_project.CloseProject();
-
 
231
            }
-
 
232
         }
-
 
233
         catch (Exception ex)
-
 
234
         {
-
 
235
            MessageBox.Show(ex.Message, "Error (CopyReqProDatabaseToMemory::parse)", MessageBoxButtons.OK);
-
 
236
         }      
-
 
237
         return false;
-
 
238
      }
-
 
239
 
-
 
240
 
-
 
241
      /// <summary>
-
 
242
      /// This method is designed to make use of a ReqProDB artifact to indicate the ReqPro
-
 
243
      /// database to open and parse. Once parsed, the user is offered a chance to setup
-
 
244
      /// the filter controls.
-
 
245
      /// </summary>
-
 
246
      /// <param name="ea_repository"></param>
-
 
247
      /// <returns></returns>
-
 
248
      public override bool parse(EA.Repository ea_repository)
-
 
249
      {
-
 
250
         try
-
 
251
         {
-
 
252
            pre_parsing();
-
 
253
            if (true == base.parse(ea_repository))
-
 
254
            {
-
 
255
               // obtain the requirement types from the reqpro database (need these for
-
 
256
               // the filter dialog)
-
 
257
               get_rq_req_types_from_database();
-
 
258
               set_rq_req_types_in_copied_data(rq_root_package);
-
 
259
 
234
 
260
               get_rq_req_status_types_from_database();
-
 
261
 
-
 
262
               // bring up the filter dialog to allow user to specify exactly what gets copied
-
 
263
               ReqProFilterForm rq_filter = new ReqProFilterForm();
-
 
264
               rq_filter.populate(rq_root_package, rq_req_types, rq_req_status_types);
-
 
265
               DialogResult dlgRes = rq_filter.ShowDialog();
235
               DialogResult dlgRes = rq_filter.ShowDialog();
266
               if (dlgRes == DialogResult.OK)
236
               if (dlgRes == DialogResult.OK)
267
               {
237
               {
268
                  allowPackageStructureFragments = rq_filter.allowPackageStructureFragments;
238
                  allowPackageStructureFragments = rq_filter.allowPackageStructureFragments;
269
                  RQ_project.CloseProject();
239
                  RQ_project.CloseProject();
-
 
240
 
-
 
241
                  // Save filter settings to the ReqProDB element if it is available
-
 
242
                  if (RQ_Element != null)
-
 
243
                  {
-
 
244
                     RQ_Element.Notes = rq_filter.saveFilterSettings();
-
 
245
                     RQ_Element.Update();
-
 
246
                  }
-
 
247
 
270
                  return true;
248
                  return true;
271
               }
249
               }
272
               RQ_project.CloseProject();
250
               RQ_project.CloseProject();
273
            }
251
            }
274
         }
252
         }
Line 276... Line 254...
276
         {
254
         {
277
            MessageBox.Show(ex.Message, "Error (CopyReqProDatabaseToMemory::parse)", MessageBoxButtons.OK);
255
            MessageBox.Show(ex.Message, "Error (CopyReqProDatabaseToMemory::parse)", MessageBoxButtons.OK);
278
         }      
256
         }      
279
         return false;
257
         return false;
280
      }
258
      }
-
 
259
 
281
 
260
 
282
 
261
 
283
      /// <summary>
262
      /// <summary>
284
      /// This method will be called by the base class parser when it has obtained a ReqPro
263
      /// This method will be called by the base class parser when it has obtained a ReqPro
285
      /// project object. We capture that object here so we can interrogate the ReqPro database
264
      /// project object. We capture that object here so we can interrogate the ReqPro database
286
      /// ourselves, if we need to. We wont do that for package/requirement reading, but we may
265
      /// ourselves, if we need to. We wont do that for package/requirement reading, but we may
287
      /// do it for meta-data such as requirement types, etc.
266
      /// do it for meta-data such as requirement types, etc.
288
      /// </summary>
267
      /// </summary>
289
      /// <param name="reqpro_project"></param>
268
      /// <param name="reqpro_project"></param>
290
      protected override void provideReqProDatabaseInfo(ReqPro40.Project rq_project)
269
      protected override void provideReqProDatabaseInfo(ReqPro40.Application rq_app, 
-
 
270
         ReqPro40.Project rq_project, 
-
 
271
         ReqProDB_Artifact rq_artifact,
-
 
272
         EA.Element rq_element)
291
      {
273
      {
-
 
274
         RQ_app = rq_app;
292
         RQ_project = rq_project;
275
         RQ_project = rq_project;
-
 
276
         RQ_Artifact = rq_artifact;
-
 
277
         RQ_Element = rq_element;
293
      }
278
      }
294
 
279
 
295
      /// <summary>
280
      /// <summary>
296
      /// This method will be called by the base class parser whenever a package or requirement object
281
      /// This method will be called by the base class parser whenever a package or requirement object
297
      /// is found in the ReqPro database. The method collects important information from the object 
282
      /// is found in the ReqPro database. The method collects important information from the object