2829303132333435363738
@Test public void testFile() { String fileName = "wildcard_import"; IMXMLFileNode node = compileMXML(fileName, true, "test-files/flexjs/files", false); mxmlBlockWalker.visitFile(node); //writeResultToFile(writer.toString(), fileName);
4344454647484950515253
@Test public void testFlexJSMainFile() { String fileName = "FlexJSTest_again"; IMXMLFileNode node = compileMXML(fileName, true, "test-files/flexjs/files", false); mxmlBlockWalker.visitFile(node); //writeResultToFile(writer.toString(), fileName);
5859606162636465666768
@Test public void testFlexJSInitialViewFile() { String fileName = "MyInitialView"; IMXMLFileNode node = compileMXML(fileName, true, "test-files/flexjs/files", false); mxmlBlockWalker.visitFile(node); //writeResultToFile(writer.toString(), fileName);
3031323334353637383940
{ String code = "" + "<s:Application xmlns:s=\"library://ns.adobe.com/flex/spark\">" + "</s:Application>"; IMXMLFileNode node = compileMXML(code); mxmlBlockWalker.visitFile(node); assertOut("<Application>\n\t\n</Application>"); }
4546474849505152535455
String code = "" + "<s:Application xmlns:s=\"library://ns.adobe.com/flex/spark\">" + " <s:Button id=\"myBtn\" label=\"Hello world\"></s:Button>" + "</s:Application>"; IMXMLFileNode node = compileMXML(code); mxmlBlockWalker.visitFile(node); assertOut("<Application>\n\t<Button id=\"myBtn\" label=\"Hello world\"></Button>\n</Application>"); }
6162636465666768697071
+ "<s:Application xmlns:s=\"library://ns.adobe.com/flex/spark\">" + " <s:Label id=\"myLbl\" text=\"Bye bye\"></s:Label>" + " <s:Button id=\"myBtn\" label=\"Hello world\"></s:Button>" + "</s:Application>"; IMXMLFileNode node = compileMXML(code); mxmlBlockWalker.visitFile(node); assertOut("<Application>\n\t<Label id=\"myLbl\" text=\"Bye bye\"></Label>\n\t<Button id=\"myBtn\" label=\"Hello world\"></Button>\n</Application>"); }
7778798081828384858687
+ "<s:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\" xmlns:s=\"library://ns.adobe.com/flex/spark\">" + " <fx:Script><![CDATA[" + " private const GREETING:String = \"Hello world!\"" + " ]]></fx:Script>" + "</s:Application>"; IMXMLFileNode node = compileMXML(code); mxmlBlockWalker.visitFile(node); assertOut("<Application>\n\t<script><![CDATA[\n\t\tprivate const GREETING:String = \"Hello world!\";\n\t]]></script>\n</Application>"); }
979899100101102103104105106107
+ " minWidth=\"955\" minHeight=\"600\">" + " <fx:Declarations>" + " <!-- Place non-visual elements (e.g., services, value objects) here -->" + " </fx:Declarations>" + "</s:Application>"; IMXMLFileNode node = compileMXML(code); mxmlBlockWalker.visitFile(node); assertOut("<Application minHeight=\"600\" minWidth=\"955\">\n\t\n</Application>"); }
102103104105106107108109110
if (wrapLevel >= WRAP_LEVEL_DOCUMENT) code = "" + "<basic:Application xmlns:basic=\"library://ns.apache.org/flexjs/basic\">" + code + "</basic:Application>"; IMXMLFileNode node = compileMXML(code); return findFirstDescendantOfType(node, type); }
104105106107108109110111112113114
+ "<s:Application xmlns:fx=\"http://ns.adobe.com/mxml/2009\"" + " xmlns:s=\"library://ns.adobe.com/flex/spark\"" + " xmlns:mx=\"library://ns.adobe.com/flex/mx\">" + code + "</s:Application>"; IMXMLFileNode node = compileMXML(code); if (wrapLevel >= WRAP_LEVEL_NODE) // for now: attributes { IMXMLNode pnode = findFirstDescendantOfType(node, type);