Package org.apache.flex.compiler.internal.workspaces

Examples of org.apache.flex.compiler.internal.workspaces.Workspace


                    new MXMLInvalidSourceAttributeProblem(sourceAttribute, resolvedSourcePath);
            addProblem(problem);
            return null;
        }

        Workspace workspace = getWorkspace();
        IFileSpecification sourceFileSpec =
                workspace.getFileSpecification(resolvedSourcePath);
        IMXMLDataManager mxmlDataManager = workspace.getMXMLDataManager();

        return mxmlDataManager.get(sourceFileSpec);
    }
View Full Code Here


                                           IMXMLTagAttributeData attribute)
    {
        setLocation(attribute);
        adjustOffsets(builder);

        Workspace workspace = builder.getWorkspace();
        Collection<ICompilerProblem> problems = builder.getProblems();

        // Fragmentize the attribute value, to deal with XML entities.
        ISourceFragment[] valueFragments = attribute.getValueFragments(problems);
        int n = valueFragments.length;
View Full Code Here

        clean();
    }

    private Name getMNameForQName(String qname)
    {
        Workspace workspace = getWorkspace();
        IResolvedQualifiersReference reference =
            ReferenceFactory.packageQualifiedReference(workspace, qname);
        return reference.getMName();
    }
View Full Code Here

     */
    public LibraryDependencyGraph createLibraryDependencyGraph(DependencyTypeSet dependencySet)
    {
        // Get the compilation units from the swcs.
        List<ISWC> swcs = getLibraries();
        Workspace w = getWorkspace();
        List<IRequest<IOutgoingDependenciesRequestResult, ICompilationUnit>> requests =
                new ArrayList<IRequest<IOutgoingDependenciesRequestResult, ICompilationUnit>>();
       
        // For each swc, get the compilation units. Request the semantic problems
        // for each compilation unit to cause the dependency graph to be built.
        Set<ICompilationUnit> swcUnits = new HashSet<ICompilationUnit>();
       
        for (ISWC swc : swcs)
        {
            String path = swc.getSWCFile().getAbsolutePath();
            Collection<ICompilationUnit> units = w.getCompilationUnits(path, this);
            swcUnits.addAll(units);
           
            for (ICompilationUnit unit : units)
                requests.add(unit.getOutgoingDependenciesRequest());
        }
View Full Code Here

     * @return a set of {@link ICompilationUnit}s that are included into the
     * build process by -include-classes compiler argument.
     */
    protected final Set<ICompilationUnit> getIncludesCompilationUnits() throws InterruptedException
    {
        Workspace workspace = project.getWorkspace();
        Set<IResolvedQualifiersReference> includesReferences = new HashSet<IResolvedQualifiersReference>();
        for (String className : targetSettings.getIncludes())
        {
            IResolvedQualifiersReference ref = ReferenceFactory.packageQualifiedReference(workspace, className);
            includesReferences.add(ref);
View Full Code Here

                targetSettings.getIncludeLibraries().toArray(new File[0]));
       
        // For each library, get a compilation unit for every class in the
        // library.
        ISWCManager swcManager = project.getWorkspace().getSWCManager();
        Workspace w = project.getWorkspace();

        for (FileID swcPath : swcs)
        {
            File swcFile =swcPath.getFile();
View Full Code Here

            if (unit instanceof IMXMLTextData)
            {
                final IMXMLTextData mxmlTextData = (IMXMLTextData)unit;
                if (mxmlTextData.getTextType() != TextType.WHITESPACE)
                {
                    final Workspace workspace = builder.getWorkspace();
                    final FlexProject project = builder.getProject();
                    final Collection<ICompilerProblem> problems = builder.getProblems();

                    final IncludeHandler includeHandler = new IncludeHandler(builder.getFileSpecificationGetter());
                    includeHandler.setProjectAndCompilationUnit(project, builder.getCompilationUnit());
View Full Code Here

            // Doing so makes this compilation unit dependent on that file.
            String sourcePath = resolveSourceAttributePath(builder, attribute, info);
            if (sourcePath != null)
            {
                FlexProject project = builder.getProject();
                Workspace workspace = builder.getWorkspace();
                Collection<ICompilerProblem> problems = builder.getProblems();
                IFileSpecification sourceFileSpec = workspace.getFileSpecification(sourcePath);
                String scriptText = builder.readExternalFile(attribute, sourcePath);

                if (scriptText != null)
                {
                    final IncludeHandler includeHandler = new IncludeHandler(builder.getFileSpecificationGetter());
View Full Code Here

     * @param problems Any problems with the attributes
     * @return an EmbedCompilationUnit
     */
    public static EmbedCompilationUnit getCompilationUnit(CompilerProject project, String containingSourceFilename, ISourceLocation location, IMetaTagAttribute[] attributes, Collection<ICompilerProblem> problems) throws InterruptedException
    {
        Workspace workspace = project.getWorkspace();
        workspace.embedLock.writeLock().lock();
        try
        {
            // there was a problem parsing the embed meta data, so just bomb out
            // rather than creating a compilation unit
View Full Code Here

            // and not a regular member acces (a.b.C means find C in package a.b, if a.b is a package)
            // convert the name to a fully qualified name, and look that up via findProperty
            ExpressionNodeBase base = getBaseExpression();

            String packageName = base.computeSimpleReference();
            Workspace workspace = (Workspace)project.getWorkspace();
            qualifier = workspace.getPackageNamespaceDefinitionCache().get(packageName, false);

            // Set this to false, so we'll fall through to the findProperty case
            // below, instead of trying to call resolveMemberRef
            isMemberRef = false;
        }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.workspaces.Workspace

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.