flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [3/3] git commit: [flex-falcon] [refs/heads/develop] - Emit fully qualified interface type as return type in function JSDoc
Date Tue, 19 Nov 2013 22:28:45 GMT
Emit fully qualified interface type as return type in function JSDoc

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/fc4b7cfe
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/fc4b7cfe
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/fc4b7cfe

Branch: refs/heads/develop
Commit: fc4b7cfe340c99aaf4e03db7025bc5fe503c56fb
Parents: 81121b9
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Tue Nov 19 23:27:59 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Tue Nov 19 23:27:59 2013 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/JSFlexJSDocEmitter.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fc4b7cfe/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
index b5e78f7..adb3b60 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
@@ -25,11 +25,13 @@ import org.apache.flex.compiler.common.DependencyType;
 import org.apache.flex.compiler.constants.IASKeywordConstants;
 import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.definitions.IFunctionDefinition;
 import org.apache.flex.compiler.definitions.ITypeDefinition;
 import org.apache.flex.compiler.definitions.references.IReference;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogDocEmitter;
+import org.apache.flex.compiler.internal.definitions.InterfaceDefinition;
 import org.apache.flex.compiler.internal.scopes.ASScope;
 import org.apache.flex.compiler.projects.ICompilerProject;
 import org.apache.flex.compiler.tree.as.IExpressionNode;
@@ -120,7 +122,16 @@ public class JSFlexJSDocEmitter extends JSGoogDocEmitter
                         hasDoc = true;
                     }
 
-                    emitReturn(node, node.getPackageName());
+                    ITypeDefinition tdef = ((IFunctionDefinition)node.getDefinition())
+                            .resolveReturnType(project);
+
+                    String packageName = "";
+                    if (tdef instanceof InterfaceDefinition)
+                        packageName = tdef.getPackageName();
+                    else
+                        packageName = node.getPackageName();
+                    
+                    emitReturn(node, packageName);
                 }
 
                 // @override


Mime
View raw message