Example #1
0
        private void ResetConnectionsLabelHidden(ConnectionElement connection)
        {
            connection.LabelVisible = true;

            if (_HideNonsenceLabels)
            {
                if (connection.ConnectionType != ConnectionType.Composition && connection.ConnectionType != ConnectionType.Aggregation)
                {
                    BlockElement to = _entityTypes.FirstOrDefault(t => t.FullName == connection.To);
                    if (to == null)
                    {
                        to = _enumTypes.FirstOrDefault(t => t.FullName == connection.To);
                    }

                    var hasNonsenceLabel = to.Name == connection.Label;
                    if (hasNonsenceLabel)
                    {
                        connection.LabelVisible = false;
                    }
                }
            }
        }