Package org.apache.flex.compiler.units

Examples of org.apache.flex.compiler.units.ICompilationUnit


    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(tempMXMLFile.getAbsolutePath());
    //String normalizedMainFileName = FilenameNormalization.normalize("code.mxml");
        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.
    IMXMLFileNode fileNode = null;
    try
    {
      fileNode = (IMXMLFileNode)cu.getSyntaxTreeRequest().get().getAST();
    }
    catch (InterruptedException e)
    {
      e.printStackTrace();
    }
View Full Code Here


                                .getQualifiedNames().get(0), outputFolder);

                        System.out
                                .println("Compiling file: " + outputClassFile);

                        ICompilationUnit unit = cu;

                        IASWriter writer;
                        if (cuType == ICompilationUnit.UnitType.AS_UNIT)
                        {
                            writer = JSSharedData.backend.createWriter(project,
View Full Code Here

                "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();
        }
View Full Code Here

                            getOutputClassFile(cu.getQualifiedNames().get(0),
                                outputFolder);

                        //for (ICompilationUnit unit : reachableCompilationUnits)
                        //{
                          ICompilationUnit unit = cu;
                            IASWriter jswriter = JSSharedData.backend
                                    .createWriter(project,
                                            (List<ICompilerProblem>) errors,
                                            unit, false);
View Full Code Here

        BuiltCompilationUnitSet builtCompilationUnits = getBuiltCompilationUnitSet();

        //        if (JSSharedData.OUTPUT_ISOLATED)
        //        {
        final ICompilationUnit rootCU = getRootClassCompilationUnit();
        compilationUnits.clear();
        compilationUnits.add(rootCU);

        // i added
        Iterables.addAll(problems, builtCompilationUnits.problems);
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.units.ICompilationUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.