コード例 #1
0
ファイル: AddinFileSystem.cs プロジェクト: Kalnor/monodevelop
		void HandleSolutionEntrySaved (object sender, SolutionItemEventArgs e)
		{
			if (e.SolutionItem is DotNetProject) {
				projectTimestamps [(DotNetProject)e.SolutionItem] = DateTime.Now;
				OnChanged ();
			}
		}
コード例 #2
0
        protected virtual void OnSaved(SolutionItemEventArgs args)
        {
            SetFastBuildCheckDirty();

            if (Saved != null)
            {
                Saved(this, args);
            }
        }
コード例 #3
0
        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.
        }
コード例 #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));
 }
コード例 #5
0
 void OnItemReloadRequired(SolutionItemEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnItemReloadRequired(e);
     }
     if (ItemReloadRequired != null)
     {
         ItemReloadRequired(this, e);
     }
 }
コード例 #6
0
		private void ReloadEditorHosts(object sender, SolutionItemEventArgs e)
		{
			if (e.SolutionItem == null)
			{
				editorHost.Reload(e.Solution);
			}
			else
			{
				editorHost.Reload(e.SolutionItem);
			}
		}
コード例 #7
0
 protected virtual void OnItemSaved(SolutionItemEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnEntrySaved(e);
     }
     if (ItemSaved != null)
     {
         ItemSaved(this, e);
     }
 }
コード例 #8
0
 protected virtual void OnReloadRequired(SolutionItemEventArgs args)
 {
     fileStatusTracker.FireReloadRequired(args);
 }
コード例 #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));
		}
コード例 #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);
		}
コード例 #11
0
		static void OnSolutionItemRemoved (object sender, SolutionItemEventArgs args)
		{
			if (args.SolutionItem is Project)
				Unload ((Project) args.SolutionItem);
		}
コード例 #12
0
ファイル: DProject.cs プロジェクト: aBothe/Mono-D
        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
                {
                }
            }
        }
コード例 #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));
		}
コード例 #14
0
ファイル: AbstractDProject.cs プロジェクト: foerdi/Mono-D
 protected override void OnSaved(SolutionItemEventArgs args)
 {
     NeedsFullRebuild = true;
     base.OnSaved (args);
 }
コード例 #15
0
ファイル: CProject.cs プロジェクト: telebovich/monodevelop
		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);
		}
コード例 #16
0
		void OnEntryRemoved (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem);
			if (tb != null)
				tb.Remove ();
		}
コード例 #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;
			}
		}
コード例 #18
0
		void OnSolutionItemAddedRemoved (object sender, SolutionItemEventArgs e)
		{
			ITreeBuilder tb = Context.GetTreeBuilder (e.Solution);
			if (tb != null)
				tb.Update ();	// Update the entry count
		}
コード例 #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);
		}
コード例 #20
0
 internal void NotifyItemSaved(object sender, SolutionItemEventArgs e)
 {
     OnItemSaved(e);
 }
コード例 #21
0
 internal protected virtual void OnReloadRequired(SolutionItemEventArgs args)
 {
     next.OnReloadRequired(args);
 }
コード例 #22
0
ファイル: ValaProject.cs プロジェクト: Kalnor/monodevelop
		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);
		}
コード例 #23
0
		void OnEntryChanged (object sender, SolutionItemEventArgs e)
		{
			UpdateTests ();
		}
コード例 #24
0
		static void OnSolutionItemAdded (object sender, SolutionItemEventArgs args)
		{
			if (args.SolutionItem is Project)
				Load ((Project) args.SolutionItem);
		}
コード例 #25
0
 internal void NotifyItemReloadRequired(object sender, SolutionItemEventArgs e)
 {
     OnItemReloadRequired(e);
 }
コード例 #26
0
		internal protected virtual void OnReloadRequired (SolutionItemEventArgs args)
		{
			next.OnReloadRequired (args);
		}
コード例 #27
0
ファイル: MainToolbar.cs プロジェクト: jrhtcg/monodevelop
		void HandleProjectSaved (object sender, SolutionItemEventArgs e)
		{
			UpdateCombos ();
		}
コード例 #28
0
		void ProjectSaved (object sender, SolutionItemEventArgs e)
		{
			projectSavedHandler (this, new EventArgs ());
		}