Package org.apache.flex.compiler.internal.units

Examples of org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory


        final String mainFileName = config.getTargetFile();

        final String normalizedMainFileName = FilenameNormalization
                .normalize(mainFileName);

        final SourceCompilationUnitFactory compilationUnitFactory = project
                .getSourceCompilationUnitFactory();

        File normalizedMainFile = new File(normalizedMainFileName);
        if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
        {
            project.addIncludeSourceFile(normalizedMainFile);

            final List<String> sourcePath = config.getCompilerSourcePath();
            String mainQName = null;
View Full Code Here


                project.addCompilationUnitsAndUpdateDefinitions(
                        Collections.singleton(mainCU));
            }
            else
            {
                final SourceCompilationUnitFactory compilationUnitFactory =
                    project.getSourceCompilationUnitFactory();
                File normalizedMainFile = new File(normalizedMainFileName);
                if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
                {
                    // Remove the main file from the source path and put it on the
                    // source list. The only reason this needs to be done is to
                    // prevent the compilation unit of the main file from shadowing
                    // another compilation unit with the same qname. This can
View Full Code Here

    public ASProject(Workspace workspace, boolean useAS3, IASDocBundleDelegate asDocBundleDelegate)
    {
        super(workspace, useAS3);
        sourcePathManager = new SourcePathManager(this);
        sourceListManager = new SourceListManager(this, sourcePathManager);
        sourceCompilationUnitFactory = new SourceCompilationUnitFactory(this);
        sourceCompilationUnitFactory.addHandler(ASSourceFileHandler.INSTANCE);
        sourceCompilationUnitFactory.addHandler(FXGSourceFileHandler.INSTANCE);
        libraryPathManager = new LibraryPathManager(this);
        projectDependencies = new HashMap<IASProject, String>();
        dependingProjects = new HashSet<IASProject>();
View Full Code Here

     * delegate for an {@link InvisibleCompilationUnit} or null if the specified
     * file name is not on the source path.
     */
    private CompilationUnitBase createInvisibleCompilationUnit(QNameFile qNameFile)
    {
        SourceCompilationUnitFactory compilationUnitFactory = getSourceCompilationUnitFactory();
        if (!compilationUnitFactory.canCreateCompilationUnit(qNameFile.file))
            return null;

        CompilationUnitBase newCU = (CompilationUnitBase)getSourceCompilationUnitFactory().createCompilationUnit(
                qNameFile.file, DefinitionPriority.BasePriority.SOURCE_PATH, 0, qNameFile.qName, qNameFile.locale);
        assert newCU != null : "canCreateCompilationUnit should have returned false if createCompilationUnit returns null!";
View Full Code Here

    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)
View Full Code Here

    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)
View Full Code Here

        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)
            {
View Full Code Here

        final String mainFileName = config.getTargetFile();

        final String normalizedMainFileName = FilenameNormalization
                .normalize(mainFileName);

        final SourceCompilationUnitFactory compilationUnitFactory = project
                .getSourceCompilationUnitFactory();

        File normalizedMainFile = new File(normalizedMainFileName);
        if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
        {
            // adds the source path to the sourceListManager
            project.addIncludeSourceFile(normalizedMainFile);

            // just using the basename is obviously wrong:
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory

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.