flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [04/10] git commit: [flex-falcon] [refs/heads/develop] - When available - which is not always the case in the tests - include the fully qualified interface name in the @extends annotation.
Date Fri, 01 Nov 2013 11:33:17 GMT
When available - which is not always the case in the tests - include the fully qualified interface
name in the @extends annotation.

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

Branch: refs/heads/develop
Commit: 914fb884a68605c428e37083d9d546a75f81fe58
Parents: 9a3f3d9
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Fri Nov 1 09:34:18 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Fri Nov 1 12:32:58 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/goog/IJSGoogDocEmitter.java      |  2 +-
 .../codegen/js/goog/JSGoogDocEmitter.java       | 27 +++++++++++++++++---
 .../internal/codegen/js/goog/JSGoogEmitter.java |  4 ++-
 3 files changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/914fb884/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java
index 540f97f..b3d3ad9 100644
--- a/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/codegen/js/goog/IJSGoogDocEmitter.java
@@ -49,7 +49,7 @@ import org.apache.flex.compiler.tree.as.IVariableNode;
 public interface IJSGoogDocEmitter extends IJSDocEmitter
 {
 
-    void emitInterfaceDoc(IInterfaceNode node);
+    void emitInterfaceDoc(IInterfaceNode node, ICompilerProject project);
 
     void emitFieldDoc(IVariableNode node, IDefinition def);
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/914fb884/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 b5ba549..44f8f16 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
@@ -59,16 +59,35 @@ public class JSGoogDocEmitter extends JSDocEmitter implements IJSGoogDocEmitter
     }
 
     @Override
-    public void emitInterfaceDoc(IInterfaceNode node)
+    public void emitInterfaceDoc(IInterfaceNode node, ICompilerProject project)
     {
         begin();
 
         emitJSDocLine(JSEmitterTokens.INTERFACE.getToken());
 
-        String[] inodes = node.getExtendedInterfaces();
-        for (String inode : inodes)
+        boolean hasQualifiedNames = true;
+        IExpressionNode[] inodes = node.getExtendedInterfaceNodes();
+        for (IExpressionNode inode : inodes)
         {
-            emitJSDocLine(ASEmitterTokens.EXTENDS, inode);
+            IDefinition dnode = inode.resolve(project);
+            if (dnode != null)
+            {
+                emitJSDocLine(ASEmitterTokens.EXTENDS, dnode.getQualifiedName());
+            }
+            else
+            {
+                hasQualifiedNames = false;
+                break;
+            }
+        }
+        
+        if (!hasQualifiedNames)
+        {
+            String[] inames = node.getExtendedInterfaces();
+            for (String iname : inames)
+            {
+                emitJSDocLine(ASEmitterTokens.EXTENDS, iname);
+            }
         }
 
         end();

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/914fb884/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java
index 49d23c6..30e70bb 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogEmitter.java
@@ -252,7 +252,9 @@ public class JSGoogEmitter extends JSEmitter implements IJSGoogEmitter
     @Override
     public void emitInterface(IInterfaceNode node)
     {
-        getDoc().emitInterfaceDoc(node);
+        ICompilerProject project = getWalker().getProject();
+
+        getDoc().emitInterfaceDoc(node, project);
 
         String qname = node.getQualifiedName();
         if (qname != null && !qname.equals(""))


Mime
View raw message