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 13... Line 13...
13
	/// </summary>
13
	/// </summary>
14
	public class CopyReqProDatabaseToMemory : ReqProParser
14
	public class CopyReqProDatabaseToMemory : ReqProParser
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
      // items setup by base class calling into provideReqProDatabaseInfo()
21
      protected ReqPro40.Project RQ_project;
21
      protected ReqPro40.Project RQ_project;
22
      protected ReqPro40.Application RQ_app;
22
      protected ReqPro40.Application RQ_app;
23
      protected ReqProDB_Artifact RQ_Artifact;
23
      protected ReqProDB_Artifact RQ_Artifact;
Line 42... Line 42...
42
      /// <param name="ea_repository"></param>
42
      /// <param name="ea_repository"></param>
43
		public CopyReqProDatabaseToMemory(): base()
43
		public CopyReqProDatabaseToMemory(): base()
44
		{
44
		{
45
         try
45
         try
46
         {
46
         {
47
            // create an EA_Utilities object
-
 
48
            EA_Utils = new EA_Utilities();
-
 
49
 
-
 
50
            // figure out where in the EA database we will place the results of parsing
47
            // figure out where in the EA database we will place the results of parsing
51
            object o;
48
            object o;
52
            EA.ObjectType type;
49
            EA.ObjectType type;
53
            type = Main.EA_Repository.GetTreeSelectedItem(out o);
50
            type = Main.EA_Repository.GetTreeSelectedItem(out o);
54
            if (type == EA.ObjectType.otElement)
51
            if (type == EA.ObjectType.otElement)
Line 65... Line 62...
65
               throw e;
62
               throw e;
66
            }
63
            }
67
         }
64
         }
68
         catch (Exception ex)
65
         catch (Exception ex)
69
         {
66
         {
70
            MessageBoxEx.Show(ex.Message, "Error (CopyReqProDatabaseToMemory)", MessageBoxButtons.OK);
67
            Main.MessageBoxException(ex, "Exception (CopyReqProDatabaseToMemory)");
71
         }    
68
         }    
72
		}
69
		}
73
 
70
 
74
 
71
 
75
 
72
 
Line 155... Line 152...
155
               RQ_project.CloseProject();
152
               RQ_project.CloseProject();
156
            }
153
            }
157
         }
154
         }
158
         catch (Exception ex)
155
         catch (Exception ex)
159
         {
156
         {
160
            MessageBoxEx.Show(ex.Message, "Error (parse)", MessageBoxButtons.OK);
157
            Main.MessageBoxException(ex, "Exception (parse)");
161
         }      
158
         }      
162
         return false;
159
         return false;
163
      }
160
      }
164
 
161
 
165
 
162
 
Line 237... Line 234...
237
            new_rq_obj.tag    = rq_requirement.get_Tag(ReqPro40.enumTagFormat.eTagFormat_FullTag);
234
            new_rq_obj.tag    = rq_requirement.get_Tag(ReqPro40.enumTagFormat.eTagFormat_FullTag);
238
 
235
 
239
            bool hasStatus = false;
236
            bool hasStatus = false;
240
            bool hasDifficulty = false;
237
            bool hasDifficulty = false;
241
            bool hasPriority = false;
238
            bool hasPriority = false;
-
 
239
            bool hasSource = false;
-
 
240
            bool hasSourceVersion = false;
-
 
241
            bool hasSourceSection = false;
-
 
242
 
-
 
243
            if (reqTypeHasOneOrMoreAttrs(new_rq_obj, 
242
            if (reqTypeHasOneOrMoreAttrs(new_rq_obj, ref hasStatus, ref hasDifficulty, ref hasPriority))
244
               ref hasStatus, ref hasDifficulty, ref hasPriority,
-
 
245
               ref hasSource, ref hasSourceVersion, ref hasSourceSection))
243
            {
246
            {
244
               if (hasStatus)
247
               if (hasStatus)
245
               {
248
               {
246
                  new_rq_obj.status = rq_requirement.AttrValues["Status", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
249
                  new_rq_obj.status = rq_requirement.AttrValues["Status", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
247
               }
250
               }
Line 251... Line 254...
251
               }
254
               }
252
               if (hasPriority)
255
               if (hasPriority)
253
               {
256
               {
254
                  new_rq_obj.priority = rq_requirement.AttrValues["Priority", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
257
                  new_rq_obj.priority = rq_requirement.AttrValues["Priority", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
255
               }
258
               }
-
 
259
               if (hasSource)
-
 
260
               {
-
 
261
                  new_rq_obj.source = rq_requirement.AttrValues["Source", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
-
 
262
               }
-
 
263
               if (hasSourceVersion)
-
 
264
               {
-
 
265
                  new_rq_obj.sourceVersion = rq_requirement.AttrValues["Source Version", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
-
 
266
               }
-
 
267
               if (hasSourceSection)
-
 
268
               {
-
 
269
                  new_rq_obj.sourceSection = rq_requirement.AttrValues["Source Section", ReqPro40.enumAttrValueLookups.eAttrValueLookup_Label].Text;
-
 
270
               }
256
            }
271
            }
257
 
272
 
258
            new_rq_obj.version    = rq_requirement.VersionNumber;
273
            new_rq_obj.version    = rq_requirement.VersionNumber;
259
            new_rq_obj.versionDateTime = rq_requirement.VersionDateTime;
274
            new_rq_obj.versionDateTime = rq_requirement.VersionDateTime;
260
 
275