flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/3] git commit: [flex-utilities] [refs/heads/develop] - add if/unless
Date Wed, 11 Dec 2013 07:44:31 GMT
add if/unless


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

Branch: refs/heads/develop
Commit: ee94181e2f555f0a725f7a035299514972f915f1
Parents: 9dc5a00
Author: Alex Harui <aharui@apache.org>
Authored: Tue Dec 10 23:43:36 2013 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Dec 10 23:43:36 2013 -0800

----------------------------------------------------------------------
 ant_on_air/src/org/apache/flex/ant/tags/Target.as             | 6 ++++++
 .../org/apache/flex/ant/tags/supportClasses/TaskHandler.as    | 7 +++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ee94181e/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 185498f..8334c97 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
@@ -131,6 +131,12 @@ package org.apache.flex.ant.tags
             while (current < numChildren)
             {
                 var step:TaskHandler = getChildAt(current++) as TaskHandler;
+                if (step.ifProperty != null)
+                    if (!context.hasOwnProperty(step.ifProperty))
+                        continue;
+                if (step.unlessProperty != null)
+                    if (context.hasOwnProperty(step.unlessProperty))
+                        continue;
                 if (!step.execute(callbackMode))
                 {
                     step.addEventListener(Event.COMPLETE, completeHandler);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ee94181e/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 673189e..6ee826b 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
@@ -30,6 +30,9 @@ package org.apache.flex.ant.tags.supportClasses
         
         public var failonerror:Boolean = true;
         
+        public var ifProperty:String;
+        public var unlessProperty:String;
+        
         protected var callbackMode:Boolean;
         
         /**
@@ -49,6 +52,10 @@ package org.apache.flex.ant.tags.supportClasses
         {
             if (name == "failonerror")
                 failonerror = value == "true";
+            else if (name == "if")
+                ifProperty = value;
+            else if (name == "unless")
+                unlessProperty = value;
             else
                 super.processAttribute(name, value);
         }


Mime
View raw message