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

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


                // a reference to a package.  For example 'a.b.c.Foo' where a.b.c is a known package name.
                // This needs to generate a QName with a.b.c as the qualifier.
                if (baseIsPackage())
                {
                    String packageName = baseExpr.computeSimpleReference();
                    Workspace workspace = (Workspace)project.getWorkspace();
                    INamespaceReference qualifier = workspace.getPackageNamespaceDefinitionCache().get(packageName, false);

                    return new Name(isAttributeIdentifier() ? CONSTANT_QnameA : CONSTANT_Qname,
                            new Nsset(qualifier.resolveAETNamespace(project)), getName());
                }
View Full Code Here


        // of improperly written code,
        if (name == "")
            return null;
       
        INamespaceReference nsRef = null;
        Workspace w = (Workspace)getWorkspace();

        switch (getRefType())
        {
            case PACKAGE_QUALIFIED:
            {
                // Create a reference with the package name as the qualifier
                //    a.b.ns1
                // where a.b is a package name
                ExpressionNodeBase baseExpr = getBaseExpression();
                nsRef = NamespaceDefinition.createNamespaceReference(
                     getASScope(), getName(),
                     w.getPackageNamespaceDefinitionCache().get(baseExpr.computeSimpleReference(), false));
                break;
            }
            case LEXICAL:
            {
                // no qualifer, just a lexical ref
View Full Code Here

    private IJSPublisher jsPublisher;

    protected MXMLJSC(IBackend backend)
    {
        JSSharedData.backend = backend;
        workspace = new Workspace();
        project = new FlexJSProject(workspace);
        problems = new ProblemQuery();
        JSSharedData.OUTPUT_EXTENSION = backend.getOutputExtension();
        JSSharedData.workspace = workspace;
        asFileHandler = backend.getSourceFileHandlerInstance();
View Full Code Here

     * {@link IASNode}'s for the contents of the package.
     */
    public PackageScope(ASScope containingScope, String packageName, ScopedBlockNode contentsNode)
    {
        super(containingScope, contentsNode);
        Workspace workspace = (Workspace)containingScope.getWorkspace();
        PackageNamespaceDefinitionCache packageNSCache = workspace.getPackageNamespaceDefinitionCache();
        internalNamespaceReference = packageNSCache.get(packageName, true);
        publicNamespaceReference = packageNSCache.get(packageName, false);

        if( containingScope instanceof ASFileScope )
        {
View Full Code Here

        return result;
    }

    public Optimizer()
    {
        workspace = new Workspace();
        project = new FlexProject(workspace);
        problems = new ProblemQuery();
    }
View Full Code Here

     */
    public Set<INamespaceDefinition> getExplicitImportQualifiers(CompilerProject project, String name)
    {
        Set<INamespaceDefinition> nsSet = new LinkedHashSet<INamespaceDefinition>();

        Workspace workspace = project.getWorkspace();

        getContainingScopeExplicitImports(project, name, nsSet);

        if (importedNames != null)
        {
            // Was it an import in this scope
            Set<String> packages = importedNames.get(name);
            if (packages != null)
            {
                for (String s : packages)
                {
                    nsSet.add(workspace.getPackageNamespaceDefinitionCache().get(s, false));
                }
            }
        }
        return nsSet.size() > 0 ? nsSet : Collections.<INamespaceDefinition> emptySet();
    }
View Full Code Here

     */
    private int main()
    {
        int exitStatus = EXIT_CODE_SUCCESS;

        final Workspace workspace = new Workspace();
        try
        {
            // source AS3 files
            final boolean success = compileSourceFiles(workspace, getSourceFilenames());
            if (!success)
                exitStatus = EXIT_CODE_ERROR;
        }
        catch (Exception e)
        {
            err.println(e.getMessage());
            e.printStackTrace();
            exitStatus = EXIT_CODE_ERROR;
        }
        finally
        {
            workspace.close();
        }

        return exitStatus;
    }
View Full Code Here

        return swcDepends.mainNoExit(args);
    }

    public SWCDepends()
    {
        workspace = new Workspace();
        project = new FlexProject(workspace);
        problems = new ProblemQuery();
    }
View Full Code Here

    /**
     * Create a new FlexProject with a new Workspace
     */
    public static IFlexProject createSimpleFlexProject()
    {
        return new FlexProject( new Workspace());
    }
View Full Code Here

        return exitCode;
    }

    public MXMLC()
    {
        workspace = new Workspace();
        project = new FlexProject(workspace);
        problems = new ProblemQuery();
    }
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.