Subversion Repositories DevTools

Rev

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

Rev 2128 Rev 2132
Line 409... Line 409...
409
      {
409
      {
410
         // NOTE: diagrams only use one stereotype, not a list of them, so dont use StereotypeEx field
410
         // NOTE: diagrams only use one stereotype, not a list of them, so dont use StereotypeEx field
411
         if (  EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_DIAGRAMS_ONLY)
411
         if (  EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.CONSIDER_API_DIAGRAMS_ONLY)
412
            && !theDiagram.Stereotype.Equals("API") )
412
            && !theDiagram.Stereotype.Equals("API") )
413
         {
413
         {
414
            displayProgress( "SKIPPED DIAGRAM: ", theDiagram.Name.ToString() );
414
            displayProgress( "SKIPPED DIAGRAM: ", theDiagram.Name );
415
         }
415
         }
416
         else if (theDiagram.StyleEx != null && theDiagram.StyleEx.IndexOf("ExcludeRTF=1") >= 0)
416
         else if (theDiagram.StyleEx != null && theDiagram.StyleEx.IndexOf("ExcludeRTF=1") >= 0)
417
         {
417
         {
418
            displayProgress( "EXCLUDED DIAGRAM: ", theDiagram.Name.ToString() );
418
            displayProgress( "EXCLUDED DIAGRAM: ", theDiagram.Name );
419
         }
419
         }
420
            // open the diagram in EA and copy it's image to the clipboard
420
            // open the diagram in EA and copy it's image to the clipboard
421
         else if (EA_Project.PutDiagramImageOnClipboard(theDiagram.DiagramGUID,0))
421
         else if (EA_Project.PutDiagramImageOnClipboard(theDiagram.DiagramGUID,0))
422
         {
422
         {
423
            object startLocation;
423
            object startLocation;
424
            object endLocation;
424
            object endLocation;
425
 
425
 
-
 
426
            if (theDiagram.Notes != null && theDiagram.Notes.Length > 0)
-
 
427
            {
426
            //@@@@
428
               //@@@@
427
            //TextualContent.appendDescription( TextualContent.trimTrailingReturns(theDiagram.Notes) );
429
               //TextualContent.appendDescription( TextualContent.trimTrailingReturns(theDiagram.Notes) );
428
            TextParser.parse( TextualContent.trimTrailingReturns(theDiagram.Notes), theDiagram.DiagramID, EA_Constants.styleName_Body1, 0, false);
430
               TextParser.parse( TextualContent.trimTrailingReturns(theDiagram.Notes), theDiagram.DiagramID, EA_Constants.styleName_Body1, 0, false);
-
 
431
            }
429
 
432
 
430
            // create a range at the end of the document
433
            // create a range at the end of the document
431
            startLocation = WordDocument.Content.End;
434
            startLocation = WordDocument.Content.End;
432
            WordDocument.Content.InsertParagraphAfter();
435
            WordDocument.Content.InsertParagraphAfter();
433
            endLocation = WordDocument.Content.End;
436
            endLocation = WordDocument.Content.End;
Line 462... Line 465...
462
            object Title = Type.Missing;
465
            object Title = Type.Missing;
463
            object TitleAutoText = Type.Missing;
466
            object TitleAutoText = Type.Missing;
464
            object Position = Word.WdCaptionPosition.wdCaptionPositionAbove;
467
            object Position = Word.WdCaptionPosition.wdCaptionPositionAbove;
465
            object ExcludeLabel = 0;
468
            object ExcludeLabel = 0;
466
            WordApp.Selection.InsertCaption( ref Label, ref Title, ref TitleAutoText, ref Position, ref ExcludeLabel);
469
            WordApp.Selection.InsertCaption( ref Label, ref Title, ref TitleAutoText, ref Position, ref ExcludeLabel);
467
            WordApp.Selection.TypeText( ": " + theDiagram.Name.ToString());
470
            WordApp.Selection.TypeText( ": " + theDiagram.Name);
468
            WordApp.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
471
            WordApp.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
469
 
472
 
470
            // experimental code to create a bookmark for the figure caption
473
            // experimental code to create a bookmark for the figure caption
471
            //WordDocument.Paragraphs[ WordDocument.Paragraphs.Count ].Range.Select();
474
            //WordDocument.Paragraphs[ WordDocument.Paragraphs.Count ].Range.Select();
472
            //object lastParaRange = WordDocument.Paragraphs[ WordDocument.Paragraphs.Count ].Range;
475
            //object lastParaRange = WordDocument.Paragraphs[ WordDocument.Paragraphs.Count ].Range;
Line 475... Line 478...
475
            //WordDocument.Bookmarks.Add( bookmarkName, ref lastParaRange );
478
            //WordDocument.Bookmarks.Add( bookmarkName, ref lastParaRange );
476
 
479
 
477
            // Close the diagram in EA
480
            // Close the diagram in EA
478
            Main.EA_Repository.CloseDiagram(theDiagram.DiagramID);
481
            Main.EA_Repository.CloseDiagram(theDiagram.DiagramID);
479
 
482
 
480
            displayProgress( "DIAGRAM: ", theDiagram.Name.ToString() );
483
            displayProgress( "DIAGRAM: ", theDiagram.Name );
481
         }
484
         }
482
      }
485
      }
483
 
486
 
484
 
487
 
485
      #region special element processing functions (link elements, table and text elements, etc)
488
      #region special element processing functions (link elements, table and text elements, etc)
Line 490... Line 493...
490
      /// </summary>
493
      /// </summary>
491
      /// <param name="theElement"></param>
494
      /// <param name="theElement"></param>
492
      /// <param name="recurse_level"></param>
495
      /// <param name="recurse_level"></param>
493
      private void processPackageLink(EA.Element theElement, int recurse_level)
496
      private void processPackageLink(EA.Element theElement, int recurse_level)
494
      {
497
      {
495
         string [] EA_DocGenPkgLnk = null;
-
 
496
         string delimStr = "\r\n";
-
 
497
         char [] delim = delimStr.ToCharArray();
-
 
498
         EA_DocGenPkgLnk = theElement.Notes.ToString().Split(delim,100);
498
         if (theElement.Notes != null && theElement.Notes.Length > 0)
499
         string linkedName = "";
-
 
500
 
-
 
501
         foreach(string s in EA_DocGenPkgLnk)
-
 
502
         {
499
         {
503
            if (s.Length > 0 && s != "\n" && s != "\r")
500
            string [] EA_DocGenPkgLnk = null;
-
 
501
            string delimStr = "\r\n";
-
 
502
            char [] delim = delimStr.ToCharArray();
-
 
503
            EA_DocGenPkgLnk = theElement.Notes.Split(delim,100);
-
 
504
            string linkedName = "";
-
 
505
 
-
 
506
            foreach(string s in EA_DocGenPkgLnk)
504
            {
507
            {
505
               if (s == "skiproot")
508
               if (s.Length > 0 && s != "\n" && s != "\r")
506
               {
509
               {
507
                  oneShot_skipRootPackage = true;
-
 
508
               }
-
 
509
               else if (s[0] == '{')
510
                  if (s == "skiproot")
510
               {
-
 
511
                  EA.Package theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
-
 
512
                  if (theFoundPackage != null)
-
 
513
                  {
511
                  {
514
                     parse_package(theFoundPackage, recurse_level);
512
                     oneShot_skipRootPackage = true;
515
                  }
513
                  }
516
                  else
514
                  else if (s[0] == '{')
517
                  {
515
                  {
-
 
516
                     EA.Package theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
-
 
517
                     if (theFoundPackage != null)
-
 
518
                     {
-
 
519
                        parse_package(theFoundPackage, recurse_level);
-
 
520
                     }
-
 
521
                     else
-
 
522
                     {
518
                     MessageBox.Show("WARNING - Could not find linked package : " + linkedName );
523
                        MessageBox.Show("WARNING - Could not find linked package : " + linkedName );
-
 
524
                     }
519
                  }
525
                  }
-
 
526
                  else
-
 
527
                  {
-
 
528
                     linkedName = s;
-
 
529
                  }            
520
               }
530
               }
521
               else
-
 
522
               {
-
 
523
                  linkedName = s;
-
 
524
               }            
-
 
525
            }
531
            }
526
         }
532
         }
527
      }
533
      }
528
 
534
 
529
 
535
 
Line 532... Line 538...
532
      /// for each linked diagram.
538
      /// for each linked diagram.
533
      /// </summary>
539
      /// </summary>
534
      /// <param name="theElement"></param>
540
      /// <param name="theElement"></param>
535
      private void processDiagramLink(EA.Element theElement)
541
      private void processDiagramLink(EA.Element theElement)
536
      {
542
      {
537
         string [] EA_DocGenDiagLnk = null;
-
 
538
         string delimStr = "\r\n";
-
 
539
         char [] delim = delimStr.ToCharArray();
-
 
540
         EA_DocGenDiagLnk = theElement.Notes.ToString().Split(delim,100);
543
         if (theElement.Notes != null && theElement.Notes.Length > 0)
541
         string linkedName = "";
-
 
542
         
-
 
543
         foreach(string s in EA_DocGenDiagLnk)
-
 
544
         {
544
         {
-
 
545
            string [] EA_DocGenDiagLnk = null;
-
 
546
            string delimStr = "\r\n";
-
 
547
            char [] delim = delimStr.ToCharArray();
-
 
548
            EA_DocGenDiagLnk = theElement.Notes.Split(delim,100);
-
 
549
            string linkedName = "";
-
 
550
         
545
            if (s.Length > 0 && s != "\n" && s != "\r" )
551
            foreach(string s in EA_DocGenDiagLnk)
546
            {
552
            {
547
               if (s[0] == '{')
553
               if (s.Length > 0 && s != "\n" && s != "\r" )
548
               {
554
               {
549
                  EA.Diagram theFoundDiagram = (EA.Diagram)Main.EA_Repository.GetDiagramByGuid(s);
-
 
550
                  if (theFoundDiagram != null)
555
                  if (s[0] == '{')
551
                  {
556
                  {
-
 
557
                     EA.Diagram theFoundDiagram = (EA.Diagram)Main.EA_Repository.GetDiagramByGuid(s);
-
 
558
                     if (theFoundDiagram != null)
-
 
559
                     {
552
                     appendAndSelectDiagramViaClipboard( theFoundDiagram );
560
                        appendAndSelectDiagramViaClipboard( theFoundDiagram );
-
 
561
                     }
-
 
562
                     else 
-
 
563
                     {
-
 
564
                        MessageBox.Show("WARNING - Could not find linked diagram : " + linkedName );
-
 
565
                     }
553
                  }
566
                  }
554
                  else 
567
                  else
555
                  {
568
                  {
556
                     MessageBox.Show("WARNING - Could not find linked diagram : " + linkedName );
569
                     linkedName = s;
557
                  }
570
                  }            
558
               }
571
               }
559
               else
-
 
560
               {
572
            } 
561
                  linkedName = s;
-
 
562
               }            
-
 
563
            }
573
         }
564
         }         
-
 
565
      }
574
      }
566
 
575
 
567
 
576
 
568
      /// <summary>
577
      /// <summary>
569
      /// This function process an element link element, parsing each linked element by the
578
      /// This function process an element link element, parsing each linked element by the
Line 571... Line 580...
571
      /// </summary>
580
      /// </summary>
572
      /// <param name="theElement"></param>
581
      /// <param name="theElement"></param>
573
      /// <param name="recurse_level"></param>
582
      /// <param name="recurse_level"></param>
574
      private void processElementLink(EA.Element theElement, int recurse_level )
583
      private void processElementLink(EA.Element theElement, int recurse_level )
575
      {
584
      {
576
         string [] EA_DocGenEleLnk = null;
-
 
577
         string delimStr = "\r\n";
-
 
578
         char [] delim = delimStr.ToCharArray();
-
 
579
         EA_DocGenEleLnk = theElement.Notes.ToString().Split(delim,100);
585
         if (theElement.Notes != null && theElement.Notes.Length > 0)
580
         string linkedName = "";
-
 
581
         
-
 
582
         foreach(string s in EA_DocGenEleLnk)
-
 
583
         {
586
         {
584
            if (s.Length > 0 && s != "\n" && s != "\r")
587
            string [] EA_DocGenEleLnk = null;
-
 
588
            string delimStr = "\r\n";
-
 
589
            char [] delim = delimStr.ToCharArray();
-
 
590
            EA_DocGenEleLnk = theElement.Notes.Split(delim,100);
-
 
591
            string linkedName = "";
-
 
592
         
-
 
593
            foreach(string s in EA_DocGenEleLnk)
585
            {
594
            {
586
               if (s == "skiproot")
595
               if (s.Length > 0 && s != "\n" && s != "\r")
587
               {
-
 
588
                  oneShot_skipRootElementHeading = true;
-
 
589
               }
-
 
590
               else if ( s[0] == '{')
-
 
591
               {
596
               {
592
                  EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
-
 
593
                  if (theFoundElement != null)
597
                  if (s == "skiproot")
594
                  {
598
                  {
595
                     parse_element( theFoundElement, recurse_level );
599
                     oneShot_skipRootElementHeading = true;
596
                  }
600
                  }
597
                  else 
601
                  else if ( s[0] == '{')
598
                  {
602
                  {
-
 
603
                     EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
-
 
604
                     if (theFoundElement != null)
-
 
605
                     {
-
 
606
                        parse_element( theFoundElement, recurse_level );
-
 
607
                     }
-
 
608
                     else 
-
 
609
                     {
599
                     MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
610
                        MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
-
 
611
                     }
600
                  }
612
                  }
-
 
613
                  else
-
 
614
                  {
-
 
615
                     linkedName = s;
-
 
616
                  }            
601
               }
617
               }
602
               else
-
 
603
               {
-
 
604
                  linkedName = s;
-
 
605
               }            
-
 
606
            }
618
            }
607
         }         
619
         }
608
      }
620
      }
609
 
621
 
610
 
622
 
611
      /// <summary>
623
      /// <summary>
612
      /// This method is recursive and searches a model structure to find a match to any 
624
      /// This method is recursive and searches a model structure to find a match to any 
Line 680... Line 692...
680
         }
692
         }
681
      }
693
      }
682
 
694
 
683
      private void processNameLink(EA.Element theElement, int recurse_level )
695
      private void processNameLink(EA.Element theElement, int recurse_level )
684
      {
696
      {
-
 
697
         if (theElement.Notes != null && theElement.Notes.Length > 0)
-
 
698
         {
685
         string delimStr = "\r\n";
699
            string delimStr = "\r\n";
686
         char [] delim = delimStr.ToCharArray();
700
            char [] delim = delimStr.ToCharArray();
687
         string [] EA_DocGenNameLnk = theElement.Notes.ToString().Split(delim,100);
701
            string [] EA_DocGenNameLnk = theElement.Notes.Split(delim,100);
688
 
702
 
689
         string linkedName = "";
703
            string linkedName = "";
690
         bool gotLinkedName = false;
704
            bool gotLinkedName = false;
691
 
705
 
692
         ArrayList names = new ArrayList();
706
            ArrayList names = new ArrayList();
693
 
707
 
694
         EA.Package theFoundPackage = null;
708
            EA.Package theFoundPackage = null;
695
 
709
 
696
         bool skipRoots = false;
710
            bool skipRoots = false;
697
 
711
 
698
         // search through the option strings
712
            // search through the option strings
699
         foreach(string s in EA_DocGenNameLnk)
713
            foreach(string s in EA_DocGenNameLnk)
700
         {
-
 
701
            if (s.Length > 0 && s != "\n" && s != "\r")
-
 
702
            {
714
            {
703
               if (s == "skiproot")
-
 
704
               {
-
 
705
                  skipRoots = true;
-
 
706
               }
-
 
707
               else if (s[0] == '{')  // is it a GUID?
715
               if (s.Length > 0 && s != "\n" && s != "\r")
708
               {
-
 
709
                  // find the package by its GUID
-
 
710
                  theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
-
 
711
               }
-
 
712
               else if (s.StartsWith("package="))
-
 
713
               {
716
               {
-
 
717
                  if (s == "skiproot")
-
 
718
                  {
-
 
719
                     skipRoots = true;
-
 
720
                  }
-
 
721
                  else if (s[0] == '{')  // is it a GUID?
-
 
722
                  {
-
 
723
                     // find the package by its GUID
-
 
724
                     theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
-
 
725
                  }
-
 
726
                  else if (s.StartsWith("package="))
-
 
727
                  {
714
                  // add the users named package to our list of names
728
                     // add the users named package to our list of names
715
                  names.Add( s.Substring(8, s.Length - 8) );
729
                     names.Add( s.Substring(8, s.Length - 8) );
-
 
730
                  }
-
 
731
                  else if (gotLinkedName == false)
-
 
732
                  {
-
 
733
                     // capture name of package refered to by the GUID - this is only for diagnostic purposes
-
 
734
                     gotLinkedName = true;
-
 
735
                     linkedName = s;
-
 
736
                  }            
716
               }
737
               }
717
               else if (gotLinkedName == false)
-
 
718
               {
738
            }  
719
                  // capture name of package refered to by the GUID - this is only for diagnostic purposes
-
 
720
                  gotLinkedName = true;
-
 
721
                  linkedName = s;
-
 
722
               }            
-
 
723
            }
-
 
724
         }  
-
 
725
 
739
 
726
         // If the GUID was resolved...
740
            // If the GUID was resolved...
727
         if (theFoundPackage != null)
741
            if (theFoundPackage != null)
728
         {
-
 
729
            processNameLinkPackage(null, theFoundPackage, recurse_level, skipRoots, ref names);
-
 
730
 
-
 
731
            if (names.Count > 0)
-
 
732
            {
742
            {
733
               StringBuilder sb = new StringBuilder();
-
 
734
               sb.Append("WARNING - Could not find named package(s)\n");
-
 
735
               sb.Append("within name link: ");
-
 
736
               sb.Append(linkedName);
-
 
737
               sb.Append("\n\nProblem package= directives are:\n");
743
               processNameLinkPackage(null, theFoundPackage, recurse_level, skipRoots, ref names);
-
 
744
 
738
               foreach(String s in names)
745
               if (names.Count > 0)
739
               {
746
               {
-
 
747
                  StringBuilder sb = new StringBuilder();
-
 
748
                  sb.Append("WARNING - Could not find named package(s)\n");
-
 
749
                  sb.Append("within name link: ");
-
 
750
                  sb.Append(linkedName);
-
 
751
                  sb.Append("\n\nProblem package= directives are:\n");
-
 
752
                  foreach(String s in names)
-
 
753
                  {
740
                  sb.Append("\n");
754
                     sb.Append("\n");
741
                  sb.Append(s);
755
                     sb.Append(s);
-
 
756
                  }
-
 
757
                  MessageBox.Show(sb.ToString());
742
               }
758
               }
743
               MessageBox.Show(sb.ToString());
-
 
744
            }
759
            }
745
         }
-
 
746
         else
760
            else
747
         {
761
            {
748
            MessageBox.Show("WARNING - Could not find linked package : " + linkedName );
762
               MessageBox.Show("WARNING - Could not find linked package : " + linkedName );
-
 
763
            }
749
         }
764
         }
750
      }
765
      }
751
 
766
 
752
 
767
 
753
      /// <summary>
768
      /// <summary>
Line 760... Line 775...
760
      /// </summary>
775
      /// </summary>
761
      /// <param name="theElement"></param>
776
      /// <param name="theElement"></param>
762
      /// <param name="recurse_level"></param>
777
      /// <param name="recurse_level"></param>
763
      private void processTestLink(EA.Element theElement, int recurse_level )
778
      private void processTestLink(EA.Element theElement, int recurse_level )
764
      {
779
      {
765
         string [] EA_DocGenEleLnk = null;
-
 
766
         string delimStr = "\r\n";
-
 
767
         char [] delim = delimStr.ToCharArray();
-
 
768
         EA_DocGenEleLnk = theElement.Notes.ToString().Split(delim,100);
780
         if (theElement.Notes != null && theElement.Notes.Length > 0)
769
         string linkedName = "";
-
 
770
         
-
 
771
         foreach(string s in EA_DocGenEleLnk)
-
 
772
         {
781
         {
773
            if (s.Length > 0 && s != "\n" && s != "\r")
782
            string [] EA_DocGenEleLnk = null;
-
 
783
            string delimStr = "\r\n";
-
 
784
            char [] delim = delimStr.ToCharArray();
-
 
785
            EA_DocGenEleLnk = theElement.Notes.Split(delim,100);
-
 
786
            string linkedName = "";
-
 
787
         
-
 
788
            foreach(string s in EA_DocGenEleLnk)
774
            {
789
            {
775
               if ( s[0] == '{')
790
               if (s.Length > 0 && s != "\n" && s != "\r")
776
               {
791
               {
777
                  try
792
                  if ( s[0] == '{')
778
                  {
793
                  {
-
 
794
                     try
-
 
795
                     {
779
                     // try to find the GUID as a package
796
                        // try to find the GUID as a package
780
                     EA.Package theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
797
                        EA.Package theFoundPackage = Main.EA_Repository.GetPackageByGuid(s);
781
                     if (theFoundPackage != null)
798
                        if (theFoundPackage != null)
782
                        TextualContent.appendUnitTestSuite(theFoundPackage, recurse_level, ref classesWithUnitTests);
799
                           TextualContent.appendUnitTestSuite(theFoundPackage, recurse_level, ref classesWithUnitTests);
783
                     else 
800
                        else 
-
 
801
                        {
-
 
802
                           // try to find the GUID as an element
-
 
803
                           EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
-
 
804
                           if (theFoundElement != null)
-
 
805
                              TextualContent.appendUnitTestSuite(theFoundElement, recurse_level, ref classesWithUnitTests);
-
 
806
                           else 
-
 
807
                              MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
-
 
808
                        }
-
 
809
                     }
-
 
810
                     catch 
784
                     {
811
                     {
785
                        // try to find the GUID as an element
812
                        // try to find the GUID as an element
786
                        EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
813
                        EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
787
                        if (theFoundElement != null)
814
                        if (theFoundElement != null)
788
                           TextualContent.appendUnitTestSuite(theFoundElement, recurse_level, ref classesWithUnitTests);
815
                           TextualContent.appendUnitTestSuite(theFoundElement, recurse_level, ref classesWithUnitTests);
789
                        else 
816
                        else 
790
                           MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
817
                           MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
791
                     }
818
                     }
792
                  }
819
                  }
793
                  catch 
820
                  else
794
                  {
821
                  {
795
                     // try to find the GUID as an element
-
 
796
                     EA.Element theFoundElement = Main.EA_Repository.GetElementByGuid(s);
-
 
797
                     if (theFoundElement != null)
822
                     linkedName = s;
798
                        TextualContent.appendUnitTestSuite(theFoundElement, recurse_level, ref classesWithUnitTests);
-
 
799
                     else 
823
                  }            
800
                        MessageBox.Show("WARNING - Could not find linked element : " + linkedName );
-
 
801
                  }
-
 
802
               }
824
               }
803
               else
-
 
804
               {
825
            }   
805
                  linkedName = s;
-
 
806
               }            
-
 
807
            }
826
         }
808
         }         
-
 
809
      }
827
      }
810
 
828
 
811
 
829
 
812
      private void processTestTraceability( EA.Element theElement, int recurse_level )
830
      private void processTestTraceability( EA.Element theElement, int recurse_level )
813
      {
831
      {
Line 1021... Line 1039...
1021
         bool processLowerLevelContent = true;  // return value for this function
1039
         bool processLowerLevelContent = true;  // return value for this function
1022
 
1040
 
1023
         // The package name is a heading, and the package notes are paragraphs 
1041
         // The package name is a heading, and the package notes are paragraphs 
1024
         // directly under that heading
1042
         // directly under that heading
1025
 
1043
 
1026
         TextualContent.appendAndSelectHeadingText( thePackage.Name.ToString(), recurse_level );
1044
         TextualContent.appendAndSelectHeadingText( thePackage.Name, recurse_level );
1027
         displayProgress( "PACKAGE: ", thePackage.Name.ToString() );
1045
         displayProgress( "PACKAGE: ", thePackage.Name );
1028
 
1046
 
1029
         // Special handling for package called "Terminology" 
1047
         // Special handling for package called "Terminology" 
1030
         if (thePackage.Name == "Terminology")
1048
         if (thePackage.Name == "Terminology")
1031
         {
1049
         {
1032
            TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(thePackage.Notes), EA_Constants.styleName_Body1 );
1050
            TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(thePackage.Notes), EA_Constants.styleName_Body1 );
Line 1040... Line 1058...
1040
            createReferencesSection(thePackage);
1058
            createReferencesSection(thePackage);
1041
            processLowerLevelContent = false;
1059
            processLowerLevelContent = false;
1042
         }
1060
         }
1043
         else
1061
         else
1044
         {
1062
         {
-
 
1063
            if (thePackage.Notes != null && thePackage.Notes.Length > 0)
-
 
1064
            {
1045
            // use the package notes as body text and indicate to caller that package elements 
1065
               // use the package notes as body text and indicate to caller that package elements 
1046
            // have not been consumed
1066
               // have not been consumed
-
 
1067
 
1047
            // @@@@
1068
               // @@@@
1048
            //TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(thePackage.Notes), EA_Constants.styleName_Body1 ); 
1069
               //TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(thePackage.Notes), EA_Constants.styleName_Body1 ); 
1049
            TextParser.parse( TextualContent.trimTrailingReturns(thePackage.Notes), thePackage.PackageID, EA_Constants.styleName_Body1, 0, false);
1070
               TextParser.parse( TextualContent.trimTrailingReturns(thePackage.Notes), thePackage.PackageID, EA_Constants.styleName_Body1, 0, false);
-
 
1071
            }
1050
         }
1072
         }
1051
 
1073
 
1052
         return processLowerLevelContent;
1074
         return processLowerLevelContent;
1053
      }
1075
      }
1054
 
1076
 
Line 1662... Line 1684...
1662
                  }
1684
                  }
1663
 
1685
 
1664
                  processedElements.Add(theElement.ElementID);
1686
                  processedElements.Add(theElement.ElementID);
1665
                  displayProgress( "ELEMENT: ", theElement.Name );
1687
                  displayProgress( "ELEMENT: ", theElement.Name );
1666
 
1688
 
-
 
1689
                  if (theElement.Notes != null && theElement.Notes.Length > 0)
-
 
1690
                  {
1667
                  // @@@@
1691
                     // @@@@
1668
                  //TextualContent.appendDescription( TextualContent.trimTrailingReturns(theElement.Notes) );
1692
                     //TextualContent.appendDescription( TextualContent.trimTrailingReturns(theElement.Notes) );
1669
                  TextParser.parse( TextualContent.trimTrailingReturns(theElement.Notes), theElement.ElementID, EA_Constants.styleName_Body1, 0, false);
1693
                     TextParser.parse( TextualContent.trimTrailingReturns(theElement.Notes), theElement.ElementID, EA_Constants.styleName_Body1, 0, false);
-
 
1694
                  }
1670
 
1695
 
1671
                  generateElementDiagrams(theElement);
1696
                  generateElementDiagrams(theElement);
1672
 
1697
 
1673
                  if (true == isClass)
1698
                  if (true == isClass)
1674
                  {
1699
                  {
Line 1836... Line 1861...
1836
            // The EA_DocGenText element can contain text content in its notes section
1861
            // The EA_DocGenText element can contain text content in its notes section
1837
            // that must be appended to the doc in Body 1 style within the current
1862
            // that must be appended to the doc in Body 1 style within the current
1838
            // section.
1863
            // section.
1839
         else if (theElement.Name.StartsWith(EA_Constants.EA_DocGenText))
1864
         else if (theElement.Name.StartsWith(EA_Constants.EA_DocGenText))
1840
         {
1865
         {
-
 
1866
            if (theElement.Notes != null && theElement.Notes.Length > 0)
-
 
1867
            {
1841
            //@@@@
1868
               //@@@@
1842
            //TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(theElement.Notes), EA_Constants.styleName_Body1 );
1869
               //TextualContent.appendAndSelectText( TextualContent.trimTrailingReturns(theElement.Notes), EA_Constants.styleName_Body1 );
1843
            TextParser.parse( TextualContent.trimTrailingReturns(theElement.Notes), theElement.ElementID, EA_Constants.styleName_Body1, 0, false);
1870
               TextParser.parse( TextualContent.trimTrailingReturns(theElement.Notes), theElement.ElementID, EA_Constants.styleName_Body1, 0, false);
-
 
1871
            }
1844
         }
1872
         }
1845
 
1873
 
1846
         else if (theElement.Name.StartsWith(EA_Constants.EA_DocGenRelationshipMatrix))
1874
         else if (theElement.Name.StartsWith(EA_Constants.EA_DocGenRelationshipMatrix))
1847
         {
1875
         {
1848
            EA_RelationshipMatrix.initialise(processedElements);
1876
            EA_RelationshipMatrix.initialise(processedElements);
Line 2069... Line 2097...
2069
            if (!abortCreationThread)
2097
            if (!abortCreationThread)
2070
            {
2098
            {
2071
               Main.EA_Repository.WriteOutput(Main.GUI_OUTPUT_TAB_NAME, "Correcting known problems in ERG template styles", -1);
2099
               Main.EA_Repository.WriteOutput(Main.GUI_OUTPUT_TAB_NAME, "Correcting known problems in ERG template styles", -1);
2072
               StyleContent.correctErrorsInTemplateStyles();
2100
               StyleContent.correctErrorsInTemplateStyles();
2073
            }
2101
            }
-
 
2102
            if (EA_DocGenOptions.optionValue(EA_DocGenOptions.boolean_options_e.FORCE_HEADING_TABS_TO_2_5_CM))
-
 
2103
            {
-
 
2104
               Main.EA_Repository.WriteOutput(Main.GUI_OUTPUT_TAB_NAME, "Forcing Heading styles to use tab stop at 2.5cm only", -1);
-
 
2105
               StyleContent.forceHeadingsToUse2_5cmTabStops();
-
 
2106
            }
2074
 
2107
 
2075
            // Parse EA_DocGen Document Model. The parent package is the document model itself
2108
            // Parse EA_DocGen Document Model. The parent package is the document model itself
2076
            // and the packages within it are the top level packages only.
2109
            // and the packages within it are the top level packages only.
2077
            // Question: do we have to parse diagrams and elements at this top level? So far,
2110
            // Question: do we have to parse diagrams and elements at this top level? So far,
2078
            // this has been found to be unecessary, but you never know. For now, dont do it.
2111
            // this has been found to be unecessary, but you never know. For now, dont do it.