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 123... Line 123...
123
      protected bool reqTypeIsFiltered(ReqPro_object rq_obj)
123
      protected bool reqTypeIsFiltered(ReqPro_object rq_obj)
124
      {
124
      {
125
         return ((ReqPro_ReqType)rq_req_types[rq_obj.tag_enum]).filtered;
125
         return ((ReqPro_ReqType)rq_req_types[rq_obj.tag_enum]).filtered;
126
      }
126
      }
127
 
127
 
128
      protected bool reqTypeHasOneOrMoreAttrs(ReqPro_object rq_obj, ref bool hasStatus, ref bool hasDiff, ref bool hasPrio)
128
      protected bool reqTypeHasOneOrMoreAttrs(ReqPro_object rq_obj, 
-
 
129
         ref bool hasStatus, 
-
 
130
         ref bool hasDiff, 
-
 
131
         ref bool hasPrio,
-
 
132
         ref bool hasSource,
-
 
133
         ref bool hasSourceVersion,
-
 
134
         ref bool hasSourceSection)
129
      {
135
      {
130
         foreach (ReqPro_ReqType rp_rt in rq_req_types)
136
         foreach (ReqPro_ReqType rp_rt in rq_req_types)
131
         {
137
         {
132
            if (rq_obj.tag.StartsWith(rp_rt.prefix))
138
            if (rq_obj.tag.StartsWith(rp_rt.prefix))
133
            {
139
            {
134
               hasStatus = rp_rt.hasStatus;
140
               hasStatus = rp_rt.hasStatus;
135
               hasDiff = rp_rt.hasDifficulty;
141
               hasDiff = rp_rt.hasDifficulty;
136
               hasPrio = rp_rt.hasPriority;
142
               hasPrio = rp_rt.hasPriority;
137
               return hasStatus | hasDiff | hasPrio;
143
               hasSource = rp_rt.hasSource;
-
 
144
               hasSourceVersion = rp_rt.hasSourceVersion;
-
 
145
               hasSourceSection = rp_rt.hasSourceSection;
-
 
146
 
-
 
147
               return hasStatus | hasDiff | hasPrio | hasSource | hasSourceVersion | hasSourceSection;
138
            }
148
            }
139
         }
149
         }
140
 
150
 
141
         return false;
151
         return false;
142
      }
152
      }
Line 198... Line 208...
198
            }
208
            }
199
            catch 
209
            catch 
200
            {
210
            {
201
               delayedMessages.Add( string.Format("WARNING, ReqPro requirement type ({0}) has no Priority attribute", rp_rt.prefix) );
211
               delayedMessages.Add( string.Format("WARNING, ReqPro requirement type ({0}) has no Priority attribute", rp_rt.prefix) );
202
            };
212
            };
-
 
213
 
-
 
214
            try 
-
 
215
            {
-
 
216
               ReqPro40.Attr attr = rp_rt.rq_type.get_Attr("Source", ReqPro40.enumAttrLookups.eAttrLookups_Label);
-
 
217
               rp_rt.hasSource = true;
-
 
218
            }
-
 
219
            catch 
-
 
220
            {
-
 
221
               delayedMessages.Add( string.Format("WARNING, ReqPro requirement type ({0}) has no Source attribute", rp_rt.prefix) );
-
 
222
            };
-
 
223
 
-
 
224
            try 
-
 
225
            {
-
 
226
               ReqPro40.Attr attr = rp_rt.rq_type.get_Attr("Source Version", ReqPro40.enumAttrLookups.eAttrLookups_Label);
-
 
227
               rp_rt.hasSourceVersion = true;
-
 
228
            }
-
 
229
            catch 
-
 
230
            {
-
 
231
               delayedMessages.Add( string.Format("WARNING, ReqPro requirement type ({0}) has no Source Version attribute", rp_rt.prefix) );
-
 
232
            };
-
 
233
 
-
 
234
            try 
-
 
235
            {
-
 
236
               ReqPro40.Attr attr = rp_rt.rq_type.get_Attr("Source Section", ReqPro40.enumAttrLookups.eAttrLookups_Label);
-
 
237
               rp_rt.hasSourceSection = true;
-
 
238
            }
-
 
239
            catch 
-
 
240
            {
-
 
241
               delayedMessages.Add( string.Format("WARNING, ReqPro requirement type ({0}) has no Source Section attribute", rp_rt.prefix) );
-
 
242
            };
203
         }
243
         }
204
 
244
 
205
         // if reqpro had no status values, then add a dummy one
245
         // if reqpro had no status values, then add a dummy one
206
         if (status_values.Count == 0)
246
         if (status_values.Count == 0)
207
         {
247
         {
Line 326... Line 366...
326
                  return false;
366
                  return false;
327
 
367
 
328
               // if we do not currently have a ReqProDB artifact, create one
368
               // if we do not currently have a ReqProDB artifact, create one
329
               if (RQ_Element == null)
369
               if (RQ_Element == null)
330
               {
370
               {
331
                  EA_Utilities EA_Utils = new EA_Utilities();
-
 
332
 
-
 
333
                  RQ_Element = RQ_Artifact.create_rq_artifact(
371
                  RQ_Element = RQ_Artifact.create_rq_artifact(
334
                     EA_Utils.get_selected_package(), 
372
                     EA_Utilities.get_selected_package(), 
335
                     rq_project.Name, 
373
                     rq_project.Name, 
336
                     rq_project.Description, 
374
                     rq_project.Description, 
337
                     logon.ebUserName.Text, 
375
                     logon.ebUserName.Text, 
338
                     ofd.FileName, 
376
                     ofd.FileName, 
339
                     rq_project.GUID);
377
                     rq_project.GUID);
Line 368... Line 406...
368
               return true;
406
               return true;
369
            }
407
            }
370
         }
408
         }
371
         catch (Exception ex)
409
         catch (Exception ex)
372
         {
410
         {
373
            MessageBoxEx.Show(ex.Message, "Error (prompt_and_parse)", MessageBoxButtons.OK);
411
            Main.MessageBoxException(ex, "Exception (prompt_and_parse)");
374
            if (rq_project != null)
412
            if (rq_project != null)
375
               rq_project.CloseProject();
413
               rq_project.CloseProject();
376
         }  
414
         }  
377
         return false;
415
         return false;
378
      }
416
      }