protected virtual void OnSaved(WorkspaceItemEventArgs args) { if (Saved != null) { Saved(this, args); } }
protected override void OnCloseWorkspace (object sender, WorkspaceItemEventArgs e) { base.OnCloseWorkspace (sender, e); IdeApp.ProjectOperations.CurrentSelectedSolutionItem = null; IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem = null; IdeApp.ProjectOperations.CurrentSelectedItem = null; }
protected virtual void OnModified(WorkspaceItemEventArgs args) { if (Modified != null) { Modified(this, args); } }
static void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e) { // Save UserTasks to xml file SaveUserTasks (e.Item); // Remove solution tasks errors.RemoveItemTasks (e.Item, true); userTasks.RemoveItemTasks (e.Item, true); }
static void OnWorkspaceItemLoaded (object sender, WorkspaceItemEventArgs e) { string fileToLoad = GetUserTasksFilename (e.Item); userTasks.BeginTaskUpdates (); try { // Load User Tasks from xml file if (File.Exists (fileToLoad)) { XmlDataSerializer serializer = new XmlDataSerializer (new DataContext ()); List<Task> ts = (List<Task>) serializer.Deserialize (fileToLoad, typeof(List<Task>)); foreach (Task t in ts) { t.WorkspaceObject = e.Item; userTasks.Add (t); } } } catch (Exception ex) { LoggingService.LogWarning ("Could not load user tasks: " + fileToLoad, ex); } finally { userTasks.EndTaskUpdates (); } }
void OnSolutionUnloaded (object sender, WorkspaceItemEventArgs e) { if (e.Item is Solution) { RegistryInfo reg; if (solutions.TryGetValue ((Solution) e.Item, out reg)) { var nav = tree.BuilderContext.GetTreeBuilder (reg); if (nav != null) nav.Remove (); } } }
static void OnWorkspaceItemAdded(object s, MonoDevelop.Projects.WorkspaceItemEventArgs args) { TypeSystemService.Load(args.Item, null).Ignore(); }
void OnCombineOpened(object sender, WorkspaceItemEventArgs args) { try { Solution sol = args.Item as Solution; if (sol != null && sol.StartupItem != null) fb.CurrentDir = sol.StartupItem.BaseDirectory; } catch { fb.CurrentDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal); } }
static void OnWorkspaceItemAdded (object s, WorkspaceItemEventArgs args) { Load (args.Item); }
void OnCloseCombine (object sender, WorkspaceItemEventArgs e) { treeView.Clear (); }
void HandleWorkspaceItemLoaded (object sender, WorkspaceItemEventArgs e) { if (ownerProjects != null) return; UpdateOwnerProjects (e.Item.GetAllItems<DotNetProject> ()); }
protected virtual void OnCloseWorkspace (object sender, WorkspaceItemEventArgs e) { treeView.RemoveChild (e.Item); }
void OnOpenCombine (object sender, WorkspaceItemEventArgs e) { treeView.LoadTree (e.Item); }
protected virtual void OnOpenWorkspace (object sender, WorkspaceItemEventArgs e) { treeView.AddChild (e.Item); }
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e) { comments.RemoveItemTasks (e.Item, true); var solution = e.Item as Solution; if (solution != null) { loadedSlns.Remove (solution); foreach (Project p in solution.GetAllProjects ()) { projectTags.Remove (p); } } }
void OnEntryChanged (object sender, WorkspaceItemEventArgs e) { UpdateTests (); }
void OnWorkspaceItemLoaded (object sender, WorkspaceItemEventArgs e) { comments.BeginTaskUpdates (); try { LoadWorkspaceItemContents (e.Item); } finally { comments.EndTaskUpdates (); } }
void HandleWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e) { if (ownerProjects == null) return; foreach (var p in e.Item.GetAllItems<DotNetProject> ()) { RemoveOwnerProject (p); } if (ownerProjects.Count == 0) { ownerProjects = null; DocumentContext.AttachToProject (null); } }
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e) { foreach (var sln in e.Item.GetAllSolutions ()) loadedSlns.Remove (sln); comments.RemoveItemTasks (e.Item, true); }
protected virtual void OnReloadRequired(WorkspaceItemEventArgs args) { fileStatusTracker.FireReloadRequired(args); }
static void OnWorkspaceItemRemoved (object s, WorkspaceItemEventArgs args) { Unload (args.Item); }
void OnWorkspaceItemUnloaded (object s, WorkspaceItemEventArgs args) { if (ContainsTarget (args.Item, currentSolutionItem)) CurrentSelectedSolutionItem = null; if (ContainsTarget (args.Item, currentWorkspaceItem)) CurrentSelectedWorkspaceItem = null; if ((currentItem is IBuildTarget) && ContainsTarget (args.Item, ((IBuildTarget)currentItem))) CurrentSelectedItem = null; }
void OnWorkspaceItemAdded(object s, MonoDevelop.Projects.WorkspaceItemEventArgs args) { Load(args.Item, null).Ignore(); }
void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e) { foreach (var sln in e.Item.GetAllSolutions ()) { if (loadedSlns.Remove (sln)) sln.SolutionItemAdded -= HandleSolutionItemAdded; } comments.RemoveItemTasks (e.Item, true); }
void OnEntryAdded (object sender, WorkspaceItemEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder (e.Item.ParentWorkspace); if (tb != null) { tb.AddChild (e.Item, true); tb.Expanded = true; } }
void OnEntryRemoved (object sender, WorkspaceItemEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder (e.Item); if (tb != null) tb.Remove (); }
void HandleSolutionSaved (object sender, WorkspaceItemEventArgs e) { UpdateCombos (); }
static void OnWorkspaceItemAdded(object s, MonoDevelop.Projects.WorkspaceItemEventArgs args) { Task.Run(() => TypeSystemService.Load(args.Item, null)); }
static void OnWorkspaceItemRemoved(object s, MonoDevelop.Projects.WorkspaceItemEventArgs args) { Unload(args.Item); }
void OnSolutionLoaded (object sender, WorkspaceItemEventArgs e) { if (e.Item is Solution) AddSolution ((Solution)e.Item); }