Package org.apache.flex.compiler.internal.embedding

Examples of org.apache.flex.compiler.internal.embedding.EmbedData


     * @param data The embedding data.
     * @return the canonical EmbedData
     */
    public EmbedData getCanonicalEmbedData(EmbedData data)
    {
        EmbedData cachedData = embedDataCache.get(data);
        if (cachedData != null)
            return cachedData;

        embedDataCache.put(data, data);

View Full Code Here


        workspace.embedLock.writeLock().lock();
        try
        {
            // there was a problem parsing the embed meta data, so just bomb out
            // rather than creating a compilation unit
            EmbedData data = getEmbedData(project, null, containingSourceFilename, location, attributes, problems);
            if (data == null)
                return null;

            // Check to see if there is an existing compilation unit in this project
            // which can be re-used.
View Full Code Here

     * @param problems Any problems with the attributes
     * @return an EmbedData
     */
    public static EmbedData getEmbedData(CompilerProject project, String specifiedQName, String containingSourceFilename, ISourceLocation location, IMetaTagAttribute[] attributes, Collection<ICompilerProblem> problems)
    {
        EmbedData data = new EmbedData(containingSourceFilename, specifiedQName);

        boolean hadError = false;
        for (IMetaTagAttribute attribute : attributes)
        {
            String key = attribute.getKey();
            String value = attribute.getValue();
            if (data.addAttribute(project, location, key, value, problems))
            {
                hadError = true;
            }
        }

        if (hadError || !data.createTranscoder(project, location, problems))
            return null;

        // get the canonical EmbedData, as there may already be an equivalent
        // embed data sitting in the workspace
        return project.getWorkspace().getCanonicalEmbedData(data);
View Full Code Here

    {
        ICompilerProject project = classScope.getProject();
        if (!(project instanceof CompilerProject))
            return;

        EmbedData embedData = classDefinition.getEmbeddedAsset((CompilerProject)project, classScope.getProblems());
        if (embedData != null)
            classScope.getGlobalScope().getEmbeds().add(embedData);
    }
View Full Code Here

            return Collections.emptySet();

        Set<String> filenames = new HashSet<String>();
        for (ICompilationUnit cu : embedCompilationUnits)
        {
            EmbedData data = ((EmbedCompilationUnit)cu).getEmbedData();
            String sourcePath = (String)data.getAttribute(EmbedAttribute.SOURCE);

            // the source attribute can be null or empty if the file doesn't exist
            // or wasn't specified.
            if (sourcePath != null && !sourcePath.isEmpty())
                filenames.add(sourcePath);
View Full Code Here

        workspace.removeCompilationUnit(unit);
        unit.clearProject();

        if (unit instanceof EmbedCompilationUnit)
        {
            EmbedData embedData = ((EmbedCompilationUnit)unit).getEmbedData();
            embedCompilationUnits.remove(embedData);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.embedding.EmbedData

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.