示例#1
0
 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;
		}
示例#3
0
 protected virtual void OnModified(WorkspaceItemEventArgs args)
 {
     if (Modified != null)
     {
         Modified(this, args);
     }
 }
示例#4
0
		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);
		}
示例#5
0
		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();
 }
示例#8
0
		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);
			}
		}
示例#9
0
		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);
		}
示例#15
0
		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 ();
		}
示例#17
0
		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);
			}
		}
示例#19
0
		void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
		{
			foreach (var sln in e.Item.GetAllSolutions ())
				loadedSlns.Remove (sln);
			comments.RemoveItemTasks (e.Item, true);
		}		
示例#20
0
 protected virtual void OnReloadRequired(WorkspaceItemEventArgs args)
 {
     fileStatusTracker.FireReloadRequired(args);
 }
示例#21
0
		static void OnWorkspaceItemRemoved (object s, WorkspaceItemEventArgs args)
		{
			Unload (args.Item);
		}
示例#22
0
		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();
 }
示例#24
0
		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 ();
		}
示例#27
0
		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);
		}