Ejemplo n.º 1
0
		void HandleSolutionEntrySaved (object sender, SolutionItemEventArgs e)
		{
			if (e.SolutionItem is DotNetProject) {
				projectTimestamps [(DotNetProject)e.SolutionItem] = DateTime.Now;
				OnChanged ();
			}
		}
Ejemplo n.º 2
0
        protected virtual void OnSaved(SolutionItemEventArgs args)
        {
            SetFastBuildCheckDirty();

            if (Saved != null)
            {
                Saved(this, args);
            }
        }
        private void OnModuleOnShadowSolutionChanged (object o, SolutionItemEventArgs eventArgs)
        {
            /*TypeSystemService.UnloadAllProjects ();
            foreach (var project in eventArgs.Solution.GetAllSolutionItems<ProtobuildDefinition> ()) {
                TypeSystemService.LoadProject (project);
            }*/

            // Active documents automatically change over because the type system reloads.
        }
Ejemplo n.º 4
0
 public SolutionEntityItem()
 {
     items          = new ProjectItemCollection(this);
     thisItemArgs   = new SolutionItemEventArgs(this);
     configurations = new SolutionItemConfigurationCollection(this);
     configurations.ConfigurationAdded   += new ConfigurationEventHandler(OnConfigurationAddedToCollection);
     configurations.ConfigurationRemoved += new ConfigurationEventHandler(OnConfigurationRemovedFromCollection);
     Counters.ItemsLoaded++;
     fileStatusTracker = new FileStatusTracker <SolutionItemEventArgs> (this, OnReloadRequired, new SolutionItemEventArgs(this));
 }
Ejemplo n.º 5
0
 void OnItemReloadRequired(SolutionItemEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnItemReloadRequired(e);
     }
     if (ItemReloadRequired != null)
     {
         ItemReloadRequired(this, e);
     }
 }
		private void ReloadEditorHosts(object sender, SolutionItemEventArgs e)
		{
			if (e.SolutionItem == null)
			{
				editorHost.Reload(e.Solution);
			}
			else
			{
				editorHost.Reload(e.SolutionItem);
			}
		}
Ejemplo n.º 7
0
 protected virtual void OnItemSaved(SolutionItemEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnEntrySaved(e);
     }
     if (ItemSaved != null)
     {
         ItemSaved(this, e);
     }
 }
 protected virtual void OnReloadRequired(SolutionItemEventArgs args)
 {
     fileStatusTracker.FireReloadRequired(args);
 }
Ejemplo n.º 9
0
		static void OnEntryAdded (object o, SolutionItemEventArgs args)
		{
			// handles addition of solutions and projects
			SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder;
			
			if (parent == null)
				return;
			
			Repository repo = GetRepository (parent);
			
			if (repo == null)
				return;
			
			SolutionItem entry = args.SolutionItem;
			Repository currentRepo = GetRepository (entry);
			if (currentRepo != null && currentRepo.VersionControlSystem != repo.VersionControlSystem) {
				// If the item is already under version control using a different version control system
				// don't add it to the parent repo.
				return;
			}
			
			string path = entry.BaseDirectory;
			
			// While we /could/ call repo.Add with `recursive = true', we don't
			// necessarily want to add files under the project/solution directory
			// that may not be a part of this project/solution.
			
			ArrayList files = new ArrayList ();
			
			files.Add (path);
			SolutionItemAddFiles (path, entry, files);
			files.Sort ();
			
			using (IProgressMonitor monitor = GetStatusMonitor ()) {
				string[] paths = (string[]) files.ToArray (typeof (string));
				
				foreach (string p in paths) {
					if (repo.GetVersionInfo (p).CanAdd)
						repo.Add (p, false, monitor);
				}
			}
			
			NotifyFileStatusChanged (new FileUpdateEventArgs (repo, parent.BaseDirectory, true));
		}
Ejemplo n.º 10
0
		static void OnEntryAdded (object o, SolutionItemEventArgs args)
		{
			// handles addition of solutions and projects
			SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder;
			
			if (parent == null)
				return;
			
			Repository repo = GetRepository (parent);
			
			if (repo == null)
				return;
			
			SolutionItem entry = args.SolutionItem;
			string path = entry.BaseDirectory;
			
			if (!repo.CanAdd (path))
				return;
			
			// While we /could/ call repo.Add with `recursive = true', we don't
			// necessarily want to add files under the project/solution directory
			// that may not be a part of this project/solution.
			
			ArrayList files = new ArrayList ();
			
			files.Add (path);
			SolutionItemAddFiles (path, entry, files);
			files.Sort ();
			
			using (IProgressMonitor monitor = GetStatusMonitor ()) {
				string[] paths = (string[]) files.ToArray (typeof (string));
				
				for (int i = 0; i < paths.Length; i++)
					repo.Add (paths[i], false, monitor);
			}
			
			NotifyFileStatusChanged (repo, parent.BaseDirectory, true);
		}
Ejemplo n.º 11
0
		static void OnSolutionItemRemoved (object sender, SolutionItemEventArgs args)
		{
			if (args.SolutionItem is Project)
				Unload ((Project) args.SolutionItem);
		}
Ejemplo n.º 12
0
        protected override void OnSaved(SolutionItemEventArgs args)
        {
            base.OnSaved(args);

            if (ExtendedConfiguration != null)
            {
                try
                {
                    var json = JsonConvert.SerializeObject(ExtendedConfiguration, Newtonsoft.Json.Formatting.Indented);
                    File.WriteAllText(BaseDirectory.Combine(ConfigJson), json);
                }
                catch
                {
                }
            }
        }
Ejemplo n.º 13
0
		static void OnEntryAdded (object o, SolutionItemEventArgs args)
		{
			if (args is SolutionItemChangeEventArgs && ((SolutionItemChangeEventArgs) args).Reloading)
				return;

			// handles addition of solutions and projects
			SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder;
			
			if (parent == null)
				return;
			
			Repository repo = GetRepository (parent);
			
			if (repo == null)
				return;
			
			SolutionItem entry = args.SolutionItem;
			Repository currentRepo = GetRepository (entry);
			if (currentRepo != null && currentRepo.VersionControlSystem != repo.VersionControlSystem) {
				// If the item is already under version control using a different version control system
				// don't add it to the parent repo.
				return;
			}
			
			string path = entry.BaseDirectory;
			
			// While we /could/ call repo.Add with `recursive = true', we don't
			// necessarily want to add files under the project/solution directory
			// that may not be a part of this project/solution.

			var files = new HashSet<string> { path };
			SolutionItemAddFiles (path, entry, files);
			
			using (IProgressMonitor monitor = GetStatusMonitor ()) {
				var status = repo.GetDirectoryVersionInfo (path, false, true);
				foreach (var v in status) {
					if (!v.IsVersioned && files.Contains (v.LocalPath))
						repo.Add (v.LocalPath, false, monitor);
				}
			}
			
			NotifyFileStatusChanged (new FileUpdateEventArgs (repo, parent.BaseDirectory, true));
		}
Ejemplo n.º 14
0
 protected override void OnSaved(SolutionItemEventArgs args)
 {
     NeedsFullRebuild = true;
     base.OnSaved (args);
 }
Ejemplo n.º 15
0
		private static void OnEntryAddedToCombine (object sender, SolutionItemEventArgs e)
		{
			CProject p = e.SolutionItem as CProject;
			
			if (p == null)
				return;
			
			foreach (ProjectFile f in p.Files)
				TagDatabaseManager.Instance.UpdateFileTags (p, f.Name);
		}
Ejemplo n.º 16
0
		void OnEntryRemoved (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem);
			if (tb != null)
				tb.Remove ();
		}
Ejemplo n.º 17
0
		void OnEntryAdded (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem.ParentFolder);
			if (tb != null) {
				tb.AddChild (e.SolutionItem, true);
				tb.Expanded = true;
			}
		}
Ejemplo n.º 18
0
		void OnSolutionItemAddedRemoved (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.Solution);
			if (tb != null)
				tb.Update ();	// Update the entry count
		}
Ejemplo n.º 19
0
		void OnEntryAdded (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb;
			if (e.SolutionItem.ParentFolder == null)
				tb = Context.GetTreeBuilder (e.SolutionItem.ParentSolution);
			else
				tb = Context.GetTreeBuilder (e.SolutionItem.ParentFolder);
			
			if (tb != null)
				tb.AddChild (e.SolutionItem, true);
		}
Ejemplo n.º 20
0
 internal void NotifyItemSaved(object sender, SolutionItemEventArgs e)
 {
     OnItemSaved(e);
 }
Ejemplo n.º 21
0
 internal protected virtual void OnReloadRequired(SolutionItemEventArgs args)
 {
     next.OnReloadRequired(args);
 }
Ejemplo n.º 22
0
		private static void OnEntryAddedToCombine (object sender, SolutionItemEventArgs e)
		{
			ValaProject p = e.SolutionItem as ValaProject;
			
			if (p == null)
				return;
			
			foreach (ProjectPackage package in p.Packages)
				if (!package.IsProject){ ProjectInformationManager.Instance.Get (p).AddPackage (package.Name); }
			foreach (ProjectFile f in p.Files)
				ProjectInformationManager.Instance.Get (p).AddFile (f.FilePath);
		}
		void OnEntryChanged (object sender, SolutionItemEventArgs e)
		{
			UpdateTests ();
		}
Ejemplo n.º 24
0
		static void OnSolutionItemAdded (object sender, SolutionItemEventArgs args)
		{
			if (args.SolutionItem is Project)
				Load ((Project) args.SolutionItem);
		}
Ejemplo n.º 25
0
 internal void NotifyItemReloadRequired(object sender, SolutionItemEventArgs e)
 {
     OnItemReloadRequired(e);
 }
		internal protected virtual void OnReloadRequired (SolutionItemEventArgs args)
		{
			next.OnReloadRequired (args);
		}
Ejemplo n.º 27
0
		void HandleProjectSaved (object sender, SolutionItemEventArgs e)
		{
			UpdateCombos ();
		}
		void ProjectSaved (object sender, SolutionItemEventArgs e)
		{
			projectSavedHandler (this, new EventArgs ());
		}