Esempio n. 1
0
 /// <summary>
 /// Raises the modified event.
 /// </summary>
 /// <param name='args'>
 /// Arguments.
 /// </param>
 protected virtual void OnModified(SolutionItemModifiedEventArgs args)
 {
     if (Modified != null && !Disposed)
     {
         Modified(this, args);
     }
 }
Esempio n. 2
0
 internal protected virtual void OnEntryModified(SolutionItemModifiedEventArgs args)
 {
     if (EntryModified != null)
     {
         EntryModified(this, args);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Raises the modified event.
 /// </summary>
 /// <param name='args'>
 /// Arguments.
 /// </param>
 protected virtual void OnModified(SolutionItemModifiedEventArgs args)
 {
     AssertMainThread();
     if (Modified != null && !Disposed)
     {
         Modified(this, args);
     }
 }
 void OnItemModified(SolutionItemModifiedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnEntryModified(e);
     }
     ItemModified?.Invoke(this, e);
 }
		public static IEnumerable<ProjectModifiedEventArgs> Create (SolutionItemModifiedEventArgs e)
		{
			foreach (SolutionItemModifiedEventInfo eventInfo in e) {
				var project = eventInfo.SolutionItem as DotNetProject;
				if (project != null) {
					yield return new ProjectModifiedEventArgs (project, eventInfo.Hint);
				}
			}
		}
Esempio n. 6
0
 void OnProjectModified(object sender, SolutionItemModifiedEventArgs e)
 {
     foreach (var eventInfo in e)
     {
         if (eventInfo.Hint == "FileName")
         {
             cachedInclude = null;
             return;
         }
     }
 }
Esempio n. 7
0
 protected virtual void OnItemModified(SolutionItemModifiedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnEntryModified(e);
     }
     if (ItemModified != null)
     {
         ItemModified(this, e);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// This takes the modified projects that occurred during the solution load and re-plays
 /// the modifications to the workspace as though they occurred after the load so any updated
 /// references due to a NuGet restore are made available to the type system.
 /// </summary>
 void ReloadModifiedProjects()
 {
     lock (workspace.projectModifyLock) {
         if (!workspace.modifiedProjects.Any())
         {
             return;
         }
         var modifiedWhileLoading = workspace.modifiedProjects;
         workspace.modifiedProjects = new List <MonoDevelop.Projects.DotNetProject> ();
         foreach (var project in modifiedWhileLoading)
         {
             var args = new MonoDevelop.Projects.SolutionItemModifiedEventArgs(project, "References");
             workspace.OnProjectModified(project, args);
         }
     }
 }
Esempio n. 9
0
            /// <summary>
            /// This checks that the new project was modified whilst it was being added to the
            /// workspace and re-plays project modifications to the workspace as though they
            /// happened after the project was added. This ensures any updated references due to
            /// a NuGet restore are made available to the type system.
            /// </summary>
            internal void ReloadModifiedProject(MonoDevelop.Projects.Project project)
            {
                lock (workspace.projectModifyLock) {
                    if (!workspace.modifiedProjects.Any())
                    {
                        return;
                    }

                    int removed = workspace.modifiedProjects.RemoveAll(p => p == project);
                    if (removed > 0)
                    {
                        var args = new MonoDevelop.Projects.SolutionItemModifiedEventArgs(project, "References");
                        workspace.OnProjectModified(project, args);
                    }
                }
            }
		void OnProjectModified (object s, SolutionItemModifiedEventArgs args)
		{
			if (!args.Any (x => x is SolutionItemModifiedEventInfo && ((SolutionItemModifiedEventInfo)x).Hint == "TargetFramework"))
				return;
			if (UpdateFromProject ())
				SourceProjectDom.UpdateReferences ();
		}
Esempio n. 11
0
 internal protected virtual void OnModified(SolutionItemModifiedEventArgs args)
 {
     next.OnModified(args);
 }
Esempio n. 12
0
 internal void NotifyItemModified(object sender, SolutionItemModifiedEventArgs e)
 {
     OnItemModified(e);
 }
		internal protected virtual void OnModified (SolutionItemModifiedEventArgs args)
		{
			next.OnModified (args);
		}
Esempio n. 14
0
		static void HandleModified (object sender, SolutionItemModifiedEventArgs e)
		{
			var fn = e.FirstOrDefault (x => x is SolutionItemModifiedEventInfo && ((SolutionItemModifiedEventInfo)x).Hint == "FileName");
			if (fn == null)
				return;
			var project = fn.SolutionItem as Project;
			if (project == null)
				return;
			lock (databases) {
				try {
					foreach (var pair in databases) {
						if (pair.Value.Project == project) {
							databases.Remove (pair.Key);
							string uri = "Project:" + project.FileName;
							pair.Value.Uri = uri;
							databases [uri] = pair.Value;
							return;
						}
					}
				} catch (Exception ex) {
					LoggingService.LogError ("Parser database error: can't rename file name of " + project.Name + " to " + project.FileName, ex);
				}
			}
		}
Esempio n. 15
0
 /// <summary>
 /// Notifies that this solution folder item has been modified
 /// </summary>
 /// <param name="args">Arguments.</param>
 internal virtual void OnNotifyModified(SolutionItemModifiedEventArgs args)
 {
     OnModified(args);
 }
Esempio n. 16
0
 protected internal override void OnModified(SolutionItemModifiedEventArgs args)
 {
     base.OnModified(args);
     ModifiedEventArgs.Add(args);
 }
		/// <summary>
		/// Raises the modified event.
		/// </summary>
		/// <param name='args'>
		/// Arguments.
		/// </param>
		protected virtual void OnModified (SolutionItemModifiedEventArgs args)
		{
			AssertMainThread ();
			if (Modified != null && !Disposed)
				Modified (this, args);
		}
		void OnProjectModified (object s, SolutionItemModifiedEventArgs args)
		{
			UpdateCorlibReference ();
			if (UpdateCorlibReference ())
				SourceProjectDom.UpdateReferences ();
		}
		void ProjectModified (object sender, SolutionItemModifiedEventArgs e)
		{
			foreach (ProjectModifiedEventArgs eventArgs in ProjectModifiedEventArgs.Create (e)) {
				projectModifiedHandler (this, eventArgs);
			}
		}
Esempio n. 20
0
		void OnProjectModified (object sender, SolutionItemModifiedEventArgs args)
		{
			foreach (SolutionItemModifiedEventInfo e in args) {
				if (e.Hint == "References" || e.Hint == "Files")
					continue;
				ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem);
				if (tb != null) {
					if (e.Hint == "BaseDirectory" || e.Hint == "TargetFramework")
						tb.UpdateAll ();
					else
						tb.Update ();
				}
			}
		}