You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ft...@apache.org on 2015/07/07 20:18:14 UTC
[2/9] git commit: [flex-falcon] [refs/heads/add-CollectImportPass] -
switch from @expose to @export
switch from @expose to @export
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/5307227d
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/5307227d
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/5307227d
Branch: refs/heads/add-CollectImportPass
Commit: 5307227d55a0ef91ae60999a93e483706443377f
Parents: 70bc7d8
Author: Alex Harui <ah...@apache.org>
Authored: Sun Jul 5 21:37:10 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sun Jul 5 21:37:10 2015 -0700
----------------------------------------------------------------------
.../js/flexjs/TestFlexJSAccessorMembers.java | 20 +++++-----
.../codegen/js/flexjs/TestFlexJSAccessors.java | 8 ++--
.../codegen/js/flexjs/TestFlexJSClass.java | 30 +++++++-------
.../codegen/js/flexjs/TestFlexJSEmiter.java | 2 +-
.../js/flexjs/TestFlexJSExpressions.java | 18 ++++-----
.../js/flexjs/TestFlexJSFieldMembers.java | 26 ++++++------
.../js/flexjs/TestFlexJSGlobalConstants.java | 8 ++--
.../js/flexjs/TestFlexJSMethodMembers.java | 8 ++--
.../codegen/js/vf2js/TestVF2JSClass.java | 26 ++++++------
.../codegen/js/vf2js/TestVF2JSExpressions.java | 2 +-
.../mxml/flexjs/TestFlexJSMXMLScript.java | 2 +-
.../externals_unit_tests/constructor_params.js | 2 +-
.../externals_unit_tests/package_namespace.js | 2 +-
.../flexjs/files/FlexJSTest_again_result.js | 6 +--
.../flexjs/files/LocalFunction_result.js | 2 +-
.../flexjs/files/MyInitialView_result.js | 42 ++++++++++----------
.../flexjs/files/StockDataJSONItemConverter.js | 2 +-
.../files/controllers/MyController_result.js | 2 +-
.../flexjs/files/models/MyModel_result.js | 6 +--
.../flexjs/projects/interfaces/Test_result.js | 2 +-
.../projects/interfaces/interfaces/IE_result.js | 2 +-
.../flexjs/projects/super/Base_result.js | 2 +-
.../flexjs/projects/super/Super_result.js | 4 +-
.../test-files/goog/files/call-super_result.js | 2 +-
.../test-files/vf2js/files/SimpleMXML_result.js | 2 +-
.../vf2js/projects/interfaces/Test_result.js | 2 +-
.../projects/interfaces/classes/A_result.js | 2 +-
.../vf2js/projects/sdk/SomeSDKClass_result.js | 8 ++--
.../sdk/bases/HelperBaseClass_result.js | 2 +-
.../simpleMXML/src/SimpleMXML_Project_result.js | 2 +-
.../vf2js/projects/super/Base_result.js | 8 ++--
.../vf2js/projects/super/Super_result.js | 8 ++--
.../codegen/js/goog/IJSGoogDocEmitter.java | 4 +-
.../codegen/js/goog/JSGoogDocEmitter.java | 2 +-
.../codegen/js/goog/JSGoogDocEmitterTokens.java | 2 +-
.../internal/codegen/js/jx/AccessorEmitter.java | 4 +-
.../internal/codegen/js/jx/BindableEmitter.java | 2 +-
.../codegen/js/vf2js/JSVF2JSEmitter.java | 4 +-
.../codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 8 ++--
.../codegen/mxml/vf2js/MXMLVF2JSEmitter.java | 10 ++---
.../utils/JSClosureCompilerWrapper.java | 4 +-
41 files changed, 151 insertions(+), 149 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index d1d35a5..53ecd66 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -37,7 +37,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("function get foo():int{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n}}}\n);");
}
@Override
@@ -47,7 +47,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n return -1;\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n return -1;\n}}}\n);");
}
@Override
@@ -57,7 +57,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n return -1;\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n return -1;\n}}}\n);");
}
@Override
@@ -67,7 +67,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public override function get foo():int{super.foo(); return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n org_apache_flex_utils_Language.superGetter(FalconTest_A, this, 'foo');\n return -1;\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nget: /** @this {FalconTest_A} */ function() {\n org_apache_flex_utils_Language.superGetter(FalconTest_A, this, 'foo');\n return -1;\n}}}\n);");
}
@Override
@@ -77,7 +77,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public static function get foo():int{return -1;}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @expose */\nfoo: {\nget: function() {\n return -1;\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nget: function() {\n return -1;\n}}}\n);");
}
@Override
@@ -87,7 +87,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n}}}\n);");
}
@Override
@@ -97,7 +97,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("function set foo(value:int):void{fetch('haai');}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n fetch('haai');\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n fetch('haai');\n}}}\n);");
}
@Override
@@ -107,7 +107,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nfoo: {\nset: /** @this {FalconTest_A} */ function(value) {\n}}}\n);");
}
@Override
@@ -117,7 +117,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public class B extends A { public override function set foo(value:int):void {super.foo = value;} }; public class A extends B { public override set foo(value:int):void{}}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @expose */\nfoo: {\nset: /** @this {B} */ function(value) {\n org_apache_flex_utils_Language.superSetter(B, this, 'foo', value);\n}}}\n);");
+ assertOut("/**\n * @constructor\n * @extends {A}\n */\nB = function() {\n B.base(this, 'constructor');\n};\ngoog.inherits(B, A);\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nfoo: {\nset: /** @this {B} */ function(value) {\n org_apache_flex_utils_Language.superSetter(B, this, 'foo', value);\n}}}\n);");
}
@Override
@@ -127,7 +127,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
IClassNode node = (IClassNode) getNode("public static function set foo(value:int):void{}",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @expose */\nfoo: {\nset: function(value) {\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A, /** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nset: function(value) {\n}}}\n);");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
index 77d5a24..7083e3a 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
@@ -38,7 +38,7 @@ public class TestFlexJSAccessors extends ASTestBase
"public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @expose\n */\nFalconTest_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 */\nFalconTest_A.prototype._label;\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nlabel: {\nget: /** @this {FalconTest_A} */ function() {\n return this._label;\n},\nset: /** @this {FalconTest_A} */ function(value) {\n this._label = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_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 */\nFalconTest_A.prototype._label;\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nlabel: {\nget: /** @this {FalconTest_A} */ function() {\n return this._label;\n},\nset: /** @this {FalconTest_A} */ function(value) {\n this._label = value;\n}}}\n);";
assertOut(expected);
}
@@ -49,7 +49,7 @@ public class TestFlexJSAccessors extends ASTestBase
"public class B { public function B() {}; public function doStuff():void {this.label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @expose\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;\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @expose */\nlabel: {\nget: /** @this {B} */ function() {\n return this._label;\n},\nset: /** @this {B} */ function(value) {\n this._label = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\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;\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nlabel: {\nget: /** @this {B} */ function() {\n return this._label;\n},\nset: /** @this {B} */ function(value) {\n this._label = value;\n}}}\n);";
assertOut(expected);
}
@@ -60,7 +60,7 @@ public class TestFlexJSAccessors extends ASTestBase
"public function doStuff():void {label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
IClassNode.class, WRAP_LEVEL_CLASS);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @expose\n */\nFalconTest_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 */\nFalconTest_A.prototype._label;\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @expose */\nlabel: {\nget: /** @this {FalconTest_A} */ function() {\n return this._label;\n},\nset: /** @this {FalconTest_A} */ function(value) {\n this._label = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @export\n */\nFalconTest_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 */\nFalconTest_A.prototype._label;\n\n\nObject.defineProperties(FalconTest_A.prototype, /** @lends {FalconTest_A.prototype} */ {\n/** @export */\nlabel: {\nget: /** @this {FalconTest_A} */ function() {\n return this._label;\n},\nset: /** @this {FalconTest_A} */ function(value) {\n this._label = value;\n}}}\n);";
assertOut(expected);
}
@@ -71,7 +71,7 @@ public class TestFlexJSAccessors extends ASTestBase
"public class B { public function B() {}; public function doStuff():void {label = this.label; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
IClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @expose\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;\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @expose */\nlabel: {\nget: /** @this {B} */ function() {\n return this._label;\n},\nset: /** @this {B} */ function(value) {\n this._label = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @export\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;\n\n\nObject.defineProperties(B.prototype, /** @lends {B.prototype} */ {\n/** @export */\nlabel: {\nget: /** @this {B} */ function() {\n return this._label;\n},\nset: /** @this {B} */ function(value) {\n this._label = value;\n}}}\n);";
assertOut(expected);
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index c2ece93..2c1b273 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -99,7 +99,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B(arg1:String) {this.arg1 = arg1}; public var arg1:String;}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg_apache_flex_B = function(arg1) {\n this.arg1 = arg1;\n};\n\n\n/**\n * @expose\n * @type {string}\n */\norg_apache_flex_B.prototype.arg1;";
+ String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg_apache_flex_B = function(arg1) {\n this.arg1 = arg1;\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg_apache_flex_B.prototype.arg1;";
assertOut(expected);
}
@@ -108,7 +108,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; public var button:Button = new Button(); public function foo():String {return button.label;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @type {spark_components_Button}\n */\norg_apache_flex_B.prototype.button = new spark_components_Button();\n\n\n/**\n * @expose\n * @return {string}\n */\norg_apache_flex_B.prototype.foo = function() {\n return this.button.label;\n};";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @type {spark_components_Button}\n */\norg_apache_flex_B.prototype.button = new spark_components_Button();\n\n\n/**\n * @export\n * @return {string}\n */\norg_apache_flex_B.prototype.foo = function() {\n return this.button.label;\n};";
assertOut(expected);
}
@@ -117,7 +117,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n */\norg_apache_flex_B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n */\norg_apache_flex_B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -126,7 +126,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @override\n */\norg_apache_flex_B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg_apache_flex_B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -135,7 +135,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo(value:Object):void {baz = ''};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @param {Object} value\n * @override\n */\norg_apache_flex_B.prototype.foo = function(value) {\n baz = '';\n};";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @param {Object} value\n * @override\n */\norg_apache_flex_B.prototype.foo = function(value) {\n baz = '';\n};";
assertOut(expected);
}
@@ -144,7 +144,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @override\n */\norg_apache_flex_B.prototype.foo = function() {\n org_apache_flex_B.base(this, 'foo');\n};";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @override\n */\norg_apache_flex_B.prototype.foo = function() {\n org_apache_flex_B.base(this, 'foo');\n};";
assertOut(expected);
}
@@ -153,7 +153,7 @@ public class TestFlexJSClass 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_flex_B = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_B.prototype, /** @lends {org_apache_flex_B.prototype} */ {\n/** @expose */\nbaz: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n}},\n/** @expose */\nfoo: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n this.baz = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_B.prototype, /** @lends {org_apache_flex_B.prototype} */ {\n/** @export */\nbaz: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n}},\n/** @export */\nfoo: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n this.baz = value;\n}}}\n);";
assertOut(expected);
}
@@ -162,7 +162,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_B.prototype, /** @lends {org_apache_flex_B.prototype} */ {\n/** @expose */\nfoo: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n foo = value;\n}}}\n);";
+ String expected = "/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_B.prototype, /** @lends {org_apache_flex_B.prototype} */ {\n/** @export */\nfoo: {\nset: /** @this {org_apache_flex_B} */ function(value) {\n foo = value;\n}}}\n);";
assertOut(expected);
}
@@ -182,7 +182,7 @@ public class TestFlexJSClass extends TestGoogClass
IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
+ "private var c:int; internal var d:uint; var e:Number}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @expose\n * @type {Object}\n */\norg_apache_flex_A.prototype.a;\n\n\n/**\n * @protected\n * @type {string}\n */\norg_apache_flex_A.prototype.b;\n\n\n/**\n * @private\n * @type {number}\n */\norg_apache_flex_A.prototype.c;\n\n\n/**\n * @expose\n * @type {number}\n */\norg_apache_flex_A.prototype.d;\n\n\n/**\n * @expose\n * @type {number}\n */\norg_apache_flex_A.prototype.e;");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @export\n * @type {Object}\n */\norg_apache_flex_A.prototype.a;\n\n\n/**\n * @protected\n * @type {string}\n */\norg_apache_flex_A.prototype.b;\n\n\n/**\n * @private\n * @type {number}\n */\norg_apache_flex_A.prototype.c;\n\n\n/**\n * @export\n * @type {number}\n */\norg_apache_flex_A.prototype.d;\n\n\n/**\n * @export\n * @type {number}\n */\norg_apache_flex_A.prototype.e;");
}
@Override
@@ -195,7 +195,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "private static const C:Number = 42;"
+ "foo_bar static const C:String = 'me' + 'you';");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @expose\n * @const\n * @type {number}\n */\norg_apache_flex_A.A = 42;\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\norg_apache_flex_A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg_apache_flex_A.C = 42;\n\n\n/**\n * @expose\n * @const\n * @type {string}\n */\norg_apache_flex_A.C = 'me' + 'you';");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @export\n * @const\n * @type {number}\n */\norg_apache_flex_A.A = 42;\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\norg_apache_flex_A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg_apache_flex_A.C = 42;\n\n\n/**\n * @export\n * @const\n * @type {string}\n */\norg_apache_flex_A.C = 'me' + 'you';");
}
@Override
@@ -214,7 +214,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "foo_bar function get foo6():Object{return null;}"
+ "foo_bar function set foo6(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_A.prototype, /** @lends {org_apache_flex_A.prototype} */ {\n/** @expose */\nfoo5: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @expose */\nfoo3: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @expose */\nfoo2: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @expose */\nfoo1: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @expose */\nfoo6: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}}}\n);");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\nObject.defineProperties(org_apache_flex_A.prototype, /** @lends {org_apache_flex_A.prototype} */ {\n/** @export */\nfoo5: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @export */\nfoo3: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @export */\nfoo2: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @export */\nfoo1: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}},\n/** @export */\nfoo6: {\nget: /** @this {org_apache_flex_A} */ function() {\n return null;\n},\nset: /** @this {org_apache_flex_A} */ function(value) {\n}}}\n);");
}
@Override
@@ -232,7 +232,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "public static function foo7(value:Object):void{}"
+ "foo_bar static function foo7(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg_apache_flex_A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg_apache_flex_A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n * @override\n */\norg_apache_flex_A.prototype.foo1b = function() {\n return org_apache_flex_A.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo6 = function(value) {\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg_apache_flex_A.foo7 = function(value) {\n
};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.foo7 = function(value) {\n};");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg_apache_flex_A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg_apache_flex_A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n * @override\n */\norg_apache_flex_A.prototype.foo1b = function() {\n return org_apache_flex_A.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.prototype.foo6 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg_apache_flex_A.foo7 = function(value) {\n
};\n\n\n/**\n * @param {Object} value\n */\norg_apache_flex_A.foo7 = function(value) {\n};");
}
@Test
@@ -243,7 +243,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg_apache_flex_B.prototype.foo1 = function() {\n function bar1() {\n return null;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg_apache_flex_B.prototype.foo2 = function() {\n function bar2(param1) {\n return null;\n };\n return goog.bind(bar2, this)('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg_apache_flex_B.prototype.foo1 = function() {\n function bar1() {\n return null;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg_apache_flex_B.prototype.foo2 = function() {\n function bar2(param1) {\n return null;\n };\n return goog.bind(bar2, this)('foo');\n};");
}
@Test
@@ -255,7 +255,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @type {string}\n */\norg_apache_flex_B.prototype.baz1;\n\n\n/**\n * @expose\n * @return {string}\n */\norg_apache_flex_B.prototype.foo1 = function() {\n function bar1() {\n return this.baz1;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {string}\n */\norg_apache_flex_B.prototype.foo2 = function() {\n function bar2(param1) {\n return param1 + this.baz1;\n };\n return goog.bind(bar2, this)('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @type {string}\n */\norg_apache_flex_B.prototype.baz1;\n\n\n/**\n * @export\n * @return {string}\n */\norg_apache_flex_B.prototype.foo1 = function() {\n function bar1() {\n return this.baz1;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg_apache_flex_B.prototype.foo2 = function() {\n function bar2(param1) {\n return param1 + this.baz1;\n };\n return goog.bind(bar2, this)('foo');\n};");
}
@Test
@@ -275,7 +275,7 @@ public class TestFlexJSClass extends TestGoogClass
+ "public function clone():B { return new B() }"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @expose\n * @return {org_apache_flex_B}\n */\norg_apache_flex_B.prototype.clone = function() {\n return new org_apache_flex_B();\n};");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_B = function() {\n};\n\n\n/**\n * @export\n * @return {org_apache_flex_B}\n */\norg_apache_flex_B.prototype.clone = function() {\n return new org_apache_flex_B();\n};");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
index fa8c339..3e7f6d7 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
@@ -54,7 +54,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
+ "return \"Don't \" + _privateVar + value; }";
IFileNode node = compileAS(code);
asBlockWalker.visitFile(node);
- assertOut("/**\n * com.example.components.MyTextButton\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com_example_components_MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark_components_Button}\n */\ncom_example_components_MyTextButton = function() {\n com_example_components_MyTextButton.base(this, 'constructor');\n if (foo() != 42) {\n bar();\n }\n};\ngoog.inherits(com_example_components_MyTextButton, spark_components_Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom_example_components_MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @expose\n * @type {number}\n */\ncom_example_components_MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom_example_components_MyTextButton.prototype.myFunction = function(value) {\n return \"Don't \" + this._privateVar + value;\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\
ncom_example_components_MyTextButton.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyTextButton', qName: 'com_example_components_MyTextButton'}] };\n");
+ assertOut("/**\n * com.example.components.MyTextButton\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com_example_components_MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark_components_Button}\n */\ncom_example_components_MyTextButton = function() {\n com_example_components_MyTextButton.base(this, 'constructor');\n if (foo() != 42) {\n bar();\n }\n};\ngoog.inherits(com_example_components_MyTextButton, spark_components_Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom_example_components_MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @export\n * @type {number}\n */\ncom_example_components_MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @export\n * @param {string} value\n * @return {string}\n */\ncom_example_components_MyTextButton.prototype.myFunction = function(value) {\n return \"Don't \" + this._privateVar + value;\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\
ncom_example_components_MyTextButton.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyTextButton', qName: 'com_example_components_MyTextButton'}] };\n");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index 99fc70f..9cd4eb6 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -552,7 +552,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b() { function c(f:Function):void {}; function d():void {}; c(d); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n function c(f) {\n };\n function d() {\n };\n goog.bind(c, this)(goog.bind(d, this));\n}");
+ assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n function c(f) {\n };\n function d() {\n };\n goog.bind(c, this)(goog.bind(d, this));\n}");
}
@Test
@@ -562,7 +562,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b() { function c(s:String, f:Function):void {}; function d():void {}; c('foo', d); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n function c(s, f) {\n };\n function d() {\n };\n goog.bind(c, this)('foo', goog.bind(d, this));\n}");
+ assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n function c(s, f) {\n };\n function d() {\n };\n goog.bind(c, this)('foo', goog.bind(d, this));\n}");
}
@Test
@@ -572,7 +572,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b() { c('foo', d); function c(s:String, f:Function):void {}; function d():void {};}}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n goog.bind(c, this)('foo', goog.bind(d, this));\n function c(s, f) {\n };\n function d() {\n };\n}");
+ assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n goog.bind(c, this)('foo', goog.bind(d, this));\n function c(s, f) {\n };\n function d() {\n };\n}");
}
@Test
@@ -582,7 +582,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b() { function d():void {}; c('foo', d); } public function c(s:String, f:Function):void {};}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n function d() {\n };\n this.c('foo', goog.bind(d, this));\n}");
+ assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n function d() {\n };\n this.c('foo', goog.bind(d, this));\n}");
}
@Test
@@ -592,7 +592,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b() { function c(f:Function):void {}; c(b); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n function c(f) {\n };\n goog.bind(c, this)(goog.bind(this.b, this));\n}");
+ assertOut("/**\n * @export\n */\nB.prototype.b = function() {\n function c(f) {\n };\n goog.bind(c, this)(goog.bind(this.b, this));\n}");
}
@Test
@@ -602,7 +602,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {static public function b() { function c(f:Function):void {}; c(b); }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n */\nfoo_bar_B.b = function() {\n function c(f) {\n };\n goog.bind(c, this)(foo_bar_B.b);\n}");
+ assertOut("/**\n * @export\n */\nfoo_bar_B.b = function() {\n function c(f) {\n };\n goog.bind(c, this)(foo_bar_B.b);\n}");
}
@Test
@@ -613,7 +613,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
// String.length is a getter but is a property in JS, so don't generate set_length() call.
- assertOut("/**\n * @expose\n * @return {number}\n */\nfoo_bar_B.prototype.b = function() {\n var /** @type {string} */ s;\n return s.length;\n}");
+ assertOut("/**\n * @export\n * @return {number}\n */\nfoo_bar_B.prototype.b = function() {\n var /** @type {string} */ s;\n return s.length;\n}");
}
@Test
@@ -624,7 +624,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
// String.length is a getter but is a property in JS, so don't generate set_length() call.
- assertOut("/**\n * @expose\n * @return {number}\n */\nfoo_bar_B.prototype.b = function() {\n var /** @type {Vector.<string>} */ a;\n return a.length;\n}");
+ assertOut("/**\n * @export\n * @return {number}\n */\nfoo_bar_B.prototype.b = function() {\n var /** @type {Vector.<string>} */ a;\n return a.length;\n}");
}
//----------------------------------
@@ -701,7 +701,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
"public class B {public function b(o:Object):int { var a:B; a = o as B; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n * @param {Object} o\n * @return {number}\n */\nfoo_bar_B.prototype.b = function(o) {\n var /** @type {foo_bar_B} */ a;\n a = org_apache_flex_utils_Language.as(o, foo_bar_B);\n}");
+ assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo_bar_B.prototype.b = function(o) {\n var /** @type {foo_bar_B} */ a;\n a = org_apache_flex_utils_Language.as(o, foo_bar_B);\n}");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
index ca79089..c2a076f 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSFieldMembers.java
@@ -43,7 +43,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("var foo;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {*}\n */\nFalconTest_A.prototype.foo");
+ assertOut("/**\n * @export\n * @type {*}\n */\nFalconTest_A.prototype.foo");
}
@Override
@@ -52,7 +52,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("var foo:int;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.foo");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.foo");
}
@Override
@@ -61,7 +61,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("var foo:int = 420;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
}
@Test
@@ -69,7 +69,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("var foo:int = -420;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.foo = -420");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.foo = -420");
}
@Override
@@ -88,7 +88,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
IVariableNode node = getField("mx_internal var foo:int = 420;");
asBlockWalker.visitVariable(node);
// (erikdebruin) we ignore custom namespaces completely (are there side effects I'm missing?)
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
}
@Override
@@ -137,7 +137,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("static const foo;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {*}\n */\nFalconTest_A.foo");
+ assertOut("/**\n * @export\n * @const\n * @type {*}\n */\nFalconTest_A.foo");
}
@Test
@@ -145,7 +145,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("const foo;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {*}\n */\nFalconTest_A.prototype.foo");
+ assertOut("/**\n * @export\n * @const\n * @type {*}\n */\nFalconTest_A.prototype.foo");
}
@Override
@@ -154,7 +154,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("static const foo:int;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.foo");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.foo");
}
@Test
@@ -162,7 +162,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("const foo:int;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo");
}
@Override
@@ -171,7 +171,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("static const foo:int = 420;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.foo = 420");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.foo = 420");
}
@Test
@@ -179,7 +179,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
{
IVariableNode node = getField("const foo:int = 420;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
}
@Override
@@ -206,7 +206,7 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
IVariableNode node = getField("mx_internal static const foo:int = 420;");
asBlockWalker.visitVariable(node);
// (erikdebruin) we ignore custom namespaces completely (are there side effects I'm missing?)
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.foo = 420");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.foo = 420");
}
@Test
@@ -215,6 +215,6 @@ public class TestFlexJSFieldMembers extends TestGoogFieldMembers
IVariableNode node = getField("mx_internal const foo:int = 420;");
asBlockWalker.visitVariable(node);
// (erikdebruin) we ignore custom namespaces completely (are there side effects I'm missing?)
- assertOut("/**\n * @expose\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
+ assertOut("/**\n * @export\n * @const\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
}
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalConstants.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalConstants.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalConstants.java
index e8971e2..78e93cc 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalConstants.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalConstants.java
@@ -43,7 +43,7 @@ public class TestFlexJSGlobalConstants extends TestGoogGlobalConstants
{
IVariableNode node = getField("var a:Number = Infinity;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.a = Infinity");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.a = Infinity");
}
@Override
@@ -52,7 +52,7 @@ public class TestFlexJSGlobalConstants extends TestGoogGlobalConstants
{
IVariableNode node = getField("var a:Number = -Infinity;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.a = -Infinity");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.a = -Infinity");
}
@Override
@@ -61,7 +61,7 @@ public class TestFlexJSGlobalConstants extends TestGoogGlobalConstants
{
IVariableNode node = getField("var a:Number = NaN;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {number}\n */\nFalconTest_A.prototype.a = NaN");
+ assertOut("/**\n * @export\n * @type {number}\n */\nFalconTest_A.prototype.a = NaN");
}
@Override
@@ -70,6 +70,6 @@ public class TestFlexJSGlobalConstants extends TestGoogGlobalConstants
{
IVariableNode node = getField("var a:* = undefined;");
asBlockWalker.visitVariable(node);
- assertOut("/**\n * @expose\n * @type {*}\n */\nFalconTest_A.prototype.a = undefined");
+ assertOut("/**\n * @export\n * @type {*}\n */\nFalconTest_A.prototype.a = undefined");
}
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
index a11ea8d..b983329 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
@@ -157,7 +157,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
IFunctionNode node = getMethod("public function foo(bar:String, baz:int = null):int{ return -1;}");
asBlockWalker.visitFunction(node);
// we ignore the 'public' namespace completely
- assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
@@ -169,7 +169,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
// (erikdebruin) here we actually DO want to declare the method
// directly on the 'class' constructor instead of the
// prototype!
- assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
@@ -178,7 +178,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
{
IFunctionNode node = getMethod("public override function foo(bar:String, baz:int = null):int{ return -1;}");
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
@@ -187,7 +187,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
{
IFunctionNode node = getMethod("override public function foo(bar:String, baz:int = null):int{return -1;}");
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
+ assertOut("/**\n * @export\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n baz = typeof baz !== 'undefined' ? baz : null;\n return -1;\n}");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSClass.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSClass.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSClass.java
index 1e6b546..b84647d 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSClass.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSClass.java
@@ -185,7 +185,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; public var button:Button = new Button(); public function foo():String {return button.label;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n this.button = new spark.components.Button();\n};\n\n\n/**\n * @type {spark.components.Button}\n */\norg.apache.flex.B.prototype.button;\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n return this.button.get_label();\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n this.button = new spark.components.Button();\n};\n\n\n/**\n * @type {spark.components.Button}\n */\norg.apache.flex.B.prototype.button;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n return this.button.get_label();\n};";
assertOut(expected);
}
@@ -194,7 +194,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -203,7 +203,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
assertOut(expected);
}
@@ -212,7 +212,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo(value:Object):void {baz = ''};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @param {Object} value\n * @override\n */\norg.apache.flex.B.prototype.foo = function(value) {\n baz = '';\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @param {Object} value\n * @override\n */\norg.apache.flex.B.prototype.foo = function(value) {\n baz = '';\n};";
assertOut(expected);
}
@@ -221,7 +221,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function foo():void {super.foo();};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n org.apache.flex.B.base(this, 'foo');\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @override\n */\norg.apache.flex.B.prototype.foo = function() {\n org.apache.flex.B.base(this, 'foo');\n};";
assertOut(expected);
}
@@ -230,7 +230,7 @@ public class TestVF2JSClass 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.flex.B = function() {};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.B.prototype.set_baz = function(value) {\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.B.prototype.set_foo = function(value) {\n this.set_baz(value);\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.B.prototype.set_baz = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.B.prototype.set_foo = function(value) {\n this.set_baz(value);\n};";
assertOut(expected);
}
@@ -239,7 +239,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class B {public function B() {}; override public function set foo(value:Object):void {super.foo = value;};}");
asBlockWalker.visitClass(node);
- String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @param {Object} value\n * @override\n */\norg.apache.flex.B.prototype.set_foo = function(value) {\n org.apache.flex.B.base(this, 'set_foo', value);\n};";
+ String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @param {Object} value\n * @override\n */\norg.apache.flex.B.prototype.set_foo = function(value) {\n org.apache.flex.B.base(this, 'set_foo', value);\n};";
assertOut(expected);
}
@@ -275,7 +275,7 @@ public class TestVF2JSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A {private var controlBarGroupProperties:Object = { visible: true }; private var _visible:Boolean; public function get visible():Boolean { return _visible; }; public function set visible(value:Boolean):void { _visible = value; };}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @private\n * @type {Object}\n */\norg.apache.flex.A.prototype.controlBarGroupProperties = {visible:true};\n\n\n/**\n * @private\n * @type {boolean}\n */\norg.apache.flex.A.prototype._visible;\n\n\n/**\n * @expose\n * @return {boolean}\n */\norg.apache.flex.A.prototype.get_visible = function() {\n return this._visible;\n};\n\n\n/**\n * @expose\n * @param {boolean} value\n */\norg.apache.flex.A.prototype.set_visible = function(value) {\n this._visible = value;\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @private\n * @type {Object}\n */\norg.apache.flex.A.prototype.controlBarGroupProperties = {visible:true};\n\n\n/**\n * @private\n * @type {boolean}\n */\norg.apache.flex.A.prototype._visible;\n\n\n/**\n * @export\n * @return {boolean}\n */\norg.apache.flex.A.prototype.get_visible = function() {\n return this._visible;\n};\n\n\n/**\n * @export\n * @param {boolean} value\n */\norg.apache.flex.A.prototype.set_visible = function(value) {\n this._visible = value;\n};");
}
@Override
@@ -307,7 +307,7 @@ public class TestVF2JSClass extends TestGoogClass
+ "foo_bar function get foo6():Object{return null;}"
+ "foo_bar function set foo6(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo1 = function() {\n return null;\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo1 = function(value) {\n};\n\n\n/**\n * @protected\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo2 = function() {\n return null;\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo3 = function() {\n return null;\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo3 = function(value) {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo5 = function() {\n return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo5 = function(value) {\
n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo6 = function() {\n return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo6 = function(value) {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo1 = function(value) {\n};\n\n\n/**\n * @protected\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo2 = function() {\n return null;\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo3 = function() {\n return null;\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo3 = function(value) {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo5 = function() {\n return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo5 = function(value) {\
n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo6 = function() {\n return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo6 = function(value) {\n};");
}
@Override
@@ -325,7 +325,7 @@ public class TestVF2JSClass extends TestGoogClass
+ "public static function foo7(value:Object):void{}"
+ "foo_bar static function foo7(value:Object):void{}" + "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n return org.apache.flex.A.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo6 = function(value) {\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};
\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n return null;\n};\n\n\n/**\n * @export\n * @return {Object}\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n return org.apache.flex.A.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo6 = function(value) {\n};\n\n\n/**\n * @export\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};
\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};");
}
@Test
@@ -336,7 +336,7 @@ public class TestVF2JSClass extends TestGoogClass
+ "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n function bar1() {\n return null;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n function bar2(param1) {\n return null;\n };\n return goog.bind(bar2, this)('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n function bar1() {\n return null;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @export\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n function bar2(param1) {\n return null;\n };\n return goog.bind(bar2, this)('foo');\n};");
}
@Test
@@ -348,7 +348,7 @@ public class TestVF2JSClass extends TestGoogClass
+ "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n function bar1() {\n return this.baz1;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n function bar2(param1) {\n return param1 + this.baz1;\n };\n return goog.bind(bar2, this)('foo');\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n function bar1() {\n return this.baz1;\n };\n return goog.bind(bar1, this)();\n};\n\n\n/**\n * @export\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n function bar2(param1) {\n return param1 + this.baz1;\n };\n return goog.bind(bar2, this)('foo');\n};");
}
@Test
@@ -368,7 +368,7 @@ public class TestVF2JSClass extends TestGoogClass
+ "public function clone():B { return new B() }"
+ "}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @expose\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n return new org.apache.flex.B();\n};");
+ assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {};\n\n\n/**\n * @export\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n return new org.apache.flex.B();\n};");
}
protected IBackend createBackend()
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSExpressions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSExpressions.java
index 1abf203..f04e28e 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSExpressions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSExpressions.java
@@ -104,7 +104,7 @@ public class TestVF2JSExpressions extends TestGoogExpressions
"public class B {public function b(o:Object):int { var a:B; a = o as B; }}",
IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
asBlockWalker.visitFunction(node);
- assertOut("/**\n * @expose\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a;\n a = org_apache_flex_utils_Language.as(o, foo.bar.B);\n}");
+ assertOut("/**\n * @export\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n var /** @type {foo.bar.B} */ a;\n a = org_apache_flex_utils_Language.as(o, foo.bar.B);\n}");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
index 6d79603..8b3708a 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLScript.java
@@ -43,7 +43,7 @@ public class TestFlexJSMXMLScript extends FlexJSTestBase
((JSFlexJSEmitter)(mxmlBlockWalker.getASEmitter())).getModel().setCurrentClass(dnode.getDefinition());
mxmlBlockWalker.visitDocument(dnode);
String appName = dnode.getQualifiedName();
- String outTemplate = "/**\n * AppName\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('AppName');\n\ngoog.require('org_apache_flex_core_Application');\n\n\n\n\n/**\n * @constructor\n * @extends {org_apache_flex_core_Application}\n */\nAppName = function() {\n AppName.base(this, 'constructor');\n \n /**\n * @private\n * @type {Array}\n */\n this.mxmldd;\n \n /**\n * @private\n * @type {Array}\n */\n this.mxmldp;\n};\ngoog.inherits(AppName, org_apache_flex_core_Application);\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nAppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }] };\n\n\n/**\n * @expose\n * @override\n */\nAppName.prototype.addedToParent = function() {\n AppName.base(this, 'addedToParent');\n};\n\n\n";
+ String outTemplate = "/**\n * AppName\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('AppName');\n\ngoog.require('org_apache_flex_core_Application');\n\n\n\n\n/**\n * @constructor\n * @extends {org_apache_flex_core_Application}\n */\nAppName = function() {\n AppName.base(this, 'constructor');\n \n /**\n * @private\n * @type {Array}\n */\n this.mxmldd;\n \n /**\n * @private\n * @type {Array}\n */\n this.mxmldp;\n};\ngoog.inherits(AppName, org_apache_flex_core_Application);\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nAppName.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'AppName', qName: 'AppName' }] };\n\n\n/**\n * @export\n * @override\n */\nAppName.prototype.addedToParent = function() {\n AppName.base(this, 'addedToParent');\n};\n\n\n";
assertOut(outTemplate.replaceAll("AppName", appName));
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/externals_unit_tests/constructor_params.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/externals_unit_tests/constructor_params.js b/compiler.jx.tests/test-files/externals_unit_tests/constructor_params.js
index 1029bdb..2e8d7eb 100644
--- a/compiler.jx.tests/test-files/externals_unit_tests/constructor_params.js
+++ b/compiler.jx.tests/test-files/externals_unit_tests/constructor_params.js
@@ -78,4 +78,4 @@ var FinalClass = {};
/**
* A static method.
*/
-FinalClass.bar = function () {};
\ No newline at end of file
+FinalClass.bar = function () {};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/externals_unit_tests/package_namespace.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/externals_unit_tests/package_namespace.js b/compiler.jx.tests/test-files/externals_unit_tests/package_namespace.js
index e4048e9..3ea2fbf 100644
--- a/compiler.jx.tests/test-files/externals_unit_tests/package_namespace.js
+++ b/compiler.jx.tests/test-files/externals_unit_tests/package_namespace.js
@@ -45,4 +45,4 @@ function Goo () {}
/**
* @typedef {Foo}
*/
-var ATypeDef;
\ No newline at end of file
+var ATypeDef;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
index 8334fea..7171859 100644
--- a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
@@ -137,7 +137,7 @@ FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_aga
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
FlexJSTest_again.prototype.$EH0 = function(event)
@@ -147,7 +147,7 @@ FlexJSTest_again.prototype.$EH0 = function(event)
Object.defineProperties(FlexJSTest_again.prototype, /** @lends {FlexJSTest_again.prototype} */ {
-/** @expose */
+/** @export */
service: {
/** @this {FlexJSTest_again} */
get: function() {
@@ -161,7 +161,7 @@ Object.defineProperties(FlexJSTest_again.prototype, /** @lends {FlexJSTest_again
}
}
},
- /** @expose */
+ /** @export */
collection: {
/** @this {FlexJSTest_again} */
get: function() {
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
index 8fbc116..e757c3e 100644
--- a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
@@ -50,7 +50,7 @@ LocalFunction.prototype.myMemberMethod = function(value) {
/**
- * @expose
+ * @export
*/
LocalFunction.prototype.doIt = function() {
this.myMemberMethod(624);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
index f86853f..50eee15 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -228,7 +228,7 @@ MyInitialView.prototype.timer;
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.startTimer = function(event) {
@@ -239,7 +239,7 @@ MyInitialView.prototype.startTimer = function(event) {
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.timerHandler = function(event) {
@@ -251,28 +251,28 @@ MyInitialView.prototype.timerHandler = function(event) {
Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
-/** @expose */
+/** @export */
comboBoxValue: {
get: /** @this {MyInitialView} */ function() {
return String(this.comboBox.selectedItem);
}},
-/** @expose */
+/** @export */
inputText: {
get: /** @this {MyInitialView} */ function() {
return this.input.text;
}},
-/** @expose */
+/** @export */
symbol: {
get: /** @this {MyInitialView} */ function() {
return org_apache_flex_utils_Language.as(this.list.selectedItem, String);
}},
-/** @expose */
+/** @export */
city: {
get: /** @this {MyInitialView} */ function() {
return org_apache_flex_utils_Language.as(this.cityList.selectedItem, String);
}}}
);/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH0 = function(event)
@@ -282,7 +282,7 @@ MyInitialView.prototype.$EH0 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH1 = function(event)
@@ -293,7 +293,7 @@ MyInitialView.prototype.$EH1 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH2 = function(event)
@@ -303,7 +303,7 @@ MyInitialView.prototype.$EH2 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH3 = function(event)
@@ -313,7 +313,7 @@ MyInitialView.prototype.$EH3 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH4 = function(event)
@@ -323,7 +323,7 @@ MyInitialView.prototype.$EH4 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH5 = function(event)
@@ -333,7 +333,7 @@ MyInitialView.prototype.$EH5 = function(event)
/**
- * @expose
+ * @export
* @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH6 = function(event)
@@ -343,7 +343,7 @@ MyInitialView.prototype.$EH6 = function(event)
Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.prototype} */ {
-/** @expose */
+/** @export */
lbl: {
/** @this {MyInitialView} */
get: function() {
@@ -357,7 +357,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
timerLabel: {
/** @this {MyInitialView} */
get: function() {
@@ -371,7 +371,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
cityList: {
/** @this {MyInitialView} */
get: function() {
@@ -385,7 +385,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
input: {
/** @this {MyInitialView} */
get: function() {
@@ -399,7 +399,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
checkbox: {
/** @this {MyInitialView} */
get: function() {
@@ -413,7 +413,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
list: {
/** @this {MyInitialView} */
get: function() {
@@ -427,7 +427,7 @@ Object.defineProperties(MyInitialView.prototype, /** @lends {MyInitialView.proto
}
}
},
- /** @expose */
+ /** @export */
comboBox: {
/** @this {MyInitialView} */
get: function() {
@@ -835,4 +835,4 @@ null
}
}
});
-
\ No newline at end of file
+
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5307227d/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js b/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
index c010141..da79aa8 100644
--- a/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
+++ b/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
@@ -25,7 +25,7 @@ StockDataJSONItemConverter = function() {
goog.inherits(StockDataJSONItemConverter, org_apache_flex_net_JSONItemConverter);
/**
- * @expose
+ * @export
* @param {string} data
* @return {Object}
* @override