You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2020/10/20 21:33:44 UTC

[royale-compiler] branch develop updated (062da91 -> 8f20e7d)

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from 062da91  AccessorDefinition: fix null exception in hasConflictingLanguageNSDefinition() when accessor is created by [Bindable] variable
     new cc03b41  compiler-jx: dynamically export getters/setters in release builds instead of using export jsdoc annotation
     new 8f20e7d  AccessorEmitter, BindableEmitter: clean up jsdoc formatting to better match other jsdoc emitted by the compiler

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../internal/codegen/js/jx/AccessorEmitter.java    | 39 +++++---------
 .../internal/codegen/js/jx/BindableEmitter.java    | 26 +++++-----
 .../apache/royale/compiler/utils/ClosureUtils.java |  3 +-
 .../js/royale/TestRoyaleAccessorMembers.java       | 28 +++++-----
 .../codegen/js/royale/TestRoyaleAccessors.java     | 25 ++++-----
 .../codegen/js/royale/TestRoyaleClass.java         | 60 ++++++++++++----------
 .../codegen/js/royale/TestRoyaleExpressions.java   |  2 +-
 .../codegen/js/royale/TestRoyalePackage.java       |  8 +--
 .../resources/royale/files/MyInitialView_result.js | 16 +++---
 .../royale/files/models/MyModel_result.js          | 12 ++---
 .../resources/royale/projects/super/Base_result.js |  4 +-
 .../royale/projects/super/Super_result.js          |  4 +-
 12 files changed, 112 insertions(+), 115 deletions(-)


[royale-compiler] 01/02: compiler-jx: dynamically export getters/setters in release builds instead of using export jsdoc annotation

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit cc03b41a663a93e97ff5c3a5f2fc0adc8ff1ed6e
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Oct 20 13:48:47 2020 -0700

    compiler-jx: dynamically export getters/setters in release builds instead of using export jsdoc annotation
---
 .../internal/codegen/js/jx/AccessorEmitter.java    |  7 -------
 .../internal/codegen/js/jx/BindableEmitter.java    | 10 +++-------
 .../apache/royale/compiler/utils/ClosureUtils.java |  3 ++-
 .../js/royale/TestRoyaleAccessorMembers.java       | 16 +++++++--------
 .../codegen/js/royale/TestRoyaleAccessors.java     | 20 +++++++++----------
 .../codegen/js/royale/TestRoyaleClass.java         | 23 +++++++++++-----------
 .../codegen/js/royale/TestRoyaleExpressions.java   |  2 +-
 .../codegen/js/royale/TestRoyalePackage.java       |  2 --
 .../resources/royale/files/MyInitialView_result.js |  4 ----
 .../royale/files/models/MyModel_result.js          |  3 ---
 .../resources/royale/projects/super/Base_result.js |  1 -
 .../royale/projects/super/Super_result.js          |  1 -
 12 files changed, 35 insertions(+), 57 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
index 258bc8b..2eb426e 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
@@ -320,11 +320,6 @@ public class AccessorEmitter extends JSSubEmitter implements
                 IGetterNode getterNode = p.getter;
                 ISetterNode setterNode = p.setter;
                 writeNewline("/**");
-                //if either one is marked as suppressed, both are considered to be
-                if(p.resolvedExport && !p.suppressExport)
-                {
-                    writeNewline("  * @export");
-                }
                 if (p.type != null)
                 {
                 	String typeName = p.type.getBaseName();
@@ -645,8 +640,6 @@ public class AccessorEmitter extends JSSubEmitter implements
                 ISetterNode setterNode = p.setter;
                 String baseName = p.name;
             	writeNewline("/**");
-                if (p.resolvedExport && !p.suppressExport)
-                    writeNewline("  * @export");
                 if (p.type != null)
                 	writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
                 else
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
index 31d49e1..a692a29 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
@@ -366,11 +366,9 @@ public class BindableEmitter extends JSSubEmitter implements
         String qname = fjs.formatQualifiedName(cdef.getQualifiedName());
         // 'PropName': {
 
+        writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("/** @export");
             writeNewline("  * @private");
-        } else {
-            writeNewline("/** @export");
         }
 
         writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
@@ -442,12 +440,10 @@ public class BindableEmitter extends JSSubEmitter implements
     {
         // TODO (mschmalle) will remove this cast as more things get abstracted
         JSRoyaleEmitter fjs = (JSRoyaleEmitter) getEmitter();
-    		String qname = (info.namespace.equals("private") && getProject().getAllowPrivateNameConflicts()) ? fjs.formatPrivateName(cdef.getQualifiedName(), name) : name;
+        String qname = (info.namespace.equals("private") && getProject().getAllowPrivateNameConflicts()) ? fjs.formatPrivateName(cdef.getQualifiedName(), name) : name;
+        writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("/** @export");
             writeNewline("  * @private");
-        } else {
-            writeNewline("/** @export");
         }
         writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
         // 'PropName': {
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
index a7ccbd8..6a64ac2 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/ClosureUtils.java
@@ -199,7 +199,8 @@ public class ClosureUtils
                                 && !(localDef instanceof IAccessorDefinition);
                             boolean isVar = localDef instanceof IVariableDefinition
                                 && !(localDef instanceof IAccessorDefinition);
-                            if (isMethod || isVar)
+                            boolean isAccessor = localDef instanceof IAccessorDefinition;
+                            if (isMethod || isVar || isAccessor)
                             {
                                 INamespaceReference nsRef = localDef.getNamespaceReference();
                                 boolean isCustomNS = !nsRef.isLanguageNamespace();
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
index a8f5ea1..011d4b4 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
@@ -63,7 +63,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n  return -1;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -75,7 +75,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo}}\n);");
     }
 
     @Test
@@ -86,7 +86,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
     }
     
     @Override
@@ -99,7 +99,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
           "/**\n  * @nocollapse\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.get__foo = function() {\n  return -1;\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
     }
 
     @Override
@@ -135,7 +135,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -147,7 +147,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: B.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -160,7 +160,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
           "/**\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.set__foo = function(value) {\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
     }
 
     @Test
@@ -171,7 +171,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {number} */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
     }
     
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
index 5d0390f..3f49465 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
@@ -49,7 +49,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
         		"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
         		"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
@@ -64,7 +64,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
         		"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -79,7 +79,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
 				"get: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -94,7 +94,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label;\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
 				"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -109,7 +109,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -123,7 +123,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -138,7 +138,7 @@ public class TestRoyaleAccessors extends ASTestBase
                 "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -153,7 +153,7 @@ public class TestRoyaleAccessors extends ASTestBase
                 "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +        
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @export\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -178,7 +178,7 @@ public class TestRoyaleAccessors extends ASTestBase
                 "}\n};\n\n\n" +
                 "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
                 "/**\n" +
-                "  * @export\n  * @type {string} */\n" +
+                "  * @type {string} */\n" +
                 "label: {\n" +
                 "get: RoyaleTest_A.prototype.get__label,\n" +
                 "set: RoyaleTest_A.prototype.set__label}}\n" +
@@ -196,7 +196,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @export\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
index e3a6d4e..c995ea5 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
@@ -261,7 +261,7 @@ public class TestRoyaleClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function set baz(value:Object):void {}; public function set foo(value:Object):void {baz = value;};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @export\n  * @type {Object} */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n  * @export\n  * @type {Object}  [...]
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @type {Object} */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n  * @type {Object} */\nfoo: {\nset: org.apach [...]
         assertOut(expected);
     }
 
@@ -270,7 +270,7 @@ public class TestRoyaleClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B extends A {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};} class A {public function set foo(value:Object):void {}}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @e [...]
+        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @t [...]
         assertOut(expected);
     }
 
@@ -335,7 +335,6 @@ public class TestRoyaleClass extends TestGoogClass
                           "\n" + 
                           "Object.defineProperties(org.apache.royale.B.A.prototype, /** @lends {org.apache.royale.B.A.prototype} */ {\n" + 
                           "/**\n" + 
-                          "  * @export\n" + 
                           "  * @type {org.apache.royale.B.A} */\n" + 
                           "a: {\n" + 
                           "get: org.apache.royale.B.A.prototype.get__a}}\n" + 
@@ -426,7 +425,7 @@ public class TestRoyaleClass extends TestGoogClass
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
+        		  "/**\n" +
     			  "  * @type {Object} */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
@@ -443,7 +442,7 @@ public class TestRoyaleClass extends TestGoogClass
     			  "         this, \"a\", oldValue, value));\n" +
     			  "}\n" +
     			  "}}," +
-    			  "/** @export\n" +
+    			  "/**\n" +
         		  "  * @private\n" +
         		  "  * @type {string} */\n" +
         		  "b: {\n" +
@@ -460,7 +459,7 @@ public class TestRoyaleClass extends TestGoogClass
     			  "    this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(\n" +
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
-    			  "}},/** @export\n" +
+    			  "}},/**\n" +
     			  "  * @private\n" +
     			  "  * @type {number} */\n" +
     			  "c: {\n" +
@@ -515,7 +514,7 @@ public class TestRoyaleClass extends TestGoogClass
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
+        		  "/**\n" +
     			  "  * @type {Object} */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
@@ -532,7 +531,7 @@ public class TestRoyaleClass extends TestGoogClass
     			  "         this, \"a\", oldValue, value));\n" +
     			  "}\n" +
     			  "}}," +
-    			  "/** @export\n" +
+    			  "/**\n" +
         		  "  * @private\n" +
         		  "  * @type {string} */\n" +
         		  "b: {\n" +
@@ -549,7 +548,7 @@ public class TestRoyaleClass extends TestGoogClass
     			  "    this.dispatchEvent(org.apache.royale.events.ValueChangeEvent.createUpdateEvent(\n" +
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
-    			  "}},/** @export\n" +
+    			  "}},/**\n" +
     			  "  * @private\n" +
     			  "  * @type {number} */\n" +
     			  "c: {\n" +
@@ -603,7 +602,7 @@ public class TestRoyaleClass extends TestGoogClass
         		  " * @type {number}\n" +
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
-        		  "/** @export\n" +
+        		  "/**\n" +
         		  "  * @type {Object} */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
@@ -680,11 +679,11 @@ public class TestRoyaleClass extends TestGoogClass
         		"org.apache.royale.A.prototype.set__foo5 = function(value) {\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6 = function() {\n  return null;\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6 = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n  * @export\n  * @type {Object} */\n" +
+        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n  * @type {Object} */\n" +
         		    "foo1: {\nget: org.apache.royale.A.prototype.get__foo1,\nset: org.apache.royale.A.prototype.set__foo1},\n/**\n  * @type {Object} */\n" +
         		    "foo2: {\nget: org.apache.royale.A.prototype.get__foo2,\nset: org.apache.royale.A.prototype.set__foo2},\n/**\n  * @type {Object} */\n" +
         		    "foo3: {\nget: org.apache.royale.A.prototype.get__foo3,\nset: org.apache.royale.A.prototype.set__foo3},\n/**\n  * @type {Object} */\n" +
-        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n  * @export\n  * @type {Object} */\n" +
+        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n  * @type {Object} */\n" +
         		    "http_$$ns_apache_org$2017$custom$namespace__foo6: {\nget: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6,\n" +
         		    																"set: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6}}\n);");
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
index 085b5b6..fd1fc04 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
@@ -125,7 +125,7 @@ public class TestRoyaleExpressions extends TestGoogExpressions
         		  "  return RoyaleTest_A.superClass_.isDefaultPrevented.apply(this);\n" +
         		  "};\n\n\n" +
         		  "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
-        		  "/**\n  * @export\n  * @type {Object} */\n" +
+        		  "/**\n  * @type {Object} */\n" +
         		  "defaultPrevented: {\nget: RoyaleTest_A.prototype.get__defaultPrevented}}\n);");
     }
 
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
index cbced0a..fba15ec 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
@@ -838,7 +838,6 @@ public class TestRoyalePackage extends TestGoogPackage
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.prototype, /** @lends {foo.bar.baz.A.prototype} */ {\n" +
 				"/**\n" +
-				"  * @export\n" +
 				"  * @type {string} */\n" +
 				"myString: {\n" +
 				"get: foo.bar.baz.A.prototype.get__myString,\n" +
@@ -900,7 +899,6 @@ public class TestRoyalePackage extends TestGoogPackage
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.InternalClass.prototype, /** @lends {foo.bar.baz.A.InternalClass.prototype} */ {\n" +
 				"/**\n" +
-				"  * @export\n" +
 				"  * @type {string} */\n" +
 				"someString: {\n" +
 				"get: foo.bar.baz.A.InternalClass.prototype.get__someString,\n" +
diff --git a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
index 6716c67..14b46ec 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -263,22 +263,18 @@ MyInitialView.prototype.get__comboBoxValue = function() {
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
 /**
-  * @export
   * @type {string} */
 symbol: {
 get: MyInitialView.prototype.get__symbol},
 /**
-  * @export
   * @type {string} */
 city: {
 get: MyInitialView.prototype.get__city},
 /**
-  * @export
   * @type {string} */
 inputText: {
 get: MyInitialView.prototype.get__inputText},
 /**
-  * @export
   * @type {string} */
 comboBoxValue: {
 get: MyInitialView.prototype.get__comboBoxValue}}
diff --git a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
index 378bfb1..fb24481 100644
--- a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
+++ b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
@@ -85,18 +85,15 @@ models.MyModel.prototype.get__cities = function() {
 
 Object.defineProperties(models.MyModel.prototype, /** @lends {models.MyModel.prototype} */ {
 /**
-  * @export
   * @type {string} */
 labelText: {
 get: models.MyModel.prototype.get__labelText,
 set: models.MyModel.prototype.set__labelText},
 /**
-  * @export
   * @type {Array} */
 strings: {
 get: models.MyModel.prototype.get__strings},
 /**
-  * @export
   * @type {Array} */
 cities: {
 get: models.MyModel.prototype.get__cities}}
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
index f56c691..7596b54 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
@@ -49,7 +49,6 @@ Base.prototype.set__text = function(value) {
 
 Object.defineProperties(Base.prototype, /** @lends {Base.prototype} */ {
 /**
-  * @export
   * @type {string} */
 text: {
 get: Base.prototype.get__text,
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
index 617a2e3..002c1ad 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
@@ -51,7 +51,6 @@ Super.prototype.set__text = function(value) {
 
 Object.defineProperties(Super.prototype, /** @lends {Super.prototype} */ {
 /**
-  * @export
   * @type {string} */
 text: {
 get: Super.prototype.get__text,


[royale-compiler] 02/02: AccessorEmitter, BindableEmitter: clean up jsdoc formatting to better match other jsdoc emitted by the compiler

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 8f20e7d28733070148b1d4fe4f75cca40d55dc98
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Oct 20 14:33:33 2020 -0700

    AccessorEmitter, BindableEmitter: clean up jsdoc formatting to better match other jsdoc emitted by the compiler
---
 .../internal/codegen/js/jx/AccessorEmitter.java    | 32 +++++++--------
 .../internal/codegen/js/jx/BindableEmitter.java    | 16 +++++---
 .../js/royale/TestRoyaleAccessorMembers.java       | 28 +++++++-------
 .../codegen/js/royale/TestRoyaleAccessors.java     | 25 ++++++------
 .../codegen/js/royale/TestRoyaleClass.java         | 45 +++++++++++++---------
 .../codegen/js/royale/TestRoyaleExpressions.java   |  2 +-
 .../codegen/js/royale/TestRoyalePackage.java       |  6 ++-
 .../resources/royale/files/MyInitialView_result.js | 12 ++++--
 .../royale/files/models/MyModel_result.js          |  9 +++--
 .../resources/royale/projects/super/Base_result.js |  3 +-
 .../royale/projects/super/Super_result.js          |  3 +-
 11 files changed, 100 insertions(+), 81 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
index 2eb426e..f4064aa 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
@@ -105,11 +105,10 @@ public class AccessorEmitter extends JSSubEmitter implements
                     writeNewline();
                 	writeNewline("/**");
                     if (emitExports)
-                    	writeNewline("  * @export");
+                    	writeNewline(" * @export");
                     if (p.type != null)
-                    	writeNewline("  * @type {"+ JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                    else
-                    	writeNewline("  */");
+                    	writeNewline(" * @type {"+ JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     write(JSEmitterTokens.PROTOTYPE);
@@ -325,10 +324,9 @@ public class AccessorEmitter extends JSSubEmitter implements
                 	String typeName = p.type.getBaseName();
                 	if (getModel().isInternalClass(typeName))
     					typeName = getModel().getInternalClasses().get(typeName);
-					writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(typeName, p.type.getPackageName()) + "} */");
+					writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(typeName, p.type.getPackageName()) + "}");
                 }
-                else
-                	writeNewline("  */");
+                writeNewline(" */");
                 FunctionNode fnNode = getterNode != null ? (FunctionNode) getterNode : (FunctionNode) setterNode;
                 if (p.uri != null)
                 {
@@ -487,11 +485,10 @@ public class AccessorEmitter extends JSSubEmitter implements
                     writeNewline();
                     writeNewline("/**");
                     if (emitExports)
-                    	writeNewline("  * @export");
+                    	writeNewline(" * @export");
                     if (p.type != null)
-                    	writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                    else
-                    	writeNewline("  */");
+                    	writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     if (p.uri != null)
                     {
@@ -525,12 +522,12 @@ public class AccessorEmitter extends JSSubEmitter implements
                     writeNewline();
                     writeNewline("/**");
                     if (p.preventRename)
-                        writeNewline("  * @nocollapse");
+                        writeNewline(" * @nocollapse");
                     if (p.resolvedExport && !p.suppressExport)
-                        writeNewline("  * @export");
+                        writeNewline(" * @export");
                     if (p.type != null)
-                        writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
-                    writeNewline("  */");
+                        writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}"); 
+                    writeNewline(" */");
                     write(getEmitter().formatQualifiedName(qname));
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     if (p.uri != null)
@@ -641,9 +638,8 @@ public class AccessorEmitter extends JSSubEmitter implements
                 String baseName = p.name;
             	writeNewline("/**");
                 if (p.type != null)
-                	writeNewline("  * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "} */");
-                else
-                	writeNewline("  */");
+                	writeNewline(" * @type {" + JSGoogDocEmitter.convertASTypeToJSType(p.type.getBaseName(), p.type.getPackageName()) + "}");
+                writeNewline(" */");
 				FunctionNode fnNode = getterNode != null ? (FunctionNode) getterNode : (FunctionNode) setterNode;
 				if (p.uri != null)
 				{
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
index a692a29..d88c04d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/BindableEmitter.java
@@ -288,8 +288,10 @@ public class BindableEmitter extends JSSubEmitter implements
         // export above did not work in the release build for the static getter/setter bindables,
         // solution below:
         //Commented by JT, in AccessorEmitter:
-        writeNewline("/** @export");
-        writeNewline("  * @type {"+DISPATCHER_CLASS_QNAME+"} */");
+        writeNewline("/**");
+        writeNewline(" * @export");
+        writeNewline(" * @type {"+DISPATCHER_CLASS_QNAME+"}");
+        writeNewline(" */");
         write(STATIC_DISPATCHER_GETTER);
         write(ASEmitterTokens.COLON);
         write(ASEmitterTokens.SPACE);
@@ -368,10 +370,11 @@ public class BindableEmitter extends JSSubEmitter implements
 
         writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("  * @private");
+            writeNewline(" * @private");
         }
 
-        writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
+        writeNewline(" * @type {" + convertASTypeToJS(info.type) + "}");
+        writeNewline(" */");
         write(name);
         write(ASEmitterTokens.COLON);
         write(ASEmitterTokens.SPACE);
@@ -443,9 +446,10 @@ public class BindableEmitter extends JSSubEmitter implements
         String qname = (info.namespace.equals("private") && getProject().getAllowPrivateNameConflicts()) ? fjs.formatPrivateName(cdef.getQualifiedName(), name) : name;
         writeNewline("/**");
         if (info.namespace != "public") {
-            writeNewline("  * @private");
+            writeNewline(" * @private");
         }
-        writeNewline("  * @type {"+convertASTypeToJS(info.type)+"} */");
+        writeNewline(" * @type {" + convertASTypeToJS(info.type) + "}");
+        writeNewline(" */");
         // 'PropName': {
         writeNewline(qname + ASEmitterTokens.COLON.getToken()
                 + ASEmitterTokens.SPACE.getToken()
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
index 011d4b4..e88faee 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessorMembers.java
@@ -39,7 +39,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -51,7 +51,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n  return -1;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -63,7 +63,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.get__foo = function() {\n  return -1;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.prototype.get__foo}}\n);");
     }
 
     @Override
@@ -75,7 +75,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo}}\n);");
     }
 
     @Test
@@ -86,7 +86,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.get__foo = function() {\n  return B.superClass_.get__foo.apply(this);\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: B.prototype.get__foo,\nset: A.prototype.set__foo}}\n);");
     }
     
     @Override
@@ -97,9 +97,9 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
-          "/**\n  * @nocollapse\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
+          "/**\n * @nocollapse\n * @export\n * @type {number}\n */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.get__foo = function() {\n  return -1;\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @type {number} */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: RoyaleTest_A.get__foo}}\n);");
     }
 
     @Override
@@ -111,7 +111,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -123,7 +123,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n  fetch('haai');\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -135,7 +135,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__foo = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -147,7 +147,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: B.prototype.set__foo}}\n);");
     }
 
     @Override
@@ -158,9 +158,9 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n" +
-          "/**\n  * @export\n  * @type {number}\n  */\nRoyaleTest_A.foo;\n\n\n" +
+          "/**\n * @export\n * @type {number}\n */\nRoyaleTest_A.foo;\n\n\n" +
           "RoyaleTest_A.set__foo = function(value) {\n};\n\n\n" +
-          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n  * @type {number} */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
+          "Object.defineProperties(RoyaleTest_A, /** @lends {RoyaleTest_A} */ {\n/**\n * @type {number}\n */\nfoo: {\nset: RoyaleTest_A.set__foo}}\n);");
     }
 
     @Test
@@ -171,7 +171,7 @@ public class TestRoyaleAccessorMembers extends TestGoogAccessorMembers
         asBlockWalker.visitClass(node);
         assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n  B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\n" +
 				"B.prototype.set__foo = function(value) {\n  B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {number} */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {number}\n */\nfoo: {\nget: A.prototype.get__foo,\nset: B.prototype.set__foo}}\n);");
     }
     
     @Override
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
index 3f49465..8cd7047 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleAccessors.java
@@ -49,7 +49,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
         		"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
         		"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
@@ -64,7 +64,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
         		"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -79,7 +79,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = this.label + 'bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
 				"get: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -94,7 +94,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  this.label = this.label;\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nlabel: {\n" +
+				"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nlabel: {\n" +
 				"get: B.prototype.get__label,\nset: B.prototype.set__label}}\n);"; 
         assertOut(expected);
     }
@@ -109,7 +109,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -123,7 +123,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = this.http_$$ns_apache_org$2017$custom$namespace__label;\n  this.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label = null;\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+        		"Object.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.prototype.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.prototype.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -135,10 +135,10 @@ public class TestRoyaleAccessors extends ASTestBase
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n  B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
-                "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -150,10 +150,10 @@ public class TestRoyaleAccessors extends ASTestBase
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
         String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n */\nB.prototype.doStuff = function() {\n  var /** @type {string} */ theLabel = B.http_$$ns_apache_org$2017$custom$namespace__label;\n  B.http_$$ns_apache_org$2017$custom$namespace__label = theLabel;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB._label = null;\n\n\n" +
-                "/**\n  * @nocollapse\n  * @export\n  * @type {string}\n  */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +        
+                "/**\n * @nocollapse\n * @export\n * @type {string}\n */\nB.http_$$ns_apache_org$2017$custom$namespace__label;\n\n\n" +        
                 "B.http_$$ns_apache_org$2017$custom$namespace__get__label = function() {\n  return B._label;\n};\n\n\n" +
                 "B.http_$$ns_apache_org$2017$custom$namespace__set__label = function(value) {\n  B._label = value;\n};\n\n\n" +
-                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n  * @type {string} */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
+                "Object.defineProperties(B, /** @lends {B} */ {\n/**\n * @type {string}\n */\nhttp_$$ns_apache_org$2017$custom$namespace__label: {\nget: B.http_$$ns_apache_org$2017$custom$namespace__get__label,\nset: B.http_$$ns_apache_org$2017$custom$namespace__set__label}}\n);";
         assertOut(expected);
     }
 
@@ -178,7 +178,8 @@ public class TestRoyaleAccessors extends ASTestBase
                 "}\n};\n\n\n" +
                 "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
                 "/**\n" +
-                "  * @type {string} */\n" +
+                " * @type {string}\n" +
+                " */\n" +
                 "label: {\n" +
                 "get: RoyaleTest_A.prototype.get__label,\n" +
                 "set: RoyaleTest_A.prototype.set__label}}\n" +
@@ -196,7 +197,7 @@ public class TestRoyaleAccessors extends ASTestBase
         String expected = "/**\n * @constructor\n */\nRoyaleTest_A = function() {\n};\n\n\n/**\n */\nRoyaleTest_A.prototype.doStuff = function() {\n  this.label = 'hello, bye';\n  var /** @type {string} */ theLabel = this.label;\n};\n\n\n/**\n * @private\n * @type {string}\n */\nRoyaleTest_A.prototype._label = null;\n\n\n" +
 				"RoyaleTest_A.prototype.get__label = function() {\n  return this._label;\n};\n\n\n" +
 				"RoyaleTest_A.prototype.set__label = function(value) {\n  this._label = value;\n};\n\n\n" +
-        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n  * @type {string} */\n" +
+        		"Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n/**\n * @type {string}\n */\n" +
         		"label: {\nget: RoyaleTest_A.prototype.get__label,\nset: RoyaleTest_A.prototype.set__label}}\n);";
         assertOut(expected);
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
index c995ea5..b8f50e1 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleClass.java
@@ -261,7 +261,7 @@ public class TestRoyaleClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function set baz(value:Object):void {}; public function set foo(value:Object):void {baz = value;};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @type {Object} */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n  * @type {Object} */\nfoo: {\nset: org.apach [...]
+        String expected = "/**\n * @constructor\n */\norg.apache.royale.B = function() {\n};\n\n\norg.apache.royale.B.prototype.set__baz = function(value) {\n};\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  this.baz = value;\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n * @type {Object}\n */\nbaz: {\nset: org.apache.royale.B.prototype.set__baz},\n/**\n * @type {Object}\n */\nfoo: {\nset: org.apa [...]
         assertOut(expected);
     }
 
@@ -270,7 +270,7 @@ public class TestRoyaleClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B extends A {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};} class A {public function set foo(value:Object):void {}}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n  * @t [...]
+        String expected = "/**\n * @constructor\n * @extends {org.apache.royale.A}\n */\norg.apache.royale.B = function() {\n  org.apache.royale.B.base(this, 'constructor');\n};\ngoog.inherits(org.apache.royale.B, org.apache.royale.A);\n\n\norg.apache.royale.B.prototype.set__foo = function(value) {\n  org.apache.royale.B.superClass_.set__foo.apply(this, [ value] );\n};\n\n\nObject.defineProperties(org.apache.royale.B.prototype, /** @lends {org.apache.royale.B.prototype} */ {\n/**\n * @ty [...]
         assertOut(expected);
     }
 
@@ -335,7 +335,7 @@ public class TestRoyaleClass extends TestGoogClass
                           "\n" + 
                           "Object.defineProperties(org.apache.royale.B.A.prototype, /** @lends {org.apache.royale.B.A.prototype} */ {\n" + 
                           "/**\n" + 
-                          "  * @type {org.apache.royale.B.A} */\n" + 
+                          " * @type {org.apache.royale.B.A}\n */\n" + 
                           "a: {\n" + 
                           "get: org.apache.royale.B.A.prototype.get__a}}\n" + 
                           ");\n" + 
@@ -426,7 +426,8 @@ public class TestRoyaleClass extends TestGoogClass
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
         		  "/**\n" +
-    			  "  * @type {Object} */\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -443,8 +444,9 @@ public class TestRoyaleClass extends TestGoogClass
     			  "}\n" +
     			  "}}," +
     			  "/**\n" +
-        		  "  * @private\n" +
-        		  "  * @type {string} */\n" +
+        		  " * @private\n" +
+                  " * @type {string}\n" +
+                  " */\n" +
         		  "b: {\n" +
         		  "/** @this {org.apache.royale.A} */\n" +
         		  "  get: function() {\n" +
@@ -460,8 +462,9 @@ public class TestRoyaleClass extends TestGoogClass
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
     			  "}},/**\n" +
-    			  "  * @private\n" +
-    			  "  * @type {number} */\n" +
+    			  " * @private\n" +
+                  " * @type {number}\n" + 
+                  " */\n" +
     			  "c: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -515,7 +518,8 @@ public class TestRoyaleClass extends TestGoogClass
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
         		  "/**\n" +
-    			  "  * @type {Object} */\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -532,8 +536,9 @@ public class TestRoyaleClass extends TestGoogClass
     			  "}\n" +
     			  "}}," +
     			  "/**\n" +
-        		  "  * @private\n" +
-        		  "  * @type {string} */\n" +
+        		  " * @private\n" +
+                  " * @type {string}\n" +
+                  " */\n" +
         		  "b: {\n" +
         		  "/** @this {org.apache.royale.A} */\n" +
         		  "  get: function() {\n" +
@@ -549,8 +554,9 @@ public class TestRoyaleClass extends TestGoogClass
     			  "         this, \"b\", oldValue, value));\n" +
     			  "}\n" +
     			  "}},/**\n" +
-    			  "  * @private\n" +
-    			  "  * @type {number} */\n" +
+    			  " * @private\n" +
+                  " * @type {number}\n" + 
+                  " */\n" +
     			  "c: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -603,7 +609,8 @@ public class TestRoyaleClass extends TestGoogClass
         		  " */\n" +
         		  "org.apache.royale.A.prototype.e = NaN;Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n" +
         		  "/**\n" +
-        		  "  * @type {Object} */\n" +
+                  " * @type {Object}\n" +
+                  " */\n" +
     			  "a: {\n" +
     			  "/** @this {org.apache.royale.A} */\n" +
     			  "  get: function() {\n" +
@@ -679,11 +686,11 @@ public class TestRoyaleClass extends TestGoogClass
         		"org.apache.royale.A.prototype.set__foo5 = function(value) {\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6 = function() {\n  return null;\n};\n\n\n" +
         		"org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6 = function(value) {\n};\n\n\n" +
-        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n  * @type {Object} */\n" +
-        		    "foo1: {\nget: org.apache.royale.A.prototype.get__foo1,\nset: org.apache.royale.A.prototype.set__foo1},\n/**\n  * @type {Object} */\n" +
-        		    "foo2: {\nget: org.apache.royale.A.prototype.get__foo2,\nset: org.apache.royale.A.prototype.set__foo2},\n/**\n  * @type {Object} */\n" +
-        		    "foo3: {\nget: org.apache.royale.A.prototype.get__foo3,\nset: org.apache.royale.A.prototype.set__foo3},\n/**\n  * @type {Object} */\n" +
-        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n  * @type {Object} */\n" +
+        		"Object.defineProperties(org.apache.royale.A.prototype, /** @lends {org.apache.royale.A.prototype} */ {\n/**\n * @type {Object}\n */\n" +
+        		    "foo1: {\nget: org.apache.royale.A.prototype.get__foo1,\nset: org.apache.royale.A.prototype.set__foo1},\n/**\n * @type {Object}\n */\n" +
+        		    "foo2: {\nget: org.apache.royale.A.prototype.get__foo2,\nset: org.apache.royale.A.prototype.set__foo2},\n/**\n * @type {Object}\n */\n" +
+        		    "foo3: {\nget: org.apache.royale.A.prototype.get__foo3,\nset: org.apache.royale.A.prototype.set__foo3},\n/**\n * @type {Object}\n */\n" +
+        		    "foo5: {\nget: org.apache.royale.A.prototype.get__foo5,\nset: org.apache.royale.A.prototype.set__foo5},\n/**\n * @type {Object}\n */\n" +
         		    "http_$$ns_apache_org$2017$custom$namespace__foo6: {\nget: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__get__foo6,\n" +
         		    																"set: org.apache.royale.A.prototype.http_$$ns_apache_org$2017$custom$namespace__set__foo6}}\n);");
     }
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
index fd1fc04..6540ece 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyaleExpressions.java
@@ -125,7 +125,7 @@ public class TestRoyaleExpressions extends TestGoogExpressions
         		  "  return RoyaleTest_A.superClass_.isDefaultPrevented.apply(this);\n" +
         		  "};\n\n\n" +
         		  "Object.defineProperties(RoyaleTest_A.prototype, /** @lends {RoyaleTest_A.prototype} */ {\n" +
-        		  "/**\n  * @type {Object} */\n" +
+        		  "/**\n * @type {Object}\n */\n" +
         		  "defaultPrevented: {\nget: RoyaleTest_A.prototype.get__defaultPrevented}}\n);");
     }
 
diff --git a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
index fba15ec..a24a6b0 100644
--- a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
+++ b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/js/royale/TestRoyalePackage.java
@@ -838,7 +838,8 @@ public class TestRoyalePackage extends TestGoogPackage
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.prototype, /** @lends {foo.bar.baz.A.prototype} */ {\n" +
 				"/**\n" +
-				"  * @type {string} */\n" +
+				" * @type {string}\n" +
+				" */\n" +
 				"myString: {\n" +
 				"get: foo.bar.baz.A.prototype.get__myString,\n" +
 				"set: foo.bar.baz.A.prototype.set__myString}}\n" +
@@ -899,7 +900,8 @@ public class TestRoyalePackage extends TestGoogPackage
 				"\n" +
 				"Object.defineProperties(foo.bar.baz.A.InternalClass.prototype, /** @lends {foo.bar.baz.A.InternalClass.prototype} */ {\n" +
 				"/**\n" +
-				"  * @type {string} */\n" +
+				" * @type {string}\n" +
+				" */\n" +
 				"someString: {\n" +
 				"get: foo.bar.baz.A.InternalClass.prototype.get__someString,\n" +
 				"set: foo.bar.baz.A.InternalClass.prototype.set__someString}}\n" +
diff --git a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
index 14b46ec..1b42281 100644
--- a/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
+++ b/compiler-jx/src/test/resources/royale/files/MyInitialView_result.js
@@ -263,19 +263,23 @@ MyInitialView.prototype.get__comboBoxValue = function() {
 
 Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
 /**
-  * @type {string} */
+ * @type {string}
+ */
 symbol: {
 get: MyInitialView.prototype.get__symbol},
 /**
-  * @type {string} */
+ * @type {string}
+ */
 city: {
 get: MyInitialView.prototype.get__city},
 /**
-  * @type {string} */
+ * @type {string}
+ */
 inputText: {
 get: MyInitialView.prototype.get__inputText},
 /**
-  * @type {string} */
+ * @type {string}
+ */
 comboBoxValue: {
 get: MyInitialView.prototype.get__comboBoxValue}}
 );/**
diff --git a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
index fb24481..5be3502 100644
--- a/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
+++ b/compiler-jx/src/test/resources/royale/files/models/MyModel_result.js
@@ -85,16 +85,19 @@ models.MyModel.prototype.get__cities = function() {
 
 Object.defineProperties(models.MyModel.prototype, /** @lends {models.MyModel.prototype} */ {
 /**
-  * @type {string} */
+ * @type {string}
+ */
 labelText: {
 get: models.MyModel.prototype.get__labelText,
 set: models.MyModel.prototype.set__labelText},
 /**
-  * @type {Array} */
+ * @type {Array}
+ */
 strings: {
 get: models.MyModel.prototype.get__strings},
 /**
-  * @type {Array} */
+ * @type {Array}
+ */
 cities: {
 get: models.MyModel.prototype.get__cities}}
 );
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
index 7596b54..fcaa48c 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Base_result.js
@@ -49,7 +49,8 @@ Base.prototype.set__text = function(value) {
 
 Object.defineProperties(Base.prototype, /** @lends {Base.prototype} */ {
 /**
-  * @type {string} */
+ * @type {string}
+ */
 text: {
 get: Base.prototype.get__text,
 set: Base.prototype.set__text}}
diff --git a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
index 002c1ad..6991be4 100644
--- a/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
+++ b/compiler-jx/src/test/resources/royale/projects/super/Super_result.js
@@ -51,7 +51,8 @@ Super.prototype.set__text = function(value) {
 
 Object.defineProperties(Super.prototype, /** @lends {Super.prototype} */ {
 /**
-  * @type {string} */
+ * @type {string}
+ */
 text: {
 get: Super.prototype.get__text,
 set: Super.prototype.set__text}}