2007-01-10 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Wed, 10 Jan 2007 16:30:31 +0000 (16:30 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Wed, 10 Jan 2007 16:30:31 +0000 (16:30 -0000)
        * BuildItemGroup.cs (Clear): Remove from XML.

        * BuildPropertyGroup.cs (AddNewProperty): Use right namespace and add
        to Project.EvaluatedProperties.
        (Clear): Remove from XML.

svn path=/trunk/mcs/; revision=70780

mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs

index 6a20bac03126c9cd35512afa0e1ae5e0289417dc..e511661558336b11d2182bec41464901178332b7 100644 (file)
@@ -95,9 +95,11 @@ namespace Microsoft.Build.BuildEngine {
                        return bi;
                }
                
-               [MonoTODO ("what about groups from xml?")]
                public void Clear ()
                {
+                       if (FromXml)
+                               itemGroupElement.RemoveAll ();
+                       
                        buildItems = new List <BuildItem> ();
                }
 
index 443e5b9ec471f701101c8f39fca49249f822b385..173f3d3c97e5447546d382beb809e10c87f7fb40 100644 (file)
@@ -87,7 +87,7 @@ namespace Microsoft.Build.BuildEngine {
                        if (FromXml) {
                                XmlElement xe;
                                
-                               xe = propertyGroup.OwnerDocument.CreateElement (propertyName);
+                               xe = propertyGroup.OwnerDocument.CreateElement (propertyName, Project.XmlNamespace);
                                propertyGroup.AppendChild (xe);
                                
                                if (treatPropertyValueAsLiteral)
@@ -97,6 +97,7 @@ namespace Microsoft.Build.BuildEngine {
                                
                                prop = new BuildProperty (parentProject, xe);
                                AddProperty (prop);
+                               parentProject.EvaluatedProperties.AddProperty (prop);
                                return prop;
                        } else
                                throw new InvalidOperationException ("This method is only valid for persisted <System.Object[]> elements.");
@@ -121,9 +122,10 @@ namespace Microsoft.Build.BuildEngine {
                
                public void Clear ()
                {
-                       if (FromXml)
+                       if (FromXml) {
+                               propertyGroup.RemoveAll ();
                                properties = new List <BuildProperty> ();
-                       else
+                       else
                                propertiesByName = new Dictionary <string, BuildProperty> ();
                }
 
index ac25039b83fbe0b4c6dd687ee604ebb09cd53d37..02f863d57a00f4c9d4e627b386bdf15ad3e4937c 100644 (file)
@@ -1,3 +1,11 @@
+2007-01-10  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * BuildItemGroup.cs (Clear): Remove from XML.
+
+       * BuildPropertyGroup.cs (AddNewProperty): Use right namespace and add
+       to Project.EvaluatedProperties.
+       (Clear): Remove from XML.
+
 2007-01-09  Marek Sieradzki  <marek.sieradzki@gmail.com>
 
        * Project.cs (InitializeProperties): Added $(MSBuildProjectDirectory)
index d9f11b9c25e2530d14cf2b2d02d06865029e1fbd..f3f9e31df86f771e9334491c6d7c5849ef702ef5 100644 (file)
@@ -149,7 +149,6 @@ namespace Microsoft.Build.BuildEngine {
                        Evaluate (EvaluationType.Item);
                }
 
-               // check what happens with order: import -> 1 2 (probably is entered in wrong order)
                void Evaluate (EvaluationType type)
                {
                        BuildItemGroup big;