Subversion Repositories DevTools

Rev

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

Rev 2110 Rev 2116
Line 403... Line 403...
403
      /// </summary>
403
      /// </summary>
404
      /// <param name="theDiagram"></param>
404
      /// <param name="theDiagram"></param>
405
      private void appendAndSelectDiagramViaClipboard(EA.Diagram theDiagram)
405
      private void appendAndSelectDiagramViaClipboard(EA.Diagram theDiagram)
406
      {
406
      {
407
         // NOTE: diagrams only use one stereotype, not a list of them, so dont use StereotypeEx field
407
         // NOTE: diagrams only use one stereotype, not a list of them, so dont use StereotypeEx field
408
         if (  EA_DocGenOptions.opt_ConsiderAPIDiagramsOnly 
408
         if (  EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_DIAGRAMS_ONLY)
409
            && !theDiagram.Stereotype.Equals("API") )
409
            && !theDiagram.Stereotype.Equals("API") )
410
         {
410
         {
411
            displayProgress( "SKIPPED DIAGRAM: ", theDiagram.Name.ToString() );
411
            displayProgress( "SKIPPED DIAGRAM: ", theDiagram.Name.ToString() );
412
         }
412
         }
413
         else if (theDiagram.StyleEx != null && theDiagram.StyleEx.IndexOf("ExcludeRTF=1") >= 0)
413
         else if (theDiagram.StyleEx != null && theDiagram.StyleEx.IndexOf("ExcludeRTF=1") >= 0)
Line 476... Line 476...
476
         }
476
         }
477
      }
477
      }
478
 
478
 
479
 
479
 
480
      #region special element processing functions (link elements, table and text elements, etc)
480
      #region special element processing functions (link elements, table and text elements, etc)
481
      /// <summary>
-
 
482
      /// This is an attempt to create a table similar in style to those made by the ERG doc template macros.
-
 
483
      /// It is not exaclty that same though, and further work could be done to align it more precisely.
-
 
484
      /// </summary>
-
 
485
      /// <param name="tableTitle"></param>
-
 
486
      /// <param name="numRows"></param>
-
 
487
      /// <param name="numCols"></param>
-
 
488
      /// <returns></returns>
-
 
489
 
481
 
490
      /// <summary>
482
      /// <summary>
491
      /// This function process a package link element, parsing each linked package by the
483
      /// This function process a package link element, parsing each linked package by the
492
      /// parse_package() recursive function.
484
      /// parse_package() recursive function.
493
      /// </summary>
485
      /// </summary>
Line 1104... Line 1096...
1104
         foreach(EA.Method theMethod in theMethods)
1096
         foreach(EA.Method theMethod in theMethods)
1105
         {
1097
         {
1106
            if (abortCreationThread)
1098
            if (abortCreationThread)
1107
               return;
1099
               return;
1108
 
1100
 
1109
            if (EA_DocGenOptions.opt_SuppressPrivateMethods == false
1101
            if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_METHODS) == false
1110
               || !theMethod.Visibility.StartsWith("Private"))
1102
               || !theMethod.Visibility.StartsWith("Private"))
1111
               numMethodsRemaining++;
1103
               numMethodsRemaining++;
1112
         }
1104
         }
1113
 
1105
 
1114
         Word.Range wr;
1106
         Word.Range wr;
Line 1128... Line 1120...
1128
               if (abortCreationThread)
1120
               if (abortCreationThread)
1129
                  return;
1121
                  return;
1130
 
1122
 
1131
               sb = new StringBuilder();
1123
               sb = new StringBuilder();
1132
 
1124
 
1133
               if (EA_DocGenOptions.opt_SuppressPrivateMethods == false
1125
               if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_METHODS) == false
1134
                  || !theMethod.Visibility.StartsWith("Private"))
1126
                  || !theMethod.Visibility.StartsWith("Private"))
1135
               {
1127
               {
1136
                  // Print the Method name as a sub heading, and its description
1128
                  // Print the Method name as a sub heading, and its description
1137
                  TextualContent.appendAndSelectHeadingText(theMethod.Name , recurse_level + 1);
1129
                  TextualContent.appendAndSelectHeadingText(theMethod.Name , recurse_level + 1);
1138
                  TextualContent.appendDescription(TextualContent.trimTrailingReturns(theMethod.Notes));
1130
                  TextualContent.appendDescription(TextualContent.trimTrailingReturns(theMethod.Notes));
Line 1200... Line 1192...
1200
                     sb.Append( ")" );
1192
                     sb.Append( ")" );
1201
                     wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1193
                     wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1202
                  }
1194
                  }
1203
 
1195
 
1204
 
1196
 
-
 
1197
                  if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_METHOD_CHARACTERISTICS) == false)
-
 
1198
                  {
1205
                  // Prototype Attributes/Characteristics
1199
                     // Prototype Attributes/Characteristics
1206
                  sb = new StringBuilder();
1200
                     sb = new StringBuilder();
1207
                  sb.Append( theMethod.Visibility );
1201
                     sb.Append( theMethod.Visibility );
1208
 
1202
 
1209
                  if (theMethod.IsStatic)
1203
                     if (theMethod.IsStatic)
1210
                     sb.Append("\nStatic");
1204
                        sb.Append("\nStatic");
1211
 
1205
 
1212
                  if (theMethod.Abstract)
1206
                     if (theMethod.Abstract)
1213
                     sb.Append("\nAbstract");
1207
                        sb.Append("\nAbstract");
1214
 
1208
 
1215
                  if (theMethod.IsPure)
1209
                     if (theMethod.IsPure)
1216
                     sb.Append("\nPure (c++)");
1210
                        sb.Append("\nPure (c++)");
1217
 
1211
 
1218
                  if (theMethod.IsSynchronized)
1212
                     if (theMethod.IsSynchronized)
1219
                     sb.Append("\nSynchronised");
1213
                        sb.Append("\nSynchronised");
1220
 
1214
 
1221
                  if (theMethod.Concurrency != null && theMethod.Concurrency.Length > 0 && !theMethod.Concurrency.StartsWith("Sequential") )
1215
                     if (theMethod.Concurrency != null && theMethod.Concurrency.Length > 0 && !theMethod.Concurrency.StartsWith("Sequential") )
1222
                  {
1216
                     {
1223
                     sb.Append("\n");
1217
                        sb.Append("\n");
1224
                     sb.Append(theMethod.Concurrency);
1218
                        sb.Append(theMethod.Concurrency);
1225
                  }
1219
                     }
1226
 
1220
 
1227
                  if (theMethod.IsConst)
1221
                     if (theMethod.IsConst)
1228
                     sb.Append("\nConst");
1222
                        sb.Append("\nConst");
1229
 
1223
 
1230
                  if (theMethod.IsQuery)
1224
                     if (theMethod.IsQuery)
1231
                     sb.Append("\nIs Querry (does not alter class variables)");
1225
                        sb.Append("\nIs Querry (does not alter class variables)");
1232
 
1226
 
1233
                  if (theMethod.IsLeaf)
1227
                     if (theMethod.IsLeaf)
1234
                     sb.Append("\nIs Leaf (cannot be overriden)");
1228
                        sb.Append("\nIs Leaf (cannot be overriden)");
1235
 
1229
 
1236
                  if (theMethod.ReturnIsArray)
1230
                     if (theMethod.ReturnIsArray)
1237
                     sb.Append( "\nReturn value is an array" );
1231
                        sb.Append( "\nReturn value is an array" );
1238
 
1232
 
1239
                  if (theMethod.Throws != null && theMethod.Throws.Length > 0)
1233
                     if (theMethod.Throws != null && theMethod.Throws.Length > 0)
1240
                  {
1234
                     {
1241
                     sb.Append("\n");
1235
                        sb.Append("\n");
1242
                     sb.Append( theMethod.Throws );
1236
                        sb.Append( theMethod.Throws );
1243
                  }
1237
                     }
1244
 
1238
 
1245
                  if (sb.Length > 0)
1239
                     if (sb.Length > 0)
1246
                  {
1240
                     {
1247
                     wr = TextualContent.appendAndSelectText("Characteristics:", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1241
                        wr = TextualContent.appendAndSelectText("Characteristics:", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1248
 
1242
 
1249
                     wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1243
                        wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
-
 
1244
                     }
1250
                  }
1245
                  }
1251
 
1246
 
1252
                  // Parameter Descriptions
1247
                  // Parameter Descriptions
1253
                  if (theParams.Count > 0)
1248
                  if (theParams.Count > 0)
1254
                  {
1249
                  {
Line 1296... Line 1291...
1296
         foreach(EA.Attribute theAttr in theAttrs)
1291
         foreach(EA.Attribute theAttr in theAttrs)
1297
         {
1292
         {
1298
            if (abortCreationThread)
1293
            if (abortCreationThread)
1299
               return;
1294
               return;
1300
 
1295
 
1301
            if (EA_DocGenOptions.opt_SuppressPrivateAttributes == false
1296
            if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_ATTRIBUTES) == false
1302
               || !theAttr.Visibility.StartsWith("Private"))
1297
               || !theAttr.Visibility.StartsWith("Private"))
1303
               numAttrsRemaining++;
1298
               numAttrsRemaining++;
1304
         }
1299
         }
1305
 
1300
 
1306
         if (numAttrsRemaining > 0)
1301
         if (numAttrsRemaining > 0)
Line 1315... Line 1310...
1315
            foreach(EA.Attribute theAttr in theAttrs)
1310
            foreach(EA.Attribute theAttr in theAttrs)
1316
            {
1311
            {
1317
               if (abortCreationThread)
1312
               if (abortCreationThread)
1318
                  return;
1313
                  return;
1319
 
1314
 
1320
               if (EA_DocGenOptions.opt_SuppressPrivateAttributes == false
1315
               if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_ATTRIBUTES) == false
1321
                  || !theAttr.Visibility.StartsWith("Private"))
1316
                  || !theAttr.Visibility.StartsWith("Private"))
1322
               {
1317
               {
1323
                  // Begin to build content string for the "Attribute" table column 
1318
                  // Begin to build content string for the "Attribute" table column 
1324
                  sb = new StringBuilder();
1319
                  sb = new StringBuilder();
1325
 
1320
 
Line 1334... Line 1329...
1334
                  wr.Font.Bold = 1;
1329
                  wr.Font.Bold = 1;
1335
                  
1330
                  
1336
                  wr = TextualContent.appendDescription(TextualContent.trimTrailingReturns(theAttr.Notes));
1331
                  wr = TextualContent.appendDescription(TextualContent.trimTrailingReturns(theAttr.Notes));
1337
                  wr.ParagraphFormat.LeftIndent = WordApp.CentimetersToPoints((float)3.5);
1332
                  wr.ParagraphFormat.LeftIndent = WordApp.CentimetersToPoints((float)3.5);
1338
 
1333
 
-
 
1334
                  if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_ATTRIBUTE_CHARACTERISTICS) == false)
-
 
1335
                  {
1339
                  // The approach here is to display as much of the attribute as we can but try to keep the output
1336
                     // The approach here is to display as much of the attribute as we can but try to keep the output
1340
                  // uncluttered by omitting items the user has not set via the EA GUI.
1337
                     // uncluttered by omitting items the user has not set via the EA GUI.
1341
 
1338
 
1342
                  // Begin to build content string for the "Other Information" table cell
1339
                     // Begin to build content string for the attribute characteristics
1343
                  sb = new StringBuilder();
1340
                     sb = new StringBuilder();
1344
 
1341
 
1345
                  sb.Append(theAttr.Visibility);
1342
                     sb.Append(theAttr.Visibility);
1346
                  sb.Append("\n");
1343
                     sb.Append("\n");
1347
 
1344
 
1348
                  if (theAttr.IsConst)
1345
                     if (theAttr.IsConst)
1349
                     sb.Append("Constant\n");
1346
                        sb.Append("Constant\n");
1350
 
1347
 
1351
                  if (theAttr.IsStatic)
1348
                     if (theAttr.IsStatic)
1352
                     sb.Append("Static\n");
1349
                        sb.Append("Static\n");
1353
 
1350
 
1354
                  if (theAttr.IsDerived)
1351
                     if (theAttr.IsDerived)
1355
                     sb.Append("Derived\n");
1352
                        sb.Append("Derived\n");
1356
 
1353
 
1357
                  if (theAttr.IsOrdered)
1354
                     if (theAttr.IsOrdered)
1358
                  {
1355
                     {
1359
                     sb.Append("Is Ordered\n");
1356
                        sb.Append("Is Ordered\n");
1360
                  }
1357
                     }
1361
 
1358
 
1362
                  if (theAttr.IsCollection)
1359
                     if (theAttr.IsCollection)
1363
                  {
1360
                     {
1364
                     sb.Append("Is A Collection\n");
1361
                        sb.Append("Is A Collection\n");
1365
                  }
1362
                     }
1366
 
1363
 
1367
                  if (theAttr.Length.Length > 0 && System.Convert.ToInt32(theAttr.Length) > 0)
1364
                     if (theAttr.Length.Length > 0 && System.Convert.ToInt32(theAttr.Length) > 0)
1368
                  {
1365
                     {
1369
                     sb.Append("Length = ");
1366
                        sb.Append("Length = ");
1370
                     sb.Append(theAttr.Length);
1367
                        sb.Append(theAttr.Length);
1371
                     sb.Append("\n");
1368
                        sb.Append("\n");
1372
                  }
1369
                     }
1373
 
1370
 
1374
                  if (!theAttr.Containment.StartsWith("Not Specified"))
1371
                     if (!theAttr.Containment.StartsWith("Not Specified"))
1375
                  {
1372
                     {
1376
                     sb.Append("Containment =");
1373
                        sb.Append("Containment =");
1377
                     sb.Append(theAttr.Containment);
1374
                        sb.Append(theAttr.Containment);
1378
                     sb.Append("\n");
1375
                        sb.Append("\n");
1379
                  }
1376
                     }
1380
 
1377
 
1381
                  if (theAttr.Container.Length > 0)
1378
                     if (theAttr.Container.Length > 0)
1382
                  {
1379
                     {
1383
                     sb.Append("Container Type = ");
1380
                        sb.Append("Container Type = ");
1384
                     sb.Append(theAttr.Container);
1381
                        sb.Append(theAttr.Container);
1385
                     sb.Append("\n");
1382
                        sb.Append("\n");
1386
                  }
1383
                     }
1387
 
1384
 
1388
                  if (theAttr.Style.Length > 0)
1385
                     if (theAttr.Style.Length > 0)
1389
                  {
1386
                     {
1390
                     sb.Append("Style = ");
1387
                        sb.Append("Style = ");
1391
                     sb.Append(theAttr.Style);
1388
                        sb.Append(theAttr.Style);
1392
                     sb.Append("\n");
1389
                        sb.Append("\n");
1393
                  }
1390
                     }
1394
 
1391
 
1395
                  if (  System.Convert.ToInt32(theAttr.LowerBound) > 1
1392
                     if (  System.Convert.ToInt32(theAttr.LowerBound) > 1
1396
                     || System.Convert.ToInt32(theAttr.UpperBound) > 1)
1393
                        || System.Convert.ToInt32(theAttr.UpperBound) > 1)
1397
                  {
1394
                     {
1398
                     sb.Append("Multiplicity [");
1395
                        sb.Append("Multiplicity [");
1399
                     sb.Append(theAttr.LowerBound);
1396
                        sb.Append(theAttr.LowerBound);
1400
                     sb.Append("..");
1397
                        sb.Append("..");
1401
                     sb.Append(theAttr.UpperBound);
1398
                        sb.Append(theAttr.UpperBound);
1402
                     sb.Append("]\n");
1399
                        sb.Append("]\n");
1403
                  }
1400
                     }
1404
 
1401
 
1405
                  if (theAttr.Scale.Length > 0 && System.Convert.ToInt32(theAttr.Scale) > 0)
1402
                     if (theAttr.Scale.Length > 0 && System.Convert.ToInt32(theAttr.Scale) > 0)
1406
                  {
1403
                     {
1407
                     sb.Append("Scale = ");
1404
                        sb.Append("Scale = ");
1408
                     sb.Append(theAttr.Scale);
1405
                        sb.Append(theAttr.Scale);
1409
                     sb.Append( "\n" );
1406
                        sb.Append( "\n" );
1410
                  }
1407
                     }
1411
                  if (theAttr.Precision.Length > 0 && System.Convert.ToInt32(theAttr.Precision) > 0)
1408
                     if (theAttr.Precision.Length > 0 && System.Convert.ToInt32(theAttr.Precision) > 0)
1412
                  {
1409
                     {
1413
                     sb.Append("Precision = ");
1410
                        sb.Append("Precision = ");
1414
                     sb.Append(theAttr.Precision);
1411
                        sb.Append(theAttr.Precision);
1415
                     sb.Append( "\n" );
1412
                        sb.Append( "\n" );
1416
                  }
1413
                     }
1417
 
1414
 
1418
                  if (theAttr.Default.Length > 0)
1415
                     if (theAttr.Default.Length > 0)
1419
                  {
1416
                     {
1420
                     sb.Append("Default Value = ");
1417
                        sb.Append("Default Value = ");
1421
                     sb.Append(theAttr.Default);
1418
                        sb.Append(theAttr.Default);
1422
                     sb.Append( "\n" );
1419
                        sb.Append( "\n" );
1423
                  }
1420
                     }
1424
 
1421
 
1425
                  // Now look at the constraint and tagged value collections and add any found info to the
1422
                     // Now look at the constraint and tagged value collections and add any found info to the
1426
                  // right hand column
1423
                     // right hand column
1427
                  short i;
1424
                     short i;
1428
                  for(i=0; i<theAttr.Constraints.Count; i++)
1425
                     for(i=0; i<theAttr.Constraints.Count; i++)
1429
                  {
1426
                     {
1430
                     if (abortCreationThread)
1427
                        if (abortCreationThread)
1431
                        return;
1428
                           return;
1432
 
1429
 
1433
                     EA.AttributeConstraint theCons = (EA.AttributeConstraint)theAttr.Constraints.GetAt(i);
1430
                        EA.AttributeConstraint theCons = (EA.AttributeConstraint)theAttr.Constraints.GetAt(i);
1434
                     sb.Append( theCons.Type );
1431
                        sb.Append( theCons.Type );
1435
                     sb.Append( ": {" );
1432
                        sb.Append( ": {" );
1436
                     sb.Append( theCons.Name );
1433
                        sb.Append( theCons.Name );
1437
                     sb.Append( "}\n" );
1434
                        sb.Append( "}\n" );
1438
                     //sb.Append( theCons.Notes  );
1435
                        //sb.Append( theCons.Notes  );
1439
                     //sb.Append( "\n" );
1436
                        //sb.Append( "\n" );
1440
                  }
1437
                     }
1441
 
1438
 
1442
                  for(i=0; i<theAttr.TaggedValues.Count; i++)
1439
                     for(i=0; i<theAttr.TaggedValues.Count; i++)
1443
                  {
1440
                     {
1444
                     if (abortCreationThread)
1441
                        if (abortCreationThread)
1445
                        return;
1442
                           return;
1446
 
1443
 
1447
                     EA.AttributeTag theTag = (EA.AttributeTag)theAttr.TaggedValues.GetAt(i);
1444
                        EA.AttributeTag theTag = (EA.AttributeTag)theAttr.TaggedValues.GetAt(i);
1448
                     sb.Append( "[" );
1445
                        sb.Append( "[" );
1449
                     sb.Append( theTag.Name );
1446
                        sb.Append( theTag.Name );
1450
                     sb.Append( "="  );
1447
                        sb.Append( "="  );
1451
                     sb.Append( theTag.Value );
1448
                        sb.Append( theTag.Value );
1452
                     sb.Append( "]\n" );
1449
                        sb.Append( "]\n" );
1453
                     //sb.Append( theTag.Notes );
1450
                        //sb.Append( theTag.Notes );
1454
                     //sb.Append( "\n" );
1451
                        //sb.Append( "\n" );
1455
                  }
1452
                     }
1456
 
1453
 
1457
                  if (sb.Length > 0)
1454
                     if (sb.Length > 0)
1458
                  {
1455
                     {
1459
                     // remove the trailing "\n"
1456
                        // remove the trailing "\n"
1460
                     sb.Remove( sb.ToString().Length - 1, 1);
1457
                        sb.Remove( sb.ToString().Length - 1, 1);
1461
 
1458
 
1462
                     wr = TextualContent.appendAndSelectText("Characteristics:", EA_Constants.styleName_Body1_Left_3_5cm_Italic);
1459
                        wr = TextualContent.appendAndSelectText("Characteristics:", EA_Constants.styleName_Body1_Left_3_5cm_Italic);
1463
 
1460
 
1464
                     wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
1461
                        wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
-
 
1462
                     }
1465
                  }
1463
                  }
1466
 
1464
 
1467
                  numAttrsRemaining--;
1465
                  numAttrsRemaining--;
1468
               }
1466
               }
1469
            }
1467
            }
Line 1471... Line 1469...
1471
      }
1469
      }
1472
 
1470
 
1473
 
1471
 
1474
      private void generateClassCharacteristics( EA.Element theElement, int recurse_level )
1472
      private void generateClassCharacteristics( EA.Element theElement, int recurse_level )
1475
      {
1473
      {
1476
         StringBuilder sb = new StringBuilder();
1474
         StringBuilder sb = null;
-
 
1475
         Word.Range wr = null;
1477
 
1476
 
1478
         ////////////////////////////////////////////////////////////////////////////////////////////////
-
 
1479
         sb.Append( "Characteristics:" );
-
 
1480
         Word.Range wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
-
 
1481
         
-
 
1482
         sb = new StringBuilder();
-
 
1483
         // VISIBILITY
-
 
1484
         sb.Append( theElement.Visibility );
-
 
1485
         // ABSTRACT
-
 
1486
         if (System.Convert.ToInt32(theElement.Abstract) == 1)
-
 
1487
            sb.Append( "\nAbstract" );
-
 
1488
         // STEREOTYPES
1477
         // CHARACTERISTICS
1489
         if (theElement.StereotypeEx.Length > 0)
-
 
1490
         {
-
 
1491
            sb.Append("\nStereotypes: ");
-
 
1492
            sb.Append(theElement.StereotypeEx);
-
 
1493
         }
-
 
1494
         // MULTIPLICITY
-
 
1495
         if (theElement.Multiplicity.Length > 0)
-
 
1496
         {
-
 
1497
            sb.Append("\nMultiplicity: ");
-
 
1498
            sb.Append(theElement.Multiplicity);
-
 
1499
         }
-
 
1500
         // IS ACTIVE
-
 
1501
         if (theElement.IsActive)
-
 
1502
            sb.Append("\nClass is active (has its own thread of control)\n");
-
 
1503
         // IS SPEC
-
 
1504
         if (theElement.IsSpec)
-
 
1505
            sb.Append("\nClass is a specification\n");
-
 
1506
 
-
 
1507
         wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1478
         if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_CHARACTERISTICS) == false)
1508
 
-
 
1509
         ////////////////////////////////////////////////////////////////////////////////////////////////
-
 
1510
         sb = new StringBuilder();
-
 
1511
         foreach(EA.Element baseClass in theElement.BaseClasses)
-
 
1512
         {
-
 
1513
            sb.Append( baseClass.Name);
-
 
1514
         }
-
 
1515
         if (sb.Length > 0)
-
 
1516
         {
1479
         {
-
 
1480
            sb = new StringBuilder();
-
 
1481
 
-
 
1482
            sb.Append( "Characteristics:" );
1517
            wr = TextualContent.appendAndSelectText("Base Class(es):", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1483
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
-
 
1484
         
-
 
1485
            sb = new StringBuilder();
-
 
1486
            // VISIBILITY
-
 
1487
            sb.Append( theElement.Visibility );
-
 
1488
            // ABSTRACT
-
 
1489
            if (System.Convert.ToInt32(theElement.Abstract) == 1)
-
 
1490
               sb.Append( "\nAbstract" );
-
 
1491
            // STEREOTYPES
-
 
1492
            if (theElement.StereotypeEx.Length > 0)
-
 
1493
            {
-
 
1494
               sb.Append("\nStereotypes: ");
-
 
1495
               sb.Append(theElement.StereotypeEx);
-
 
1496
            }
-
 
1497
            // MULTIPLICITY
-
 
1498
            if (theElement.Multiplicity.Length > 0)
-
 
1499
            {
-
 
1500
               sb.Append("\nMultiplicity: ");
-
 
1501
               sb.Append(theElement.Multiplicity);
-
 
1502
            }
-
 
1503
            // IS ACTIVE
-
 
1504
            if (theElement.IsActive)
-
 
1505
               sb.Append("\nClass is active (has its own thread of control)\n");
-
 
1506
            // IS SPEC
-
 
1507
            if (theElement.IsSpec)
-
 
1508
               sb.Append("\nClass is a specification\n");
1518
 
1509
 
1519
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1510
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1520
         }
1511
         }
1521
 
1512
 
1522
         ////////////////////////////////////////////////////////////////////////////////////////////////
-
 
1523
         sb = new StringBuilder();
1513
         // BASE CLASSES
1524
         foreach(EA.Element intf in theElement.Realizes)
1514
         if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_BASE_CLASSES) == false)
1525
         {
1515
         {
-
 
1516
            sb = new StringBuilder();
-
 
1517
            foreach(EA.Element baseClass in theElement.BaseClasses)
-
 
1518
            {
1526
            sb.Append( intf.Name);
1519
               sb.Append( baseClass.Name);
-
 
1520
            }
-
 
1521
            if (sb.Length > 0)
-
 
1522
            {
-
 
1523
               wr = TextualContent.appendAndSelectText("Base Class(es):", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
-
 
1524
 
-
 
1525
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
-
 
1526
            }
1527
         }
1527
         }
-
 
1528
 
1528
         if (sb.Length > 0)
1529
         // REALISES
-
 
1530
         if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_REALISES) == false)
1529
         {
1531
         {
-
 
1532
            sb = new StringBuilder();
-
 
1533
            foreach(EA.Element intf in theElement.Realizes)
-
 
1534
            {
-
 
1535
               sb.Append( intf.Name);
-
 
1536
            }
-
 
1537
            if (sb.Length > 0)
-
 
1538
            {
1530
            wr = TextualContent.appendAndSelectText("Realises:", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1539
               wr = TextualContent.appendAndSelectText("Realises:", EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1531
 
1540
 
1532
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1541
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
-
 
1542
            }
1533
         }
1543
         }
1534
      }
1544
      }
1535
 
1545
 
1536
      
1546
      
1537
      private void generateClassRequirements( EA.Element theElement, int recurse_level )
1547
      private void generateClassRequirements( EA.Element theElement, int recurse_level )
1538
      {
1548
      {
1539
         StringBuilder sb = new StringBuilder();
-
 
1540
 
-
 
1541
         sb.Append( "Requirements:" );
-
 
1542
         Word.Range wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1549
         if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_REQUIREMENTS) == false)
1543
 
-
 
1544
         foreach(EA.Requirement theReq in theElement.Requirements)
-
 
1545
         {
1550
         {
1546
            if (abortCreationThread)
1551
            StringBuilder sb = new StringBuilder();
1547
               return;
-
 
1548
 
1552
 
1549
            sb = new StringBuilder();
-
 
1550
            sb.Append( theReq.Name );
1553
            sb.Append( "Requirements:" );
1551
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1554
            Word.Range wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1552
            sb = new StringBuilder();
-
 
-
 
1555
 
1553
            sb.Append( theReq.Notes );
1556
            foreach(EA.Requirement theReq in theElement.Requirements)
1554
            if (sb.Length > 0)
-
 
1555
            {
1557
            {
-
 
1558
               if (abortCreationThread)
-
 
1559
                  return;
-
 
1560
 
-
 
1561
               sb = new StringBuilder();
-
 
1562
               sb.Append( theReq.Name );
1556
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
1563
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
-
 
1564
               sb = new StringBuilder();
-
 
1565
               sb.Append( theReq.Notes );
-
 
1566
               if (sb.Length > 0)
-
 
1567
               {
-
 
1568
                  wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
-
 
1569
               }
1557
            }
1570
            }
1558
         }
1571
         }
1559
      }
1572
      }
1560
 
1573
 
1561
      
1574
      
1562
      private void generateClassConstraints( EA.Element theElement, int recurse_level )
1575
      private void generateClassConstraints( EA.Element theElement, int recurse_level )
1563
      {
1576
      {
-
 
1577
         if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_CLASS_CONSTRAINTS) == false)
-
 
1578
         {
1564
         StringBuilder sb = new StringBuilder();
1579
            StringBuilder sb = new StringBuilder();
1565
 
1580
 
1566
         sb.Append( "Constraints:" );
1581
            sb.Append( "Constraints:" );
1567
         Word.Range wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1582
            Word.Range wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_2_5cm_Italic);
1568
         
1583
         
1569
         foreach(EA.Constraint theCons in theElement.Constraints)
1584
            foreach(EA.Constraint theCons in theElement.Constraints)
1570
         {
1585
            {
1571
            if (abortCreationThread)
1586
               if (abortCreationThread)
1572
               return;
1587
                  return;
1573
 
1588
 
1574
            sb = new StringBuilder();
1589
               sb = new StringBuilder();
1575
            sb.Append( theCons.Type );
1590
               sb.Append( theCons.Type );
1576
            sb.Append( ": {" );
1591
               sb.Append( ": {" );
1577
            sb.Append( theCons.Name );
1592
               sb.Append( theCons.Name );
1578
            sb.Append( "}" );
1593
               sb.Append( "}" );
1579
 
1594
 
1580
            wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1595
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_3_5cm);
1581
 
1596
 
1582
            if (theCons.Notes.Length > 0)
1597
               if (theCons.Notes.Length > 0)
1583
            {
1598
               {
1584
               sb = new StringBuilder();
1599
                  sb = new StringBuilder();
1585
               sb.Append( theCons.Notes );
1600
                  sb.Append( theCons.Notes );
1586
               wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
1601
                  wr = TextualContent.appendAndSelectText(sb.ToString(), EA_Constants.styleName_Body1_Left_4_5cm);
-
 
1602
               }
1587
            }
1603
            }
1588
         }
1604
         }
1589
      }
1605
      }
1590
 
1606
 
1591
 
1607
 
Line 1605... Line 1621...
1605
            if (false == TextualContent.generateRequirementText(theElement))
1621
            if (false == TextualContent.generateRequirementText(theElement))
1606
            {
1622
            {
1607
               bool isClass = theElement.Type.StartsWith("Class");
1623
               bool isClass = theElement.Type.StartsWith("Class");
1608
 
1624
 
1609
               if (   (   true == isClass
1625
               if (   (   true == isClass
1610
                       && true == EA_DocGenOptions.opt_SuppressPrivateClasses 
1626
                       && true == EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.SUPPRESS_PRIVATE_CLASSES) 
1611
                       && true == theElement.Visibility.StartsWith("Private"))
1627
                       && true == theElement.Visibility.StartsWith("Private"))
1612
                   || (   true == EA_DocGenOptions.opt_ConsiderAPIElementsOnly 
1628
                   || (   true == EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_ELEMENTS_ONLY) 
1613
                       && 0 > theElement.StereotypeEx.IndexOf("API"))
1629
                       && 0 > theElement.StereotypeEx.IndexOf("API"))
1614
                  )
1630
                  )
1615
               {
1631
               {
1616
                  // do nothing
1632
                  // do nothing
1617
                  DocSectionTracking.trackDocSection(recurse_level);
1633
                  DocSectionTracking.trackDocSection(recurse_level);
Line 1883... Line 1899...
1883
         bool packageHasAPIStereotype = false;
1899
         bool packageHasAPIStereotype = false;
1884
         if (0 <= thePackage.StereotypeEx.IndexOf("API") )
1900
         if (0 <= thePackage.StereotypeEx.IndexOf("API") )
1885
            packageHasAPIStereotype = true;
1901
            packageHasAPIStereotype = true;
1886
 
1902
 
1887
         // only process the package if it the stereotype allows, or sensitivity to the stereotype is disabled
1903
         // only process the package if it the stereotype allows, or sensitivity to the stereotype is disabled
1888
         if (  !EA_DocGenOptions.opt_ConsiderAPIPackagesOnly
1904
         if (  !EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_PACKAGES_ONLY)
-
 
1905
            || (   EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_PACKAGES_ONLY)
1889
            || (EA_DocGenOptions.opt_ConsiderAPIPackagesOnly && EA_DocGenOptions.opt_RestrictForLinkedPackagesOnly && processingLink == 0)
1906
                && EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.RESTRICT_FOR_LINKED_PACKAGES_ONLY) && processingLink == 0)
1890
            || (EA_DocGenOptions.opt_ConsiderAPIPackagesOnly && packageHasAPIStereotype) 
1907
            || (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_PACKAGES_ONLY) 
-
 
1908
                && packageHasAPIStereotype) 
1891
            )
1909
            )
1892
         {
1910
         {
1893
            
1911
            
1894
            bool processLowerLevelContent = true;
1912
            bool processLowerLevelContent = true;
1895
 
1913