/// <summary>
        /// Check if all connectors are visible in diagram (global approach). It uses the direction of UML/EA.
        /// </summary>
        /// <returns></returns>
        public bool IsCompleteGlobal()
        {
            EA.Diagram dia = Rep.GetDiagramByID(_diaObj.DiagramID);

            List <int> globalIds = new List <int>();

            globalIds.AddRange(from Connector c in Rep.GetElementByID(_diaObj.ElementID).Connectors select c.ConnectorID);

            List <int> diagramConnectorIds = new List <int>();

            foreach (EA.DiagramLink l in dia.DiagramLinks)
            {
                if (l.IsHidden == false)
                {
                    diagramConnectorIds.Add(l.ConnectorID);
                }
            }

            foreach (int id in globalIds)
            {
                if (!diagramConnectorIds.Contains(id))
                {
                    return(false);
                }
            }
            return(true);
        }
        /// <summary>
        /// Check if all links in diagram are visible (diagram local approach).
        /// </summary>
        /// <returns></returns>
        public bool IsCompleteDiagram()
        {
            EA.Diagram dia = Rep.GetDiagramByID(_diaObj.DiagramID);

            foreach (EA.DiagramLink l in dia.DiagramLinks)
            {
                if (l.IsHidden == true)
                {
                    var con          = Rep.GetConnectorByID(l.ConnectorID);
                    var sourceObject = dia.GetDiagramObjectByID(con.SupplierID, "");
                    var targetObject = dia.GetDiagramObjectByID(con.ClientID, "");
                    if ((sourceObject.ElementID == _diaObj.ElementID && sourceObject.ObjectType == _diaObj.ObjectType) ||
                        (targetObject.ElementID == _diaObj.ElementID && targetObject.ObjectType == _diaObj.ObjectType))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }