flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [6/8] git commit: [flex-utilities] [refs/heads/develop] - refactor the way tags pick up their attributes
Date Tue, 24 Dec 2013 06:48:45 GMT
refactor the way tags pick up their attributes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/56973c6d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/56973c6d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/56973c6d

Branch: refs/heads/develop
Commit: 56973c6d661466fb0ef94afaf5f2edea490fd650
Parents: 62d688c
Author: Alex Harui <aharui@apache.org>
Authored: Mon Dec 23 17:40:45 2013 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Dec 23 17:40:45 2013 -0800

----------------------------------------------------------------------
 ant_on_air/src/org/apache/flex/ant/Ant.as       | 16 +++-
 .../src/org/apache/flex/ant/tags/Available.as   | 56 +++++++-------
 .../src/org/apache/flex/ant/tags/Checksum.as    | 51 +++++++------
 .../src/org/apache/flex/ant/tags/Condition.as   | 30 ++++----
 ant_on_air/src/org/apache/flex/ant/tags/Copy.as | 79 +++++++++++++++-----
 .../src/org/apache/flex/ant/tags/Delete.as      | 21 +++---
 ant_on_air/src/org/apache/flex/ant/tags/Echo.as | 39 +++++++---
 .../src/org/apache/flex/ant/tags/Entry.as       | 21 +++---
 .../src/org/apache/flex/ant/tags/Equals.as      | 40 +++++-----
 ant_on_air/src/org/apache/flex/ant/tags/Fail.as | 19 +++--
 .../src/org/apache/flex/ant/tags/FileSet.as     | 18 ++---
 ant_on_air/src/org/apache/flex/ant/tags/Get.as  | 30 ++++----
 .../src/org/apache/flex/ant/tags/Input.as       | 38 +++++-----
 .../src/org/apache/flex/ant/tags/IsSet.as       | 20 ++---
 .../org/apache/flex/ant/tags/LoadProperties.as  | 24 +-----
 .../src/org/apache/flex/ant/tags/Mkdir.as       | 11 +--
 ant_on_air/src/org/apache/flex/ant/tags/Not.as  |  2 +-
 ant_on_air/src/org/apache/flex/ant/tags/OS.as   | 19 ++---
 .../src/org/apache/flex/ant/tags/Project.as     | 21 +-----
 .../src/org/apache/flex/ant/tags/Property.as    | 41 +++++-----
 .../org/apache/flex/ant/tags/PropertyFile.as    | 25 +------
 .../src/org/apache/flex/ant/tags/Replace.as     | 57 +++++++++-----
 .../src/org/apache/flex/ant/tags/Target.as      | 42 +++++------
 .../src/org/apache/flex/ant/tags/Untar.as       | 33 ++++----
 .../src/org/apache/flex/ant/tags/Unzip.as       | 51 +++++++++----
 .../src/org/apache/flex/ant/tags/XmlProperty.as | 27 +++----
 .../tags/supportClasses/FileSetTaskHandler.as   |  7 +-
 .../ant/tags/supportClasses/NamedTagHandler.as  |  9 ---
 .../flex/ant/tags/supportClasses/TagHandler.as  | 35 ++++-----
 .../flex/ant/tags/supportClasses/TaskHandler.as | 14 ++--
 30 files changed, 457 insertions(+), 439 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/Ant.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/Ant.as b/ant_on_air/src/org/apache/flex/ant/Ant.as
index e3727f2..2dbfc8e 100644
--- a/ant_on_air/src/org/apache/flex/ant/Ant.as
+++ b/ant_on_air/src/org/apache/flex/ant/Ant.as
@@ -80,11 +80,24 @@ package org.apache.flex.ant
             return true;
         }
     
+		private var _functionToCall:Function;
+		
         /**
          *  Set by various classes to defer processing in callbackMode
          */
-        public var functionToCall:Function;
+        public function set functionToCall(value:Function):void
+		{
+			if (parentAnt)
+				parentAnt.functionToCall = value;
+			else
+				_functionToCall = value;
+		}
         
+		public function get functionToCall():Function
+		{
+			return _functionToCall;
+		}
+		
         /**
          *  If you set callbackMode = true, you must call this method until you receive
          *  the Event.COMPLETE 
@@ -105,6 +118,7 @@ package org.apache.flex.ant
         public var progressClass:Object;
         
         private var context:Object;
+		public var parentAnt:Ant;
         public var ant:Ant;
         public var project:Project;
 		

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Available.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Available.as b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
index 219aa64..d7638c6 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Available.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
@@ -39,22 +39,37 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _file:String;
-        private var _type:String;
-        private var _property:String;
-        private var _value:String;
+        private function get file():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
+		
+        private function get type():String
+		{
+			return getNullOrAttributeValue("@type");
+		}
+		
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
+		
+        private function get value():String
+		{
+			return getNullOrAttributeValue("@value");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
-            if (_file == null) return false;
+			this.context = context;
+			
+            if (this.file == null) return false;
             
-            var file:File = new File(_file);
+            var file:File = new File(this.file);
             if (!file.exists)
                 return false;
             
-            if (_type == "dir" && !file.isDirectory)
+            if (type == "dir" && !file.isDirectory)
                 return false;
             
             return true;
@@ -63,23 +78,14 @@ package org.apache.flex.ant.tags
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
-            var value:Object = getValue(context);
-                if (!context.hasOwnProperty(_property))
-                    context[_property] = _value != null ? _value : true;
+            var avail:Object = getValue(context);
+			if (avail)
+			{
+	            if (!context.hasOwnProperty(property))
+	                context[property] = value != null ? value : true;
+			}			
             return true;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                _file = value;
-            else if (name == "type")
-                _type = value;
-            if (name == "property")
-                _property = value;
-            if (name == "value")
-                _value = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
index 5e19157..b2f3737 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
@@ -45,28 +45,33 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var file:String;
-        private var toDir:String;
-        private var fileExt:String = ".md5";
-        private var verifyproperty:String;
-        private var readbuffersize:int = 8192;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                file = value;
-            else if (name == "todir")
-                toDir = value;
-            else if (name == "fileext")
-                fileExt = value;
-            else if (name == "verifyproperty")
-                verifyproperty = value;
-            else if (name == "readbuffersize")
-                verifyproperty = value;
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get file():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get toDir():String
+		{
+			return getAttributeValue("@todir");
+		}
+		
+        private function get fileExt():String
+		{
+			var val:String = getNullOrAttributeValue("@fileext");
+			return val == null ? ".md5" : val;
+		}
+		
+        private function get verifyproperty():String
+		{
+			return getAttributeValue("@verifyproperty");
+		}
+		
+        private function get readbuffersize():int
+		{
+			var val:String = getNullOrAttributeValue("@readbuffersize");
+			return val == null ? 8192 : int(val);
+		}
+                
         private var md5:MD5Stream;
         private var fs:FileStream;
         
@@ -74,7 +79,7 @@ package org.apache.flex.ant.tags
         {
             super.execute(callbackMode, context);
          
-            var f:File = File.applicationDirectory.resolvePath(file);
+            var f:File = File.applicationDirectory.resolvePath(this.file);
             fs = new FileStream();
             fs.open(f, FileMode.READ);
             md5 = new MD5Stream();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
index ce565d1..9fe9063 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
@@ -23,7 +23,6 @@ package org.apache.flex.ant.tags
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.IValueTagHandler;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
 
@@ -44,15 +43,15 @@ package org.apache.flex.ant.tags
             super.execute(callbackMode, context);
             
             // if the property is not already set
-            if (_property && _value != null && !context.hasOwnProperty(_property))
+            if (property && !context.hasOwnProperty(property))
             {
                 var val:Object = computedValue;
                 if (val == "true" || val == true)
                 {
                     // set it if we should
-                    if (_value != null)
-                        val = _value;
-                    context[_property] = val;
+                    if (value != null)
+                        val = value;
+                    context[property] = val;
                 }            
             }
             return true;
@@ -65,16 +64,15 @@ package org.apache.flex.ant.tags
             return val;
         }
         
-        private var _property:String;
-        private var _value:Object;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "property")
-                _property = value;
-            else if (name == "value")
-                _value = value;
-        }
-        
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
+		
+        private function get value():Object
+		{
+			return getNullOrAttributeValue("@value");
+		}
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
index 8742bd3..32f66c4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
@@ -24,6 +24,7 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.FileSetTaskHandler;
+    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Copy extends FileSetTaskHandler
@@ -38,27 +39,62 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var fileName:String;
-        private var toFileName:String;
-        private var toDirName:String;
-        private var overwrite:Boolean;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get toFileName():String
+		{
+			return getAttributeValue("@toFile");
+		}
+		
+        private function get toDirName():String
+		{
+			return getAttributeValue("@toDir");
+		}
+		
+        private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
+		
+		private var mapper:GlobMapper;
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                fileName = value;
-            else if (name == "toFile")
-                toFileName = value;
-            else if (name == "toDir")
-                toDirName = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
-
+		private function mapFileName(name:String):String
+		{
+			var from:String = mapper.from;
+			if (from.indexOf(".*") == -1)
+				from = from.replace("*", ".*");
+			var regex:RegExp = new RegExp(from);
+			var results:Array = name.match(regex);
+			if (results && results.length == 1)
+			{
+				name = mapper.to.replace("*", results[0]);
+				return name;
+			}
+			return null;
+		}
+		
+		private var searchedForMapper:Boolean;
+		
         override protected function actOnFile(dir:String, fileName:String):void
         {
+			if (!searchedForMapper)
+			{
+				// look for a mapper
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var child:ITagHandler = getChildAt(i);
+					if (child is GlobMapper)
+					{
+						mapper = child as GlobMapper;
+						break;
+					}
+				}
+				searchedForMapper = true;
+			}
+
             var srcName:String;
             if (dir)
                 srcName = dir + File.separator + fileName;
@@ -66,6 +102,13 @@ package org.apache.flex.ant.tags
                 srcName = fileName;
             var srcFile:File = File.applicationDirectory.resolvePath(srcName);
             
+			if (mapper)
+			{
+				fileName = mapFileName(fileName);
+				if (fileName == null)
+					return;
+			}
+			
             var destName:String;
             if (toDirName)
                 destName = toDirName + File.separator + fileName;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
index 77aba9d..cae5795 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
@@ -38,19 +38,16 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var fileName:String;
-        private var dirName:String;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get dirName():String
+		{
+			return getAttributeValue("@dir");
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                fileName = value;
-            else if (name == "dir")
-                dirName = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override protected function actOnFile(dir:String, fileName:String):void
         {
             var srcName:String;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
index fbcfa7f..349671c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
@@ -18,6 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
+    import flash.filesystem.File;
+    import flash.filesystem.FileMode;
+    import flash.filesystem.FileStream;
+    
     import mx.core.IFlexModuleFactory;
     
     import org.apache.flex.ant.Ant;
@@ -37,25 +41,38 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
+		private var _text:String;
+		
+        private function get text():String
+		{
+			if (_text != null)
+				return _text;
+			
+			return getAttributeValue("@text");
+		}
+		private function get fileName():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
         
         public function setText(text:String):void
         {
-            this.text = text;    
+            _text = text;    
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
-            ant.output(ant.getValue(text, context));
+			if (fileName != null)
+			{
+				var f:File = new File(fileName);
+				var fs:FileStream = new FileStream();
+				fs.open(f, FileMode.WRITE);
+				fs.writeUTFBytes(ant.getValue(text, context));
+				fs.close();
+			}
+			else
+	            ant.output(ant.getValue(text, context));
             return true;
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Entry.as b/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
index 6435df6..7f56457 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
@@ -36,16 +36,15 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        public var key:String;
-        public var value:String;
-                
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "key")
-                key = value;
-            else if (name == value)
-                this.value = value;
-        }
-        
+        public function get key():String
+		{
+			return getAttributeValue("@key");
+		}
+		
+        public function get value():String
+		{
+			return getNullOrAttributeValue("@value");
+		}
+                        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
index 6c4923c..2ff7dc1 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
@@ -38,15 +38,29 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var arg1:String;
-        private var arg2:String;
-        private var casesensitive:Boolean;
-        private var trim:Boolean;
+        private function get arg1():String
+		{
+			return getAttributeValue("@arg1");
+		}
+		
+        private function get arg2():String
+		{
+			return getAttributeValue("@arg2");
+		}
+		
+        private function get casesensitive():Boolean
+		{
+			return getAttributeValue("@casesensitive") == "true";
+		}
+		
+        private function get trim():Boolean
+		{
+			return getAttributeValue("@trim") == "true";
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
+			this.context = context;
 			var val1:String = arg1;
             var val2:String = arg2;
             if (casesensitive)
@@ -61,18 +75,6 @@ package org.apache.flex.ant.tags
             }
             return val1 == val2;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "arg1")
-                arg1 = value;
-            else if (name == "arg2")
-                arg2 = value;
-            else if (name == "casesensitive")
-                casesensitive = value == "true";
-            else if (name == "trim")
-                trim = value == "true";
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
index 7f6cab4..319365a 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
@@ -36,21 +36,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
+        private var _text:String;
+		private function get text():String
+		{
+			if (_text != null)
+				return _text;
+			
+			return getAttributeValue("@message");
+		}
         
         public function setText(text:String):void
         {
-            this.text = text;    
+            _text = text;    
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
index 4b3d597..e169d7c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
@@ -40,11 +40,9 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _dir:String;
-        
         public function get dir():String
         {
-            return _dir;
+            return getNullOrAttributeValue("@dir");
         }
         
         private var _value:Vector.<String>;
@@ -52,8 +50,8 @@ package org.apache.flex.ant.tags
         public function getValue(context:Object):Object
         {
             if (_value) return _value;
-            
-			processAttributes(xml.attributes(), context);
+            this.context = context;
+			
             ant.processChildren(xml, this);
             var ds:DirectoryScanner = new DirectoryScanner();
             var n:int = numChildren;
@@ -71,18 +69,12 @@ package org.apache.flex.ant.tags
             }
             ds.setIncludes(includes);
             ds.setExcludes(excludes);
-            if (_dir != null)
-                ds.setBasedir(_dir);
+            if (dir != null)
+                ds.setBasedir(dir);
             ds.scan();
             _value = ds.getIncludedFiles();
             return _value;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "dir")
-                _dir = value;
-        }
-        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index 6512071..80ad7c3 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -34,7 +34,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Get extends TaskHandler
@@ -49,21 +48,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var skipexisting:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "skipexisting")
-                skipexisting = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
+        private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+        private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+        private function get skipexisting():Boolean
+		{
+			return getAttributeValue("@skipexisting") == "true";
+		}
         
         private var urlLoader:URLLoader;
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Input.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Input.as b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
index 2567e43..3d90ba6 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Input.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
@@ -40,25 +40,27 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
-        private var validArgs:Array;
-        private var property:String;
-        private var defaultValue:String;
+        private function get text():String
+		{
+			return getAttributeValue("@message");
+		}
+		
+        private function get validArgs():Array
+		{
+			var val:String = getNullOrAttributeValue("@validargs");
+			return val == null ? null : val.split(",");
+		}
+		
+        private function get property():String
+		{
+			return getAttributeValue("@addproperty");
+		}
+		
+        private function get defaultValue():String
+		{
+			return getAttributeValue("@defaultvalue");
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else if (name == "validargs")
-                validArgs = value.split("");
-            else if (name == "addproperty")
-                property = value;
-            else if (name == "defaultvalue")
-                defaultValue = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
index 8b88e97..7fb0199 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
@@ -37,22 +37,18 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _property:String;
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
-			if (_property == null) return false;
+			this.context = context;
+			if (property == null) return false;
             
-            return context.hasOwnProperty(_property);
+            return context.hasOwnProperty(property);
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "property")
-                _property = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
index ef68bd0..70ec113 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
@@ -18,23 +18,15 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.desktop.NativeProcess;
-    import flash.desktop.NativeProcessStartupInfo;
-    import flash.events.Event;
-    import flash.events.NativeProcessExitEvent;
-    import flash.events.ProgressEvent;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
-    import flash.system.Capabilities;
-    import flash.utils.IDataInput;
     
     import mx.core.IFlexModuleFactory;
     import mx.utils.StringUtil;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class LoadProperties extends TaskHandler
@@ -80,18 +72,10 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "srcFile")
-            {
-                fileName = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getAttributeValue("@srcFile");
+		}        
 
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
index c1c92d8..1ff1c09 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
@@ -38,7 +38,10 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _dir:String;
+        private function get _dir():String
+		{
+			return getAttributeValue("@dir");
+		}
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
@@ -50,11 +53,5 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "dir")
-                _dir = value;
-       }
-        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Not.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Not.as b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
index 0aa38b0..f4273d3 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Not.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
@@ -39,7 +39,7 @@ package org.apache.flex.ant.tags
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
+			this.context = context;
             ant.processChildren(xml, this);
             if (numChildren == 1)
             {

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/OS.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/OS.as b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
index a4e8ba2..5074573 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/OS.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
@@ -39,22 +39,19 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _family:String;
+        private function get family():String
+		{
+			return getNullOrAttributeValue("@family");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
+			this.context = context;
 			
-            if (_family == null) return false;
+            if (family == null) return false;
             
-            return Capabilities.os.toLowerCase().indexOf(_family.toLowerCase()) != -1;
+            return Capabilities.os.toLowerCase().indexOf(family.toLowerCase()) != -1;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "family")
-                _family = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Project.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Project.as b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
index 29e0392..f7a9903 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Project.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
@@ -27,7 +27,6 @@ package org.apache.flex.ant.tags
     import org.apache.flex.ant.tags.filesetClasses.Reference;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     import org.apache.flex.xml.ITagHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class Project extends TaskHandler
@@ -72,32 +71,18 @@ package org.apache.flex.ant.tags
 			}
 		}
                 
-        private var _basedir:String;
-        
         public function get basedir():String
         {
-            return _basedir;
+            return getAttributeValue("@basedir");
         }
         
-        private var _defaultTarget:String;
-        
         public function get defaultTarget():String
         {
-            return _defaultTarget;
+            return getAttributeValue("@default");
         }
         
         private var targets:Array;
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "basedir")
-                _basedir = value;
-            else if (name == "default")
-                _defaultTarget = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
 			super.execute(callbackMode, context);
@@ -109,7 +94,7 @@ package org.apache.flex.ant.tags
             status = true;
             
             if (context.targets == null)
-                context.targets == _defaultTarget;
+                context.targets = defaultTarget;
             
             targets = context.targets.split(",");
             

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Property.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Property.as b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
index adfa9c4..9e77fd8 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Property.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
@@ -89,41 +89,34 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        private var value:String;
-        private var envPrefix:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else if (name == "value")
-            {
-                this.value = value;
-            }
-            else if (name == "environment")
-            {
-                envPrefix = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
+		
+        private function get value():String
+		{
+			return getAttributeValue("@value");
+		}
+		
+        private function get envPrefix():String
+		{
+			return getNullOrAttributeValue("@environment");
+		}
+                
         private var process:NativeProcess;
         
         public function requestEnvironmentVariables():void
         {
             var file:File = File.applicationDirectory;
-            if (Capabilities.os.indexOf('Mac OS') > -1)
+            if (Capabilities.os.toLowerCase().indexOf('win') == -1)
                 file = new File("/bin/bash");
             else
                 file = file.resolvePath("C:\\Windows\\System32\\cmd.exe");
             var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
             nativeProcessStartupInfo.executable = file;
             var args:Vector.<String> = new Vector.<String>();
-            if (Capabilities.os.indexOf('Mac OS') > -1)
+            if (Capabilities.os.toLowerCase().indexOf('win') == -1)
                 args.push("-c");
 			else
 				args.push("/c");

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
index 9d5e8a0..7217524 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
@@ -18,23 +18,14 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.desktop.NativeProcess;
-    import flash.desktop.NativeProcessStartupInfo;
-    import flash.events.Event;
-    import flash.events.NativeProcessExitEvent;
-    import flash.events.ProgressEvent;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
-    import flash.system.Capabilities;
-    import flash.utils.IDataInput;
     
     import mx.core.IFlexModuleFactory;
-    import mx.utils.StringUtil;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class PropertyFile extends TaskHandler
@@ -69,18 +60,10 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
 
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
index 7eadd2f..81e418f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
@@ -18,7 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.events.Event;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
@@ -27,7 +26,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Replace extends TaskHandler
@@ -42,21 +40,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var file:String;
-        private var token:String;
-        private var value:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                file = value;
-            else if (name == "token")
-                token = value;
-            else if (name == "value")
-                this.value = value;
-            else
-                super.processAttribute(name, value);
-        }
+        private function get file():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get token():String
+		{
+			return getNullOrAttributeValue("@token");
+		}
+		
+        private function get value():String
+		{
+			return getAttributeValue("@value");
+		}
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
@@ -67,8 +64,30 @@ package org.apache.flex.ant.tags
             fs.open(f, FileMode.READ);
             var s:String = fs.readUTFBytes(fs.bytesAvailable);
             fs.close();
-            var regex:RegExp = new RegExp(token, "g");
-            s = s.replace(regex, value);
+			var tokens:Vector.<RegExp> = new Vector.<RegExp>();
+			var reps:Vector.<String> = new Vector.<String>();
+            var regex:RegExp;
+			if (token != null)
+			{
+				regex = new RegExp(token, "g");
+				tokens.push(regex);
+				reps.push(value);
+			}
+			if (numChildren > 0)
+			{
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var rf:ReplaceFilter = getChildAt(i) as ReplaceFilter;
+					regex = new RegExp(rf.token, "g");
+					tokens.push(regex);
+					reps.push(rf.value);
+				}
+			}
+			var n:int = tokens.length;
+			for (i = 0; i < n; i++)
+			{
+				s = s.replace(tokens[i], reps[i]);				
+			}
             fs.open(f, FileMode.WRITE);
             fs.writeUTFBytes(s);
             fs.close();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Target.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Target.as b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
index 5f6abbf..b61eb10 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Target.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
@@ -37,29 +37,21 @@ package org.apache.flex.ant.tags
         {
         }
                 
-        private var project:Project;
-		private var ifProperty:String;
-		private var unlessProperty:String;
+		private function get ifProperty():String
+		{
+			return getNullOrAttributeValue("@if");
+		}
+		
+		private function get unlessProperty():String
+		{
+			return getNullOrAttributeValue("@unless");
+		}
 		
-        private var _depends:String;
-        
         public function get depends():String
         {
-            return _depends;
-        }
-                
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "depends")
-                _depends = value;
-			else if (name == "if")
-				ifProperty = value;
-			else if (name == "unless")
-				unlessProperty = value;
-            else
-                super.processAttribute(name, value);
+            return getNullOrAttributeValue("@depends");
         }
-        
+                        
         private var dependsList:Array;
         
         private function processDepends():Boolean
@@ -73,7 +65,7 @@ package org.apache.flex.ant.tags
             while (dependsList.length > 0)
             {
                 var depend:String = dependsList.shift();
-                var t:Target = project.getTarget(depend);
+                var t:Target = ant.project.getTarget(depend);
                 if (!t.execute(callbackMode, context))
                 {
                     t.addEventListener(Event.COMPLETE, dependCompleteHandler);
@@ -86,6 +78,12 @@ package org.apache.flex.ant.tags
         
         private function dependCompleteHandler(event:Event):void
         {
+			if (!ant.project.status)
+			{
+				if (!inExecute)
+					dispatchEvent(new Event(Event.COMPLETE));
+				return;
+			}
             processDepends();
         }
         
@@ -97,9 +95,9 @@ package org.apache.flex.ant.tags
 			
             inExecute = true;
             this.callbackMode = callbackMode;
-            if (_depends)
+            if (depends)
             {
-                dependsList = _depends.split(",");
+                dependsList = depends.split(",");
                 if (!processDepends())
                 {
                     inExecute = false;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
index ee119f1..fd9458c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
@@ -44,23 +44,22 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var overwrite:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
-        
-        private var destFile:File;
+        private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+        private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+        private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
+
+		private var destFile:File;
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
index 6ae9d36..959eca9 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
@@ -29,6 +29,7 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    import org.apache.flex.xml.ITagHandler;
     import org.as3commons.zip.Zip;
     import org.as3commons.zip.ZipEvent;
     import org.as3commons.zip.ZipFile;
@@ -46,27 +47,40 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var overwrite:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
+		private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+		private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+		private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
         
         private var destFile:File;
+		private var patternSet:PatternSet;
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
+			if (numChildren > 0)
+			{
+				// look for a patternset
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var child:ITagHandler = getChildAt(i);
+					if (child is PatternSet)
+					{
+						patternSet = child as PatternSet;
+						break;
+					}
+				}
+			}
          
             var srcFile:File = File.applicationDirectory.resolvePath(src);
             destFile = File.applicationDirectory.resolvePath(dest);
@@ -102,6 +116,11 @@ package org.apache.flex.ant.tags
         private function onFileLoaded(e:ZipEvent):void {
             try {
                 var fzf:ZipFile = e.file;
+				if (patternSet)
+				{
+					if (!(patternSet.matches(fzf.filename)))
+						return;
+				}
                 var f:File = destFile.resolvePath(fzf.filename);
                 var fs:FileStream = new FileStream();
                 
@@ -109,7 +128,7 @@ package org.apache.flex.ant.tags
                     // Is a directory, not a file. Dont try to write anything into it.
                     return;
                 }
-                
+                				
                 fs.open(f, FileMode.WRITE);
                 fs.writeBytes(fzf.content);
                 fs.close();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
index 9fda9b4..de818ee 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
@@ -26,7 +26,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class XmlProperty extends TaskHandler
@@ -88,23 +87,15 @@ package org.apache.flex.ant.tags
             }
         }
         
-        private var fileName:String;
-        private var collapse:Boolean;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get collapse():Boolean
+		{
+			return getAttributeValue("@collapseAttributes") == "true";
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else if (name == "collapseAttributes")
-            {
-                collapse = value == "true";
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
-
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
index 9c3015b..d9d449b 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
@@ -22,7 +22,6 @@ package org.apache.flex.ant.tags.supportClasses
     import flash.events.ProgressEvent;
     import flash.filesystem.File;
     
-    import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.FileSet;
     
     /**
@@ -105,6 +104,12 @@ package org.apache.flex.ant.tags.supportClasses
                     }
                 }
             }
+			
+			if (current == numChildren)
+			{
+				dispatchEvent(new Event(Event.COMPLETE));
+				return;
+			}
         }
 
         private function actOnList():void

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
index a264bc7..99ed48f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
@@ -40,14 +40,5 @@ package org.apache.flex.ant.tags.supportClasses
             return _name;
         }
         
-        /**
-         *  @private 
-         */
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "name")
-                _name = value;
-        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
index 7834fe0..88ec3f4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
@@ -60,26 +60,19 @@ package org.apache.flex.ant.tags.supportClasses
             this.xml = xml;
         }
         
-        /**
-         *  Loop through and process attributes.
-         *  @param xmlList XMLList The list of attributes.
-         *  @param context Object An object containing useful information.
-         */
-        protected function processAttributes(xmlList:XMLList, context:Object):void
-        {
-            var n:int = xmlList.length();
-            for (var i:int = 0; i < n; i++)
-                processAttribute(xmlList[i].name().toString(), ant.getValue(xmlList[i].toString(), context));
-        }
-        
-        /**
-         *  Process an attribute on the tag.
-         *  @param name String The attribute name.
-         *  @param value String The attribute value.
-         */
-        protected function processAttribute(name:String, value:String):void
-        {
-			trace("unknown attribute:", name);
-        }
+		protected function getAttributeValue(name:String):String
+		{
+			return ant.getValue(xml[name].toString(), context);	
+		}
+		
+		protected function getNullOrAttributeValue(name:String):String
+		{
+			var xmlList:XMLList = xml[name];
+			if (xmlList.length() == 0)
+				return null;
+			
+			return ant.getValue(xml[name].toString(), context);	
+		}
+		
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
index 38e3550..59422d2 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
@@ -28,7 +28,11 @@ package org.apache.flex.ant.tags.supportClasses
         {
         }
         
-        public var failonerror:Boolean = true;
+        public function get failonerror():Boolean
+		{
+			var val:String = getNullOrAttributeValue("@failonerror");
+			return val == null ? true : val == "true";
+		}
         
         protected var callbackMode:Boolean;
         
@@ -42,17 +46,9 @@ package org.apache.flex.ant.tags.supportClasses
         {
             this.callbackMode = callbackMode;
 			this.context = context;
-			processAttributes(xml.attributes(), context);
             ant.processChildren(xml, this);
             return true;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "failonerror")
-                failonerror = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
     }
 }
\ No newline at end of file


Mime
View raw message