protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs args) { base.OnFileRenamedInProject(args); if (Loading) { return; } foreach (ProjectFileRenamedEventInfo e in args) { if (e.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource) { QueueResgenUpdate(); } //if renaming the file to "AndroidManifest.xml", and the manifest element is not in use, set it as a convenience else if (AndroidManifest.IsNullOrEmpty && e.NewName.ToRelative(BaseDirectory) == "AndroidManifest.xml") { AndroidManifest = e.NewName; } //track manifest file renames or things will break else if (AndroidManifest == e.OldName) { AndroidManifest = e.NewName; } } }
void FileRenamed(object sender, ProjectFileRenamedEventArgs e) { bool historyChanged = false, closedHistoryChanged = false; foreach (var point in history) { foreach (var args in e) { var dp = point.NavigationPoint as DocumentNavigationPoint; historyChanged |= (dp?.HandleRenameEvent(args.OldName, args.NewName)).GetValueOrDefault(); } } if (historyChanged) { OnHistoryChanged(); } foreach (var point in closedHistory) { foreach (var args in e) { var dp = point.Item1 as DocumentNavigationPoint; closedHistoryChanged |= (dp?.HandleRenameEvent(args.OldName, args.NewName)).GetValueOrDefault(); } } if (closedHistoryChanged) { OnClosedHistoryChanged(); } }
void FileRenamedInProject(object sender, ProjectFileRenamedEventArgs args) { foreach (ProjectFileRenamedEventInfo e in args) { cache.Remove(e.OldName); } }
static void FileRenamed(object sender, ProjectFileRenamedEventArgs e) { bool historyChanged = false; bool closedHistoryChanged = false; foreach (ProjectFileRenamedEventInfo args in e) { foreach (NavigationHistoryItem point in history) { var dp = point.NavigationPoint as DocumentNavigationPoint; historyChanged &= (dp != null && dp.HandleRenameEvent(args.OldName, args.NewName)); closedHistoryChanged &= (dp != null && dp.HandleRenameEvent(args.OldName, args.NewName)); if (historyChanged && closedHistoryChanged) { break; } } } if (historyChanged) { OnHistoryChanged(); } if (closedHistoryChanged) { OnClosedHistoryChanged(); } }
void OnRenameFile (object sender, ProjectFileRenamedEventArgs args) { foreach (ProjectFileEventInfo e in args) { ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile); if (tb != null) tb.Update (); } }
private void HandleFileRenamed(ProjectFileRenamedEventArgs args) { foreach (var info in args) { RemoveFile(new ProjectFile(info.OldName)); AddFile(new ProjectFile(info.NewName), info.Project); } }
void HandleRename(object sender, ProjectFileRenamedEventArgs args) { foreach (var e in args) { translationUnits.Remove(e.OldName); CreateTranslationUnit(e.NewName, project.UnsavedFiles.Get().ToArray()); SerManager.Rename(e.OldName, e.NewName, CmdArguments(e.NewName)); } }
void OnFileRenamed(object sender, ProjectFileRenamedEventArgs args) { RemoveFile(args.OldName); FileEntry file = AddFile(args.NewName); // CheckModifiedFiles won't detect new files, so parsing // must be manyally signaled QueueParseJob(file); }
void OnRenameFile(object sender, ProjectFileRenamedEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder(e.ProjectFile); if (tb != null) { tb.Update(); } }
public static void HandleRename(ProjectFileRenamedEventArgs args) { var file = args.ProjectFile; var tool = GetGenerator(file); if (tool == null) { return; } }
void OnFileRenamed(object sender, ProjectFileRenamedEventArgs args) { // if (args.ProjectFile.BuildAction == BuildAction.Compile) { // RemoveFile (args.OldName); // FileEntry file = AddFile (args.NewName); // // CheckModifiedFiles won't detect new files, so parsing // // must be manyally signaled // QueueParseJob (file); // } }
void OnFileRenamedInProject(object sender, ProjectFileRenamedEventArgs e) { foreach (var file in e) { var oldNestingInfo = RemoveFile(file.ProjectFile); NotifyNestingRulesChanged(oldNestingInfo); var nestingInfo = AddFile(file.ProjectFile); NotifyNestingRulesChanged(nestingInfo); } }
private void ExecuteFileRenamedAction(ProjectFileRenamedEventArgs args) { if (sourceProject == null) { return; } HandleFileRenamed(args); SaveTargetProjects(); }
static void HandleRename(ProjectFileRenamedEventArgs e) { foreach (ProjectFileEventInfo args in e) { var file = args.ProjectFile; var tool = GetGenerator(file.Generator); if (tool == null) { continue; } } }
static void FileRenamed (object sender, ProjectFileRenamedEventArgs e) { bool changed = false; foreach (ProjectFileRenamedEventInfo args in e) { foreach (NavigationHistoryItem point in history) { DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint; changed &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName)); } } if (changed) OnHistoryChanged (); }
void HandleRename(object sender, ProjectFileRenamedEventArgs args) { foreach (var e in args) { using (var cmd = Connection.CreateCommand()) { cmd.CommandText = "UPDATE TRACKING SET NAME = @NEWNAME WHERE NAME = @NAME;"; cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@NAME", TableName(e.OldName)); cmd.Parameters.AddWithValue("@NEWNAME", TableName(e.NewName)); cmd.ExecuteNonQuery(); } } }
void OnFileRenamedInProject(object sender, ProjectFileRenamedEventArgs e) { foreach (var file in e) { RemoveFile(file.ProjectFile); AddFile(file.ProjectFile); } if (fileNestingEnabled) { FileNestingService.NotifyNestingRulesChanged(Project); } }
protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e) { base.OnFileRenamedInProject(e); if (loadingFiles) { return; } foreach (ProjectFileRenamedEventInfo info in e) { RenameProjectFileInMSBuildProject(info.ProjectFile, info.OldName); } }
void OnFileRenamedInProject(object s, ProjectFileRenamedEventArgs e) { if (loading) { return; } if (e.ProjectFile.BuildAction != BuildAction.Compile) { return; } if (RemoveSourceFile(e.OldName)) { AddSourceFile(e.NewName); } }
void ProjectFileRenamed(object sender, ProjectFileRenamedEventArgs e) { BeginTaskUpdates(); try { Task[] ctasks = GetFileTasks(e.OldName); foreach (Task curTask in ctasks) { curTask.FileName = e.NewName; } taskIndex.Remove(e.OldName); taskIndex [e.NewName] = ctasks; tasksAdded.AddRange(ctasks); tasksRemoved.AddRange(ctasks); } finally { EndTaskUpdates(); } }
protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e) { base.OnFileRenamedInProject(e); foreach (var p in GetReferencingProjects()) { foreach (var f in e) { if (f.ProjectFile.Subtype == Subtype.Directory) { continue; } var pf = (ProjectFile)f.ProjectFile.Clone(); p.Files.Remove(f.OldName); pf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden; p.Files.Add(pf); } } }
void OnFileRenamedInProject(object s, ProjectFileRenamedEventArgs args) { if (loading) { return; } foreach (ProjectFileRenamedEventInfo e in args) { if (e.ProjectFile.BuildAction != BuildAction.Compile) { continue; } if (RemoveSourceFile(e.OldName)) { AddSourceFile(e.NewName); } } }
async void OnFileRenamedInProject(object sender, ProjectFileRenamedEventArgs e) { // extensions may have changed so reload EditorConfigs foreach (ProjectFileRenamedEventInfo info in e) { Document document = IdeApp.Workbench.GetDocument(info.OldName); if (document == null) { continue; } await document.Reload(); document = IdeApp.Workbench.GetDocument(info.NewName); if (document == null) { continue; } Engine.LoadSettings(document); } }
void OnFileRenamed (object sender, ProjectFileRenamedEventArgs args) { // if (args.ProjectFile.BuildAction == BuildAction.Compile) { // RemoveFile (args.OldName); // FileEntry file = AddFile (args.NewName); // // CheckModifiedFiles won't detect new files, so parsing // // must be manyally signaled // QueueParseJob (file); // } }
protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e) { base.OnFileRenamedInProject (e); foreach (var p in GetReferencingProjects ()) { foreach (var f in e) { if (f.ProjectFile.Subtype == Subtype.Directory) continue; var pf = (ProjectFile) f.ProjectFile.Clone (); p.Files.Remove (f.OldName); pf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden; p.Files.Add (pf); } } }
internal void NotifyFileRenamedInProject (object sender, ProjectFileRenamedEventArgs e) { if (FileRenamedInProject != null) { FileRenamedInProject (this, e); } }