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); }
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)); } } }
public override void MergeLoaded([NotNull] object data) { _mergeData = (LinkedNamesMergeData)data; base.MergeLoaded(data); }