Subversion Repositories DevTools

Rev

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

Rev 2100 Rev 2104
Line 12... Line 12...
12
   /// </summary>
12
   /// </summary>
13
   public class EA_DocGenOptions
13
   public class EA_DocGenOptions
14
   {
14
   {
15
      public const string optstr_GeneralOptions = "[GeneralOptions]";
15
      public const string optstr_GeneralOptions = "[GeneralOptions]";
16
      public const string optstr_ElementTypes   = "[ElementTypes]";
16
      public const string optstr_ElementTypes   = "[ElementTypes]";
17
      public const string optstr_ElementHeadingStyleTransitionsToNumParaAtLevel = "ElementHeadingStyleTransitionsToNumParaAtLevel";
-
 
18
      public const string optstr_DisplayRequirementElementsAsSections = "DisplayRequirementElementsAsSections";
-
 
19
      public const string optstr_RequirementElementDisplayFormat      = "RequirementElementDisplayFormat";
-
 
20
      public const string optstr_DisplayRequirementsWithStatus        = "DisplayRequirementsWithStatus";
-
 
21
      public const string optstr_SuppressElementDescriptionMissingWarnings = "SuppressElementDescriptionMissingWarnings";
17
      public const string optstr_SuppressElementDescriptionMissingWarnings = "SuppressElementDescriptionMissingWarnings";
-
 
18
      public const string optstr_SuppressUnAllocatedRelationshipWarnings = "SuppressUnAllocatedRelationshipWarnings";
22
      public const string optstr_SuppressPrivateAttributes = "SuppressPrivateAttributes";
19
      public const string optstr_SuppressPrivateAttributes = "SuppressPrivateAttributes";
23
      public const string optstr_SuppressPrivateMethods     = "SuppressPrivateMethods";
20
      public const string optstr_SuppressPrivateMethods    = "SuppressPrivateMethods";
24
      public const string optstr_SuppressPrivateClasses     = "SuppressPrivateClasses";
21
      public const string optstr_SuppressPrivateClasses    = "SuppressPrivateClasses";
-
 
22
      public const string optstr_ConsiderAPIElementsOnly   = "ConsiderAPIClassesOnly";
-
 
23
      public const string optstr_ConsiderAPIPackagesOnly   = "ConsiderAPIPackagesOnly";
-
 
24
      public const string optstr_ConsiderAPIDiagramsOnly   = "ConsiderAPIDiagramsOnly";
-
 
25
      public const string optstr_RestrictForLinkedPackagesOnly = "APIPackageRestrictionForLinkedPackagesOnly";
25
 
26
 
26
 
27
 
27
      private string [] options_string = null;
28
      private string [] options_string = null;
28
      private bool options_found = false;
29
      private bool options_found = false;
29
 
30
 
30
      // General options
31
      // General options
31
      public  int opt_ElementHeadingTransitionLevel;
-
 
32
      public bool opt_DisplayRequirementElementsAsSections;
-
 
33
      public string opt_RequirementElementDisplayFormat;
-
 
34
 
32
 
35
      public bool opt_SuppressElementDescriptionMissingWarnings;
33
      public bool opt_SuppressElementDescriptionMissingWarnings;
-
 
34
      public bool opt_SuppressUnAllocatedRelationshipWarnings;
36
 
35
 
37
      public bool opt_DisplayRequirementsWithStatus;
-
 
38
 
36
 
39
      // Visibility options
37
      // Visibility options
40
      public bool opt_SuppressPrivateAttributes;
38
      public bool opt_SuppressPrivateAttributes;
41
      public bool opt_SuppressPrivateMethods;
39
      public bool opt_SuppressPrivateMethods;
42
      public bool opt_SuppressPrivateClasses;
40
      public bool opt_SuppressPrivateClasses;
43
 
41
 
44
 
-
 
-
 
42
      public bool opt_ConsiderAPIElementsOnly;
-
 
43
      public bool opt_ConsiderAPIPackagesOnly;
-
 
44
      public bool opt_ConsiderAPIDiagramsOnly;
-
 
45
      public bool opt_RestrictForLinkedPackagesOnly;
45
 
46
 
46
 
47
 
47
      // Element Types list
48
      // Element Types list
48
      public ArrayList opt_ElementTypes = null;
49
      public ArrayList opt_ElementTypes = null;
49
 
50
 
Line 58... Line 59...
58
      }
59
      }
59
 
60
 
60
 
61
 
61
      private void setDefaults()
62
      private void setDefaults()
62
      {
63
      {
63
         opt_ElementHeadingTransitionLevel = 0;
-
 
64
         opt_DisplayRequirementElementsAsSections = false;
-
 
65
         opt_RequirementElementDisplayFormat = "[REQUIREMENT: %s]";
-
 
66
         opt_DisplayRequirementsWithStatus = true;
-
 
67
         opt_SuppressElementDescriptionMissingWarnings = false;
64
         opt_SuppressElementDescriptionMissingWarnings = false;
-
 
65
         opt_SuppressUnAllocatedRelationshipWarnings = false;
68
         opt_SuppressPrivateAttributes = true;
66
         opt_SuppressPrivateAttributes = false;
69
         opt_SuppressPrivateMethods    = true;
67
         opt_SuppressPrivateMethods    = false;
70
         opt_SuppressPrivateClasses    = true;
68
         opt_SuppressPrivateClasses    = false;
71
 
-
 
-
 
69
         opt_ConsiderAPIElementsOnly   = false;
-
 
70
         opt_ConsiderAPIDiagramsOnly   = false;
-
 
71
         opt_ConsiderAPIPackagesOnly   = false;
-
 
72
         opt_RestrictForLinkedPackagesOnly = true;
72
      }
73
      }
73
 
74
 
74
 
75
 
75
      /// <summary>
76
      /// <summary>
76
      /// Looks for the EA_DocGen element in the selected package. To generate a document
77
      /// Looks for the EA_DocGen element in the selected package. To generate a document
Line 261... Line 262...
261
                  break;
262
                  break;
262
               }
263
               }
263
 
264
 
264
               if (parsingGenOpts == true)
265
               if (parsingGenOpts == true)
265
               {
266
               {
266
                  if (s.StartsWith(optstr_ElementHeadingStyleTransitionsToNumParaAtLevel))
267
                  if (s.StartsWith(optstr_SuppressElementDescriptionMissingWarnings))
267
                  {
-
 
268
                     opt_ElementHeadingTransitionLevel = getOptionValue(s, opt_ElementHeadingTransitionLevel);
-
 
269
                  }
-
 
270
                  else if (s.StartsWith(optstr_DisplayRequirementElementsAsSections))
-
 
271
                  {
-
 
272
                     opt_DisplayRequirementElementsAsSections = getOptionValue(s, opt_DisplayRequirementElementsAsSections);
-
 
273
                  }
-
 
274
                  else if (s.StartsWith(optstr_RequirementElementDisplayFormat))
-
 
275
                  {
-
 
276
                     opt_RequirementElementDisplayFormat = getOptionValue(s, opt_RequirementElementDisplayFormat);
-
 
277
                  }
-
 
278
                  else if (s.StartsWith(optstr_DisplayRequirementsWithStatus))
-
 
279
                  {
268
                  {
280
                     opt_DisplayRequirementsWithStatus = getOptionValue(s, opt_DisplayRequirementsWithStatus);
269
                     opt_SuppressElementDescriptionMissingWarnings = getOptionValue(s, opt_SuppressElementDescriptionMissingWarnings);
281
                  }
270
                  }
282
                  else if (s.StartsWith(optstr_SuppressElementDescriptionMissingWarnings))
271
                  else if (s.StartsWith(optstr_SuppressUnAllocatedRelationshipWarnings))
283
                  {
272
                  {
284
                     opt_SuppressElementDescriptionMissingWarnings = getOptionValue(s, opt_SuppressElementDescriptionMissingWarnings);
273
                     opt_SuppressUnAllocatedRelationshipWarnings = getOptionValue(s, opt_SuppressUnAllocatedRelationshipWarnings);
285
                  }
274
                  }
286
                  else if (s.StartsWith(optstr_SuppressPrivateClasses))
275
                  else if (s.StartsWith(optstr_SuppressPrivateClasses))
287
                  {
276
                  {
288
                     opt_SuppressPrivateClasses = getOptionValue(s, opt_SuppressPrivateClasses);
277
                     opt_SuppressPrivateClasses = getOptionValue(s, opt_SuppressPrivateClasses);
289
                  }
278
                  }
Line 293... Line 282...
293
                  }
282
                  }
294
                  else if (s.StartsWith(optstr_SuppressPrivateMethods))
283
                  else if (s.StartsWith(optstr_SuppressPrivateMethods))
295
                  {
284
                  {
296
                     opt_SuppressPrivateMethods = getOptionValue(s, opt_SuppressPrivateMethods);
285
                     opt_SuppressPrivateMethods = getOptionValue(s, opt_SuppressPrivateMethods);
297
                  }
286
                  }
-
 
287
                  else if (s.StartsWith(optstr_ConsiderAPIElementsOnly))
-
 
288
                  {
-
 
289
                     opt_ConsiderAPIElementsOnly = getOptionValue(s, opt_ConsiderAPIElementsOnly);
-
 
290
                  }
-
 
291
                  else if (s.StartsWith(optstr_ConsiderAPIPackagesOnly))
-
 
292
                  {
298
 
-
 
299
 
-
 
-
 
293
                     opt_ConsiderAPIPackagesOnly = getOptionValue(s, opt_ConsiderAPIPackagesOnly);
-
 
294
                  }
-
 
295
                  else if (s.StartsWith(optstr_RestrictForLinkedPackagesOnly))
-
 
296
                  {
-
 
297
                     opt_RestrictForLinkedPackagesOnly = getOptionValue(s, opt_RestrictForLinkedPackagesOnly);
-
 
298
                  }
-
 
299
                  else if (s.StartsWith(optstr_ConsiderAPIDiagramsOnly))
-
 
300
                  {
-
 
301
                     opt_ConsiderAPIDiagramsOnly = getOptionValue(s, opt_ConsiderAPIDiagramsOnly);
-
 
302
                  }
300
                  // add others here
303
                  // add others here
301
 
304
 
302
               }
305
               }
303
            }         
306
            }         
304
         }
307
         }
Line 406... Line 409...
406
         StringBuilder sb = new StringBuilder();
409
         StringBuilder sb = new StringBuilder();
407
 
410
 
408
         sb.Append( optstr_GeneralOptions );
411
         sb.Append( optstr_GeneralOptions );
409
         sb.Append( "\r\n" );
412
         sb.Append( "\r\n" );
410
 
413
 
411
         // Requirement Display options
-
 
412
         if (opt_DisplayRequirementsWithStatus)
-
 
413
         {
-
 
414
            sb.Append( optstr_DisplayRequirementsWithStatus );
-
 
415
            sb.Append( "=true\r\n" );
-
 
416
            sb.Append( optstr_DisplayRequirementElementsAsSections );
-
 
417
            sb.Append( "=false\r\n" );
-
 
418
         }
-
 
419
         else if (opt_DisplayRequirementElementsAsSections)
-
 
420
         {
-
 
421
            sb.Append( optstr_DisplayRequirementsWithStatus );
-
 
422
            sb.Append( "=false\r\n" );
-
 
423
            sb.Append( optstr_DisplayRequirementElementsAsSections );
-
 
424
            sb.Append( "=true\r\n" );
-
 
425
         }
-
 
426
         else
-
 
427
         {
-
 
428
            sb.Append( optstr_DisplayRequirementsWithStatus );
-
 
429
            sb.Append( "=false\r\n" );
-
 
430
            sb.Append( optstr_DisplayRequirementElementsAsSections );
-
 
431
            sb.Append( "=false\r\n" );
-
 
432
            sb.Append( optstr_RequirementElementDisplayFormat );
-
 
433
            sb.Append( "=" );
-
 
434
            sb.Append( opt_RequirementElementDisplayFormat );
-
 
435
            sb.Append( "\r\n" );
-
 
436
         }
-
 
437
 
-
 
438
         // Missing Description handling options
414
         // Missing Description handling options
439
         updateEA_DocGen(ref sb, opt_SuppressElementDescriptionMissingWarnings, optstr_SuppressElementDescriptionMissingWarnings);
415
         updateEA_DocGen(ref sb, opt_SuppressElementDescriptionMissingWarnings, optstr_SuppressElementDescriptionMissingWarnings);
440
 
-
 
441
         // NumPara transition option
-
 
442
         updateEA_DocGen(ref sb, opt_ElementHeadingTransitionLevel, optstr_ElementHeadingStyleTransitionsToNumParaAtLevel);
416
         updateEA_DocGen(ref sb, opt_SuppressUnAllocatedRelationshipWarnings, optstr_SuppressUnAllocatedRelationshipWarnings);
443
 
417
 
444
         // visibility options
418
         // visibility options
445
         updateEA_DocGen(ref sb, opt_SuppressPrivateClasses,    optstr_SuppressPrivateClasses);
419
         updateEA_DocGen(ref sb, opt_SuppressPrivateClasses,    optstr_SuppressPrivateClasses);
446
         updateEA_DocGen(ref sb, opt_SuppressPrivateAttributes, optstr_SuppressPrivateAttributes);
420
         updateEA_DocGen(ref sb, opt_SuppressPrivateAttributes, optstr_SuppressPrivateAttributes);
447
         updateEA_DocGen(ref sb, opt_SuppressPrivateMethods,    optstr_SuppressPrivateMethods);
421
         updateEA_DocGen(ref sb, opt_SuppressPrivateMethods,    optstr_SuppressPrivateMethods);
-
 
422
         updateEA_DocGen(ref sb, opt_ConsiderAPIElementsOnly,   optstr_ConsiderAPIElementsOnly);
-
 
423
         updateEA_DocGen(ref sb, opt_ConsiderAPIDiagramsOnly,   optstr_ConsiderAPIDiagramsOnly);
-
 
424
         updateEA_DocGen(ref sb, opt_ConsiderAPIPackagesOnly,   optstr_ConsiderAPIPackagesOnly);
-
 
425
         updateEA_DocGen(ref sb, opt_RestrictForLinkedPackagesOnly, optstr_RestrictForLinkedPackagesOnly);
-
 
426
 
448
 
427
 
449
         // Element type filtering options
428
         // Element type filtering options
450
         if (opt_ElementTypes.Count > 0)
429
         if (opt_ElementTypes.Count > 0)
451
         {
430
         {
452
            sb.Append( "\r\n" );
431
            sb.Append( "\r\n" );