You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/04/09 01:05:19 UTC

[13/18] git commit: [flex-falcon] [refs/heads/develop] - use @expose and remove single quotes in defineProperties structures.

use @expose and remove single quotes in defineProperties structures.


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

Branch: refs/heads/develop
Commit: 8eefb001a0eda7d1b70da98b51342db362067e23
Parents: 42de259
Author: Alex Harui <ah...@apache.org>
Authored: Tue Apr 7 11:15:39 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Apr 7 11:15:39 2015 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/JSFlexJSEmitter.java         | 9 +++++----
 .../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java     | 5 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8eefb001/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index cbf89b6..46a4da9 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -243,6 +243,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             write(JSEmitterTokens.PROTOTYPE);        	
             write(ASEmitterTokens.COMMA);
             write(ASEmitterTokens.SPACE);
+            write("/** @lends {" + formatQualifiedName(qname) + ".prototype} */ ");
             writeNewline(ASEmitterTokens.BLOCK_OPEN);
             
 	        Set<String> propertyNames = propertyMap.keySet();
@@ -255,9 +256,8 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 	                writeNewline(ASEmitterTokens.COMMA);
 	        		
 	        	PropertyNodes p = propertyMap.get(propName);
-	        	write(ASEmitterTokens.SINGLE_QUOTE);
+	            writeNewline("/** @expose */");
 	        	write(propName);
-	        	write(ASEmitterTokens.SINGLE_QUOTE);
 	        	write(ASEmitterTokens.COLON);
 	            write(ASEmitterTokens.SPACE);
 	            writeNewline(ASEmitterTokens.BLOCK_OPEN);
@@ -466,6 +466,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             write(JSEmitterTokens.PROTOTYPE);        	
             write(ASEmitterTokens.COMMA);
             write(ASEmitterTokens.SPACE);
+            write("/** @lends {" + formatQualifiedName(qname) + ".prototype} */ ");
             writeNewline(ASEmitterTokens.BLOCK_OPEN);
             
 	        boolean firstTime = true;
@@ -488,8 +489,8 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
     private void emitBindableVarDefineProperty(String name, IClassDefinition cdef)
     {
 	    // 'PropName': {
-	    writeNewline(ASEmitterTokens.SINGLE_QUOTE.getToken() + name + 
-	    				ASEmitterTokens.SINGLE_QUOTE.getToken() + 
+	    writeNewline("/** @expose */");
+	    writeNewline(name + 
 	    				ASEmitterTokens.COLON.getToken() +
 	    				ASEmitterTokens.SPACE.getToken() +
 	    				ASEmitterTokens.BLOCK_OPEN.getToken());

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8eefb001/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index cf5d3df..55d830a 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -853,7 +853,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     	
     	write("Object.defineProperties(");
     	write(formattedCName);
-    	writeNewline(".prototype, {");
+    	writeNewline(".prototype, /** @lends {" + formattedCName + ".prototype} */ {");
         indentPush();
         int i = 0;
         for (MXMLDescriptorSpecifier instance : instances)
@@ -862,7 +862,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                     .getToken()))
             {
                 indentPush();
-                writeNewline("'" + instance.id + "': {");
+                writeNewline("/** @expose */");
+                writeNewline(instance.id + ": {");
                 writeNewline("/** @this {" + formattedCName + "} */");
                 indentPush();
                 writeNewline("get: function() {");