flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [07/17] git commit: [flex-asjs] [refs/heads/feature/mdl] - friendly names for asdoc tags
Date Mon, 26 Dec 2016 18:40:58 GMT
friendly names for asdoc tags


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

Branch: refs/heads/feature/mdl
Commit: 22fc5067ac5f1ba8622200934ba3d88fd2b80993
Parents: 14865fe
Author: Alex Harui <aharui@apache.org>
Authored: Mon Dec 19 17:37:19 2016 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Dec 21 22:13:31 2016 -0800

----------------------------------------------------------------------
 .../ASDoc/src/main/flex/ASDocMainView.mxml       |  2 +-
 .../ASDoc/src/main/flex/models/ASDocModel.as     | 19 ++++++++++++++++++-
 .../flexjs/ASDoc/src/main/resources/config.json  | 13 +++++++++++++
 3 files changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22fc5067/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
index 95ae691..25d4884 100644
--- a/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
+++ b/examples/flexjs/ASDoc/src/main/flex/ASDocMainView.mxml
@@ -73,7 +73,7 @@ limitations under the License.
             <js:Label id="packageName"  text="{ASDocModel(applicationModel).currentPackage}"
width="100%"/>
             <js:Label id="baseName" text="{ASDocModel(applicationModel).currentClass}"
width="100%" style="fontSize:20"/>
             <js:Label id="inheritance" text="{ASDocModel(applicationModel).inheritance}"
width="100%"/>
-            <js:MultilineLabel id="attributes" width="100%"/>
+            <js:MultilineLabel id="attributes" text="{ASDocModel(applicationModel).attributes}"
width="100%"/>
             <js:MultilineLabel id="description" text="{ASDocModel(applicationModel).description}"
width="100%"/>
             <js:Label text="Public Properties" />
             <js:List id="publicPropertyList" dataProvider="{ASDocModel(applicationModel).publicProperties}"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22fc5067/examples/flexjs/ASDoc/src/main/flex/models/ASDocModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/models/ASDocModel.as b/examples/flexjs/ASDoc/src/main/flex/models/ASDocModel.as
index be18a05..d2af8bb 100644
--- a/examples/flexjs/ASDoc/src/main/flex/models/ASDocModel.as
+++ b/examples/flexjs/ASDoc/src/main/flex/models/ASDocModel.as
@@ -40,6 +40,19 @@ package models
         
         private function initializeHandler(event:Event):void
         {
+            app.service.addEventListener("complete", configCompleteHandler);
+            app.service.url = "config.json";
+            app.service.send();
+        }
+        
+        private var tagNameMap:Object;
+        
+        private function configCompleteHandler(event:Event):void
+        {
+            app.service.removeEventListener("complete", configCompleteHandler);
+            var config:Object = JSON.parse(app.service.data);
+            tagNameMap = config.tagNames;
+            
             app.service.addEventListener("complete", completeHandler);
             app.service.url = "classes.json";
             app.service.send();
@@ -359,7 +372,11 @@ package models
                 for (var p:String in _attributesMap)
                 {
                     var o:Array = _attributesMap[p];
-                    s += p + ": ";
+                    var k:String = tagNameMap[p];
+                    if (k != null)
+                        s += k + " ";
+                    else
+                        s += p + ": ";
                     var firstOne:Boolean = true;
                     for each (var q:String in o)
                     {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22fc5067/examples/flexjs/ASDoc/src/main/resources/config.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/resources/config.json b/examples/flexjs/ASDoc/src/main/resources/config.json
new file mode 100644
index 0000000..2ed93c3
--- /dev/null
+++ b/examples/flexjs/ASDoc/src/main/resources/config.json
@@ -0,0 +1,13 @@
+{  "tagNames": { "see": "See also:",
+                 "langversion": "Language version:",
+                 "playerversion": "Runtime version:",
+                 "productversion": "Product version:",
+                 "toplevel": "Top Level Component",
+                 "bead": "Bead",
+                 "viewbead": "View Bead",
+                 "controllerbead": "Controller Bead",
+                 "modelbead": "Model Bead",
+                 "layoutbead": "Layout Bead"
+
+  }
+}
\ No newline at end of file


Mime
View raw message