示例#1
0
        public override object Load([NotNull] IProgressIndicator progress, bool enablePersistence)
        {
            var data = new LinkedNamesMergeData();

            foreach (var x in Map.Where(x => x.Key != null))
            {
                LoadFile(data, x.Key, x.Value);
            }
            return(data);
        }
示例#2
0
        private void LoadFile(LinkedNamesMergeData data, IPsiSourceFile sourceFile, LinkedNamesData linkedNamesData)
        {
            var sourceNames = linkedNamesData.Keys;

            data.PreviousNamesMap.AddRange(sourceFile, sourceNames);
            foreach (var sourceName in sourceNames)
            {
                var linkedNames = linkedNamesData[sourceName];
                data.PreviousNamesMap.AddRange(sourceFile, linkedNames);

                foreach (var linkedName in linkedNames)
                {
                    data.LinkedNamesMap.Add(sourceName, Pair.Of(sourceFile, linkedName));
                    data.LinkedNamesMap.Add(linkedName, Pair.Of(sourceFile, sourceName));
                }
            }
        }
示例#3
0
        public override void MergeLoaded([NotNull] object data)
        {
            _mergeData = (LinkedNamesMergeData)data;

            base.MergeLoaded(data);
        }