You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/01/28 18:21:55 UTC
[1/5] git commit: [flex-falcon] [refs/heads/develop] - switch from
org.apache. to org_apache_ because of Google Closure Compiler handling of
dot-path expressions
Repository: flex-falcon
Updated Branches:
refs/heads/develop eeaab7f1d -> 743fe1571
switch from org.apache. to org_apache_ because of Google Closure Compiler handling of dot-path expressions
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/46a3d288
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/46a3d288
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/46a3d288
Branch: refs/heads/develop
Commit: 46a3d288ece306c4667e81ccb3f31ba23a0eb5b0
Parents: eeaab7f
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 27 14:41:32 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 27 14:41:32 2015 -0800
----------------------------------------------------------------------
.../codegen/js/flexjs/JSFlexJSDocEmitter.java | 13 ++++-
.../codegen/js/flexjs/JSFlexJSEmitter.java | 59 +++++++++++---------
.../js/flexjs/JSFlexJSEmitterTokens.java | 2 +-
.../codegen/js/goog/JSGoogDocEmitter.java | 12 +++-
.../codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 54 ++++++++++--------
.../js/flexjs/JSCSSCompilationSession.java | 17 +++++-
.../compiler/internal/graph/GoogDepsWriter.java | 10 ++--
7 files changed, 105 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
index 63fafe5..5b3eba4 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
@@ -68,7 +68,17 @@ public class JSFlexJSDocEmitter extends JSGoogDocEmitter
if (classIgnoreList.contains(pname + "." + name))
return IASLanguageConstants.Object;
}
- return super.convertASTypeToJS(name, pname);
+ name = super.convertASTypeToJS(name, pname);
+ return formatQualifiedName(name);
+ }
+
+ @Override
+ protected String formatQualifiedName(String name)
+ {
+ if (name.contains("goog."))
+ return name;
+ name = name.replaceAll("\\.", "_");
+ return name;
}
@Override
@@ -325,5 +335,4 @@ public class JSFlexJSDocEmitter extends JSGoogDocEmitter
end();
}
-
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index d1afba4..ce77fb9 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -161,7 +161,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
String qname = definition.getQualifiedName();
if (qname != null && !qname.equals(""))
{
- write(qname);
+ write(formatQualifiedName(qname));
write(ASEmitterTokens.SPACE);
writeToken(ASEmitterTokens.EQUAL);
write(ASEmitterTokens.FUNCTION);
@@ -246,7 +246,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
String qname = node.getQualifiedName();
if (qname != null && !qname.equals(""))
{
- write(qname);
+ write(formatQualifiedName(qname));
write(ASEmitterTokens.SPACE);
writeToken(ASEmitterTokens.EQUAL);
write(ASEmitterTokens.FUNCTION);
@@ -272,7 +272,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
getDoc().emitInterfaceMemberDoc((IFunctionNode) mnode, project);
- write(qname);
+ write(formatQualifiedName(qname));
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSEmitterTokens.PROTOTYPE);
write(ASEmitterTokens.MEMBER_ACCESS);
@@ -322,7 +322,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
if (definition == null)
definition = ndef.getContainingScope().getDefinition();
- write(definition.getQualifiedName()
+ write(formatQualifiedName(definition.getQualifiedName())
+ ASEmitterTokens.MEMBER_ACCESS.getToken() + root
+ node.getName());
@@ -356,7 +356,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
writeNewline("/**");
writeNewline("@expose");
writeNewline(" */");
- writeNewline(definition.getQualifiedName()
+ writeNewline(formatQualifiedName(definition.getQualifiedName())
+ ASEmitterTokens.MEMBER_ACCESS.getToken() + root
+ "get_" + node.getName()
+ ASEmitterTokens.SPACE.getToken() + ASEmitterTokens.EQUAL.getToken()
@@ -371,7 +371,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
writeNewline("/**");
writeNewline("@expose");
writeNewline(" */");
- writeNewline(definition.getQualifiedName()
+ writeNewline(formatQualifiedName(definition.getQualifiedName())
+ ASEmitterTokens.MEMBER_ACCESS.getToken() + root
+ "set_" + node.getName()
+ ASEmitterTokens.SPACE.getToken() + ASEmitterTokens.EQUAL.getToken()
@@ -385,7 +385,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
+ node.getName() + ASEmitterTokens.SEMICOLON.getToken());
writeNewline(" " + ASEmitterTokens.THIS.getToken() + ASEmitterTokens.MEMBER_ACCESS.getToken()
+ node.getName() + " = value;");
- writeNewline(" this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(");
+ writeNewline(" this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(");
writeNewline(" this, \"" + node.getName() + "\", oldValue, value));");
writeNewline("}");
write(ASEmitterTokens.BLOCK_CLOSE.getToken());
@@ -422,7 +422,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
String qname = getTypeDefinition(node).getQualifiedName();
if (qname != null && !qname.equals(""))
{
- write(qname);
+ write(formatQualifiedName(qname));
if (!isConstructor)
{
write(ASEmitterTokens.MEMBER_ACCESS);
@@ -463,11 +463,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
writeNewline(ASEmitterTokens.SEMICOLON);
write(JSGoogEmitterTokens.GOOG_INHERITS);
write(ASEmitterTokens.PAREN_OPEN);
- write(qname);
+ write(formatQualifiedName(qname));
writeToken(ASEmitterTokens.COMMA);
String sname = getSuperClassDefinition(node, project)
.getQualifiedName();
- write(sname);
+ write(formatQualifiedName(sname));
write(ASEmitterTokens.PAREN_CLOSE);
}
}
@@ -512,7 +512,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
def = node.resolveCalledExpression(project);
// all new calls to a class should be fully qualified names
if (def instanceof ClassDefinition)
- write(def.getQualifiedName());
+ write(formatQualifiedName(def.getQualifiedName()));
else
// I think we still need this for "new someVarOfTypeClass"
getWalker().walk(node.getNameNode());
@@ -706,7 +706,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
String sname = nodeDef.getParent().getQualifiedName();
if (sname.length() > 0)
{
- write(sname);
+ write(formatQualifiedName(sname));
write(ASEmitterTokens.MEMBER_ACCESS);
}
}
@@ -818,7 +818,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
if (cnode == null)
return;
- write(cnode.getQualifiedName());
+ write(formatQualifiedName(cnode.getQualifiedName()));
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSGoogEmitterTokens.GOOG_BASE);
write(ASEmitterTokens.PAREN_OPEN);
@@ -851,7 +851,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
else if (emitName)
{
if (nodeDef != null)
- write(nodeDef.getQualifiedName());
+ write(formatQualifiedName(nodeDef.getQualifiedName()));
else
write(node.getName());
}
@@ -890,7 +890,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
if (cnode == null)
return;
- write(cnode.getQualifiedName());
+ write(formatQualifiedName(cnode.getQualifiedName()));
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSGoogEmitterTokens.GOOG_BASE);
write(ASEmitterTokens.PAREN_OPEN);
@@ -1059,7 +1059,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
IDefinition dnode = (node.getRightOperandNode()).resolve(project);
if (dnode != null)
- write(dnode.getQualifiedName());
+ write(formatQualifiedName(dnode.getQualifiedName()));
else
getWalker().walk(node.getRightOperandNode());
}
@@ -1181,7 +1181,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
writeToken(ASEmitterTokens.COMMA);
if (dnode != null)
- write(dnode.getQualifiedName());
+ write(formatQualifiedName(dnode.getQualifiedName()));
else
getWalker().walk(right);
@@ -1305,7 +1305,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
if (isBindableSetter)
{
getDoc().emitMethodDoc(fn, project);
- write(type.getQualifiedName());
+ write(formatQualifiedName(type.getQualifiedName()));
if (!node.hasModifier(ASModifier.STATIC))
{
write(ASEmitterTokens.MEMBER_ACCESS);
@@ -1358,7 +1358,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
writeNewline(ASEmitterTokens.SEMICOLON);
// add dispatch of change event
- writeNewline(" this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(");
+ writeNewline(" this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(");
writeNewline(" this, \"" + node.getName() + "\", oldValue, " + params[0].getName() + "));");
write(ASEmitterTokens.BLOCK_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
@@ -1371,7 +1371,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
project = getWalker().getProject();
getDoc().emitMethodDoc(fn, project);
- write(type.getQualifiedName());
+ write(formatQualifiedName(type.getQualifiedName()));
if (!node.hasModifier(ASModifier.STATIC))
{
write(ASEmitterTokens.MEMBER_ACCESS);
@@ -1431,7 +1431,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
write(JSGoogEmitterTokens.GOOG_PROVIDE);
write(ASEmitterTokens.PAREN_OPEN);
write(ASEmitterTokens.SINGLE_QUOTE);
- write(type.getQualifiedName());
+ write(formatQualifiedName(type.getQualifiedName()));
write(ASEmitterTokens.SINGLE_QUOTE);
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
@@ -1510,7 +1510,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
write(JSGoogEmitterTokens.GOOG_REQUIRE);
write(ASEmitterTokens.PAREN_OPEN);
write(ASEmitterTokens.SINGLE_QUOTE);
- write(imp);
+ write(formatQualifiedName(imp));
write(ASEmitterTokens.SINGLE_QUOTE);
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
@@ -1532,7 +1532,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
write(JSGoogEmitterTokens.GOOG_REQUIRE);
write(ASEmitterTokens.PAREN_OPEN);
write(ASEmitterTokens.SINGLE_QUOTE);
- write(imp);
+ write(formatQualifiedName(imp));
write(ASEmitterTokens.SINGLE_QUOTE);
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
@@ -1594,7 +1594,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
getDoc().end();
// a.B.prototype.AFJS_CLASS_INFO = { };
- write(type.getQualifiedName());
+ write(formatQualifiedName(type.getQualifiedName()));
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSEmitterTokens.PROTOTYPE);
write(ASEmitterTokens.MEMBER_ACCESS);
@@ -1616,7 +1616,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
write(JSFlexJSEmitterTokens.QNAME);
writeToken(ASEmitterTokens.COLON);
write(ASEmitterTokens.SINGLE_QUOTE);
- write(tnode.getQualifiedName());
+ write(formatQualifiedName(tnode.getQualifiedName()));
write(ASEmitterTokens.SINGLE_QUOTE);
write(ASEmitterTokens.BLOCK_CLOSE);
write(ASEmitterTokens.SQUARE_CLOSE);
@@ -1638,7 +1638,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
int i = 0;
for (IExpressionNode enode : enodes)
{
- write(enode.resolve(project).getQualifiedName());
+ write(formatQualifiedName(enode.resolve(project).getQualifiedName()));
if (i < enodes.length - 1)
writeToken(ASEmitterTokens.COMMA);
i++;
@@ -1895,4 +1895,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
super.emitUnaryOperator(node);
}
+ private String formatQualifiedName(String name)
+ {
+ if (name.contains("goog."))
+ return name;
+ name = name.replaceAll("\\.", "_");
+ return name;
+ }
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
index c30dcbc..ea99061 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
@@ -29,7 +29,7 @@ public enum JSFlexJSEmitterTokens implements IEmitterTokens
FLEXJS_CLASS_INFO("FLEXJS_CLASS_INFO"),
INDENT(" "),
INTERFACES("interfaces"),
- LANGUAGE_QNAME("org.apache.flex.utils.Language"),
+ LANGUAGE_QNAME("org_apache_flex_utils_Language"),
NAME("name"),
NAMES("names"),
QNAME("qName"),
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
index 8986fa4..0f8f960 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogDocEmitter.java
@@ -74,7 +74,7 @@ public class JSGoogDocEmitter extends JSDocEmitter implements IJSGoogDocEmitter
IDefinition dnode = inode.resolve(project);
if (dnode != null)
{
- emitJSDocLine(ASEmitterTokens.EXTENDS, dnode.getQualifiedName());
+ emitJSDocLine(ASEmitterTokens.EXTENDS, formatQualifiedName(dnode.getQualifiedName()));
}
else
{
@@ -276,13 +276,13 @@ public class JSGoogDocEmitter extends JSDocEmitter implements IJSGoogDocEmitter
public void emitExtends(IClassDefinition superDefinition, String packageName)
{
emitJSDocLine(ASEmitterTokens.EXTENDS,
- superDefinition.getQualifiedName());
+ formatQualifiedName(superDefinition.getQualifiedName()));
}
@Override
public void emitImplements(ITypeDefinition definition, String packageName)
{
- emitJSDocLine(ASEmitterTokens.IMPLEMENTS, definition.getQualifiedName());
+ emitJSDocLine(ASEmitterTokens.IMPLEMENTS, formatQualifiedName(definition.getQualifiedName()));
}
@Override
@@ -508,4 +508,10 @@ public class JSGoogDocEmitter extends JSDocEmitter implements IJSGoogDocEmitter
return cnode.getDefinition();
}
+
+ protected String formatQualifiedName(String name)
+ {
+ return name;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index cdee4d6..27bbd5e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -319,9 +319,9 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline();
writeNewline("/**");
writeNewline(" * @constructor");
- writeNewline(" * @extends {" + baseClassName + "}");
+ writeNewline(" * @extends {" + formatQualifiedName(baseClassName) + "}");
writeNewline(" */");
- writeToken(cname);
+ writeToken(formatQualifiedName(cname));
writeToken(ASEmitterTokens.EQUAL);
write(ASEmitterTokens.FUNCTION);
write(ASEmitterTokens.PAREN_OPEN);
@@ -329,7 +329,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
if (indent)
indentPush();
writeNewline(ASEmitterTokens.BLOCK_OPEN, true);
- write(cname);
+ write(formatQualifiedName(cname));
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSGoogEmitterTokens.GOOG_BASE);
write(ASEmitterTokens.PAREN_OPEN);
@@ -405,9 +405,9 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline(ASEmitterTokens.SEMICOLON);
write(JSGoogEmitterTokens.GOOG_INHERITS);
write(ASEmitterTokens.PAREN_OPEN);
- write(cname);
+ write(formatQualifiedName(cname));
writeToken(ASEmitterTokens.COMMA);
- write(baseClassName);
+ write(formatQualifiedName(baseClassName));
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
writeNewline();
@@ -425,10 +425,10 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline(" *");
writeNewline(" * @type {Object.<string, Array.<Object>>}");
writeNewline(" */");
- write(cname + ".prototype.FLEXJS_CLASS_INFO = { names: [{ name: '");
+ write(formatQualifiedName(cname) + ".prototype.FLEXJS_CLASS_INFO = { names: [{ name: '");
write(cdef.getBaseName());
write("', qName: '");
- write(cname);
+ write(formatQualifiedName(cname));
writeNewline("' }] };");
writeNewline();
writeNewline();
@@ -473,7 +473,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline("/**");
writeNewline(" * @expose");
writeNewline(" */");
- writeNewline(cname
+ writeNewline(formatQualifiedName(cname)
+ ".prototype._bindings = [");
Set<BindingInfo> bindingInfo = bindingDataBase.getBindingInfo();
@@ -815,9 +815,9 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
{
writeNewline("/**");
writeNewline(" * @expose");
- writeNewline(" * @param {" + event.type + "} event");
+ writeNewline(" * @param {" + formatQualifiedName(event.type) + "} event");
writeNewline(" */");
- writeNewline(cname
+ writeNewline(formatQualifiedName(cname)
+ ".prototype." + event.eventHandler + " = function(event)");
writeNewline(ASEmitterTokens.BLOCK_OPEN, true);
@@ -844,7 +844,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline(" * @expose");
writeNewline(" * @return {" + instance.name + "}");
writeNewline(" */");
- writeNewline(cname
+ writeNewline(formatQualifiedName(cname)
+ ".prototype.get_" + instance.id + " = function()");
indentPush();
writeNewline("{");
@@ -857,7 +857,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline(" * @expose");
writeNewline(" * @param {" + instance.name + "} value");
writeNewline(" */");
- writeNewline(cname
+ writeNewline(formatQualifiedName(cname)
+ ".prototype.set_" + instance.id
+ " = function(value)");
indentPush();
@@ -865,7 +865,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
indentPush();
writeNewline("if (value != this." + instance.id + ") {");
writeNewline("this." + instance.id + " = value;");
- write("this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, '");
+ write("this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, '");
indentPop();
writeNewline(instance.id + "', null, value));");
indentPop();
@@ -891,14 +891,14 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
writeNewline(" * @override");
writeNewline(" * @return {Array} the Array of UI element descriptors.");
writeNewline(" */");
- writeNewline(cname + ".prototype.get_MXMLDescriptor = function()");
+ writeNewline(formatQualifiedName(cname) + ".prototype.get_MXMLDescriptor = function()");
indentPush();
writeNewline("{");
writeNewline("if (this.mxmldd == undefined)");
indentPush();
writeNewline("{");
writeNewline("/** @type {Array} */");
- writeNewline("var arr = " + cname + ".base(this, 'get_MXMLDescriptor');");
+ writeNewline("var arr = " + formatQualifiedName(cname) + ".base(this, 'get_MXMLDescriptor');");
writeNewline("/** @type {Array} */");
indentPop();
indentPop();
@@ -1000,7 +1000,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
MXMLDescriptorSpecifier currentInstance = new MXMLDescriptorSpecifier();
currentInstance.isProperty = false;
currentInstance.id = id;
- currentInstance.name = cdef.getQualifiedName();
+ currentInstance.name = formatQualifiedName(cdef.getQualifiedName());
currentInstance.parent = currentPropertySpecifier;
if (currentPropertySpecifier != null)
@@ -1143,7 +1143,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
MXMLDescriptorSpecifier setProp = new MXMLDescriptorSpecifier();
setProp.isProperty = false;
- setProp.name = nameToString(overrideName);
+ setProp.name = formatQualifiedName(nameToString(overrideName));
setProp.parent = currentInstance;
currentInstance.propertySpecifiers.add(setProp);
@@ -1228,7 +1228,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
MXMLDescriptorSpecifier setEvent = new MXMLDescriptorSpecifier();
setEvent.isProperty = false;
- setEvent.name = nameToString(eventOverride);
+ setEvent.name = formatQualifiedName(nameToString(eventOverride));
setEvent.parent = currentInstance;
currentInstance.propertySpecifiers.add(setEvent);
// Set its 'target' property to the id of the object
@@ -1297,7 +1297,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
MXMLDescriptorSpecifier addItems = new MXMLDescriptorSpecifier();
addItems.isProperty = false;
- addItems.name = nameToString(instanceOverrideName);
+ addItems.name = formatQualifiedName(nameToString(instanceOverrideName));
addItems.parent = currentInstance;
currentInstance.propertySpecifiers.add(addItems);
MXMLDescriptorSpecifier itemsDescIndex = new MXMLDescriptorSpecifier();
@@ -1688,12 +1688,12 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
public void emitFactory(IMXMLFactoryNode node)
{
MXMLDescriptorSpecifier ps = getCurrentDescriptor("ps");
- ps.value = "new mx.core.ClassFactory(";
+ ps.value = formatQualifiedName("new mx.core.ClassFactory(");
IASNode cnode = node.getChild(0);
if (cnode instanceof IMXMLClassNode)
{
- ps.value += ((IMXMLClassNode)cnode).getValue(getMXMLWalker().getProject()).getQualifiedName();
+ ps.value += formatQualifiedName(((IMXMLClassNode)cnode).getValue(getMXMLWalker().getProject()).getQualifiedName());
}
ps.value += ")";
}
@@ -1704,7 +1704,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
public void emitComponent(IMXMLComponentNode node)
{
MXMLDescriptorSpecifier ps = getCurrentDescriptor("ps");
- ps.value = "new mx.core.ClassFactory(";
+ ps.value = formatQualifiedName("new mx.core.ClassFactory(");
ps.value += node.getName();
ps.value += ")";
@@ -1827,7 +1827,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
: JSGoogEmitterTokens.GOOG_REQUIRE);
write(ASEmitterTokens.PAREN_OPEN);
write(ASEmitterTokens.SINGLE_QUOTE);
- write(qname);
+ write(formatQualifiedName(qname));
write(ASEmitterTokens.SINGLE_QUOTE);
write(ASEmitterTokens.PAREN_CLOSE);
writeNewline(ASEmitterTokens.SEMICOLON);
@@ -1907,4 +1907,12 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
}
}
+ private String formatQualifiedName(String name)
+ {
+ if (name.contains("goog."))
+ return name;
+ name = name.replaceAll("\\.", "_");
+ return name;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
index 76fda8c..1033c53 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
@@ -58,7 +58,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession
sb.append("];\n");
for (String r : requires)
{
- sb.append(JSGoogEmitterTokens.GOOG_REQUIRE.getToken() + "('" + r + "');\n");
+ sb.append(JSGoogEmitterTokens.GOOG_REQUIRE.getToken() + "('" + formatQualifiedName(r) + "');\n");
}
return sb.toString();
@@ -212,6 +212,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession
result.append("\"" + sel.toString() + "\"");
else
{
+ selName = formatQualifiedName(selName);
ImmutableList<ICSSSelectorCondition> conds = sel.getConditions();
for (ICSSSelectorCondition cond : conds)
selName += cond.toString();
@@ -314,7 +315,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession
}
else
{
- result.append(className);
+ result.append(formatQualifiedName(className));
requires.add(className);
}
}
@@ -364,4 +365,16 @@ public class JSCSSCompilationSession extends CSSCompilationSession
return false;
}
+ private String formatQualifiedName(String name)
+ {
+ if (name.contains("goog."))
+ return name;
+ if (name.startsWith("."))
+ {
+ return "." + name.substring(1).replaceAll("\\.", "_");
+ }
+ name = name.replaceAll("\\.", "_");
+ return name;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/46a3d288/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 37acf0c..53a216e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -244,7 +244,7 @@ public class GoogDepsWriter {
File destFile;
File f;
- String classPath = className.replace(".", File.separator);
+ String classPath = className.replace("_", File.separator);
fn = outputFolderPath + File.separator + classPath + ".js";
f = new File(fn);
@@ -266,12 +266,12 @@ public class GoogDepsWriter {
FileUtils.copyFile(f, destFile);
// (erikdebruin) copy class assets files
- if (className.contains("org.apache.flex"))
+ if (className.contains("org_apache_flex"))
{
File assetsDir = new File(f.getParentFile(), "assets");
if (assetsDir.exists())
{
- String nameOfClass = className.substring(className.lastIndexOf('.') + 1);
+ String nameOfClass = className.substring(className.lastIndexOf('_') + 1);
File[] assetsList = assetsDir.listFiles();
assert assetsList != null;
@@ -280,8 +280,8 @@ public class GoogDepsWriter {
if (assetFile.isFile() && assetFileName.indexOf(nameOfClass) == 0) {
String pathOfClass;
- pathOfClass = className.substring(0, className.lastIndexOf('.'));
- pathOfClass = pathOfClass.replace(".", File.separator);
+ pathOfClass = className.substring(0, className.lastIndexOf('_'));
+ pathOfClass = pathOfClass.replace("_", File.separator);
destFile = new File(outputFolderPath +
File.separator + pathOfClass +
[2/5] git commit: [flex-falcon] [refs/heads/develop] - the tests
found more bugs
Posted by ah...@apache.org.
the tests found more bugs
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e0eca561
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e0eca561
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e0eca561
Branch: refs/heads/develop
Commit: e0eca561eabd546b7fc1247f9fe8c86989d18b13
Parents: 46a3d28
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 27 17:20:24 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 27 17:20:24 2015 -0800
----------------------------------------------------------------------
.../compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java | 2 +-
.../flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java | 2 +-
.../compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 2 +-
.../internal/driver/js/flexjs/JSCSSCompilationSession.java | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e0eca561/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
index 5b3eba4..701bb99 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSDocEmitter.java
@@ -75,7 +75,7 @@ public class JSFlexJSDocEmitter extends JSGoogDocEmitter
@Override
protected String formatQualifiedName(String name)
{
- if (name.contains("goog."))
+ if (name.contains("goog.") || name.startsWith("Vector."))
return name;
name = name.replaceAll("\\.", "_");
return name;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e0eca561/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index ce77fb9..9d92c4a 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -1897,7 +1897,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
private String formatQualifiedName(String name)
{
- if (name.contains("goog."))
+ if (name.contains("goog.") || name.startsWith("Vector."))
return name;
name = name.replaceAll("\\.", "_");
return name;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e0eca561/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 27bbd5e..53f0cc2 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -1909,7 +1909,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
private String formatQualifiedName(String name)
{
- if (name.contains("goog."))
+ if (name.contains("goog.") || name.startsWith("Vector."))
return name;
name = name.replaceAll("\\.", "_");
return name;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e0eca561/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
index 1033c53..0499610 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
@@ -367,7 +367,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession
private String formatQualifiedName(String name)
{
- if (name.contains("goog."))
+ if (name.contains("goog.") || name.startsWith("Vector."))
return name;
if (name.startsWith("."))
{
[5/5] git commit: [flex-falcon] [refs/heads/develop] - upgrade test
results since the compiler now emits org_apache_flex instead of
org.apache.flex
Posted by ah...@apache.org.
upgrade test results since the compiler now emits org_apache_flex instead of org.apache.flex
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/743fe157
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/743fe157
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/743fe157
Branch: refs/heads/develop
Commit: 743fe157143b6620401487f49a9b689955dbe25f
Parents: ab1376a
Author: Alex Harui <ah...@apache.org>
Authored: Wed Jan 28 07:57:13 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Jan 28 07:57:13 2015 -0800
----------------------------------------------------------------------
.../flexjs/files/FlexJSTest_again_result.js | 56 ++---
.../flexjs/files/LocalFunction_result.js | 2 +-
.../flexjs/files/MyInitialView_result.js | 204 +++++++++----------
.../flexjs/files/StockDataJSONItemConverter.js | 8 +-
.../files/controllers/MyController_result.js | 62 +++---
.../flexjs/files/models/MyModel_result.js | 28 +--
.../flexjs/files/wildcard_import_result.js | 10 +-
.../flexjs/projects/interfaces/Test_result.js | 28 +--
.../projects/interfaces/classes/A_result.js | 14 +-
.../projects/interfaces/classes/B_result.js | 6 +-
.../projects/interfaces/classes/C_result.js | 6 +-
.../projects/interfaces/interfaces/IA_result.js | 10 +-
.../projects/interfaces/interfaces/IB_result.js | 6 +-
.../projects/interfaces/interfaces/IC_result.js | 10 +-
.../projects/interfaces/interfaces/ID_result.js | 6 +-
.../projects/interfaces/interfaces/IE_result.js | 12 +-
.../flexjs/projects/super/Base_result.js | 2 +-
.../test-files/goog/files/call-super_result.js | 2 +-
.../test-files/goog/files/get-set_result.js | 2 +-
.../test-files/goog/files/output.js | 2 +-
.../test-files/goog/files/poc_result.js | 2 +-
.../goog/files/qualify-new-object_result.js | 2 +-
.../goog/projects/imports/Case_result.js | 2 +-
.../goog/projects/imports/comps/A_result.js | 2 +-
.../goog/projects/imports/comps/B_result.js | 2 +-
.../test-files/vf2js/files/SimpleAS_result.js | 2 +-
.../vf2js/projects/interfaces/Test_result.js | 4 +-
.../projects/interfaces/classes/A_result.js | 2 +-
.../vf2js/projects/sdk/SomeSDKClass_result.js | 4 +-
.../sdk/bases/HelperBaseClass_result.js | 2 +-
.../simpleMXML/src/SimpleMXML_Project_result.js | 4 +-
.../simpleMXML/src/example/Component_result.js | 2 +-
.../vf2js/projects/super/Base_result.js | 4 +-
33 files changed, 255 insertions(+), 255 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/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 7355661..5d6a1ca 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
@@ -21,30 +21,30 @@
goog.provide('FlexJSTest_again');
-goog.require('org.apache.flex.core.Application');
-goog.require('org.apache.flex.core.SimpleCSSValuesImpl');
+goog.require('org_apache_flex_core_Application');
+goog.require('org_apache_flex_core_SimpleCSSValuesImpl');
goog.require('MyInitialView');
-goog.require('models.MyModel');
-goog.require('controllers.MyController');
-goog.require('org.apache.flex.net.HTTPService');
-goog.require('org.apache.flex.net.dataConverters.LazyCollection');
-goog.require('org.apache.flex.net.JSONInputParser');
+goog.require('models_MyModel');
+goog.require('controllers_MyController');
+goog.require('org_apache_flex_net_HTTPService');
+goog.require('org_apache_flex_net_dataConverters_LazyCollection');
+goog.require('org_apache_flex_net_JSONInputParser');
goog.require('StockDataJSONItemConverter');
-goog.require('org.apache.flex.events.Event');
+goog.require('org_apache_flex_events_Event');
/**
* @constructor
- * @extends {org.apache.flex.core.Application}
+ * @extends {org_apache_flex_core_Application}
*/
FlexJSTest_again = function() {
FlexJSTest_again.base(this, 'constructor');
/**
* @private
- * @type {org.apache.flex.core.SimpleCSSValuesImpl}
+ * @type {org_apache_flex_core_SimpleCSSValuesImpl}
*/
this.$ID0;
@@ -56,31 +56,31 @@ FlexJSTest_again = function() {
/**
* @private
- * @type {models.MyModel}
+ * @type {models_MyModel}
*/
this.$ID2;
/**
* @private
- * @type {controllers.MyController}
+ * @type {controllers_MyController}
*/
this.$ID3;
/**
* @private
- * @type {org.apache.flex.net.HTTPService}
+ * @type {org_apache_flex_net_HTTPService}
*/
this.service;
/**
* @private
- * @type {org.apache.flex.net.dataConverters.LazyCollection}
+ * @type {org_apache_flex_net_dataConverters_LazyCollection}
*/
this.collection;
/**
* @private
- * @type {org.apache.flex.net.JSONInputParser}
+ * @type {org_apache_flex_net_JSONInputParser}
*/
this.$ID4;
@@ -106,18 +106,18 @@ FlexJSTest_again = function() {
([5,
'model',
false,
-[models.MyModel, 1, '_id', true, '$ID2', 0, 0, null],
+[models_MyModel, 1, '_id', true, '$ID2', 0, 0, null],
'valuesImpl',
false,
-[org.apache.flex.core.SimpleCSSValuesImpl, 1, '_id', true, '$ID0', 0, 0, null],
+[org_apache_flex_core_SimpleCSSValuesImpl, 1, '_id', true, '$ID0', 0, 0, null],
'initialView',
false,
[MyInitialView, 1, '_id', true, '$ID1', 0, 0, null],
'controller',
false,
-[controllers.MyController, 1, '_id', true, '$ID3', 0, 0, null],
+[controllers_MyController, 1, '_id', true, '$ID3', 0, 0, null],
'beads',
-null, [org.apache.flex.net.HTTPService, 2, 'id', true, 'service', 'beads', null, [org.apache.flex.net.dataConverters.LazyCollection, 3, 'id', true, 'collection', 'inputParser', false, [org.apache.flex.net.JSONInputParser, 1, '_id', true, '$ID4', 0, 0, null], 'itemConverter', false, [StockDataJSONItemConverter, 1, '_id', true, '$ID5', 0, 0, null], 0, 0, null], 0, 0, null],
+null, [org_apache_flex_net_HTTPService, 2, 'id', true, 'service', 'beads', null, [org_apache_flex_net_dataConverters_LazyCollection, 3, 'id', true, 'collection', 'inputParser', false, [org_apache_flex_net_JSONInputParser, 1, '_id', true, '$ID4', 0, 0, null], 'itemConverter', false, [StockDataJSONItemConverter, 1, '_id', true, '$ID5', 0, 0, null], 0, 0, null], 0, 0, null],
0,
1,
'initialize',
@@ -125,7 +125,7 @@ this.$EH0
]);
};
-goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
+goog.inherits(FlexJSTest_again, org_apache_flex_core_Application);
/**
@@ -138,17 +138,17 @@ FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_aga
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
FlexJSTest_again.prototype.$EH0 = function(event)
{
- org.apache.flex.utils.Language.as(this.model, models.MyModel, true).set_labelText('Hello World');
+ org_apache_flex_utils_Language.as(this.model, models_MyModel, true).set_labelText('Hello World');
};
/**
* @expose
- * @return {org.apache.flex.net.HTTPService}
+ * @return {org_apache_flex_net_HTTPService}
*/
FlexJSTest_again.prototype.get_service = function()
{
@@ -158,20 +158,20 @@ FlexJSTest_again.prototype.get_service = function()
/**
* @expose
- * @param {org.apache.flex.net.HTTPService} value
+ * @param {org_apache_flex_net_HTTPService} value
*/
FlexJSTest_again.prototype.set_service = function(value)
{
if (value != this.service) {
this.service = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'service', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'service', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.net.dataConverters.LazyCollection}
+ * @return {org_apache_flex_net_dataConverters_LazyCollection}
*/
FlexJSTest_again.prototype.get_collection = function()
{
@@ -181,13 +181,13 @@ FlexJSTest_again.prototype.get_collection = function()
/**
* @expose
- * @param {org.apache.flex.net.dataConverters.LazyCollection} value
+ * @param {org_apache_flex_net_dataConverters_LazyCollection} value
*/
FlexJSTest_again.prototype.set_collection = function(value)
{
if (value != this.collection) {
this.collection = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'collection', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'collection', null, value));
}
};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/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 3c4ce2f..8fbc116 100644
--- a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
@@ -45,7 +45,7 @@ LocalFunction.prototype.myMemberMethod = function(value) {
function myLocalFunction(value) {
return this.myMemberProperty + value;
};
- org.apache.flex.utils.Language.trace("WOW! :: " + goog.bind(myLocalFunction, this)(value + 42));
+ org_apache_flex_utils_Language.trace("WOW! :: " + goog.bind(myLocalFunction, this)(value + 42));
};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/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 c3cc35c..5f38962 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -21,167 +21,167 @@
goog.provide('MyInitialView');
-goog.require('org.apache.flex.core.ViewBase');
-goog.require('org.apache.flex.html.Label');
-goog.require('org.apache.flex.binding.SimpleBinding');
-goog.require('org.apache.flex.html.TextButton');
-goog.require('org.apache.flex.html.List');
-goog.require('org.apache.flex.binding.ConstantBinding');
-goog.require('org.apache.flex.html.TextArea');
-goog.require('org.apache.flex.html.TextInput');
-goog.require('org.apache.flex.html.CheckBox');
-goog.require('org.apache.flex.html.RadioButton');
-goog.require('org.apache.flex.html.DropDownList');
-goog.require('org.apache.flex.html.ComboBox');
-goog.require('org.apache.flex.events.CustomEvent');
-goog.require('org.apache.flex.events.Event');
-goog.require('org.apache.flex.utils.Timer');
+goog.require('org_apache_flex_core_ViewBase');
+goog.require('org_apache_flex_html_Label');
+goog.require('org_apache_flex_binding_SimpleBinding');
+goog.require('org_apache_flex_html_TextButton');
+goog.require('org_apache_flex_html_List');
+goog.require('org_apache_flex_binding_ConstantBinding');
+goog.require('org_apache_flex_html_TextArea');
+goog.require('org_apache_flex_html_TextInput');
+goog.require('org_apache_flex_html_CheckBox');
+goog.require('org_apache_flex_html_RadioButton');
+goog.require('org_apache_flex_html_DropDownList');
+goog.require('org_apache_flex_html_ComboBox');
+goog.require('org_apache_flex_events_CustomEvent');
+goog.require('org_apache_flex_events_Event');
+goog.require('org_apache_flex_utils_Timer');
/**
* @constructor
- * @extends {org.apache.flex.core.ViewBase}
+ * @extends {org_apache_flex_core_ViewBase}
*/
MyInitialView = function() {
MyInitialView.base(this, 'constructor');
/**
* @private
- * @type {org.apache.flex.html.Label}
+ * @type {org_apache_flex_html_Label}
*/
this.lbl;
/**
* @private
- * @type {org.apache.flex.binding.SimpleBinding}
+ * @type {org_apache_flex_binding_SimpleBinding}
*/
this.$ID0;
/**
* @private
- * @type {org.apache.flex.html.TextButton}
+ * @type {org_apache_flex_html_TextButton}
*/
this.$ID1;
/**
* @private
- * @type {org.apache.flex.html.TextButton}
+ * @type {org_apache_flex_html_TextButton}
*/
this.$ID2;
/**
* @private
- * @type {org.apache.flex.html.Label}
+ * @type {org_apache_flex_html_Label}
*/
this.timerLabel;
/**
* @private
- * @type {org.apache.flex.html.List}
+ * @type {org_apache_flex_html_List}
*/
this.cityList;
/**
* @private
- * @type {org.apache.flex.binding.ConstantBinding}
+ * @type {org_apache_flex_binding_ConstantBinding}
*/
this.$ID3;
/**
* @private
- * @type {org.apache.flex.html.TextArea}
+ * @type {org_apache_flex_html_TextArea}
*/
this.$ID5;
/**
* @private
- * @type {org.apache.flex.binding.SimpleBinding}
+ * @type {org_apache_flex_binding_SimpleBinding}
*/
this.$ID4;
/**
* @private
- * @type {org.apache.flex.html.TextInput}
+ * @type {org_apache_flex_html_TextInput}
*/
this.input;
/**
* @private
- * @type {org.apache.flex.html.TextButton}
+ * @type {org_apache_flex_html_TextButton}
*/
this.$ID6;
/**
* @private
- * @type {org.apache.flex.html.CheckBox}
+ * @type {org_apache_flex_html_CheckBox}
*/
this.checkbox;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID7;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID8;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID9;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID10;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID11;
/**
* @private
- * @type {org.apache.flex.html.RadioButton}
+ * @type {org_apache_flex_html_RadioButton}
*/
this.$ID12;
/**
* @private
- * @type {org.apache.flex.html.DropDownList}
+ * @type {org_apache_flex_html_DropDownList}
*/
this.list;
/**
* @private
- * @type {org.apache.flex.binding.ConstantBinding}
+ * @type {org_apache_flex_binding_ConstantBinding}
*/
this.$ID13;
/**
* @private
- * @type {org.apache.flex.html.TextButton}
+ * @type {org_apache_flex_html_TextButton}
*/
this.$ID14;
/**
* @private
- * @type {org.apache.flex.html.ComboBox}
+ * @type {org_apache_flex_html_ComboBox}
*/
this.comboBox;
/**
* @private
- * @type {org.apache.flex.binding.ConstantBinding}
+ * @type {org_apache_flex_binding_ConstantBinding}
*/
this.$ID15;
@@ -197,7 +197,7 @@ MyInitialView = function() {
*/
this.mxmldp;
};
-goog.inherits(MyInitialView, org.apache.flex.core.ViewBase);
+goog.inherits(MyInitialView, org_apache_flex_core_ViewBase);
/**
@@ -210,7 +210,7 @@ MyInitialView.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyInitialView', q
/**
* @private
- * @type {org.apache.flex.utils.Timer}
+ * @type {org_apache_flex_utils_Timer}
*/
MyInitialView.prototype.timer;
@@ -220,7 +220,7 @@ MyInitialView.prototype.timer;
* @return {string}
*/
MyInitialView.prototype.get_symbol = function() {
- return org.apache.flex.utils.Language.as(this.get_list().get_selectedItem(), String);
+ return org_apache_flex_utils_Language.as(this.get_list().get_selectedItem(), String);
};
@@ -229,7 +229,7 @@ MyInitialView.prototype.get_symbol = function() {
* @return {string}
*/
MyInitialView.prototype.get_city = function() {
- return org.apache.flex.utils.Language.as(this.get_cityList().get_selectedItem(), String);
+ return org_apache_flex_utils_Language.as(this.get_cityList().get_selectedItem(), String);
};
@@ -253,10 +253,10 @@ MyInitialView.prototype.get_comboBoxValue = function() {
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.startTimer = function(event) {
- this.timer = new org.apache.flex.utils.Timer(1000);
+ this.timer = new org_apache_flex_utils_Timer(1000);
this.timer.addEventListener('timer', goog.bind(this.timerHandler, this));
this.timer.start();
};
@@ -264,7 +264,7 @@ MyInitialView.prototype.startTimer = function(event) {
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.timerHandler = function(event) {
this.get_timerLabel().set_text(this.timer.get_currentCount().toString());
@@ -273,7 +273,7 @@ MyInitialView.prototype.timerHandler = function(event) {
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH0 = function(event)
{
@@ -283,7 +283,7 @@ MyInitialView.prototype.$EH0 = function(event)
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH1 = function(event)
{
@@ -294,57 +294,57 @@ MyInitialView.prototype.$EH1 = function(event)
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH2 = function(event)
{
- this.dispatchEvent(new org.apache.flex.events.CustomEvent('cityListChanged'));
+ this.dispatchEvent(new org_apache_flex_events_CustomEvent('cityListChanged'));
};
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH3 = function(event)
{
- this.dispatchEvent(new org.apache.flex.events.CustomEvent('transferClicked'));
+ this.dispatchEvent(new org_apache_flex_events_CustomEvent('transferClicked'));
};
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH4 = function(event)
{
- this.dispatchEvent(new org.apache.flex.events.CustomEvent('listChanged'));
+ this.dispatchEvent(new org_apache_flex_events_CustomEvent('listChanged'));
};
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH5 = function(event)
{
- this.dispatchEvent(new org.apache.flex.events.CustomEvent('buttonClicked'));
+ this.dispatchEvent(new org_apache_flex_events_CustomEvent('buttonClicked'));
};
/**
* @expose
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
MyInitialView.prototype.$EH6 = function(event)
{
- this.dispatchEvent(new org.apache.flex.events.CustomEvent('comboBoxChanged'));
+ this.dispatchEvent(new org_apache_flex_events_CustomEvent('comboBoxChanged'));
};
/**
* @expose
- * @return {org.apache.flex.html.Label}
+ * @return {org_apache_flex_html_Label}
*/
MyInitialView.prototype.get_lbl = function()
{
@@ -354,20 +354,20 @@ MyInitialView.prototype.get_lbl = function()
/**
* @expose
- * @param {org.apache.flex.html.Label} value
+ * @param {org_apache_flex_html_Label} value
*/
MyInitialView.prototype.set_lbl = function(value)
{
if (value != this.lbl) {
this.lbl = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'lbl', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'lbl', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.Label}
+ * @return {org_apache_flex_html_Label}
*/
MyInitialView.prototype.get_timerLabel = function()
{
@@ -377,20 +377,20 @@ MyInitialView.prototype.get_timerLabel = function()
/**
* @expose
- * @param {org.apache.flex.html.Label} value
+ * @param {org_apache_flex_html_Label} value
*/
MyInitialView.prototype.set_timerLabel = function(value)
{
if (value != this.timerLabel) {
this.timerLabel = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'timerLabel', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'timerLabel', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.List}
+ * @return {org_apache_flex_html_List}
*/
MyInitialView.prototype.get_cityList = function()
{
@@ -400,20 +400,20 @@ MyInitialView.prototype.get_cityList = function()
/**
* @expose
- * @param {org.apache.flex.html.List} value
+ * @param {org_apache_flex_html_List} value
*/
MyInitialView.prototype.set_cityList = function(value)
{
if (value != this.cityList) {
this.cityList = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'cityList', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'cityList', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.TextInput}
+ * @return {org_apache_flex_html_TextInput}
*/
MyInitialView.prototype.get_input = function()
{
@@ -423,20 +423,20 @@ MyInitialView.prototype.get_input = function()
/**
* @expose
- * @param {org.apache.flex.html.TextInput} value
+ * @param {org_apache_flex_html_TextInput} value
*/
MyInitialView.prototype.set_input = function(value)
{
if (value != this.input) {
this.input = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'input', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'input', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.CheckBox}
+ * @return {org_apache_flex_html_CheckBox}
*/
MyInitialView.prototype.get_checkbox = function()
{
@@ -446,20 +446,20 @@ MyInitialView.prototype.get_checkbox = function()
/**
* @expose
- * @param {org.apache.flex.html.CheckBox} value
+ * @param {org_apache_flex_html_CheckBox} value
*/
MyInitialView.prototype.set_checkbox = function(value)
{
if (value != this.checkbox) {
this.checkbox = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'checkbox', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'checkbox', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.DropDownList}
+ * @return {org_apache_flex_html_DropDownList}
*/
MyInitialView.prototype.get_list = function()
{
@@ -469,20 +469,20 @@ MyInitialView.prototype.get_list = function()
/**
* @expose
- * @param {org.apache.flex.html.DropDownList} value
+ * @param {org_apache_flex_html_DropDownList} value
*/
MyInitialView.prototype.set_list = function(value)
{
if (value != this.list) {
this.list = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'list', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'list', null, value));
}
};
/**
* @expose
- * @return {org.apache.flex.html.ComboBox}
+ * @return {org_apache_flex_html_ComboBox}
*/
MyInitialView.prototype.get_comboBox = function()
{
@@ -492,13 +492,13 @@ MyInitialView.prototype.get_comboBox = function()
/**
* @expose
- * @param {org.apache.flex.html.ComboBox} value
+ * @param {org_apache_flex_html_ComboBox} value
*/
MyInitialView.prototype.set_comboBox = function(value)
{
if (value != this.comboBox) {
this.comboBox = value;
- this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'comboBox', null, value));
+ this.dispatchEvent(org_apache_flex_events_ValueChangeEvent.createUpdateEvent(this, 'comboBox', null, value));
}
};
@@ -515,7 +515,7 @@ MyInitialView.prototype.get_MXMLDescriptor = function()
var arr = MyInitialView.base(this, 'get_MXMLDescriptor');
/** @type {Array} */
var data = [
-org.apache.flex.html.Label,
+org_apache_flex_html_Label,
4,
'id',
true,
@@ -527,11 +527,11 @@ true,
true,
25,
'beads',
-null, [org.apache.flex.binding.SimpleBinding, 5, '_id', true, '$ID0', 'eventName', true, 'labelTextChanged', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName', true, 'text', 0, 0, null],
+null, [org_apache_flex_binding_SimpleBinding, 5, '_id', true, '$ID0', 'eventName', true, 'labelTextChanged', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName', true, 'text', 0, 0, null],
0,
0,
null,
-org.apache.flex.html.TextButton,
+org_apache_flex_html_TextButton,
4,
'_id',
true,
@@ -550,7 +550,7 @@ true,
'click',
this.$EH0,
null,
-org.apache.flex.html.TextButton,
+org_apache_flex_html_TextButton,
4,
'_id',
true,
@@ -569,7 +569,7 @@ true,
'click',
this.$EH1,
null,
-org.apache.flex.html.Label,
+org_apache_flex_html_Label,
3,
'id',
true,
@@ -583,7 +583,7 @@ true,
0,
0,
null,
-org.apache.flex.html.List,
+org_apache_flex_html_List,
6,
'id',
true,
@@ -601,13 +601,13 @@ true,
true,
75,
'beads',
-null, [org.apache.flex.binding.ConstantBinding, 4, '_id', true, '$ID3', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'cities', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
+null, [org_apache_flex_binding_ConstantBinding, 4, '_id', true, '$ID3', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'cities', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
0,
1,
'change',
this.$EH2,
null,
-org.apache.flex.html.TextArea,
+org_apache_flex_html_TextArea,
6,
'_id',
true,
@@ -625,11 +625,11 @@ true,
true,
75,
'beads',
-null, [org.apache.flex.binding.SimpleBinding, 5, '_id', true, '$ID4', 'eventName', true, 'labelTextChanged', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName', true, 'text', 0, 0, null],
+null, [org_apache_flex_binding_SimpleBinding, 5, '_id', true, '$ID4', 'eventName', true, 'labelTextChanged', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName', true, 'text', 0, 0, null],
0,
0,
null,
-org.apache.flex.html.TextInput,
+org_apache_flex_html_TextInput,
3,
'id',
true,
@@ -643,7 +643,7 @@ true,
0,
0,
null,
-org.apache.flex.html.TextButton,
+org_apache_flex_html_TextButton,
4,
'_id',
true,
@@ -662,7 +662,7 @@ true,
'click',
this.$EH3,
null,
-org.apache.flex.html.CheckBox,
+org_apache_flex_html_CheckBox,
4,
'id',
true,
@@ -679,7 +679,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
6,
'_id',
true,
@@ -702,7 +702,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
7,
'_id',
true,
@@ -728,7 +728,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
6,
'_id',
true,
@@ -751,7 +751,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
7,
'_id',
true,
@@ -777,7 +777,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
6,
'_id',
true,
@@ -800,7 +800,7 @@ true,
0,
0,
null,
-org.apache.flex.html.RadioButton,
+org_apache_flex_html_RadioButton,
6,
'_id',
true,
@@ -823,7 +823,7 @@ true,
0,
0,
null,
-org.apache.flex.html.DropDownList,
+org_apache_flex_html_DropDownList,
6,
'id',
true,
@@ -841,13 +841,13 @@ true,
true,
24,
'beads',
-null, [org.apache.flex.binding.ConstantBinding, 4, '_id', true, '$ID13', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'strings', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
+null, [org_apache_flex_binding_ConstantBinding, 4, '_id', true, '$ID13', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'strings', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
0,
1,
'change',
this.$EH4,
null,
-org.apache.flex.html.TextButton,
+org_apache_flex_html_TextButton,
4,
'_id',
true,
@@ -866,7 +866,7 @@ true,
'click',
this.$EH5,
null,
-org.apache.flex.html.ComboBox,
+org_apache_flex_html_ComboBox,
5,
'id',
true,
@@ -881,7 +881,7 @@ true,
true,
100,
'beads',
-null, [org.apache.flex.binding.ConstantBinding, 4, '_id', true, '$ID15', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'cities', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
+null, [org_apache_flex_binding_ConstantBinding, 4, '_id', true, '$ID15', 'sourceID', true, 'applicationModel', 'sourcePropertyName', true, 'cities', 'destinationPropertyName', true, 'dataProvider', 0, 0, null],
0,
1,
'change',
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/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 34f5caa..c010141 100644
--- a/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
+++ b/compiler.jx.tests/test-files/flexjs/files/StockDataJSONItemConverter.js
@@ -13,16 +13,16 @@
*/
goog.provide('StockDataJSONItemConverter');
-goog.require('org.apache.flex.net.JSONItemConverter');
+goog.require('org_apache_flex_net_JSONItemConverter');
/**
* @constructor
- * @extends {org.apache.flex.net.JSONItemConverter}
+ * @extends {org_apache_flex_net_JSONItemConverter}
*/
StockDataJSONItemConverter = function() {
goog.base(this);
}
-goog.inherits(StockDataJSONItemConverter, org.apache.flex.net.JSONItemConverter);
+goog.inherits(StockDataJSONItemConverter, org_apache_flex_net_JSONItemConverter);
/**
* @expose
@@ -36,4 +36,4 @@ StockDataJSONItemConverter.prototype.convertItem = function(data) {
return "No Data";
obj = obj["query"]["results"]["quote"];
return obj;
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
index 9ca4b97..27d163b 100644
--- a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
@@ -19,19 +19,19 @@
* @suppress {checkTypes}
*/
-goog.provide('controllers.MyController');
+goog.provide('controllers_MyController');
/**
* @constructor
- * @implements {org.apache.flex.core.IDocument}
- * @param {org.apache.flex.core.Application=} app
+ * @implements {org_apache_flex_core_IDocument}
+ * @param {org_apache_flex_core_Application=} app
*/
-controllers.MyController = function(app) {
+controllers_MyController = function(app) {
app = typeof app !== 'undefined' ? app : null;
if (app) {
- this.app = org.apache.flex.utils.Language.as(app, FlexJSTest_again);
+ this.app = org_apache_flex_utils_Language.as(app, FlexJSTest_again);
app.addEventListener("viewChanged", goog.bind(this.viewChangeHandler, this));
}
};
@@ -41,28 +41,28 @@ controllers.MyController = function(app) {
* @private
* @type {string}
*/
-controllers.MyController.prototype.queryBegin = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
+controllers_MyController.prototype.queryBegin = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22";
/**
* @private
* @type {string}
*/
-controllers.MyController.prototype.queryEnd = "%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
+controllers_MyController.prototype.queryEnd = "%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json";
/**
* @private
* @type {FlexJSTest_again}
*/
-controllers.MyController.prototype.app;
+controllers_MyController.prototype.app;
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.viewChangeHandler = function(event) {
+controllers_MyController.prototype.viewChangeHandler = function(event) {
this.app.initialView.addEventListener("buttonClicked", goog.bind(this.buttonClickHandler, this));
this.app.initialView.addEventListener("listChanged", goog.bind(this.listChangedHandler, this));
this.app.initialView.addEventListener("cityListChanged", goog.bind(this.cityListChangeHandler, this));
@@ -73,10 +73,10 @@ controllers.MyController.prototype.viewChangeHandler = function(event) {
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.buttonClickHandler = function(event) {
- var /** @type {string} */ sym = org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_symbol();
+controllers_MyController.prototype.buttonClickHandler = function(event) {
+ var /** @type {string} */ sym = org_apache_flex_utils_Language.as(this.app.initialView, MyInitialView, true).get_symbol();
this.app.get_service().set_url(this.queryBegin + sym + this.queryEnd);
this.app.get_service().send();
this.app.get_service().addEventListener("complete", goog.bind(this.completeHandler, this));
@@ -85,46 +85,46 @@ controllers.MyController.prototype.buttonClickHandler = function(event) {
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.completeHandler = function(event) {
- org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.get_collection().getItemAt(0), String));
+controllers_MyController.prototype.completeHandler = function(event) {
+ org_apache_flex_utils_Language.as(this.app.model, models_MyModel, true).set_labelText(org_apache_flex_utils_Language.as(this.app.get_collection().getItemAt(0), String));
};
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.listChangedHandler = function(event) {
- org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_symbol());
+controllers_MyController.prototype.listChangedHandler = function(event) {
+ org_apache_flex_utils_Language.as(this.app.model, models_MyModel, true).set_labelText(org_apache_flex_utils_Language.as(this.app.initialView, MyInitialView, true).get_symbol());
};
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.cityListChangeHandler = function(event) {
- org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_city());
+controllers_MyController.prototype.cityListChangeHandler = function(event) {
+ org_apache_flex_utils_Language.as(this.app.model, models_MyModel, true).set_labelText(org_apache_flex_utils_Language.as(this.app.initialView, MyInitialView, true).get_city());
};
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.transferClickHandler = function(event) {
- org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_inputText());
+controllers_MyController.prototype.transferClickHandler = function(event) {
+ org_apache_flex_utils_Language.as(this.app.model, models_MyModel, true).set_labelText(org_apache_flex_utils_Language.as(this.app.initialView, MyInitialView, true).get_inputText());
};
/**
* @private
- * @param {org.apache.flex.events.Event} event
+ * @param {org_apache_flex_events_Event} event
*/
-controllers.MyController.prototype.comboBoxChangeHandler = function(event) {
- org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_comboBoxValue());
+controllers_MyController.prototype.comboBoxChangeHandler = function(event) {
+ org_apache_flex_utils_Language.as(this.app.model, models_MyModel, true).set_labelText(org_apache_flex_utils_Language.as(this.app.initialView, MyInitialView, true).get_comboBoxValue());
};
@@ -133,9 +133,9 @@ controllers.MyController.prototype.comboBoxChangeHandler = function(event) {
* @param {Object} document
* @param {string=} id
*/
-controllers.MyController.prototype.setDocument = function(document, id) {
+controllers_MyController.prototype.setDocument = function(document, id) {
id = typeof id !== 'undefined' ? id : null;
- this.app = org.apache.flex.utils.Language.as(document, FlexJSTest_again);
+ this.app = org_apache_flex_utils_Language.as(document, FlexJSTest_again);
this.app.addEventListener("viewChanged", goog.bind(this.viewChangeHandler, this));
};
@@ -145,5 +145,5 @@ controllers.MyController.prototype.setDocument = function(document, id) {
*
* @type {Object.<string, Array.<Object>>}
*/
-controllers.MyController.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyController', qName: 'controllers.MyController'}], interfaces: [org.apache.flex.core.IDocument] };
+controllers_MyController.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyController', qName: 'controllers_MyController'}], interfaces: [org_apache_flex_core_IDocument] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
index ac35168..4f73cf3 100644
--- a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
@@ -19,32 +19,32 @@
* @suppress {checkTypes}
*/
-goog.provide('models.MyModel');
+goog.provide('models_MyModel');
/**
* @constructor
- * @extends {org.apache.flex.events.EventDispatcher}
+ * @extends {org_apache_flex_events_EventDispatcher}
*/
-models.MyModel = function() {
- models.MyModel.base(this, 'constructor');
+models_MyModel = function() {
+ models_MyModel.base(this, 'constructor');
};
-goog.inherits(models.MyModel, org.apache.flex.events.EventDispatcher);
+goog.inherits(models_MyModel, org_apache_flex_events_EventDispatcher);
/**
* @private
* @type {string}
*/
-models.MyModel.prototype._labelText;
+models_MyModel.prototype._labelText;
/**
* @expose
* @return {string}
*/
-models.MyModel.prototype.get_labelText = function() {
+models_MyModel.prototype.get_labelText = function() {
return this._labelText;
};
@@ -53,10 +53,10 @@ models.MyModel.prototype.get_labelText = function() {
* @expose
* @param {string} value
*/
-models.MyModel.prototype.set_labelText = function(value) {
+models_MyModel.prototype.set_labelText = function(value) {
if (value != this._labelText) {
this._labelText = value;
- this.dispatchEvent(new org.apache.flex.events.Event("labelTextChanged"));
+ this.dispatchEvent(new org_apache_flex_events_Event("labelTextChanged"));
}
};
@@ -65,14 +65,14 @@ models.MyModel.prototype.set_labelText = function(value) {
* @private
* @type {Array}
*/
-models.MyModel.prototype._strings = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
+models_MyModel.prototype._strings = ["AAPL", "ADBE", "GOOG", "MSFT", "YHOO"];
/**
* @expose
* @return {Array}
*/
-models.MyModel.prototype.get_strings = function() {
+models_MyModel.prototype.get_strings = function() {
return this._strings;
};
@@ -81,14 +81,14 @@ models.MyModel.prototype.get_strings = function() {
* @private
* @type {Array}
*/
-models.MyModel.prototype._cities = ["London", "Miami", "Paris", "Sydney", "Tokyo"];
+models_MyModel.prototype._cities = ["London", "Miami", "Paris", "Sydney", "Tokyo"];
/**
* @expose
* @return {Array}
*/
-models.MyModel.prototype.get_cities = function() {
+models_MyModel.prototype.get_cities = function() {
return this._cities;
};
@@ -98,5 +98,5 @@ models.MyModel.prototype.get_cities = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-models.MyModel.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyModel', qName: 'models.MyModel'}] };
+models_MyModel.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyModel', qName: 'models_MyModel'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js b/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
index 3370f1f..72981e3 100644
--- a/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
@@ -21,15 +21,15 @@
goog.provide('wildcard_import');
-goog.require('org.apache.flex.core.Application');
-goog.require('org.apache.flex.html.Button');
+goog.require('org_apache_flex_core_Application');
+goog.require('org_apache_flex_html_Button');
/**
* @constructor
- * @extends {org.apache.flex.core.Application}
+ * @extends {org_apache_flex_core_Application}
*/
wildcard_import = function() {
wildcard_import.base(this, 'constructor');
@@ -46,7 +46,7 @@ wildcard_import = function() {
*/
this.mxmldp;
};
-goog.inherits(wildcard_import, org.apache.flex.core.Application);
+goog.inherits(wildcard_import, org_apache_flex_core_Application);
/**
@@ -62,7 +62,7 @@ wildcard_import.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'wildcard_import
*/
wildcard_import.prototype.tmp = function() {
var /** @type {Button} */ myButton;
- myButton = new org.apache.flex.html.Button();
+ myButton = new org_apache_flex_html_Button();
};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
index d76ea8d..a740c06 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
@@ -21,35 +21,35 @@
goog.provide('Test');
-goog.require('classes.A');
-goog.require('interfaces.IA');
-goog.require('interfaces.IC');
-goog.require('interfaces.IE');
-goog.require('org.apache.flex.utils.Language');
+goog.require('classes_A');
+goog.require('interfaces_IA');
+goog.require('interfaces_IC');
+goog.require('interfaces_IE');
+goog.require('org_apache_flex_utils_Language');
/**
* @constructor
- * @extends {classes.A}
- * @implements {interfaces.IA}
- * @implements {interfaces.IE}
+ * @extends {classes_A}
+ * @implements {interfaces_IA}
+ * @implements {interfaces_IE}
*/
Test = function() {
Test.base(this, 'constructor');
- var /** @type {interfaces.IA} */ ia = org.apache.flex.utils.Language.as(this.doSomething(interfaces.IC), interfaces.IA);
+ var /** @type {interfaces_IA} */ ia = org_apache_flex_utils_Language.as(this.doSomething(interfaces_IC), interfaces_IA);
};
-goog.inherits(Test, classes.A);
+goog.inherits(Test, classes_A);
/**
* @expose
- * @param {interfaces.IC} ic
- * @return {interfaces.IC}
+ * @param {interfaces_IC} ic
+ * @return {interfaces_IC}
*/
Test.prototype.doSomething = function(ic) {
for (var /** @type {number} */ i = 0; i < 3; i++) {
- var /** @type {classes.A} */ a = null;
+ var /** @type {classes_A} */ a = null;
}
return ic;
};
@@ -60,4 +60,4 @@ Test.prototype.doSomething = function(ic) {
*
* @type {Object.<string, Array.<Object>>}
*/
-Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}], interfaces: [interfaces.IA, interfaces.IE] };
+Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}], interfaces: [interfaces_IA, interfaces_IE] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
index e2dd3f0..6d438ac 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
@@ -19,20 +19,20 @@
* @suppress {checkTypes}
*/
-goog.provide('classes.A');
+goog.provide('classes_A');
-goog.require('classes.C');
+goog.require('classes_C');
/**
* @constructor
- * @extends {classes.C}
+ * @extends {classes_C}
*/
-classes.A = function() {
- classes.A.base(this, 'constructor');
+classes_A = function() {
+ classes_A.base(this, 'constructor');
};
-goog.inherits(classes.A, classes.C);
+goog.inherits(classes_A, classes_C);
/**
@@ -40,4 +40,4 @@ goog.inherits(classes.A, classes.C);
*
* @type {Object.<string, Array.<Object>>}
*/
-classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A'}] };
+classes_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes_A'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
index 2fef89c..1ed92c6 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
@@ -19,14 +19,14 @@
* @suppress {checkTypes}
*/
-goog.provide('classes.B');
+goog.provide('classes_B');
/**
* @constructor
*/
-classes.B = function() {
+classes_B = function() {
};
@@ -35,4 +35,4 @@ classes.B = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B'}] };
+classes_B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes_B'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
index 729cda3..e41664d 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
@@ -19,14 +19,14 @@
* @suppress {checkTypes}
*/
-goog.provide('classes.C');
+goog.provide('classes_C');
/**
* @constructor
*/
-classes.C = function() {
+classes_C = function() {
};
@@ -35,4 +35,4 @@ classes.C = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C'}] };
+classes_C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes_C'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
index 2a00144..cbd3342 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
@@ -19,17 +19,17 @@
* @suppress {checkTypes}
*/
-goog.provide('interfaces.IA');
+goog.provide('interfaces_IA');
-goog.require('interfaces.IC');
+goog.require('interfaces_IC');
/**
* @interface
- * @extends {interfaces.IC}
+ * @extends {interfaces_IC}
*/
-interfaces.IA = function() {
+interfaces_IA = function() {
};
@@ -38,4 +38,4 @@ interfaces.IA = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA'}], interfaces: [interfaces.IC] };
+interfaces_IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces_IA'}], interfaces: [interfaces_IC] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
index d4933c8..343574a 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
@@ -19,14 +19,14 @@
* @suppress {checkTypes}
*/
-goog.provide('interfaces.IB');
+goog.provide('interfaces_IB');
/**
* @interface
*/
-interfaces.IB = function() {
+interfaces_IB = function() {
};
@@ -35,4 +35,4 @@ interfaces.IB = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB'}] };
+interfaces_IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces_IB'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
index 9e5298b..4c031ea 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
@@ -19,17 +19,17 @@
* @suppress {checkTypes}
*/
-goog.provide('interfaces.IC');
+goog.provide('interfaces_IC');
-goog.require('interfaces.ID');
+goog.require('interfaces_ID');
/**
* @interface
- * @extends {interfaces.ID}
+ * @extends {interfaces_ID}
*/
-interfaces.IC = function() {
+interfaces_IC = function() {
};
@@ -38,4 +38,4 @@ interfaces.IC = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC'}], interfaces: [interfaces.ID] };
+interfaces_IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces_IC'}], interfaces: [interfaces_ID] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
index a730bbb..8ad978b 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
@@ -19,14 +19,14 @@
* @suppress {checkTypes}
*/
-goog.provide('interfaces.ID');
+goog.provide('interfaces_ID');
/**
* @interface
*/
-interfaces.ID = function() {
+interfaces_ID = function() {
};
@@ -35,4 +35,4 @@ interfaces.ID = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-interfaces.ID.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ID', qName: 'interfaces.ID'}] };
+interfaces_ID.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ID', qName: 'interfaces_ID'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
index 63d68c7..19275b0 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
@@ -19,30 +19,30 @@
* @suppress {checkTypes}
*/
-goog.provide('interfaces.IE');
+goog.provide('interfaces_IE');
/**
* @interface
*/
-interfaces.IE = function() {
+interfaces_IE = function() {
};
-interfaces.IE.prototype.myMethod = function() {};
+interfaces_IE.prototype.myMethod = function() {};
/**
* @return {string}
*/
-interfaces.IE.prototype.get_myProp = function() {};
+interfaces_IE.prototype.get_myProp = function() {};
/**
* @param {string} value
*/
-interfaces.IE.prototype.set_myProp = function(value) {};
+interfaces_IE.prototype.set_myProp = function(value) {};
/**
@@ -50,4 +50,4 @@ interfaces.IE.prototype.set_myProp = function(value) {};
*
* @type {Object.<string, Array.<Object>>}
*/
-interfaces.IE.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IE', qName: 'interfaces.IE'}] };
+interfaces_IE.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IE', qName: 'interfaces_IE'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
index b89d15e..e482ccc 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
@@ -22,7 +22,7 @@
goog.provide('Base');
goog.require('Super');
-goog.require('org.apache.flex.utils.Language');
+goog.require('org_apache_flex_utils_Language');
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/files/call-super_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/files/call-super_result.js b/compiler.jx.tests/test-files/goog/files/call-super_result.js
index 93b52aa..6b751fb 100644
--- a/compiler.jx.tests/test-files/goog/files/call-super_result.js
+++ b/compiler.jx.tests/test-files/goog/files/call-super_result.js
@@ -38,4 +38,4 @@ org.apache.flex.A.prototype.hasSuperCall = function(a, b) {
org.apache.flex.A.base(this, 'hasSuperCall', a, b, 100);
var /** @type {string} */ result = myRegularFunctionCall(-1);
return result;
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/files/get-set_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/files/get-set_result.js b/compiler.jx.tests/test-files/goog/files/get-set_result.js
index 75637a6..5a422a1 100644
--- a/compiler.jx.tests/test-files/goog/files/get-set_result.js
+++ b/compiler.jx.tests/test-files/goog/files/get-set_result.js
@@ -46,4 +46,4 @@ Object.defineProperty(
var self = this;
self._a = value;
}, configurable:true}
-);
\ No newline at end of file
+);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/files/output.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/files/output.js b/compiler.jx.tests/test-files/goog/files/output.js
index bee3fbb..a2d00e5 100644
--- a/compiler.jx.tests/test-files/goog/files/output.js
+++ b/compiler.jx.tests/test-files/goog/files/output.js
@@ -44,4 +44,4 @@ org.apache.flex.A.prototype._a = new ArgumentError();
* @const
* @type {string}
*/
-org.apache.flex.A.prototype.MY_INSTANCE_CONST = "myInstanceConst";
\ No newline at end of file
+org.apache.flex.A.prototype.MY_INSTANCE_CONST = "myInstanceConst";
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/files/poc_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/files/poc_result.js b/compiler.jx.tests/test-files/goog/files/poc_result.js
index 8f8e4cb..3b983ef 100644
--- a/compiler.jx.tests/test-files/goog/files/poc_result.js
+++ b/compiler.jx.tests/test-files/goog/files/poc_result.js
@@ -136,4 +136,4 @@ Example.prototype.btn2clickHandler = function(event) {
Example.prototype.btn3clickHandler = function(event) {
var self = this;
self._btn3.x += 10;
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/files/qualify-new-object_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/files/qualify-new-object_result.js b/compiler.jx.tests/test-files/goog/files/qualify-new-object_result.js
index a5dc7d7..b5821e4 100644
--- a/compiler.jx.tests/test-files/goog/files/qualify-new-object_result.js
+++ b/compiler.jx.tests/test-files/goog/files/qualify-new-object_result.js
@@ -46,4 +46,4 @@ org.apache.flex.A.prototype.start = function() {
var /** @type {string} */ localVar = self._privateVar.label;
self.init();
doIt();
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/projects/imports/Case_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/projects/imports/Case_result.js b/compiler.jx.tests/test-files/goog/projects/imports/Case_result.js
index c1cd56e..2d090e9 100644
--- a/compiler.jx.tests/test-files/goog/projects/imports/Case_result.js
+++ b/compiler.jx.tests/test-files/goog/projects/imports/Case_result.js
@@ -21,4 +21,4 @@ goog.require('comps.A');
Case = function() {
var self = this;
var /** @type {comps.A} */ bar = new comps.A();
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/projects/imports/comps/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/projects/imports/comps/A_result.js b/compiler.jx.tests/test-files/goog/projects/imports/comps/A_result.js
index 971ce86..5d128a5 100644
--- a/compiler.jx.tests/test-files/goog/projects/imports/comps/A_result.js
+++ b/compiler.jx.tests/test-files/goog/projects/imports/comps/A_result.js
@@ -19,4 +19,4 @@ goog.provide('comps.A');
comps.A = function() {
var self = this;
var /** @type {comps.B} */ foo = new B();
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/goog/projects/imports/comps/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/goog/projects/imports/comps/B_result.js b/compiler.jx.tests/test-files/goog/projects/imports/comps/B_result.js
index 9382710..643887e 100644
--- a/compiler.jx.tests/test-files/goog/projects/imports/comps/B_result.js
+++ b/compiler.jx.tests/test-files/goog/projects/imports/comps/B_result.js
@@ -17,4 +17,4 @@ goog.provide('comps.B');
* @constructor
*/
comps.B = function() {
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js b/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js
index a063d87..8235246 100644
--- a/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js
+++ b/compiler.jx.tests/test-files/vf2js/files/SimpleAS_result.js
@@ -30,7 +30,7 @@ goog.provide('org.apache.flex.A');
*/
org.apache.flex.A = function() {
org.apache.flex.A.base(this, 'constructor');
- org.apache.flex.utils.Language.trace(typeof("a"));
+ org_apache_flex_utils_Language.trace(typeof("a"));
};
goog.inherits(org.apache.flex.A, vf2js_s.components.Button);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js b/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
index 2d3c7a5..522524e 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/interfaces/Test_result.js
@@ -25,7 +25,7 @@ goog.require('classes.A');
goog.require('interfaces.IA');
goog.require('interfaces.IC');
goog.require('interfaces.IE');
-goog.require('org.apache.flex.utils.Language');
+goog.require('org_apache_flex_utils_Language');
@@ -37,7 +37,7 @@ goog.require('org.apache.flex.utils.Language');
*/
Test = function() {
Test.base(this, 'constructor');
- var /** @type {interfaces.IA} */ ia = org.apache.flex.utils.Language.as(this.doSomething(interfaces.IC), interfaces.IA);
+ var /** @type {interfaces.IA} */ ia = org_apache_flex_utils_Language.as(this.doSomething(interfaces.IC), interfaces.IA);
};
goog.inherits(Test, classes.A);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/interfaces/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/interfaces/classes/A_result.js b/compiler.jx.tests/test-files/vf2js/projects/interfaces/classes/A_result.js
index 80208da..5c7fe66 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/interfaces/classes/A_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/interfaces/classes/A_result.js
@@ -39,7 +39,7 @@ goog.inherits(classes.A, classes.C);
* @expose
*/
classes.A.prototype.doStuff = function() {
- org.apache.flex.utils.Language.trace("STUFF!!!");
+ org_apache_flex_utils_Language.trace("STUFF!!!");
};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/sdk/SomeSDKClass_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/sdk/SomeSDKClass_result.js b/compiler.jx.tests/test-files/vf2js/projects/sdk/SomeSDKClass_result.js
index a622dc1..5ce8532 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/sdk/SomeSDKClass_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/sdk/SomeSDKClass_result.js
@@ -23,7 +23,7 @@ goog.provide('SomeSDKClass');
goog.require('mx.core.mx_internal');
goog.require('bases.HelperBaseClass');
-goog.require('org.apache.flex.utils.Language');
+goog.require('org_apache_flex_utils_Language');
@@ -111,4 +111,4 @@ Helper.prototype.url_;
*/
Helper.prototype.get_url = function() {
return this.url_;
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/sdk/bases/HelperBaseClass_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/sdk/bases/HelperBaseClass_result.js b/compiler.jx.tests/test-files/vf2js/projects/sdk/bases/HelperBaseClass_result.js
index 9d18b3d..e8a198a 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/sdk/bases/HelperBaseClass_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/sdk/bases/HelperBaseClass_result.js
@@ -43,4 +43,4 @@ bases.HelperBaseClass.prototype.doSomething = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-bases.HelperBaseClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'HelperBaseClass', qName: 'bases.HelperBaseClass'}] };
\ No newline at end of file
+bases.HelperBaseClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'HelperBaseClass', qName: 'bases.HelperBaseClass'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML_Project_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML_Project_result.js b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML_Project_result.js
index 9373345..e34f12d 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML_Project_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/SimpleMXML_Project_result.js
@@ -23,7 +23,7 @@ goog.provide('SimpleMXML_Project');
goog.require('spark.components.Application');
goog.require('example.Component');
-goog.require('org.apache.flex.utils.Language');
+goog.require('org_apache_flex_utils_Language');
@@ -65,4 +65,4 @@ SimpleMXML_Project.prototype.myComponent;
* @expose
*/
SimpleMXML_Project.prototype.start = function () {
-};
\ No newline at end of file
+};
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component_result.js b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component_result.js
index 23f3aa4..89b829f 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/simpleMXML/src/example/Component_result.js
@@ -42,4 +42,4 @@ example.Component.prototype.myProperty = {};
*
* @type {Object.<string, Array.<Object>>}
*/
-example.Component.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Component', qName: 'example.Component'}] };
\ No newline at end of file
+example.Component.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Component', qName: 'example.Component'}] };
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/743fe157/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js b/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
index db6e56d..72c0ab9 100644
--- a/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
+++ b/compiler.jx.tests/test-files/vf2js/projects/super/Base_result.js
@@ -22,7 +22,7 @@
goog.provide('Base');
goog.require('Super');
-goog.require('org.apache.flex.utils.Language');
+goog.require('org_apache_flex_utils_Language');
@@ -117,4 +117,4 @@ Base.prototype.doStuff = function() {
*
* @type {Object.<string, Array.<Object>>}
*/
-Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base'}] };
\ No newline at end of file
+Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base'}] };
[4/5] git commit: [flex-falcon] [refs/heads/develop] - tweak import
exclusion
Posted by ah...@apache.org.
tweak import exclusion
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/ab1376a3
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/ab1376a3
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/ab1376a3
Branch: refs/heads/develop
Commit: ab1376a3f93ee3d4b7ffb72f87404c3c7840f488
Parents: 92bace8
Author: Alex Harui <ah...@apache.org>
Authored: Wed Jan 28 07:56:10 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Jan 28 07:56:10 2015 -0800
----------------------------------------------------------------------
.../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ab1376a3/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 53f0cc2..71667b8 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -1739,12 +1739,12 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
for (String subDocumentName : subDocumentNames)
{
emitHeaderLine(subDocumentName, true);
- writtenInstances.add(subDocumentName);
+ writtenInstances.add(formatQualifiedName(subDocumentName));
}
writeNewline();
emitHeaderLine(bcname);
- writtenInstances.add(cname); // make sure we don't add ourselves
- writtenInstances.add(bcname); // make sure we don't add the baseclass twice
+ writtenInstances.add(formatQualifiedName(cname)); // make sure we don't add ourselves
+ writtenInstances.add(formatQualifiedName(bcname)); // make sure we don't add the baseclass twice
allInstances.addAll(0, instances);
for (MXMLDescriptorSpecifier instance : allInstances)
{
@@ -1794,10 +1794,11 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
if (NativeUtils.isNative(imp))
continue;
- if (writtenInstances.indexOf(imp) == -1)
+ String formatted = formatQualifiedName(imp);
+ if (writtenInstances.indexOf(formatted) == -1)
{
emitHeaderLine(imp);
- writtenInstances.add(imp);
+ writtenInstances.add(formatted);
}
}
}
[3/5] git commit: [flex-falcon] [refs/heads/develop] - fix the tests
that don't use exteral files
Posted by ah...@apache.org.
fix the tests that don't use exteral files
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/92bace80
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/92bace80
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/92bace80
Branch: refs/heads/develop
Commit: 92bace80cfefdf8bb72c983f5e5e01aeb3cca4c8
Parents: e0eca56
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 27 17:21:55 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 27 17:21:55 2015 -0800
----------------------------------------------------------------------
.../codegen/js/flexjs/TestFlexJSClass.java | 126 +++++++++++++++----
.../codegen/js/flexjs/TestFlexJSEmiter.java | 42 ++++++-
.../js/flexjs/TestFlexJSExpressions.java | 28 ++---
.../js/flexjs/TestFlexJSGlobalClasses.java | 2 +-
.../js/flexjs/TestFlexJSGlobalFunctions.java | 6 +-
.../codegen/js/flexjs/TestFlexJSPackage.java | 6 +-
.../codegen/js/vf2js/TestVF2JSExpressions.java | 6 +-
.../codegen/js/vf2js/TestVF2JSStatements.java | 2 +-
8 files changed, 164 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/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 fa9768a..fd121ea 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
@@ -37,7 +37,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A {public function A() { super(); }}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n ;\n};");
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n ;\n};");
}
@Override
@@ -46,7 +46,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends Button {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor');\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -55,7 +55,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends Button implements IEventDispatcher {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n * @implements {flash_events_IEventDispatcher}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor');\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -64,7 +64,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends Button implements IEventDispatcher, ILogger {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n * @implements {flash_events_IEventDispatcher}\n * @implements {mx_logging_ILogger}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor');\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -73,7 +73,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public final class A extends Button implements IEventDispatcher, ILogger {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n * @implements {flash_events_IEventDispatcher}\n * @implements {mx_logging_ILogger}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor');\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -82,7 +82,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends spark.components.Button implements flash.events.IEventDispatcher, mx.logging.ILogger {public function A() {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor');\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n * @implements {flash_events_IEventDispatcher}\n * @implements {mx_logging_ILogger}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor');\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -91,7 +91,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends spark.components.Button { public function A() { super('foo', 42);}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n */\norg.apache.flex.A = function() {\n org.apache.flex.A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n */\norg_apache_flex_A = function() {\n org_apache_flex_A.base(this, 'constructor', 'foo', 42);\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Test
@@ -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 * @expose\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.get_label();\n};";
+ 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.get_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 * @expose\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 * @expose\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 * @expose\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 * @expose\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\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/**\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};";
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\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/**\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};";
assertOut(expected);
}
@@ -172,7 +172,7 @@ public class TestFlexJSClass extends TestGoogClass
{
IClassNode node = getClassNode("public class A extends spark.components.Button {public function A(arg1:String, arg2:int) {}}");
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n org.apache.flex.A.base(this, 'constructor', arg1, arg2);\n};\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+ assertOut("/**\n * @constructor\n * @extends {spark_components_Button}\n * @param {string} arg1\n * @param {number} arg2\n */\norg_apache_flex_A = function(arg1, arg2) {\n org_apache_flex_A.base(this, 'constructor', arg1, arg2);\n};\ngoog.inherits(org_apache_flex_A, spark_components_Button);");
}
@Override
@@ -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 * @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;");
}
@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 * @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';");
}
@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\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/**\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};");
}
@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 * @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};");
}
@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 * @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};");
}
@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 * @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};");
}
@Test
@@ -275,9 +275,89 @@ 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 * @expose\n * @return {org_apache_flex_B}\n */\norg_apache_flex_B.prototype.clone = function() {\n return new org_apache_flex_B();\n};");
}
+ @Override
+ @Test
+ public void testSimple()
+ {
+ IClassNode node = getClassNode("public class A{}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+ @Override
+ @Test
+ public void testSimpleInternal()
+ {
+ // (erikdebruin) the AS compiler will enforce 'internal' namespace,
+ // in JS we ignore it
+ IClassNode node = getClassNode("internal class A{}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+ @Override
+ @Test
+ public void testSimpleFinal()
+ {
+ // (erikdebruin) the AS compiler will enforce the 'final' keyword,
+ // in JS we ignore it
+ IClassNode node = getClassNode("public final class A{}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+ @Override
+ @Test
+ public void testSimpleDynamic()
+ {
+ // (erikdebruin) all JS objects are 'dynamic' by design
+ IClassNode node = getClassNode("public dynamic class A{}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+ @Override
+ @Test
+ public void testSimpleImplements()
+ {
+ IClassNode node = getClassNode("public class A implements IEventDispatcher {public function A() {}}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n * @implements {flash_events_IEventDispatcher}\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+ @Override
+ @Test
+ public void testSimpleImplementsMultiple()
+ {
+ IClassNode node = getClassNode("public class A implements IEventDispatcher, ILogger {public function A() {}}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n * @implements {flash_events_IEventDispatcher}\n * @implements {mx_logging_ILogger}\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+
+ @Override
+ @Test
+ public void testConstructor()
+ {
+ IClassNode node = getClassNode("public class A {public function A() { }}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n */\norg_apache_flex_A = function() {\n};");
+ }
+
+
+ @Override
+ @Test
+ public void testConstructor_withArguments()
+ {
+ IClassNode node = getClassNode("public class A {public function A(arg1:String, arg2:int) {}}");
+ asBlockWalker.visitClass(node);
+ assertOut("/**\n * @constructor\n * @param {string} arg1\n * @param {number} arg2\n */\norg_apache_flex_A = function(arg1, arg2) {\n};");
+ }
+
+
protected IBackend createBackend()
{
return new FlexJSBackend();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/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 8cf66a7..fa8c339 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 * @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");
}
@Override
@@ -65,7 +65,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
+ "public interface TestInterface { } }";
IFileNode node = compileAS(code);
asBlockWalker.visitFile(node);
- assertOut("/**\n * com.example.components.TestInterface\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com.example.components.TestInterface');\n\n\n\n/**\n * @interface\n */\ncom.example.components.TestInterface = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com.example.components.TestInterface'}] };\n");
+ assertOut("/**\n * com.example.components.TestInterface\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com_example_components_TestInterface');\n\n\n\n/**\n * @interface\n */\ncom_example_components_TestInterface = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom_example_components_TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com_example_components_TestInterface'}] };\n");
}
@Override
@@ -76,7 +76,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
+ "public class TestClass { } }";
IFileNode node = compileAS(code);
asBlockWalker.visitFile(node);
- assertOut("/**\n * com.example.components.TestClass\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com.example.components.TestClass');\n\n\n\n/**\n * @constructor\n */\ncom.example.components.TestClass = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass'}] };\n");
+ assertOut("/**\n * com.example.components.TestClass\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('com_example_components_TestClass');\n\n\n\n/**\n * @constructor\n */\ncom_example_components_TestClass = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom_example_components_TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com_example_components_TestClass'}] };\n");
}
@Override
@@ -86,7 +86,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
IFunctionNode node = getMethodWithPackage("function method1(p1:int, p2:int, p3:int = 3, p4:int = 4):int{return p1 + p2 + p3 + p4;}");
asBlockWalker.visitFunction(node);
assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
- + "foo.bar.FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
+ " p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
+ " p4 = typeof p4 !== 'undefined' ? p4 : 4;\n"
+ " return p1 + p2 + p3 + p4;\n}");
@@ -99,7 +99,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
IFunctionNode node = getMethodWithPackage("function method1(bar:int = 42, bax:int = 4):void{if (a) foo();}");
asBlockWalker.visitFunction(node);
assertOut("/**\n * @param {number=} bar\n * @param {number=} bax\n */\n"
- + "foo.bar.FalconTest_A.prototype.method1 = function(bar, bax) {\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(bar, bax) {\n"
+ " bar = typeof bar !== 'undefined' ? bar : 42;\n"
+ " bax = typeof bax !== 'undefined' ? bax : 4;\n"
+ " if (a)\n foo();\n}");
@@ -112,12 +112,42 @@ public class TestFlexJSEmiter extends TestGoogEmiter
IFunctionNode node = getMethodWithPackage("function method1(p1:int, p2:int, p3:int = 3, p4:int = 4):int{}");
asBlockWalker.visitFunction(node);
assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
- + "foo.bar.FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
+ " p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
+ " p4 = typeof p4 !== 'undefined' ? p4 : 4;\n}");
}
@Override
+ @Test
+ public void testSimpleParameterReturnType()
+ {
+ IFunctionNode node = getMethodWithPackage("function method1(bar:int):int{\n}");
+ asBlockWalker.visitFunction(node);
+ assertOut("/**\n * @param {number} bar\n * @return {number}\n */\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(bar) {\n}");
+ }
+
+ @Override
+ @Test
+ public void testSimpleMultipleParameter()
+ {
+ IFunctionNode node = getMethodWithPackage("function method1(bar:int, baz:String, goo:Array):void{\n}");
+ asBlockWalker.visitFunction(node);
+ assertOut("/**\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(bar, baz, goo) {\n}");
+ }
+
+ @Override
+ @Test
+ public void testSimpleMultipleParameter_JSDoc()
+ {
+ IFunctionNode node = getMethodWithPackage("function method1(bar:int, baz:String, goo:Array):void{\n}");
+ asBlockWalker.visitFunction(node);
+ assertOut("/**\n * @param {number} bar\n * @param {string} baz\n * @param {Array} goo\n */\n"
+ + "foo_bar_FalconTest_A.prototype.method1 = function(bar, baz, goo) {\n}");
+ }
+
+ @Override
protected IBackend createBackend()
{
return new FlexJSBackend();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/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 ecfbb62..84ddd03 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
@@ -434,7 +434,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
node, IBinaryOperatorNode.class);
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("foo.bar.B.set_b(1)");
+ assertOut("foo_bar_B.set_b(1)");
}
@Test
@@ -446,7 +446,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
node, IBinaryOperatorNode.class);
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("foo.bar.B.set_b(1)");
+ assertOut("foo_bar_B.set_b(1)");
}
@Test
@@ -458,7 +458,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
node, IBinaryOperatorNode.class);
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("foo.bar.B.get_d().set_b(1)");
+ assertOut("foo_bar_B.get_d().set_b(1)");
}
@Test
@@ -482,7 +482,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
((JSFlexJSEmitter)asEmitter).thisClass = def;
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("foo.bar.B.get_d().set_b(1)");
+ assertOut("foo_bar_B.get_d().set_b(1)");
}
@Test
@@ -494,7 +494,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
IBinaryOperatorNode bnode = (IBinaryOperatorNode) findFirstDescendantOfType(
node, IBinaryOperatorNode.class);
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("foo.bar.B.set_b(foo.bar.B.get_b() + 1)");
+ assertOut("foo_bar_B.set_b(foo_bar_B.get_b() + 1)");
}
@Test
@@ -542,7 +542,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
((JSFlexJSEmitter)asEmitter).thisClass = def;
asBlockWalker.visitBinaryOperator(bnode);
- assertOut("org.apache.flex.utils.Language.as(this.model, foo.bar.E, true).set_labelText(null)");
+ assertOut("org_apache_flex_utils_Language.as(this.model, foo_bar_E, true).set_labelText(null)");
}
@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 * @expose\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 * @expose\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 * @expose\n * @return {number}\n */\nfoo_bar_B.prototype.b = function() {\n var /** @type {Vector.<string>} */ a;\n return a.length;\n}");
}
//----------------------------------
@@ -636,7 +636,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
{
IClassNode node = (IClassNode) getNode("import spark.components.Button; public class B implements Button { public function B() { Button(b).label = ''; } }", ClassNode.class, WRAP_LEVEL_PACKAGE);
asBlockWalker.visitClass(node);
- assertOut("/**\n * @constructor\n * @implements {spark.components.Button}\n */\nB = function() {\n org.apache.flex.utils.Language.as(b, spark.components.Button, true).set_label('');\n};");
+ assertOut("/**\n * @constructor\n * @implements {spark_components_Button}\n */\nB = function() {\n org_apache_flex_utils_Language.as(b, spark_components_Button, true).set_label('');\n};");
}
@Test
@@ -644,7 +644,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
{
IFunctionNode node = getMethod("function foo(){var foo:Object = FalconTest_A(bar).bar = '';}; public function get bar():Object { return this; };");
asBlockWalker.visitFunction(node);
- assertOut("FalconTest_A.prototype.foo = function() {\n var /** @type {Object} */ foo = org.apache.flex.utils.Language.as(this.get_bar(), FalconTest_A, true).set_bar('');\n}");
+ assertOut("FalconTest_A.prototype.foo = function() {\n var /** @type {Object} */ foo = org_apache_flex_utils_Language.as(this.get_bar(), FalconTest_A, true).set_bar('');\n}");
}
@Test
@@ -691,7 +691,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
{
IBinaryOperatorNode node = getBinaryNode("a as b");
asBlockWalker.visitBinaryOperator(node);
- assertOut("org.apache.flex.utils.Language.as(a, b)");
+ assertOut("org_apache_flex_utils_Language.as(a, b)");
}
@Test
@@ -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 * @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}");
}
@Override
@@ -710,7 +710,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
{
IBinaryOperatorNode node = getBinaryNode("a is b");
asBlockWalker.visitBinaryOperator(node);
- assertOut("org.apache.flex.utils.Language.is(a, b)");
+ assertOut("org_apache_flex_utils_Language.is(a, b)");
}
protected IBackend createBackend()
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
index 2b2176c..8641690 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
@@ -44,7 +44,7 @@ public class TestFlexJSGlobalClasses extends TestGoogGlobalClasses
{
IFunctionNode node = getMethod("function a():void { trace(arguments);}");
asBlockWalker.visitFunction(node);
- assertOut("FalconTest_A.prototype.a = function() {\n org.apache.flex.utils.Language.trace(arguments);\n}");
+ assertOut("FalconTest_A.prototype.a = function() {\n org_apache_flex_utils_Language.trace(arguments);\n}");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
index 298ef08..5ef7127 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
@@ -56,7 +56,7 @@ public class TestFlexJSGlobalFunctions extends TestGoogGlobalFunctions
{
IVariableNode node = getVariable("var a:int = int(1.8);");
asBlockWalker.visitVariable(node);
- assertOut("var /** @type {number} */ a = org.apache.flex.utils.Language._int(1.8)");
+ assertOut("var /** @type {number} */ a = org_apache_flex_utils_Language._int(1.8)");
}
@Override
@@ -66,7 +66,7 @@ public class TestFlexJSGlobalFunctions extends TestGoogGlobalFunctions
IFunctionCallNode node = (IFunctionCallNode) getNode(
"trace('Hello World');", IFunctionCallNode.class);
asBlockWalker.visitFunctionCall(node);
- assertOut("org.apache.flex.utils.Language.trace('Hello World')");
+ assertOut("org_apache_flex_utils_Language.trace('Hello World')");
}
@Override
@@ -75,7 +75,7 @@ public class TestFlexJSGlobalFunctions extends TestGoogGlobalFunctions
{
IVariableNode node = getVariable("var a:uint = uint(-100);");
asBlockWalker.visitVariable(node);
- assertOut("var /** @type {number} */ a = org.apache.flex.utils.Language.uint(-100)");
+ assertOut("var /** @type {number} */ a = org_apache_flex_utils_Language.uint(-100)");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
index 48759f6..ba4b71d 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
@@ -62,7 +62,7 @@ public class TestFlexJSPackage extends TestGoogPackage
{
IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
asBlockWalker.visitFile(node);
- assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+ assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo_bar_baz_A');\n\n\n\n/**\n * @constructor\n */\nfoo_bar_baz_A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo_bar_baz_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo_bar_baz_A'}] };\n");
}
@Override
@@ -71,7 +71,7 @@ public class TestFlexJSPackage extends TestGoogPackage
{
IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
asBlockWalker.visitFile(node);
- assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+ assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo_bar_baz_A');\n\n\n\n/**\n * @constructor\n */\nfoo_bar_baz_A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo_bar_baz_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo_bar_baz_A'}] };\n");
}
@Override
@@ -80,7 +80,7 @@ public class TestFlexJSPackage extends TestGoogPackage
{
IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
asBlockWalker.visitFile(node);
- assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n if (a) {\n for (var /** @type {Object} */ i in obj) {\n doit();\n }\n }\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+ assertOut("/**\n * foo.bar.baz.A\n *\n * @fileoverview\n *\n * @suppress {checkTypes}\n */\n\ngoog.provide('foo_bar_baz_A');\n\n\n\n/**\n * @constructor\n */\nfoo_bar_baz_A = function() {\n if (a) {\n for (var /** @type {Object} */ i in obj) {\n doit();\n }\n }\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo_bar_baz_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo_bar_baz_A'}] };\n");
}
@Override
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/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 e340fc7..1abf203 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
@@ -94,7 +94,7 @@ public class TestVF2JSExpressions extends TestGoogExpressions
{
IBinaryOperatorNode node = getBinaryNode("a as b");
asBlockWalker.visitBinaryOperator(node);
- assertOut("org.apache.flex.utils.Language.as(a, b)");
+ assertOut("org_apache_flex_utils_Language.as(a, b)");
}
@Test
@@ -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 * @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}");
}
@Override
@@ -113,7 +113,7 @@ public class TestVF2JSExpressions extends TestGoogExpressions
{
IBinaryOperatorNode node = getBinaryNode("a is b");
asBlockWalker.visitBinaryOperator(node);
- assertOut("org.apache.flex.utils.Language.is(a, b)");
+ assertOut("org_apache_flex_utils_Language.is(a, b)");
}
protected IBackend createBackend()
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/92bace80/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSStatements.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSStatements.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSStatements.java
index 431d01d..3385b47 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSStatements.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/vf2js/TestVF2JSStatements.java
@@ -346,7 +346,7 @@ public class TestVF2JSStatements extends TestGoogStatements
IIfNode node = (IIfNode) getNode(
"if (numChildren == 0) { if (!typeDescription.@dynamic) { trace(\"warning: no describeType entry for '\" + childName + \"' on non-dynamic type '\" + typeDescription.@name + \"'\"); } }", IIfNode.class);
asBlockWalker.visitIf(node);
- assertOut("if (numChildren == 0) {\n if (!this.typeDescription['E4XOperator']) {\n org.apache.flex.utils.Language.trace(\"warning: no describeType entry for '\" + childName + \"' on non-dynamic type '\" + this.typeDescription['E4XOperator'] + \"'\");\n }\n}");
+ assertOut("if (numChildren == 0) {\n if (!this.typeDescription['E4XOperator']) {\n org_apache_flex_utils_Language.trace(\"warning: no describeType entry for '\" + childName + \"' on non-dynamic type '\" + this.typeDescription['E4XOperator'] + \"'\");\n }\n}");
}
@Test