[Monodevelop-patches-list] r2585 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Internal/Project/Combine
Jacob Ilsø Christensen <jacobilsoe@gmail.com>
jacobilsoe at mono-cvs.ximian.com
Fri Jun 3 10:48:42 EDT 2005
Author: jacobilsoe
Date: 2005-06-03 10:48:42 -0400 (Fri, 03 Jun 2005)
New Revision: 2585
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs
Log:
Removed references to a project when it is removed
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-06-03 00:54:59 UTC (rev 2584)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-06-03 14:48:42 UTC (rev 2585)
@@ -1,3 +1,8 @@
+2005-06-03 Jacob Ilsø Christensen <jacobilsoe at gmail.com>
+
+ * Internal/Project/Combine/Combine.cs: Remove references
+ to a project when it is removed from a combine (57782)
+
2005-06-02 John Luke <john.luke at gmail.com>
* MonoDevelopCore.addin.xml: add Shift|F8 shortcut
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs 2005-06-03 00:54:59 UTC (rev 2584)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs 2005-06-03 14:48:42 UTC (rev 2585)
@@ -280,8 +280,48 @@
OnEntryRemoved (new CombineEntryEventArgs (entry));
}
+ private void RemoveReferencesToProject(Project projectToRemove)
+ {
+ if (projectToRemove == null) {
+ return;
+ }
+
+ if (this.ParentCombine != null)
+ {
+ this.ParentCombine.RemoveReferencesToProject(projectToRemove);
+ return;
+ }
+
+ foreach (Project project in this.GetAllProjects()) {
+
+ if (project == projectToRemove) {
+ continue;
+ }
+
+ ArrayList toBeDeleted = new ArrayList();
+
+ foreach (ProjectReference refInfo in project.ProjectReferences) {
+ switch (refInfo.ReferenceType) {
+ case ReferenceType.Project:
+ if (refInfo.Reference == projectToRemove.Name) {
+ toBeDeleted.Add(refInfo);
+ }
+ break;
+ case ReferenceType.Assembly:
+ case ReferenceType.Gac:
+ break;
+ }
+ }
+
+ foreach (ProjectReference refInfo in toBeDeleted) {
+ project.ProjectReferences.Remove(refInfo);
+ }
+ }
+ }
+
public void RemoveEntry (CombineEntry entry)
{
+ RemoveReferencesToProject (entry as Project);
Entries.Remove (entry);
}
More information about the Monodevelop-patches-list
mailing list