private static IDictionaryFile CreateDictionary(IXmlFile first, IXmlFile second, string resultFilename) { var result = new DictionaryFile(resultFilename); var strings = second.SpecDetails.ToList(); if (Path.GetFileName(first.FileName) == "strings.xml") { foreach (var str in first.Details) { IOneString item = second.Details.FirstOrDefault(it => it.Name == str.Name); if (item != null && item.OldText != str.OldText) { result.Add(str.OldText, item.OldText); } } } else { foreach (var sourceString in first.SpecDetails) { IOneString item = strings.FirstOrDefault(targetString => sourceString.EqualsNavigations(targetString)); if (item != null && sourceString.OldText != item.OldText) { result.Add(sourceString.OldText, item.OldText); } } } return(result); }
private IList <IXmlToken> getStringsToCheck() { IList <IXmlToken> tokens = new List <IXmlToken>(); IXmlFile xmlFile = _file.GetTheOnlyPsiFile(XmlLanguage.Instance) as IXmlFile; if (xmlFile != null) { IXmlTag root = xmlFile.GetTag(delegate(IXmlTag tag) { return(tag.GetTagName() == "root"); }); if (root != null) { IEnumerable <IXmlTag> datas = root.GetTags <IXmlTag>().Where(tag => tag.GetTagName() == "data"); foreach (IXmlTag data in datas) { if (data.GetAttribute("type") == null) { IXmlTag val = data.GetTag(delegate(IXmlTag tag) { return(tag.GetTagName() == "value"); }); if (val != null) { if (val.FirstChild != null && val.FirstChild.NextSibling != null) { IXmlToken value = val.FirstChild.NextSibling as IXmlToken; if (value != null) { tokens.Add(value); } } } } } } } return(tokens); }
public BaseProcessorDaemonStageProcess(IXmlFile file, IDaemonProcess process) { if (file == null) throw new ArgumentNullException("file"); if (process == null) throw new ArgumentNullException("process"); this.file = file; this.process = process; }
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file) { return new ProcessorDaemonStageProcess<ModulereferenceProcessor>(file, process); }
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file) { return new L4NDaemonStageProcess(file, process); }
//injecting the serializer Interface and file Interface here to get rid of creating instance public ParcelConstructor(ISerialization serialization, IXmlFile file) { this.serialization = serialization; this.file = file; }
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file) { return new ProcessorDaemonStageProcess<DatabaseObjectsReferenceProcessor>(file, process); }
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file) { return new ProcessorDaemonStageProcess<ReferenceNameSyntaxErrorProcessor>(file, process); }
protected abstract IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file);
protected override IDaemonStageProcess CreateProcess(IDaemonProcess process, IXmlFile file) { return new ProcessorDaemonStageProcess<DiplaceMappingsProcessor>(file, process); }