Exemplo n.º 1
0
        /// <summary>
        /// Shared projects can trigger a reference change during re-evaluation so do not
        /// restore if the project is being re-evaluated. Otherwise this could cause the
        /// restore to be run repeatedly.
        /// </summary>
        protected override void OnReferenceRemovedFromProject(ProjectReferenceEventArgs e)
        {
            base.OnReferenceRemovedFromProject(e);

            if (!IsLoadingOrReevaluating())
            {
                RestoreNuGetPackages();
            }
        }
Exemplo n.º 2
0
        static void OnProjectReferenceRemoved(object sender, ProjectReferenceEventArgs args)
        {
            ProjectDom db = GetProjectDom(args.Project);

            if (db != null)
            {
                db.OnProjectReferenceRemoved(args.ProjectReference);
            }
        }
        protected override void OnReferenceRemovedFromProject(ProjectReferenceEventArgs e)
        {
            base.OnReferenceRemovedFromProject(e);

            if (!Project.Loading)
            {
                RestoreNuGetPackages();
            }
        }
Exemplo n.º 4
0
 void OnRemoveReference(object sender, ProjectReferenceEventArgs e)
 {
     var p = e.Project as AbstractDProject;
     if (p != null) {
         var tb = Context.GetTreeBuilder (p.References);
         if (tb != null && tb.FindChild (e.ProjectReference, true))
             tb.Remove ();
     }
 }
Exemplo n.º 5
0
 void OnAddReference(object sender, ProjectReferenceEventArgs e)
 {
     var p = e.Project as AbstractDProject;
     if (p != null) {
         var tb = Context.GetTreeBuilder (p.References);
         if (tb != null)
             tb.AddChild (e.ProjectReference);
     }
 }
Exemplo n.º 6
0
        protected override void OnReferenceAddedToProject(ProjectReferenceEventArgs e)
        {
            base.OnReferenceAddedToProject(e);

            DotNetProject project = GetDotNetProject(e.ProjectReference);

            if (project != null)
            {
                EnsureBuildPackagingNuGetPackageIsInstalled(project);
            }
        }
        void OnRemoveReference(object sender, ProjectReferenceEventArgs e)
        {
            ITreeBuilder tb = Context.GetTreeBuilder(e.Project);

            if (tb != null)
            {
                if (tb.FindChild(e.ProjectReference, true))
                {
                    tb.Remove();
                }
            }
        }
        void OnAddReference(object sender, ProjectReferenceEventArgs e)
        {
            DotNetProject p = e.Project as DotNetProject;

            if (p != null)
            {
                ITreeBuilder tb = Context.GetTreeBuilder(p.References);
                if (tb != null)
                {
                    tb.AddChild(e.ProjectReference);
                }
            }
        }
Exemplo n.º 9
0
        protected override void OnReferenceRemovedFromProject(ProjectReferenceEventArgs e)
        {
            //short-circuit if the project is being deserialised
            if (Loading)
            {
                base.OnReferenceAddedToProject(e);
                return;
            }

            UpdateWebConfigRefs();

            base.OnReferenceRemovedFromProject(e);
        }
        static void OnReferenceAdded(object o, ProjectReferenceEventArgs args)
        {
            if (updating || !IsGtkReference(args.ProjectReference))
            {
                return;
            }

            string           sr      = args.ProjectReference.StoredReference;
            string           version = sr.Substring(sr.IndexOf(",") + 1).Trim();
            ReferenceManager rm      = new ReferenceManager(args.Project as DotNetProject);

            rm.Update(version);
        }
Exemplo n.º 11
0
        void OnReferenceRemoved(object ob, ProjectReferenceEventArgs args)
        {
            if (disposed || !librariesUpdated)
            {
                return;
            }
            string pref = GetReferenceLibraryPath(args.ProjectReference);

            if (pref != null)
            {
                gproject.RemoveWidgetLibrary(pref);
                SaveProject(false);
            }
        }
Exemplo n.º 12
0
 void HandleReferenceRemovedFromProject(object sender, ProjectReferenceEventArgs e)
 {
     if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name)
     {
         foreach (var f in Files)
         {
             var pf = e.Project.GetProjectFile(f.FilePath);
             if ((pf.Flags & ProjectItemFlags.DontPersist) != 0)
             {
                 e.Project.Files.Remove(pf.FilePath);
             }
         }
     }
 }
        protected override void OnReferenceAddedToProject(ProjectReferenceEventArgs e)
        {
            base.OnReferenceAddedToProject(e);

            if (Project.Loading)
            {
                return;
            }

            if (RequiresMicrosoftBuild && e.ProjectReference.ReferenceType == ReferenceType.Project)
            {
                EnsureReferencedProjectsRequireMSBuild(true);
            }
        }
        static void OnReferenceRemoved(object o, ProjectReferenceEventArgs args)
        {
            if (updating || !IsGtkReference(args.ProjectReference))
            {
                return;
            }

            DotNetProject dnp = args.Project as DotNetProject;

            if (MessageService.Confirm(GettextCatalog.GetString("The Gtk# User Interface designer will be disabled by removing the gtk-sharp reference."), new AlertButton(GettextCatalog.GetString("Disable Designer"))))
            {
                GtkDesignInfo.DisableProject(dnp);
            }
            else
            {
                dnp.References.Add(new ProjectReference(ReferenceType.Package, args.ProjectReference.StoredReference));
            }
        }
Exemplo n.º 15
0
        static void HandleDomReferencesUpdated(object sender, ProjectReferenceEventArgs e)
        {
            var project = (DotNetProject)sender;
            var dom     = TypeSystemService.GetProjectContentWrapper(project);

            if (dom == null)
            {
                return;
            }
            NSObjectProjectInfo info;

            lock (infos) {
                if (!infos.TryGetValue(dom, out info))
                {
                    return;
                }
            }
            info.SetNeedsUpdating();
        }
Exemplo n.º 16
0
        static void OnReferenceRemoved(object o, ProjectReferenceEventArgs args)
        {
            if (updating || !IsGtkReference(args.ProjectReference))
            {
                return;
            }

            DotNetProject dnp = args.Project as DotNetProject;

            if (MessageService.Confirm(GettextCatalog.GetString("The Gtk# User Interface designer will be disabled by removing the gtk-sharp reference."), new AlertButton(GettextCatalog.GetString("Disable Designer"))))
            {
                dnp.ExtendedProperties ["GtkReferenceExists"] = false;
                GtkDesignInfo.DisableProject(dnp);
            }
            else
            {
                dnp.References.Add(ProjectReference.CreateAssemblyReference(args.ProjectReference.StoredReference));
            }
        }
Exemplo n.º 17
0
 void ProjectReferenceAddedToProject(object sender, ProjectReferenceEventArgs e)
 {
     if (updating)
     {
         return;
     }
     if (e.ProjectReference.ReferenceType == ReferenceType.Project)
     {
         DotNetProject rp = project.ParentSolution.FindProjectByName(e.ProjectReference.Reference) as DotNetProject;
         if (rp != null)
         {
             AddinData adata = AddinData.GetAddinData(rp);
             if (adata != null)
             {
                 CachedAddinManifest.MainModule.Dependencies.Add(new AddinDependency(adata.CachedAddinManifest.AddinId));
                 CachedAddinManifest.Save();
                 NotifyChanged(false);
             }
         }
     }
 }
Exemplo n.º 18
0
        protected override void OnReferenceRemovedFromProject(ProjectReferenceEventArgs e)
        {
            base.OnReferenceRemovedFromProject(e);

            if (addingReferences)
            {
                return;
            }

            if (e.ProjectReference.ReferenceType == ReferenceType.Project)
            {
                var jsonFile = ProjectJsonFile.Read(this);
                if (jsonFile.Exists)
                {
                    jsonFile.RemoveProjectReference(e.ProjectReference);
                    jsonFile.Save();
                    FileService.NotifyFileChanged(jsonFile.Path);
                }
                else
                {
                    LoggingService.LogDebug("Unable to find project.json '{0}'", jsonFile.Path);
                }
            }
        }
Exemplo n.º 19
0
		void HandleReferenceAddedToProject (object sender, ProjectReferenceEventArgs e)
		{
			if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name) {
				e.ProjectReference.Flags = ProjectItemFlags.DontPersist;
				foreach (var f in Files) {
					var cf = (ProjectFile) f.Clone ();
					cf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden;
					e.Project.Files.Add (cf);
					e.ProjectReference.SetItemsProjectPath (Path.ChangeExtension (FileName, ".projitems"));
				}
			}
		}
Exemplo n.º 20
0
		void HandleReferenceRemovedFromProject (object sender, ProjectReferenceEventArgs e)
		{
			if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name) {
				foreach (var f in Files) {
					var pf = e.Project.GetProjectFile (f.FilePath);
					if ((pf.Flags & ProjectItemFlags.DontPersist) != 0)
						e.Project.Files.Remove (pf.FilePath);
				}
			}
		}
Exemplo n.º 21
0
		internal void NotifyReferenceRemovedFromProject (object sender, ProjectReferenceEventArgs e)
		{
			if (ReferenceRemovedFromProject != null) {
				ReferenceRemovedFromProject (this, e);
			}
		}
Exemplo n.º 22
0
		internal void NotifyReferenceAddedToProject (object sender, ProjectReferenceEventArgs e)
		{
			if (ReferenceAddedToProject != null) {
				ReferenceAddedToProject (this, e);
			}
		}
Exemplo n.º 23
0
 protected override void OnReferenceAddedToProject(ProjectReferenceEventArgs e)
 {
     findPipelineEntries(e.ProjectReference);
     base.OnReferenceAddedToProject(e);
 }
Exemplo n.º 24
0
		void HandleReferenceAddedToProject (object sender, ProjectReferenceEventArgs e)
		{
			if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name) {
				ProcessNewReference (e.ProjectReference);
			}
		}
Exemplo n.º 25
0
 void OnReferencesChanged(object sender, ProjectReferenceEventArgs e)
 {
     RefreshAllChildNodes(e.Project as DotNetProject);
 }
Exemplo n.º 26
0
 void ProjectReferenceRemovedFromProject(object sender, ProjectReferenceEventArgs e)
 {
 }