/// <summary>
        /// copies only the tagged values necesarry
        /// </summary>
        /// <param name="source">the source element</param>
        /// <param name="target">the target element</param>
        public void copyTaggedValues(TSF_EA.Element source, TSF_EA.Element target)
        {
            //build a dictionary of tagged value pairs
            var matchedPairs = new Dictionary <TSF_EA.TaggedValue, TSF_EA.TaggedValue>();
            //get a copy of the list of target tagged values
            var targetTaggedValues = target.taggedValues.OfType <TSF_EA.TaggedValue>().ToList();

            //copy tagged values
            foreach (TSF_EA.TaggedValue sourceTaggedValue in source.taggedValues)
            {
                //if it's a tagged value to be synchronized then add it to the list and skip the rest
                if (this.settings.synchronizedTaggedValues.Contains(sourceTaggedValue.name))
                {
                    this.taggedValuesToSynchronize.Add(new Tuple <TSF_EA.TaggedValue, TSF_EA.Element>(sourceTaggedValue, target));
                    continue;
                }
                bool updateTaggedValue = true;
                var  targetTaggedValue = this.popTargetTaggedValue(targetTaggedValues, sourceTaggedValue);
                if (this.settings.ignoredTaggedValues.Contains(sourceTaggedValue.name) ||
                    sourceTaggedValue.name.Equals(this.settings.customPositionTag, StringComparison.InvariantCultureIgnoreCase))
                {
                    if (targetTaggedValue != null &&
                        targetTaggedValue.eaStringValue != string.Empty)
                    {
                        //don't update any of the tagged values of the ignoredTaggeValues if the value is already filled in.
                        updateTaggedValue = false;
                    }
                }
                if (updateTaggedValue)
                {
                    if (targetTaggedValue != null)
                    {
                        //check if neededs to be updated
                        if (targetTaggedValue.eaStringValue != sourceTaggedValue.eaStringValue ||
                            targetTaggedValue.comment != sourceTaggedValue.comment)
                        {
                            targetTaggedValue.eaStringValue = sourceTaggedValue.eaStringValue;
                            targetTaggedValue.comment       = sourceTaggedValue.comment;
                            targetTaggedValue.save();
                        }
                    }
                    else
                    {
                        //create new tagged value
                        target.addTaggedValue(sourceTaggedValue.name, sourceTaggedValue.eaStringValue, sourceTaggedValue.comment, true);
                    }
                }
            }
            //remove the tagged values to be synchronized from the target element
            var taggedValuesToDelete = target.taggedValues.Where(x => this.settings.synchronizedTaggedValues.Contains(x.name)).ToList();

            foreach (var targetTag in taggedValuesToDelete)
            {
                targetTag.delete();
            }
        }
        /// <summary>
        /// copies only the tagged values necesarry
        /// </summary>
        /// <param name="source">the source element</param>
        /// <param name="target">the target element</param>
        public void copyTaggedValues(TSF_EA.Element source, TSF_EA.Element target)
        {
            //build a dictionary of tagged value pairs
            var matchedPairs = new Dictionary <TSF_EA.TaggedValue, TSF_EA.TaggedValue>();
            //get a copy of the list of target tagged values
            var targetTaggedValues = target.taggedValues.OfType <TSF_EA.TaggedValue>().ToList();

            //copy tagged values
            foreach (TSF_EA.TaggedValue sourceTaggedValue in source.taggedValues)
            {
                bool updateTaggedValue = true;
                var  targetTaggedValue = this.popTargetTaggedValue(targetTaggedValues, sourceTaggedValue);
                if (this.settings.ignoredTaggedValues.Contains(sourceTaggedValue.name) ||
                    sourceTaggedValue.name.Equals(this.settings.customPositionTag, StringComparison.InvariantCultureIgnoreCase))
                {
                    if (targetTaggedValue != null &&
                        targetTaggedValue.eaStringValue != string.Empty)
                    {
                        //don't update any of the tagged values of the ignoredTaggeValues if the value is already filled in.
                        updateTaggedValue = false;
                    }
                }
                if (updateTaggedValue)
                {
                    if (targetTaggedValue != null)
                    {
                        //check if neededs to be updated
                        if (targetTaggedValue.eaStringValue != sourceTaggedValue.eaStringValue ||
                            targetTaggedValue.comment != sourceTaggedValue.comment)
                        {
                            targetTaggedValue.eaStringValue = sourceTaggedValue.eaStringValue;
                            targetTaggedValue.comment       = sourceTaggedValue.comment;
                            targetTaggedValue.save();
                        }
                    }
                    else
                    {
                        //create new tagged value
                        target.addTaggedValue(sourceTaggedValue.name, sourceTaggedValue.eaStringValue, sourceTaggedValue.comment, true);
                    }
                }
            }
        }
 /// <summary>
 /// copies only the tagged values necesarry
 /// </summary>
 /// <param name="source">the source element</param>
 /// <param name="target">the target element</param>
 public void copyTaggedValues(UTF_EA.Element source, UTF_EA.Element target)
 {
     //copy tagged values
     foreach (UTF_EA.TaggedValue sourceTaggedValue in source.taggedValues)
     {
         bool updateTaggedValue = true;
         if (this.settings.ignoredTaggedValues.Contains(sourceTaggedValue.name))
         {
             UTF_EA.TaggedValue targetTaggedValue =
                 target.getTaggedValue(sourceTaggedValue.name);
             if (targetTaggedValue != null &&
                 targetTaggedValue.eaStringValue != string.Empty)
             {
                 //don't update any of the tagged values of the ignoredTaggeValues if the value is already filled in.
                 updateTaggedValue = false;
             }
         }
         if (updateTaggedValue)
         {
             target.addTaggedValue(sourceTaggedValue.name,
                                   sourceTaggedValue.eaStringValue);
         }
     }
 }