/** Finds a child of an EA Model element capturing exceptions raised if the child is not
         * found.
         *
         */
        private static Object EAUtil_FindChild(EA.Collection collection, String childName)
        {
            Object child = null;
            try {
                child = collection.GetByName(childName);
            }
            catch (Exception) {}

            return child;
        }
예제 #2
0
 private static bool tagExists(EA.Collection tvs, String tagName)
 {
     try
     {
         if (tvs.GetByName(tagName) != null)
         {
             return true;
         }
     }
     catch (Exception)
     {
         // There seems to be a bug in GetByName somewhere
         // where an index out of bounds exception is thrown
         // if the input parameter is not found.
     }
     return false;
 }