Exemplo 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);
     }
 }
Exemplo n.º 2
0
 internal protected virtual void OnEntryModified(SolutionItemModifiedEventArgs args)
 {
     if (EntryModified != null)
     {
         EntryModified(this, args);
     }
 }
Exemplo 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);
     }
 }
Exemplo n.º 4
0
 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);
				}
			}
		}
Exemplo n.º 6
0
 void OnProjectModified(object sender, SolutionItemModifiedEventArgs e)
 {
     foreach (var eventInfo in e)
     {
         if (eventInfo.Hint == "FileName")
         {
             cachedInclude = null;
             return;
         }
     }
 }
Exemplo n.º 7
0
 protected virtual void OnItemModified(SolutionItemModifiedEventArgs e)
 {
     if (ParentFolder == null && ParentSolution != null)
     {
         ParentSolution.OnEntryModified(e);
     }
     if (ItemModified != null)
     {
         ItemModified(this, e);
     }
 }
Exemplo 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);
         }
     }
 }
Exemplo 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 ();
		}
Exemplo n.º 11
0
 internal protected virtual void OnModified(SolutionItemModifiedEventArgs args)
 {
     next.OnModified(args);
 }
Exemplo n.º 12
0
 internal void NotifyItemModified(object sender, SolutionItemModifiedEventArgs e)
 {
     OnItemModified(e);
 }
		internal protected virtual void OnModified (SolutionItemModifiedEventArgs args)
		{
			next.OnModified (args);
		}
Exemplo 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);
				}
			}
		}
Exemplo 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);
 }
Exemplo 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);
			}
		}
Exemplo 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 ();
				}
			}
		}