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-compiler.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5540b48  get full qnames in json output
5540b48 is described below

commit 5540b4863f92208fc97f31bee35f4190af924666
Author: Alex Harui <aha...@apache.org>
AuthorDate: Sun Feb 4 23:45:51 2018 -0800

    get full qnames in json output
---
 .../internal/codegen/js/royale/JSRoyaleASDocEmitter.java   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
index 252940c..7103b66 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleASDocEmitter.java
@@ -34,6 +34,7 @@ import org.apache.royale.compiler.asdoc.IASDocTag;
 import org.apache.royale.compiler.asdoc.royale.ASDocComment;
 import org.apache.royale.compiler.codegen.js.royale.IJSRoyaleASDocEmitter;
 import org.apache.royale.compiler.codegen.js.royale.IJSRoyaleEmitter;
+import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
 import org.apache.royale.compiler.definitions.IAccessorDefinition;
 import org.apache.royale.compiler.definitions.IDefinition;
@@ -388,7 +389,7 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter 
implements IJSRoyaleEmit
        else
             writeNewline("  \"access\": \"read-only\",");
         write("  \"return\": \"");
-        write(formatQualifiedName(node.getReturnType()));
+        
write(formatQualifiedName(node.getReturnTypeNode().resolveType(getWalker().getProject()).getQualifiedName()));
         writeNewline("\",");
         ASDocComment asDoc = (ASDocComment) node.getASDocComment();
         if (asDoc == null || asDoc.commentNoEnd().contains("@private"))
@@ -434,7 +435,7 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter 
implements IJSRoyaleEmit
        else
             writeNewline("  \"access\": \"write-only\",");
         write("  \"return\": \"");
-        
write(formatQualifiedName(node.getParameterNodes()[0].getQualifiedName()));
+        
write(formatQualifiedName(node.getParameterNodes()[0].getVariableTypeNode().resolveType(getWalker().getProject()).getQualifiedName()));
         writeNewline("\",");
         ASDocComment asDoc = (ASDocComment) node.getASDocComment();
         if (asDoc == null || asDoc.commentNoEnd().contains("@private"))
@@ -583,7 +584,10 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter 
implements IJSRoyaleEmit
             writeNewline(",");
         }
         write("  \"return\": \"");
-        write(formatQualifiedName(node.getReturnType()));
+        if (node.getReturnType().equals("void"))
+               write("void");
+        else if (node.getReturnTypeNode() != null)
+               
write(formatQualifiedName(node.getReturnTypeNode().resolveType(getWalker().getProject()).getQualifiedName()));
         writeNewline("\",");
         write("  \"params\": [");
         boolean firstParam = true;
@@ -596,7 +600,9 @@ public class JSRoyaleASDocEmitter extends JSGoogEmitter 
implements IJSRoyaleEmit
                write("{ \"name\": \"");
                write(param.getBaseName());
                write("\", \"type\": \"");
-            write(formatQualifiedName(param.getTypeAsDisplayString()));
+               if (param.getTypeReference() != null)
+                       
write(formatQualifiedName(param.getTypeReference().resolve(getWalker().getProject(),
 
+                                       node.getContainingScope().getScope(), 
DependencyType.SIGNATURE, false).getQualifiedName()));
             write("\"}");              
        }
        write("]");

-- 
To stop receiving notification emails like this one, please contact
aha...@apache.org.

Reply via email to