Subversion Repositories DevTools

Rev

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

Rev 2118 Rev 2120
Line 65... Line 65...
65
         fromElementTypes.Clear();
65
         fromElementTypes.Clear();
66
         fromPackageRecursion = true;
66
         fromPackageRecursion = true;
67
         fromPackageTrimming = false;
67
         fromPackageTrimming = false;
68
         fromPackage = null;
68
         fromPackage = null;
69
         fromElementNotes = false;
69
         fromElementNotes = false;
-
 
70
         
70
         toIntroText = null;
71
         toIntroText = null;
71
         toPackageGUID = null;
72
         toPackageGUID = null;
72
         toFromTableTitle = null;
73
         toFromTableTitle = null;
73
         toColumnTitle = null;
74
         toColumnTitle = null;
74
         toElementTypes.Clear();
75
         toElementTypes.Clear();
Line 264... Line 265...
264
               + "fromPackage=\r\n"
265
               + "fromPackage=\r\n"
265
               + "fromElementType=\r\n"
266
               + "fromElementType=\r\n"
266
               + "fromElementType=\r\n"
267
               + "fromElementType=\r\n"
267
               + "fromPackageRecursion=true\r\n"
268
               + "fromPackageRecursion=true\r\n"
268
               + "fromPackageTrimming=false\r\n"
269
               + "fromPackageTrimming=false\r\n"
269
               + "fromElementNotes=false\r\n"
270
               + "fromElementNotes=false\r\n"   
270
 
271
 
271
               + "toFromTableTitle=\r\n"
272
               + "toFromTableTitle=\r\n"
272
               + "toIntroText=\r\n"
273
               + "toIntroText=\r\n"
273
               + "toColumnTitle=\r\n"
274
               + "toColumnTitle=\r\n"
274
               + "toPackage=\r\n"
275
               + "toPackage=\r\n"
Line 336... Line 337...
336
         EA_Utilities.findAndProcessPackageElements( fromPackage, fromLister, fromPackageRecursion );
337
         EA_Utilities.findAndProcessPackageElements( fromPackage, fromLister, fromPackageRecursion );
337
 
338
 
338
         if (createWordDoc.abortCreationThread)
339
         if (createWordDoc.abortCreationThread)
339
            return;
340
            return;
340
 
341
 
-
 
342
         // Scan the toPackage to find all the "to elements".
-
 
343
         ElementAccumulator toLister = new ElementAccumulator(toElementTypes);
-
 
344
         EA_Utilities.findAndProcessPackageElements( toPackage, toLister, toPackageRecursion );
-
 
345
 
-
 
346
         if (createWordDoc.abortCreationThread)
-
 
347
            return;
-
 
348
 
341
         // Sort the "from elements"
349
         // Sort the "from elements"
342
         elementSortByName sorter = new elementSortByName();
350
         elementSortByName sorter = new elementSortByName();
343
         fromLister.Elements.Sort( sorter );
351
         fromLister.Elements.Sort( sorter );
344
 
352
 
-
 
353
         // Sort the "to" elements
-
 
354
         toLister.Elements.Sort( sorter );
-
 
355
 
345
         if (createWordDoc.abortCreationThread)
356
         if (createWordDoc.abortCreationThread)
346
            return;
357
            return;
347
 
358
 
348
         // dictionary to support from-to table construction.
359
         // dictionary to support from-to table construction.
349
         ArrayList fromToDictionary = new ArrayList();
360
         ArrayList fromToDictionary = new ArrayList();
Line 389... Line 400...
389
 
400
 
390
               // if the destination element is of a type that the user has requested to include...
401
               // if the destination element is of a type that the user has requested to include...
391
               if (!toElementTypes.Contains( destE.Type ))
402
               if (!toElementTypes.Contains( destE.Type ))
392
                  continue;
403
                  continue;
393
 
404
 
-
 
405
               // if the destination element is in the "to list"...
-
 
406
               if ( !toLister.ElementIds.Contains(destE.ElementID) )
-
 
407
                  continue;
-
 
408
 
394
               // Capture the from-to relationship in a dictionary where the key is the
409
               // Capture the from-to relationship in a dictionary where the key is the
395
               // "from element", and the value is the "to element".
410
               // "from element", and the value is the "to element".
396
               DictionaryEntry newFromToEntry = new DictionaryEntry(fromElement, destE);
411
               DictionaryEntry newFromToEntry = new DictionaryEntry(fromElement, destE);
397
               fromToDictionary.Add( newFromToEntry );
412
               fromToDictionary.Add( newFromToEntry );
398
               foundToElement = true;
413
               foundToElement = true;
Line 456... Line 471...
456
            fromElementNotes = toElementNotes;
471
            fromElementNotes = toElementNotes;
457
 
472
 
458
            // re-use the fromToDictionary to prepare the to-from table content 
473
            // re-use the fromToDictionary to prepare the to-from table content 
459
            fromToDictionary.Clear();
474
            fromToDictionary.Clear();
460
 
475
 
461
            // find all elements for the left hand column of the to-from table.
476
            // We've already found all elements for the left hand column of the to-from table.
462
            ElementAccumulator toLister = new ElementAccumulator(toElementTypes);
-
 
463
            EA_Utilities.findAndProcessPackageElements( toPackage, toLister, toPackageRecursion );
-
 
464
 
-
 
465
            if (createWordDoc.abortCreationThread)
-
 
466
               return;
-
 
467
 
-
 
468
            // Sort the "to" elements
477
            // They are stored in the toLister
469
            toLister.Elements.Sort( sorter );
-
 
470
 
478
 
471
            if (createWordDoc.abortCreationThread)
479
            if (createWordDoc.abortCreationThread)
472
               return;
480
               return;
473
 
481
 
474
            // To make the to-from table, we use the dictionary that was built when making the from-to
482
            // To make the to-from table, we use the dictionary that was built when making the from-to
Line 718... Line 726...
718
               // if we have not already come across this upward path before...
726
               // if we have not already come across this upward path before...
719
               if (!parentsDiscovered.Contains(con.ClientID))
727
               if (!parentsDiscovered.Contains(con.ClientID))
720
               {
728
               {
721
                  parentsDiscovered.Add(con.ClientID);
729
                  parentsDiscovered.Add(con.ClientID);
722
 
730
 
723
                  // is this parent is in the list of acceptable parents...
731
                  // if this parent is in the list of acceptable parents...
724
                  if (acceptableParents.Contains(con.ClientID))
732
                  if (acceptableParents.Contains(con.ClientID))
725
                  {
733
                  {
726
                     // get the parent element, add its name to our list, and ascend through the element
734
                     // get the parent element, add its name to our list, and ascend through the element
727
                     // using recursion.
735
                     // using recursion.
728
                     EA.Element client = Main.EA_Repository.GetElementByID(con.ClientID);
736
                     EA.Element client = Main.EA_Repository.GetElementByID(con.ClientID);