Subversion Repositories DevTools

Rev

Rev 2116 | Rev 2124 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2088 ghuddy 1
using System;
2
using System.Windows.Forms;
3
using System.IO;
4
using System.Collections;
2094 ghuddy 5
using System.Collections.Specialized;
6
using System.Text;
2088 ghuddy 7
 
8
namespace EA_DocGen
9
{
10
   /// <summary>
11
   /// Summary description for EA_DocGenOptions.
12
   /// </summary>
13
   public class EA_DocGenOptions
14
   {
2106 ghuddy 15
      // Strings used in the notes section of an EA_DocGen element that persists the options.
16
      public static string optstr_GeneralOptions = "[GeneralOptions]";
17
      public static string optstr_ElementTypes   = "[ElementTypes]";
2094 ghuddy 18
 
2106 ghuddy 19
      private static string [] options_string = null;
20
      private static bool options_found = false;
2088 ghuddy 21
 
2116 ghuddy 22
      // Boolean options
23
      public enum boolean_options_e
24
      {
25
         SUPPRESS_PRIVATE_CLASSES = 0,
26
         SUPPRESS_PRIVATE_ATTRIBUTES,
27
         SUPPRESS_PRIVATE_METHODS,
28
         SUPPRESS_METHOD_CHARACTERISTICS,
29
         SUPPRESS_CLASS_CHARACTERISTICS,
30
         SUPPRESS_CLASS_REQUIREMENTS,
31
         SUPPRESS_CLASS_CONSTRAINTS,
32
         SUPPRESS_CLASS_BASE_CLASSES,
33
         SUPPRESS_CLASS_REALISES,
34
         SUPPRESS_ATTRIBUTE_CHARACTERISTICS,
35
         SUPPRESS_ELEMENT_DESC_MISSING_WARNINGS,
36
         SUPPRESS_UN_ALLOCATED_RELATIONSHIP_WARNINGS,
37
         CONSIDER_API_ELEMENTS_ONLY,
38
         CONSIDER_API_DIAGRAMS_ONLY,
39
         CONSIDER_API_PACKAGES_ONLY,
40
         RESTRICT_FOR_LINKED_PACKAGES_ONLY,
41
         USE_NUM_PARA_FOR_GENERATED_TEST_CASES,
2088 ghuddy 42
 
2116 ghuddy 43
         UNKNOWN = -1
44
      };
2094 ghuddy 45
 
2116 ghuddy 46
      // local class to collect together stuff for a discrete boolean option
47
      private class boolopt
48
      {
49
         public boolean_options_e enumVal;
50
         public int level;
51
         public string optstr;
52
         public string displayName;
53
         public bool value;
54
         public boolopt(int l, boolean_options_e e, string o, string dn, bool v)
55
         {
56
            enumVal = e;
57
            level = l;
58
            optstr = o;
59
            displayName = dn;
60
            value = v;
61
         }
62
      };
2088 ghuddy 63
 
2116 ghuddy 64
      // A collection of boolean options
65
      public static ArrayList boolopts;
66
      private static int i_boolopts;
67
 
2094 ghuddy 68
 
2088 ghuddy 69
      // Element Types list
2106 ghuddy 70
      public static ArrayList opt_ElementTypes = null;
2088 ghuddy 71
 
2116 ghuddy 72
 
2106 ghuddy 73
      public static void initialise()
2088 ghuddy 74
      {
2116 ghuddy 75
         // Create discrete boolean options collection. The ordering of these statements dictates the display order in
76
         // the options form.
77
         //
78
         // WARNING: level number can be 1 or 2, but no higher.
79
         //
80
         // BIG WARNING
81
         // Make sure that if any option string is a substring of another option string, then the longest of the
82
         // two must appear first in this initialisation sequence
83
 
84
         boolopts = new ArrayList();
85
         boolopts.Add(new boolopt(1, boolean_options_e.CONSIDER_API_ELEMENTS_ONLY,        "ConsiderAPIClassesOnly",  "Consider API Stereotyped Elements Only", false) );
86
         boolopts.Add(new boolopt(1, boolean_options_e.CONSIDER_API_DIAGRAMS_ONLY,        "ConsiderAPIDiagramsOnly", "Consider API Stereotyped Diagrams Only", false) );
87
         boolopts.Add(new boolopt(1, boolean_options_e.CONSIDER_API_PACKAGES_ONLY,        "ConsiderAPIPackagesOnly", "Consider API Stereotyped Packages Only", false) );
88
         boolopts.Add(new boolopt(2, boolean_options_e.RESTRICT_FOR_LINKED_PACKAGES_ONLY, "APIPackageRestrictionForLinkedPackagesOnly", "Restriction Applies Only To Linked Packages", true) );
89
 
90
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_PRIVATE_CLASSES,       "SuppressPrivateClasses",       "Suppress Private Classes", false) );
91
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_CLASS_CHARACTERISTICS, "SuppressClassCharacteristics", "Suppress Class Characteristics", false) );
92
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_CLASS_BASE_CLASSES,    "SuppressClassBaseClasses",     "Suppress Class Base Class List", false) );
93
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_CLASS_REALISES,        "SuppressClassRealises",        "Suppress Class Realisation List", false) );
94
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_CLASS_REQUIREMENTS,    "SuppressClassRequirements",    "Suppress Class Requirements", false) );
95
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_CLASS_CONSTRAINTS,     "SuppressClassConstraints",     "Suppress Class Constraints", false) );
96
 
97
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_PRIVATE_ATTRIBUTES,        "SuppressPrivateAttributes",        "Suppress Private Attributes", false) );
98
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_ATTRIBUTE_CHARACTERISTICS, "SuppressAttributeCharacteristics", "Suppress Attribute Characteristics", false) );
99
 
100
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_PRIVATE_METHODS,        "SuppressPrivateMethods",        "Suppress Private Methods", false) );
101
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_METHOD_CHARACTERISTICS, "SuppressMethodCharacteristics", "Suppress Method Characteristics", false) );
102
 
103
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_ELEMENT_DESC_MISSING_WARNINGS,      "SuppressElementDescriptionMissingWarnings", "Suppress Element Description Missing Warnings", false) );
104
         boolopts.Add(new boolopt(1, boolean_options_e.SUPPRESS_UN_ALLOCATED_RELATIONSHIP_WARNINGS, "SuppressUnAllocatedRelationshipWarnings",   "Suppress Un-Allocated Relationship Warnings", false) );
105
 
106
         boolopts.Add(new boolopt(1, boolean_options_e.USE_NUM_PARA_FOR_GENERATED_TEST_CASES, "UseNumParaForGeneratedTestCases", "Use NumPara Styles For Generated Test Case Sections", true) );
107
 
108
         // Create element types list
2108 ghuddy 109
         if (opt_ElementTypes == null)
110
            opt_ElementTypes = new ArrayList();
111
         opt_ElementTypes.Clear();
2088 ghuddy 112
         setDefaults();
113
      }
114
 
2116 ghuddy 115
 
116
      /// <summary>
117
      /// Function to return to another class the value of a specified discrete boolean option
118
      /// </summary>
119
      /// <param name="e"></param>
120
      /// <returns></returns>
121
      public static bool optionValue(boolean_options_e e)
122
      {
123
         foreach (boolopt bo in boolopts)
124
         {
125
            if (bo.enumVal == e)
126
            {
127
               return bo.value;
128
            }
129
         }
130
         return false;
131
      }
132
 
133
      /// <summary>
134
      /// Function to allow another class to set the value of a discrete boolean option.
135
      /// Normally, this will only be done from the editing form class.
136
      /// </summary>
137
      /// <param name="e"></param>
138
      /// <param name="value"></param>
139
      public static void optionValue(boolean_options_e e, bool value)
140
      {
141
         foreach (boolopt bo in boolopts)
142
         {
143
            if (bo.enumVal == e)
144
            {
145
               bo.value = value;
146
               break;
147
            }
148
         }
149
      }
150
 
151
      /// <summary>
152
      /// Function to return the option string to use for a specified
153
      /// discrete boolean option. Option strings are used in the actual EA element to record
154
      /// the state of the option. They are (or may be) similar to the display names for the options
155
      /// but without any spaces, and they may be shortened somewhat too.
156
      /// </summary>
157
      /// <param name="e"></param>
158
      /// <returns></returns>
159
      private static string optionString(boolean_options_e e)
160
      {
161
         foreach (boolopt bo in boolopts)
162
         {
163
            if (bo.enumVal == e)
164
            {
165
               return bo.optstr;
166
            }
167
         }
168
         return null;
169
      }
170
 
171
      /// <summary>
172
      /// Helper for getFirstBooleanOption() and getNextBooleanOption()
173
      /// </summary>
174
      /// <param name="index"></param>
175
      /// <param name="e"></param>
176
      /// <param name="level"></param>
177
      /// <param name="displayName"></param>
178
      /// <param name="value"></param>
179
      private static void getBooleanOption(int index, out boolean_options_e e, out int level, out string displayName, out bool value)
180
      {
181
         boolopt o = (boolopt)boolopts[index];
182
         e = o.enumVal;
183
         level = o.level;
184
         displayName = o.displayName;
185
         value = o.value;
186
      }
187
 
188
      /// <summary>
189
      /// Function to return the details of the first discrete boolean option.
190
      /// This will be used by the option editing form class to populate a list for user editing.
191
      /// </summary>
192
      /// <param name="e"></param>
193
      /// <param name="level"></param>
194
      /// <param name="displayName"></param>
195
      /// <param name="value"></param>
196
      /// <returns></returns>
197
      public static bool getFirstBooleanOption(out boolean_options_e e, out int level, out string displayName, out bool value)
198
      {
199
         i_boolopts = 0;
200
 
201
         e = boolean_options_e.UNKNOWN;
202
         level = 1;
203
         displayName = "";
204
         value = false;
205
 
206
         if (i_boolopts < boolopts.Count)
207
         {
208
            getBooleanOption(i_boolopts, out e, out level, out displayName, out value);
209
            return true;
210
         }
211
         else
212
         {
213
            return false;
214
         }
215
      }
216
 
217
      /// <summary>
218
      /// Function to return the details of the next discrete boolean option.
219
      /// This will be used by the option editing form class to populate a list for user editing.
220
      /// </summary>
221
      /// <param name="e"></param>
222
      /// <param name="level"></param>
223
      /// <param name="displayName"></param>
224
      /// <param name="value"></param>
225
      /// <returns></returns>
226
      public static bool getNextBooleanOption(out boolean_options_e e, out int level, out string displayName, out bool value)
227
      {
228
         i_boolopts++;
229
 
230
         e = boolean_options_e.UNKNOWN;
231
         level = 1;
232
         displayName = "";
233
         value = false;
234
 
235
         if (i_boolopts < boolopts.Count)
236
         {
237
            getBooleanOption(i_boolopts, out e, out level, out displayName, out value);
238
            return true;
239
         }
240
         else
241
         {
242
            return false;
243
         }
244
      }
245
 
246
      /// <summary>
247
      /// Set default values for the discrete boolean options.
248
      /// </summary>
2106 ghuddy 249
      private static void setDefaults()
2088 ghuddy 250
      {
2116 ghuddy 251
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_ELEMENT_DESC_MISSING_WARNINGS, false);
252
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_UN_ALLOCATED_RELATIONSHIP_WARNINGS, false);
253
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_ATTRIBUTES, false);
254
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_METHODS, false);
255
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_CLASSES, false);
256
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_METHOD_CHARACTERISTICS, false);
257
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_CHARACTERISTICS, false);
258
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_REQUIREMENTS, false);
259
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_CONSTRAINTS, false);
260
         optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_ATTRIBUTE_CHARACTERISTICS, false);
261
         optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_ELEMENTS_ONLY, false);
262
         optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_DIAGRAMS_ONLY, false);
263
         optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_PACKAGES_ONLY, false);
264
         optionValue(EA_DocGenOptions.boolean_options_e.RESTRICT_FOR_LINKED_PACKAGES_ONLY, true);
2088 ghuddy 265
      }
266
 
267
 
268
      /// <summary>
269
      /// Looks for the EA_DocGen element in the selected package. To generate a document
270
      /// on a package, the package must contain the EA_DocGen element, even if that elements
271
      /// notes are empty. It serves to denote a package as a document model that is allowed
272
      /// to be processed by this add-in.
273
      /// </summary>
274
      /// <param name="parentPackage"></param>
275
      /// <returns></returns>
2122 ghuddy 276
      public static EA.Package lookForAndProcess_EA_DocGen_Element( EA.Package pkg )
2088 ghuddy 277
      {
2122 ghuddy 278
         options_found = false;
2088 ghuddy 279
 
2122 ghuddy 280
         // iterate up through the package hiearchy
281
         while (pkg != null)
2088 ghuddy 282
         {
2122 ghuddy 283
            // Look for an EA_DocGen element in this package
284
            foreach(EA.Element theElement in pkg.Elements)
285
            {
286
               options_found = lookForAndProcess_EA_DocGen_Element(theElement);
287
               if (options_found)
288
               {
289
                  return pkg;
290
               }
291
            }            
292
 
293
            // Didnt find EA_DocGen element, go up one package level ready for the next loop iteration
294
            if (pkg.ParentID > 0)
295
            {
296
               pkg = Main.EA_Repository.GetPackageByID(pkg.ParentID);
297
            }
298
            else
299
            {
300
               // force loop termination if cannot go up one more package level
301
               pkg = null;
302
            }
303
         }
304
 
305
         return pkg;
2094 ghuddy 306
      }
2088 ghuddy 307
 
2106 ghuddy 308
      public static bool lookForAndProcess_EA_DocGen_Element( EA.Element theElement )
2094 ghuddy 309
      {
2108 ghuddy 310
         initialise();
311
 
2094 ghuddy 312
         options_string = null;
313
         options_found  = false;
2088 ghuddy 314
 
2094 ghuddy 315
         // Special handling for the EA_DocGen element designed to control this document
316
         // generator
317
         if (0 == theElement.Name.CompareTo(EA_Constants.EA_DocGenBaseName))
318
         {
319
            options_found = true;
2088 ghuddy 320
 
2094 ghuddy 321
            // Extract the content of the EA_DocGen element notes section, into a list of
322
            // strings.
323
            string delimStr = "\n";
324
            char [] delim = delimStr.ToCharArray();
2116 ghuddy 325
            options_string = theElement.Notes.ToString().Split(delim,400);
2094 ghuddy 326
 
327
            int i = 0;
328
            foreach(string s in options_string)
329
            {
330
               options_string[i] = s.Trim();
331
               i++;
2088 ghuddy 332
            }
333
 
2094 ghuddy 334
            // Extract general options from the list of strings
335
            extractGeneralOptions();
336
 
337
            // Extract element types list from the list of strings
338
            extractElementTypes();
339
         }
340
 
2088 ghuddy 341
         return options_found;
342
      }
343
 
344
 
2106 ghuddy 345
      private static string getOptionValueString(string optionLine)
2088 ghuddy 346
      {
347
         string delimStr = "=";
348
         char [] delim = delimStr.ToCharArray();
349
         string [] optionLineParts = optionLine.Split(delim,2);
350
         if (optionLineParts.GetLength(0) == 2)
351
         {
352
            return optionLineParts[1];
353
         }
354
         else
355
         {
356
            MessageBox.Show( "Error in EA_DocGen option\n\n" + optionLine + "\n\n" + "Missing value" );
357
         }
358
         return null;
359
      }
360
 
361
 
362
      // Overloaded "get option value" methods
2106 ghuddy 363
      public static int getOptionValue(string s, int defaultReturnValue)
2088 ghuddy 364
      {
365
         int returnVal = defaultReturnValue;
366
 
367
         string optionValue = getOptionValueString(s);
368
         if (optionValue != null)
369
         {
370
            try
371
            {
372
               returnVal = Convert.ToInt32(optionValue);
373
            }
374
            catch(Exception)
375
            {
376
               MessageBox.Show( "Error in EA_DocGen option\n\n" + s + "\n\n" + "Expected valid integer" );
377
            }
378
         }   
379
         return returnVal;
380
      }
381
 
2106 ghuddy 382
      public static double getOptionValue(string s, double defaultReturnValue)
2100 ghuddy 383
      {
384
         double returnVal = defaultReturnValue;
385
 
386
         string optionValue = getOptionValueString(s);
387
         if (optionValue != null)
388
         {
389
            try
390
            {
391
               returnVal = Convert.ToDouble(optionValue);
392
            }
393
            catch(Exception)
394
            {
395
               MessageBox.Show( "Error in EA_DocGen option\n\n" + s + "\n\n" + "Expected valid double" );
396
            }
397
         }   
398
         return returnVal;
399
      }
400
 
2106 ghuddy 401
      public static bool getOptionValue(string s, bool defaultReturnValue)
2088 ghuddy 402
      {
403
         bool returnVal = defaultReturnValue;
404
 
405
         string optionValue = getOptionValueString(s);
406
         if (optionValue != null)
407
         {
408
            try
409
            {
410
               returnVal = Convert.ToBoolean(optionValue);
411
            }
412
            catch(Exception)
413
            {
414
               MessageBox.Show( "Error in EA_DocGen option\n\n" + s + "\n\n" + "Expected valid boolean" );
415
            }
416
         }   
417
         return returnVal;
418
      }
419
 
420
 
2106 ghuddy 421
      public static string getOptionValue(string s, string defaultReturnValue)
2088 ghuddy 422
      {
423
         string returnVal = defaultReturnValue;
424
 
425
         string optionValue = getOptionValueString(s);
426
         if (optionValue != null)
427
         {
428
            returnVal = optionValue;
429
         }   
430
         return returnVal;
431
      }
432
 
433
 
2106 ghuddy 434
      public static char getOptionValue(string s, char defaultReturnValue)
2088 ghuddy 435
      {
436
         char returnVal = defaultReturnValue;
437
 
438
         string optionValue = getOptionValueString(s);
439
         if (optionValue != null && optionValue.Length > 0)
440
         {
441
            returnVal = optionValue[0];
442
         }   
443
         return returnVal;
444
      }
445
 
446
 
447
 
448
      /// <summary>
449
      /// Method to extract all the general options from the string array obtained from
450
      /// the EA_DocGen element
451
      /// </summary>
2106 ghuddy 452
      private static void extractGeneralOptions()
2088 ghuddy 453
      {
454
         bool parsingGenOpts = false;
455
 
456
         if (options_string != null)
457
         {
458
            // iterate through the string array obtained from the EA_DocGen element
459
            foreach(string s in options_string)
460
            {
2094 ghuddy 461
               if (s.StartsWith(optstr_GeneralOptions))
2088 ghuddy 462
               {
463
                  parsingGenOpts = true;
464
                  continue;
465
               }
466
               else if (   (parsingGenOpts == true) 
467
                        && (s.Length >= 1)
468
                        && (s.Substring(0,1) == "[") )
469
               {
470
                  // we have gone past the general options and reached another section in EA_DocGen
471
                  // so there is no point in continuing. Exit the loop
472
                  break;
473
               }
474
 
475
               if (parsingGenOpts == true)
476
               {
2116 ghuddy 477
                  foreach(boolopt bo in boolopts)
2088 ghuddy 478
                  {
2116 ghuddy 479
                     if (s.StartsWith(bo.optstr))
480
                     {
481
                        optionValue(bo.enumVal, getOptionValue(s, bo.value));
482
                     }
2088 ghuddy 483
                  }
484
               }
485
            }         
486
         }
487
      }
488
 
489
 
2106 ghuddy 490
      private static void extractElementTypes()
2088 ghuddy 491
      {
492
         bool parsingElementTypes = false;
493
 
494
         opt_ElementTypes.Clear();
495
 
496
         if (options_string != null)
497
         {
498
            // iterate through the string array obtained from the EA_DocGen element
499
            foreach(string s in options_string)
500
            {
2094 ghuddy 501
               if (s.StartsWith(optstr_ElementTypes))
2088 ghuddy 502
               {
503
                  parsingElementTypes = true;
504
                  continue;
505
               }
506
               else if (   (parsingElementTypes == true) 
507
                        && (s.Length >= 1)
508
                        && (s.Substring(0,1) == "[") )
509
               {
510
                  // we have gone past the element types and reached another section in EA_DocGen
511
                  // so there is no point in continuing. Exit the loop
512
                  break;
513
               }
514
 
515
               if (parsingElementTypes == true)
516
               {
517
                  string trimmed_s = s.Trim();
518
                  if (trimmed_s.Length > 0)
519
                  {
520
                     opt_ElementTypes.Add( s );
521
                  }
522
               }
523
            }
524
         }
525
      }
526
 
527
 
528
      /// <summary>
529
      /// This method searches the EA_DocGen string list to find the element types the user
530
      /// has specified that must be included in the document. If the element type given to
531
      /// the function is not in that list then it is excluded from the generated document.
532
      /// The notes of the EA_DocGen element are formed like a .ini file and contain sections 
533
      /// and section content along the lines of:
534
      /// 
535
      /// [sectionName]
536
      /// value
537
      /// value
538
      /// etc
539
      /// [anotherSectionName]
540
      /// value
541
      /// value
542
      /// etc
543
      /// 
544
      /// The [ElementTypes] section is the one this function is interested in
545
      /// 
546
      /// </summary>
547
      /// <param name="elementName"></param>
548
      /// <returns></returns>
2106 ghuddy 549
      public static bool elementTypeFoundInEA_DocGen(string elementType)
2088 ghuddy 550
      {
551
         if (opt_ElementTypes != null && opt_ElementTypes.Count > 0)
552
         {
553
            foreach(string s in opt_ElementTypes)
554
            {
555
               if (s.StartsWith(elementType))
556
               {
557
                  return true;
558
               }
559
            } 
560
            // elementType is not in the opt_ElementTypes list, so element is filtered out
561
            return false;
562
         }
563
         else
564
         {
565
            // opt_ElementTypes is empty so no filtering, return true 
566
            return true;
567
         }
568
      }
569
 
2116 ghuddy 570
      private static void updateEA_DocGen(ref StringBuilder sb, EA_DocGenOptions.boolean_options_e e)
2094 ghuddy 571
      {
2116 ghuddy 572
         boolopt o = (boolopt)boolopts[(int)e];
573
 
574
         sb.Append( o.optstr );
2094 ghuddy 575
         sb.Append( "=" );
2116 ghuddy 576
         sb.Append( o.value.ToString() );
2094 ghuddy 577
         sb.Append( "\r\n" );
578
      }
2088 ghuddy 579
 
2106 ghuddy 580
      private static void updateEA_DocGen(ref StringBuilder sb, int iValue, string s)
2094 ghuddy 581
      {
582
         sb.Append( s );
583
         sb.Append( "=" );
584
         sb.Append( iValue.ToString() );
585
         sb.Append( "\r\n" );
586
      }
587
 
2106 ghuddy 588
      public static void updateEA_DocGen(EA.Element ele)
2094 ghuddy 589
      {
590
         StringBuilder sb = new StringBuilder();
591
 
592
         sb.Append( optstr_GeneralOptions );
593
         sb.Append( "\r\n" );
594
 
2116 ghuddy 595
         // output discrete boolean options
596
         foreach(boolopt bo in boolopts)
597
         {
598
            updateEA_DocGen(ref sb, bo.enumVal);
599
         }
2094 ghuddy 600
 
601
         // Element type filtering options
602
         if (opt_ElementTypes.Count > 0)
603
         {
604
            sb.Append( "\r\n" );
605
            sb.Append( optstr_ElementTypes );
606
            sb.Append( "\r\n" );
607
            foreach (string s in opt_ElementTypes)
608
            {
609
               sb.Append( s );
610
               sb.Append( "\r\n" );
611
            }
612
         }
613
 
614
         ele.Notes = sb.ToString();
615
         ele.Update();
616
 
617
      }
618
 
2088 ghuddy 619
   } // end of class
620
} // end of namespace