flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [2/5] git commit: [flex-falcon] [refs/heads/develop_strictest] - Fixed the JSDoc emission to allow for fully qualified type names as a parameter.
Date Wed, 13 Nov 2013 10:46:02 GMT
Fixed the JSDoc emission to allow for fully qualified type names as a parameter.

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>


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

Branch: refs/heads/develop_strictest
Commit: 183b4c8a8ffed4a14a101c651bac36f966ed0831
Parents: 44fbfcd
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Wed Nov 13 10:00:43 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Wed Nov 13 10:00:43 2013 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/goog/JSGoogDocEmitter.java   | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/183b4c8a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
index 44f8f16..96571de 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
@@ -280,9 +280,22 @@ public class JSGoogDocEmitter extends JSDocEmitter implements IJSGoogDocEmitter
 
         String paramType = "";
         if (node.isRest())
+        {
             paramType = ASEmitterTokens.ELLIPSIS.getToken();
+        }
         else
-            paramType = convertASTypeToJS(node.getVariableType(), packageName);
+        {
+            String typeName = node.getVariableType();
+            if (typeName.indexOf(packageName) > -1)
+            {
+                String[] parts = typeName.split("\\.");
+                if (parts.length > 0)
+                {
+                    typeName = parts[parts.length - 1];
+                }
+            }
+            paramType = convertASTypeToJS(typeName, packageName);
+        }
 
         emitJSDocLine(JSGoogDocEmitterTokens.PARAM, paramType + postfix,
                 node.getName());


Mime
View raw message