Subversion Repositories DevTools

Rev

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

Rev 2100 Rev 2102
Line 1304... Line 1304...
1304
      private void generatePackageDiagrams( EA.Package thePackage )
1304
      private void generatePackageDiagrams( EA.Package thePackage )
1305
      {
1305
      {
1306
         // default handling of diagrams
1306
         // default handling of diagrams
1307
         foreach(EA.Diagram theDiagram in thePackage.Diagrams)
1307
         foreach(EA.Diagram theDiagram in thePackage.Diagrams)
1308
         {
1308
         {
-
 
1309
            if (theDiagram.ParentID == 0 || thePackage.PackageID == theDiagram.ParentID)
-
 
1310
            {
1309
            displayProgress( "DIAGRAM: ", theDiagram.Name.ToString() );
1311
               displayProgress( "DIAGRAM: ", theDiagram.Name.ToString() );
1310
 
1312
 
1311
            appendAndSelectDiagramViaClipboard( theDiagram );
1313
               appendAndSelectDiagramViaClipboard( theDiagram );
-
 
1314
            }
1312
         }
1315
         }
1313
      }
1316
      }
1314
 
1317
 
-
 
1318
      private void generateElementDiagrams( EA.Element theElement )
-
 
1319
      {
-
 
1320
         // default handling of diagrams
-
 
1321
         foreach(EA.Diagram theDiagram in theElement.Diagrams)
-
 
1322
         {
-
 
1323
            if (theDiagram.ParentID == 0 || theElement.ElementID == theDiagram.ParentID)
-
 
1324
            {
-
 
1325
               displayProgress( "DIAGRAM: ", theDiagram.Name.ToString() );
-
 
1326
 
-
 
1327
               appendAndSelectDiagramViaClipboard( theDiagram );
-
 
1328
            }
-
 
1329
         }
-
 
1330
      }
1315
 
1331
 
1316
      private void generateMethodContent( EA.Element theElement, int recurse_level )
1332
      private void generateMethodContent( EA.Element theElement, int recurse_level )
1317
      {
1333
      {
1318
         recurse_level++;
1334
         recurse_level++;
1319
         if (recurse_level > EA_Constants.MAX_HEADING_LEVEL - 1)  // -1 because this function generates two heading levels 
1335
         if (recurse_level > EA_Constants.MAX_HEADING_LEVEL - 1)  // -1 because this function generates two heading levels 
Line 1839... Line 1855...
1839
                     oneShot_skipRootElementHeading = false;
1855
                     oneShot_skipRootElementHeading = false;
1840
                  }
1856
                  }
1841
 
1857
 
1842
                  TextUtils.appendDescription( theElement.Notes, EA_Utils );
1858
                  TextUtils.appendDescription( theElement.Notes, EA_Utils );
1843
 
1859
 
-
 
1860
                  generateElementDiagrams(theElement);
-
 
1861
 
1844
                  if (true == isClass)
1862
                  if (true == isClass)
1845
                  {
1863
                  {
1846
                     // If accumulation of non-private classes is enabled, then do so.
1864
                     // If accumulation of non-private classes is enabled, then do so.
1847
                     if (recordingNonPrivateClasses)
1865
                     if (recordingNonPrivateClasses)
1848
                     {
1866
                     {
Line 1958... Line 1976...
1958
      /// </summary>
1976
      /// </summary>
1959
      /// <param name="theElement"></param>
1977
      /// <param name="theElement"></param>
1960
      /// <param name="recurse_level"></param>
1978
      /// <param name="recurse_level"></param>
1961
      private void parse_element(EA.Element theElement, int recurse_level)
1979
      private void parse_element(EA.Element theElement, int recurse_level)
1962
      {
1980
      {
-
 
1981
 
1963
         // First look for and handle special elements that control the doc-gen process
1982
         // First look for and handle special elements that control the doc-gen process
1964
 
1983
 
1965
         // The EA_DocGenPackageLink can contain a list of GUIDs in its notes section
1984
         // The EA_DocGenPackageLink can contain a list of GUIDs in its notes section
1966
         // that point to model structure outside of the localised structure forming the
1985
         // that point to model structure outside of the localised structure forming the
1967
         // document. This enables a document to grab content from other external models
1986
         // document. This enables a document to grab content from other external models
Line 2019... Line 2038...
2019
            // we are aware of the other ERG EA add-in, EA_ReqPro! That other add-in creates 
2038
            // we are aware of the other ERG EA add-in, EA_ReqPro! That other add-in creates 
2020
            // ReqProDB stereotyped elements. Never consume them in the document generation process.
2039
            // ReqProDB stereotyped elements. Never consume them in the document generation process.
2021
         else if ( theElement.Stereotype != EA_Constants.stereotype_ReqProDB )    
2040
         else if ( theElement.Stereotype != EA_Constants.stereotype_ReqProDB )    
2022
         {
2041
         {
2023
            generateElementContent( theElement, recurse_level );
2042
            generateElementContent( theElement, recurse_level );
2024
         }      
2043
         }   
-
 
2044
   
-
 
2045
         // Look at this elements sub-elements
-
 
2046
         foreach(EA.Element subElement in theElement.Elements)
-
 
2047
         {
-
 
2048
            parse_element(subElement, recurse_level+1);
-
 
2049
         }
2025
      }
2050
      }
2026
 
2051
 
2027
 
2052
 
2028
      /// <summary>
2053
      /// <summary>
2029
      /// Parses the package and all of its content, extracting information as needed, and
2054
      /// Parses the package and all of its content, extracting information as needed, and
Line 2065... Line 2090...
2065
         if (false == generatePackageHeadingAndDescription( thePackage, recurse_level ))
2090
         if (false == generatePackageHeadingAndDescription( thePackage, recurse_level ))
2066
         {
2091
         {
2067
            // consume diagrams
2092
            // consume diagrams
2068
            generatePackageDiagrams( thePackage );
2093
            generatePackageDiagrams( thePackage );
2069
 
2094
 
-
 
2095
            foreach(EA.Element subElement in thePackage.Elements)
-
 
2096
            {
-
 
2097
               if (subElement.ParentID == 0 || thePackage.PackageID == subElement.ParentID)
-
 
2098
                  parse_element(subElement, recurse_level);
-
 
2099
            }
-
 
2100
 
2070
            // consume elements - we have to use a special sorting class here because of peculiarties
2101
            // consume elements - we have to use a special sorting class here because of peculiarties
2071
            // in the way EA holds the elements in the collections. 
2102
            // in the way EA holds the elements in the collections. 
2072
            EA_ElementSorter elementSorter = new EA_ElementSorter(thePackage);
2103
            //EA_ElementSorter elementSorter = new EA_ElementSorter(thePackage);
2073
            EA.Element theElement = null;
2104
            //EA.Element theElement = null;
2074
            int theElementsRelativeLevel = 0;
2105
            //int theElementsRelativeLevel = 0;
2075
            if (true == elementSorter.getFirst(ref theElement, ref theElementsRelativeLevel))
2106
            //if (true == elementSorter.getFirst(ref theElement, ref theElementsRelativeLevel))
2076
            {
2107
           // {
2077
               do
2108
           //    do
2078
               {
2109
           //    {
2079
                  int theElementsRecurseLevel = recurse_level + theElementsRelativeLevel;
2110
           //       int theElementsRecurseLevel = recurse_level + theElementsRelativeLevel;
2080
 
2111
 
2081
                  parse_element( theElement, theElementsRecurseLevel );
2112
           //       parse_element( theElement, theElementsRecurseLevel );
2082
 
2113
 
2083
               } while (true == elementSorter.getNext(ref theElement, ref theElementsRelativeLevel));
2114
           //    } while (true == elementSorter.getNext(ref theElement, ref theElementsRelativeLevel));
2084
            }
2115
           // }
2085
         }
2116
         }
2086
 
2117
 
2087
         // Scan through the packages within this package.
2118
         // Scan through the packages within this package.
2088
         foreach(EA.Package lowerLevelPackage in thePackage.Packages)
2119
         foreach(EA.Package lowerLevelPackage in thePackage.Packages)
2089
         {
2120
         {