flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [03/14] git commit: [flex-utilities] [refs/heads/develop] - create base class for FileSet handling tasks
Date Mon, 09 Dec 2013 23:30:05 GMT
create base class for FileSet handling tasks


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

Branch: refs/heads/develop
Commit: 7f8af60cdd2d8b9cb2108994678571b0a221c396
Parents: 3a58a60
Author: Alex Harui <aharui@apache.org>
Authored: Sat Dec 7 21:47:41 2013 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Sat Dec 7 21:50:43 2013 -0800

----------------------------------------------------------------------
 .../tags/supportClasses/FileSetTaskHandler.as   | 65 ++++++++++++++++++++
 1 file changed, 65 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/7f8af60c/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
new file mode 100644
index 0000000..c399e52
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags.supportClasses
+{
+    import org.apache.flex.ant.tags.FileSet;
+    
+    /**
+     *  The base class for ITagHandlers that do work with filesets
+     */
+    public class FileSetTaskHandler extends TaskHandler
+    {
+        public function FileSetTaskHandler()
+        {
+        }
+        
+        /**
+         *  Do the work.
+         *  TaskHandlers lazily create their children so
+         *  super.execute() should be called before
+         *  doing any real work. 
+         */
+        override public function execute():Boolean
+        {
+            ant.processChildren(this.xml, context, this);
+            var n:int = numChildren;
+            for (var i:int = 0; i < n; i++)
+            {
+                var fs:FileSet = getChildAt(i) as FileSet;
+                if (fs)
+                {
+                    var list:Vector.<String> = fs.value as Vector.<String>;
+                    if (list)
+                    {
+                        for each (var fileName:String in list)
+                        {
+                            actOnFile(fs.dir, fileName);
+                        }
+                    }
+                }
+            }
+            return true;
+        }
+        
+        protected function actOnFile(dir:String, fileName:String):void
+        {
+            
+        }
+    }
+}
\ No newline at end of file


Mime
View raw message