flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1451144 [2/2] - in /flex/falcon/trunk/compiler.jx.tests: src/org/apache/flex/compiler/internal/as/codegen/ src/org/apache/flex/compiler/internal/js/codegen/amd/ src/org/apache/flex/compiler/internal/js/codegen/goog/ src/org/apache/flex/com...
Date Thu, 28 Feb 2013 09:08:55 GMT
Copied: flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/TestBase.java
(from r1449611, flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java)
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/TestBase.java?p2=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/TestBase.java&p1=flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java&r1=1449611&r2=1451144&rev=1451144&view=diff
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/internal/as/codegen/TestBase.java
(original)
+++ flex/falcon/trunk/compiler.jx.tests/src/org/apache/flex/compiler/test/TestBase.java Thu
Feb 28 09:08:54 2013
@@ -1,6 +1,8 @@
-package org.apache.flex.compiler.internal.as.codegen;
+package org.apache.flex.compiler.test;
 
+import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
 
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
@@ -13,41 +15,51 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.flex.compiler.as.codegen.IASEmitter;
+import org.apache.flex.compiler.clients.IBackend;
+import org.apache.flex.compiler.internal.as.codegen.ASFilterWriter;
 import org.apache.flex.compiler.internal.projects.FlexProject;
 import org.apache.flex.compiler.internal.projects.FlexProjectConfigurator;
 import org.apache.flex.compiler.internal.tree.as.FunctionNode;
-import org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory;
 import org.apache.flex.compiler.internal.workspaces.Workspace;
 import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
-import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.tree.as.IASNode;
-import org.apache.flex.compiler.tree.as.IAccessorNode;
-import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
-import org.apache.flex.compiler.tree.as.IDynamicAccessNode;
-import org.apache.flex.compiler.tree.as.IExpressionNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
-import org.apache.flex.compiler.tree.as.IFunctionNode;
-import org.apache.flex.compiler.tree.as.IInterfaceNode;
-import org.apache.flex.compiler.tree.as.IUnaryOperatorNode;
-import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
 import org.apache.flex.compiler.units.ICompilationUnit;
 import org.apache.flex.compiler.utils.EnvProperties;
+import org.apache.flex.compiler.visitor.IASBlockVisitor;
 import org.apache.flex.utils.FilenameNormalization;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 
 @Ignore
-public class TestBase
+public class TestBase implements ITestBase
 {
     protected List<ICompilerProblem> errors;
 
-    private static EnvProperties env = EnvProperties.initiate();
+    protected static EnvProperties env = EnvProperties.initiate();
 
     protected static Workspace workspace = new Workspace();
-
     protected FlexProject project;
 
+    protected IASBlockVisitor visitor;
+    protected IBackend backend;
+    protected IASEmitter emitter;
+    protected ASFilterWriter writer;
+
+    protected String mCode;
+
+    protected File tempDir;
+
+    protected List<File> sourcePaths = new ArrayList<File>();
+    protected List<File> libraries = new ArrayList<File>();
+    protected List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
+
+    private boolean isMXML;
+
     @Before
     public void setUp()
     {
@@ -59,53 +71,130 @@ public class TestBase
 
         project = new FlexProject(workspace);
         FlexProjectConfigurator.configure(project);
+
+        backend = createBackend();
+        writer = backend.createWriterBuffer(project);
+        emitter = backend.createEmitter(writer);
+        visitor = backend.createWalker(project, errors, emitter);
+
+        sourcePaths = new ArrayList<File>();
+        libraries = new ArrayList<File>();
+        namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
+
+        tempDir = new File(FilenameNormalization.normalize("temp")); // ensure this exists
     }
 
-    protected IASNode findFirstDescendantOfType(IASNode node,
-            Class<? extends IASNode> nodeType)
+    @After
+    public void tearDown()
     {
-        int n = node.getChildCount();
-        for (int i = 0; i < n; i++)
+        backend = null;
+        writer = null;
+        emitter = null;
+        visitor = null;
+    }
+
+    protected IBackend createBackend()
+    {
+        return null;
+    }
+
+    protected void assertOut(String code)
+    {
+        mCode = writer.toString();
+        //System.out.println(mCode);
+        assertThat(mCode, is(code));
+    }
+
+    @Override
+    public String toString()
+    {
+        return writer.toString();
+    }
+
+    protected IFileNode compileAS(String input)
+    {
+        return compileAS(input, false, "");
+    }
+
+    protected IFileNode compileAS(String input, boolean isFileName,
+            String inputDir)
+    {
+        return compileAS(input, isFileName, inputDir, true);
+    }
+
+    protected IFileNode compileAS(String input, boolean isFileName,
+            String inputDir, boolean useTempFile)
+    {
+        isMXML = false;
+
+        return (IFileNode) compile(input, isFileName, inputDir, useTempFile);
+    }
+
+    protected IASNode compile(String input, boolean isFileName,
+            String inputDir, boolean useTempFile)
+    {
+        File tempFile = (useTempFile) ? writeCodeToTempFile(input, isFileName,
+                inputDir) : new File(FilenameNormalization.normalize(inputDir
+                + File.separator + input + ((isMXML) ? ".mxml" : ".as")));
+
+        addDependencies();
+
+        ICompilationUnit cu = null;
+
+        String normalizedMainFileName = FilenameNormalization
+                .normalize(tempFile.getAbsolutePath());
+
+        Collection<ICompilationUnit> mainFileCompilationUnits = workspace
+                .getCompilationUnits(normalizedMainFileName, project);
+        for (ICompilationUnit cu2 : mainFileCompilationUnits)
         {
-            IASNode child = node.getChild(i);
-            if (child instanceof FunctionNode)
-            {
-                ((FunctionNode) child).parseFunctionBody(errors);
-            }
-            if (nodeType.isInstance(child))
-                return child;
+            if (cu2 != null)
+                cu = cu2;
+        }
 
-            IASNode found = findFirstDescendantOfType(child, nodeType);
-            if (found != null)
-                return found;
+        IASNode fileNode = null;
+        try
+        {
+            fileNode = cu.getSyntaxTreeRequest().get().getAST();
+        }
+        catch (InterruptedException e)
+        {
+            e.printStackTrace();
         }
 
-        return null;
+        return fileNode;
     }
 
-    protected IFileNode getFileNode(String input)
+    protected IMXMLFileNode compileMXML(String input)
     {
-        return getFileNode(input, false);
+        return compileMXML(input, false, "");
     }
 
-    protected IFileNode getFileNode(String input, boolean isFileName)
+    protected IMXMLFileNode compileMXML(String input, boolean isFileName,
+            String inputDir)
     {
-        return getFileNode(input, isFileName, "");
+        return compileMXML(input, isFileName, inputDir, true);
     }
 
-    protected IFileNode getFileNode(String input, boolean isFileName,
-            String inputDir)
+    protected IMXMLFileNode compileMXML(String input, boolean isFileName,
+            String inputDir, boolean useTempFile)
     {
-        String tempDir = FilenameNormalization.normalize("temp"); // ensure this exists
+        isMXML = true;
+
+        return (IMXMLFileNode) compile(input, isFileName, inputDir, useTempFile);
+    }
 
+    protected File writeCodeToTempFile(String input, boolean isFileName,
+            String inputDir)
+    {
         File tempASFile = null;
         try
         {
             String tempFileName = (isFileName) ? input : getClass()
                     .getSimpleName();
 
-            tempASFile = File.createTempFile(tempFileName, ".as", new File(
-                    tempDir));
+            tempASFile = File.createTempFile(tempFileName, ((isMXML) ? ".mxml"
+                    : ".as"), tempDir);
             tempASFile.deleteOnExit();
 
             String code = "";
@@ -127,71 +216,34 @@ public class TestBase
             e1.printStackTrace();
         }
 
-        List<File> sourcePaths = new ArrayList<File>();
-        sourcePaths.add(new File(tempDir));
-        addSourcePaths(sourcePaths);
-        project.setSourcePath(sourcePaths);
+        return tempASFile;
+    }
 
-        // Compile the code against playerglobal.swc.
-        List<File> libraries = new ArrayList<File>();
-        libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
-                + "\\11.1\\playerglobal.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\framework.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\rpc.swc")));
-        libraries.add(new File(FilenameNormalization.normalize(env.SDK
-                + "\\frameworks\\libs\\spark.swc")));
+    private void addDependencies()
+    {
+        addSourcePaths();
+        addLibraries();
+        addNamespaceMappings();
 
-        addLibrary(libraries);
+        project.setSourcePath(sourcePaths);
         project.setLibraries(libraries);
-
-        // Use the MXML 2009 manifest.
-        List<IMXMLNamespaceMapping> namespaceMappings = new ArrayList<IMXMLNamespaceMapping>();
-        IMXMLNamespaceMapping mxml2009 = new MXMLNamespaceMapping(
-                "http://ns.adobe.com/mxml/2009", env.SDK
-                        + "\\frameworks\\mxml-2009-manifest.xml");
-        namespaceMappings.add(mxml2009);
         project.setNamespaceMappings(namespaceMappings);
-
-        ICompilationUnit cu = null;
-        String normalizedMainFileName = FilenameNormalization
-                .normalize(tempASFile.getAbsolutePath());
-
-        SourceCompilationUnitFactory compilationUnitFactory = project
-                .getSourceCompilationUnitFactory();
-        File normalizedMainFile = new File(normalizedMainFileName);
-        if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
-        {
-            Collection<ICompilationUnit> mainFileCompilationUnits = workspace
-                    .getCompilationUnits(normalizedMainFileName, project);
-            for (ICompilationUnit cu2 : mainFileCompilationUnits)
-            {
-                if (cu2 != null)
-                    cu = cu2;
-            }
-        }
-
-        // Build the AST.
-        IFileNode fileNode = null;
-        try
-        {
-            fileNode = (IFileNode) cu.getSyntaxTreeRequest().get().getAST();
-        }
-        catch (InterruptedException e)
-        {
-            e.printStackTrace();
-        }
-
-        return fileNode;
     }
 
-    protected void addSourcePaths(List<File> sourcePaths)
+    @Override
+    public void addLibraries()
     {
     }
 
-    protected void addLibrary(List<File> libraries)
+    @Override
+    public void addNamespaceMappings()
+    {
+    }
+    
+    @Override
+    public void addSourcePaths()
     {
+        sourcePaths.add(tempDir);
     }
 
     protected String getCodeFromFile(String fileName, boolean isJS,
@@ -201,7 +253,7 @@ public class TestBase
 
         File testFile = new File(testFileDir
                 + File.separator + sourceDir + File.separator + fileName
-                + (isJS ? ".js" : ".as"));
+                + (isJS ? ".js" : ((isMXML) ? ".mxml" : ".as")));
 
         String code = "";
         try
@@ -216,7 +268,7 @@ public class TestBase
                 code += line + "\n";
                 line = in.readLine();
             }
-            code = code.substring(0, code.length() - 1); // (erikdebruin) remove last line
break
+            code = code.substring(0, code.length() - 1);
 
             in.close();
         }
@@ -227,99 +279,26 @@ public class TestBase
         return code;
     }
 
-    //--------------------------------------------------------------------------
-    // Node "factory"
-    //--------------------------------------------------------------------------
-
-    private static final int WRAP_LEVEL_MEMBER = 3;
-    private static final int WRAP_LEVEL_CLASS = 2;
-    private static final int WRAP_LEVEL_PACKAGE = 1;
-
-    protected IASNode getNode(String code, Class<? extends IASNode> type)
-    {
-        return getNode(code, type, WRAP_LEVEL_MEMBER, false);
-    }
-
-    protected IASNode getNode(String code, Class<? extends IASNode> type,
-            int wrapLevel)
-    {
-        return getNode(code, type, wrapLevel, false);
-    }
-
-    protected IASNode getNode(String code, Class<? extends IASNode> type,
-            int wrapLevel, boolean includePackage)
-    {
-        if (wrapLevel == WRAP_LEVEL_MEMBER)
-            code = "function a():void {" + code + "}";
-
-        if (wrapLevel >= WRAP_LEVEL_CLASS)
-            code = "public class A {" + code + "}";
-
-        if (wrapLevel >= WRAP_LEVEL_PACKAGE)
-            code = "package"
-                    + ((includePackage) ? " foo.bar" : "") + " {" + code + "}";
-
-        IFileNode node = getFileNode(code);
-
-        if (type.isInstance(node))
-            return node;
-
-        return (IASNode) findFirstDescendantOfType(node, type);
-    }
-
-    protected IInterfaceNode getInterfaceNode(String code)
-    {
-        return (IInterfaceNode) getNode(code, IInterfaceNode.class,
-                WRAP_LEVEL_PACKAGE);
-    }
-
-    protected IAccessorNode getAccessor(String code)
-    {
-        return (IAccessorNode) getNode(code, IAccessorNode.class,
-                WRAP_LEVEL_CLASS);
-    }
-
-    protected IVariableNode getField(String code)
-    {
-        return (IVariableNode) getNode(code, IVariableNode.class,
-                WRAP_LEVEL_CLASS);
-    }
-
-    protected IFunctionNode getMethod(String code)
-    {
-        return (IFunctionNode) getNode(code, IFunctionNode.class,
-                WRAP_LEVEL_CLASS);
-    }
-
-    protected IFunctionNode getMethodWithPackage(String code)
-    {
-        return (IFunctionNode) getNode(code, IFunctionNode.class,
-                WRAP_LEVEL_CLASS, true);
-    }
-
-    protected IExpressionNode getExpressionNode(String code,
-            Class<? extends IASNode> type)
-    {
-        return (IExpressionNode) getNode(code, type);
-    }
-
-    protected IBinaryOperatorNode getBinaryNode(String code)
+    protected IASNode findFirstDescendantOfType(IASNode node,
+            Class<? extends IASNode> nodeType)
     {
-        return (IBinaryOperatorNode) getNode(code, IBinaryOperatorNode.class);
-    }
+        int n = node.getChildCount();
+        for (int i = 0; i < n; i++)
+        {
+            IASNode child = node.getChild(i);
+            if (child instanceof FunctionNode)
+            {
+                ((FunctionNode) child).parseFunctionBody(errors);
+            }
+            if (nodeType.isInstance(child))
+                return child;
 
-    protected IDynamicAccessNode getDynamicAccessNode(String code)
-    {
-        return (IDynamicAccessNode) getNode(code, IDynamicAccessNode.class);
-    }
+            IASNode found = findFirstDescendantOfType(child, nodeType);
+            if (found != null)
+                return found;
+        }
 
-    protected IUnaryOperatorNode getUnaryNode(String code)
-    {
-        return (IUnaryOperatorNode) getNode(code, IUnaryOperatorNode.class);
+        return null;
     }
 
-    protected IVariableNode getVariable(String code)
-    {
-        return (IVariableNode) getNode(code, IVariableNode.class);
-    }
 }

Added: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/libs/FlexJSUI.swc
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/libs/FlexJSUI.swc?rev=1451144&view=auto
==============================================================================
Binary file - no diff available.

Propchange: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/libs/FlexJSUI.swc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml
(added)
+++ flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml
Thu Feb 28 09:08:54 2013
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+				   xmlns:local="*"
+				   xmlns:basic="library://ns.apache.org/flexjs/basic" 
+				   xmlns:models="models.*" 
+				   xmlns:controllers="controllers.*"
+				   initialize="MyModel(model).labelText='Hello World'"
+				   >
+	<basic:valuesImpl>
+		<local:MySimpleValuesImpl />
+	</basic:valuesImpl>
+	<basic:initialView>
+		<local:MyInitialView />
+	</basic:initialView>
+	<basic:model>
+		<models:MyModel />
+	</basic:model>
+	<basic:controller>
+		<controllers:MyController />
+	</basic:controller>
+    <basic:beads>
+        <basic:HTTPService id="service">
+            <basic:LazyCollection id="collection">
+                <basic:inputParser>
+                    <basic:JSONInputParser />
+                </basic:inputParser>
+                <basic:itemConverter>
+                    <local:StockDataJSONItemConverter />
+                </basic:itemConverter> 
+            </basic:LazyCollection>
+        </basic:HTTPService>
+    </basic:beads>
+</basic:Application>
\ No newline at end of file

Propchange: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/FlexJSTest.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml
(added)
+++ flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml
Thu Feb 28 09:08:54 2013
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:basic="library://ns.apache.org/flexjs/basic" 
+			   >
+    <fx:Script>
+        <![CDATA[            
+            public function get symbol():String
+            {
+                return list.selectedItem as String;
+            }
+            
+            public function get inputText():String
+            {
+            	return input.text;
+            }
+        ]]>
+    </fx:Script>
+	<basic:Label id="lbl" x="100" y="25" >
+		<basic:beads>
+			<basic:SimpleBinding eventName="labelTextChanged"
+								 sourceID="applicationModel"
+								 sourcePropertyName="labelText"
+								 destinationPropertyName="text" />
+		</basic:beads>
+	</basic:Label>
+	<basic:TextButton text="OK" x="100" y="50" click="dispatchEvent(new Event('buttonClicked'))"
/>
+    <basic:List id="list" x="200" y="25" width="100" height="200" change="dispatchEvent(new
Event('listChanged'))">
+        <basic:beads>
+            <basic:ConstantBinding
+                                 sourceID="applicationModel"
+                                 sourcePropertyName="strings"
+                                 destinationPropertyName="dataProvider" />
+        </basic:beads>
+    </basic:List>
+    
+    
+    <basic:TextArea x="320" y="25" width="150" height="75">
+		<basic:beads>
+			<basic:SimpleBinding eventName="labelTextChanged"
+								 sourceID="applicationModel"
+								 sourcePropertyName="labelText"
+								 destinationPropertyName="text" />
+		</basic:beads>
+    </basic:TextArea>
+    <basic:TextInput id="input" x="320" y="110" />
+    <basic:TextButton text="Transfer" x="320" y="138" click="dispatchEvent(new Event('transferClicked'))"
/>
+    
+    <basic:CheckBox id="checkbox" x="320" y="170" text="Check Me" />
+    
+    
+</basic:ViewBase>

Propchange: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MyInitialView.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as
(added)
+++ flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as
Thu Feb 28 09:08:54 2013
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package 
+{
+	import flash.events.IEventDispatcher;
+	
+	import org.apache.flex.core.SimpleValuesImpl;
+	import org.apache.flex.html.staticControls.beads.CheckBoxBead;
+	import org.apache.flex.html.staticControls.beads.TextButtonBead;
+	import org.apache.flex.html.staticControls.beads.TextFieldBead;
+	import org.apache.flex.html.staticControls.beads.TextInputBead;
+	import org.apache.flex.html.staticControls.beads.TextInputWithBorderBead;
+	import org.apache.flex.html.staticControls.beads.models.ArraySelectionModel;
+    import org.apache.flex.html.staticControls.beads.models.TextModel;
+	import org.apache.flex.html.staticControls.beads.models.ToggleButtonModel;
+	
+	public class MySimpleValuesImpl extends SimpleValuesImpl
+	{
+		public function MySimpleValuesImpl()
+		{
+			values = { 
+                ISelectionModel: ArraySelectionModel,
+				ITextButtonBead: TextButtonBead,
+				ITextBead: TextFieldBead,
+				ITextModel: TextModel,
+				ITextInputBead: TextInputWithBorderBead,
+				IToggleButtonModel: ToggleButtonModel,
+				ICheckBoxBead:  CheckBoxBead				
+			}
+		}
+		
+		
+	}
+}
\ No newline at end of file

Propchange: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/MySimpleValuesImpl.as
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as?rev=1451144&view=auto
==============================================================================
--- flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as
(added)
+++ flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as
Thu Feb 28 09:08:54 2013
@@ -0,0 +1,18 @@
+package
+{
+    import org.apache.flex.net.JSONItemConverter;
+    
+    public class StockDataJSONItemConverter extends JSONItemConverter
+    {
+        public function StockDataJSONItemConverter()
+        {
+            super();
+        }
+        
+        override public function convertItem(data:String):Object
+        {
+            var obj:Object = super.convertItem(data);
+            return obj.query.results.quote.Ask;
+        }
+    }
+}
\ No newline at end of file

Propchange: flex/falcon/trunk/compiler.jx.tests/test-files/flexjs/projects/FlexJSTest/src/StockDataJSONItemConverter.as
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message