From commits-return-1916-archive-asf-public=cust-asf.ponee.io@royale.apache.org Mon Feb 5 08:46:23 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id A2B50180647 for ; Mon, 5 Feb 2018 08:46:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9252E160C4B; Mon, 5 Feb 2018 07:46:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B0B4A160C46 for ; Mon, 5 Feb 2018 08:46:22 +0100 (CET) Received: (qmail 51086 invoked by uid 500); 5 Feb 2018 07:46:21 -0000 Mailing-List: contact commits-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list commits@royale.apache.org Received: (qmail 51077 invoked by uid 99); 5 Feb 2018 07:46:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Feb 2018 07:46:21 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3E74781C53; Mon, 5 Feb 2018 07:46:21 +0000 (UTC) Date: Mon, 05 Feb 2018 07:46:21 +0000 To: "commits@royale.apache.org" Subject: [royale-asjs] branch develop updated: more tweaks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151781678120.28600.14308782073422456724@gitbox.apache.org> From: aharui@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: royale-asjs X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Oldrev: 8eeccd3a0f4ff8695367004a212b3904588075f2 X-Git-Newrev: 7c9d51794c2f995125683c39edb118ed838c52a7 X-Git-Rev: 7c9d51794c2f995125683c39edb118ed838c52a7 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git The following commit(s) were added to refs/heads/develop by this push: new 7c9d517 more tweaks 7c9d517 is described below commit 7c9d51794c2f995125683c39edb118ed838c52a7 Author: Alex Harui AuthorDate: Sun Feb 4 23:45:26 2018 -0800 more tweaks --- .../ASDoc/src/main/royale/ASDocMainView.mxml | 19 +++- ...tailRenderer.mxml => MethodDetailRenderer.mxml} | 11 +- .../src/main/royale/MethodSummaryRenderer.mxml | 112 +++++++++++++++++++++ .../ASDoc/src/main/royale/ParameterRenderer.as | 73 ++++++++++++++ ...ilRenderer.mxml => PropertyDetailRenderer.mxml} | 0 .../ASDoc/src/main/royale/models/ASDocModel.as | 38 ++++++- .../src/main/royale/valueObjects/ValueObject.as | 1 + 7 files changed, 245 insertions(+), 9 deletions(-) diff --git a/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml b/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml index 3f40e07..7441546 100644 --- a/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml +++ b/examples/royale/ASDoc/src/main/royale/ASDocMainView.mxml @@ -225,6 +225,17 @@ limitations under the License. font-family: monospace; } + .paramName { + font-family: monospace; + } + .paramType { + font-family: monospace; + } + .paramLink { + text-decoration: none; + font-family: monospace; + } + @@ -318,16 +329,16 @@ limitations under the License. itemRenderer="SummaryRenderer" width="100%"/> + itemRenderer="MethodSummaryRenderer" width="100%"/> + itemRenderer="PropertyDetailRenderer" width="100%"/> + itemRenderer="MethodDetailRenderer" width="100%"/> + itemRenderer="MethodDetailRenderer" width="100%"/> diff --git a/examples/royale/ASDoc/src/main/royale/DetailRenderer.mxml b/examples/royale/ASDoc/src/main/royale/MethodDetailRenderer.mxml similarity index 88% copy from examples/royale/ASDoc/src/main/royale/DetailRenderer.mxml copy to examples/royale/ASDoc/src/main/royale/MethodDetailRenderer.mxml index 5cfe8bd..e269966 100644 --- a/examples/royale/ASDoc/src/main/royale/DetailRenderer.mxml +++ b/examples/royale/ASDoc/src/main/royale/MethodDetailRenderer.mxml @@ -53,14 +53,21 @@ limitations under the License. - + - + + + + + + + diff --git a/examples/royale/ASDoc/src/main/royale/MethodSummaryRenderer.mxml b/examples/royale/ASDoc/src/main/royale/MethodSummaryRenderer.mxml new file mode 100644 index 0000000..00c3688 --- /dev/null +++ b/examples/royale/ASDoc/src/main/royale/MethodSummaryRenderer.mxml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/royale/ASDoc/src/main/royale/ParameterRenderer.as b/examples/royale/ASDoc/src/main/royale/ParameterRenderer.as new file mode 100644 index 0000000..3712d0a --- /dev/null +++ b/examples/royale/ASDoc/src/main/royale/ParameterRenderer.as @@ -0,0 +1,73 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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 +{ +import org.apache.royale.html.supportClasses.StringItemRenderer; +import org.apache.royale.html.DataContainer; + + /** + * The AttributeRenderer class displays an ASDoc attribute. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.0 + */ + public class ParameterRenderer extends StringItemRenderer + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.0 + */ + public function ParameterRenderer() + { + typeNames = "AttributeRenderer" + } + + override public function set text(value:String):void + { + var last:Boolean = false; + if (itemRendererParent) + { + var n:int = (itemRendererParent as DataContainer).dataProvider.length; + last = n == index + 1; + } + var html:String = "" + data.name + ":"; + if (data.typehref) + html += "" + data.type + ""; + else + html += "" + data.type + ""; + if (!last) + html += ", "; + COMPILE::SWF + { + textField.htmlText = value; + } + COMPILE::JS + { + this.element.innerHTML = html; + } + } + + } +} diff --git a/examples/royale/ASDoc/src/main/royale/DetailRenderer.mxml b/examples/royale/ASDoc/src/main/royale/PropertyDetailRenderer.mxml similarity index 100% rename from examples/royale/ASDoc/src/main/royale/DetailRenderer.mxml rename to examples/royale/ASDoc/src/main/royale/PropertyDetailRenderer.mxml diff --git a/examples/royale/ASDoc/src/main/royale/models/ASDocModel.as b/examples/royale/ASDoc/src/main/royale/models/ASDocModel.as index 3feeb6a..6168d10 100644 --- a/examples/royale/ASDoc/src/main/royale/models/ASDocModel.as +++ b/examples/royale/ASDoc/src/main/royale/models/ASDocModel.as @@ -232,7 +232,10 @@ package models var href:String = m.return; var c:int = href.lastIndexOf("."); if (c != -1) + { + m.return = href.substr(c + 1); href = href.substr(0, c) + "/" + href.substr(c + 1); + } m.returnhref = "#!" +href; } @@ -290,6 +293,10 @@ package models } } addAttributes(data, data); + if (data.type == "method") + { + processParams(data); + } arr.push(data); } @@ -304,14 +311,19 @@ package models } arr = dest.attributes; var map:Object = {}; - for (var tag:Object in arr) + var tag:Object; + var n:int = arr.length; + for (var i:int = 0; i < n; i++) { + tag = arr[i]; map[tag.name] = tag.value; } - var n:int = src.tags.length; - for (var i:int = 0; i < n; i++) + n = src.tags.length; + for (i = 0; i < n; i++) { tag = src.tags[i]; + if (map[tag.tagName]) + continue; var obj:Object = {}; var k:String = tagNameMap[tag.tagName]; if (k != null) @@ -340,6 +352,26 @@ package models } } + private function processParams(data:Object):void + { + var n:int = data.params.length; + for (var i:int = 0; i < n; i++) + { + var param:Object = data.params[i]; + if (masterData.classnames.indexOf(param.type) != -1) + { + var href:String = param.type; + var c:int = href.lastIndexOf("."); + if (c != -1) + { + param.type = href.substr(c + 1); + href = href.substr(0, c) + "/" + href.substr(c + 1); + } + param.typehref = "#!" +href; + } + } + } + private function computeFileName(input:String):String { return input.replace(new RegExp("\\.", "g"), "/") + ".json"; diff --git a/examples/royale/ASDoc/src/main/royale/valueObjects/ValueObject.as b/examples/royale/ASDoc/src/main/royale/valueObjects/ValueObject.as index 3d76999..bbf20ad 100644 --- a/examples/royale/ASDoc/src/main/royale/valueObjects/ValueObject.as +++ b/examples/royale/ASDoc/src/main/royale/valueObjects/ValueObject.as @@ -27,5 +27,6 @@ package valueObjects public var return:String; public var returnhref:String; public var attributes:Array; + public var params:Array; } } -- To stop receiving notification emails like this one, please contact aharui@apache.org.