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

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


        HashSet<ICompilationUnit> result = new HashSet<ICompilationUnit>();
        LinkedList<Edge> workList = new LinkedList<Edge>();
        for (ICompilationUnit unit : roots)
        {
            assert unit instanceof CompilationUnitBase;
            CompilationUnitBase compilationUnit = (CompilationUnitBase)unit;
            boolean alreadyVisited = !result.add(compilationUnit);
            if (!alreadyVisited)
                workList.addAll(compilationUnit.getProject().getDependencyGraph().getIncomingEdges(compilationUnit));
        }
        DependencyTypeSet recursiveInvalidationSet = DependencyTypeSet.of(DependencyType.INHERITANCE, DependencyType.SIGNATURE, DependencyType.NAMESPACE);
        HashSet<Edge> visitedEdges = new HashSet<Edge>();
        while (!workList.isEmpty())
        {
            Edge currentEdge = workList.pop();
            if (visitedEdges.add(currentEdge))
            {
                assert currentEdge.getFrom() instanceof CompilationUnitBase;
                CompilationUnitBase dependentUnit = (CompilationUnitBase)currentEdge.getFrom();
                result.add(dependentUnit);
                if (currentEdge.typeInSet(recursiveInvalidationSet))
                    workList.addAll(dependentUnit.getProject().getDependencyGraph().getIncomingEdges(dependentUnit));
            }
        }
        return result;
    }
View Full Code Here


    {
        QNameFile qNameFile = sourcePathManager.computeQNameForFilename(rootSourceFile);
        if (qNameFile == null)
            return null;

        CompilationUnitBase invisibleCUDelegate = createInvisibleCompilationUnit(qNameFile);
        if (invisibleCUDelegate == null)
            return null;

        return new InvisibleCompilationUnit(invisibleCUDelegate, fileSpecGetter);
    }
View Full Code Here

    @Override
    public IInvisibleCompilationUnit createInvisibleCompilationUnit(String rootSourceFile, IFileSpecificationGetter fileSpecGetter, String qName)
    {
        QNameFile qNameFile = new QNameFile(qName, new File(rootSourceFile), null, 0);
        CompilationUnitBase invisibleCUDelegate = createInvisibleCompilationUnit(qNameFile);
        if (invisibleCUDelegate == null)
            return null;

        return new InvisibleCompilationUnit(invisibleCUDelegate, fileSpecGetter);
    }
View Full Code Here

    {
        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!";
        addCompilationUnit(newCU);
        return newCU;
    }
View Full Code Here

TOP

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

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.