private void UpdateFile(IFileUpdater updater) { for (int i = Items.Count - 1; i >= 0; i--) { LocationPreviewItem item = (LocationPreviewItem)Items[i]; if (item.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked) { // change is applied updater.Replace(item.Line - 1, item.Column - 1, item.Length, Engine.Request.Name); updater.Log(Strings.RefactorPreviewUpdatedLogEntry.FormatUI(Filename, item.Line, item.Column, item.Type == Analysis.VariableType.Definition ? Strings.RefactorPreviewUpdatedLogEntryDefinition : Strings.RefactorPreviewUpdatedLogEntryReference)); } } updater.Save(); }
private void UpdateFile(IFileUpdater updater) { for (int i = Items.Count - 1; i >= 0; i--) { LocationPreviewItem item = (LocationPreviewItem)Items[i]; if (item.CheckState == __PREVIEWCHANGESITEMCHECKSTATE.PCCS_Checked) { // change is applied updater.Replace(item.Line - 1, item.Column - 1, item.Length, Engine.Request.Name); updater.Log(String.Format("{0}({1},{2}): updated {3}", Filename, item.Line, item.Column, item.Type == Analysis.VariableType.Definition ? "definition" : "reference")); } } updater.Save(); }