Examples of FXGSymbolClass


Examples of org.apache.flex.compiler.fxg.flex.FXGSymbolClass

    @Override
    public FXGSymbolClass transcode(IFXGNode fxgNode, String packageName, String className, Map<ITag, ITag> extraTags, Collection<ICompilerProblem> problems)
    {
        this.problems = problems;
        this.extraTags = extraTags;
        graphicClass = new FXGSymbolClass();
        graphicClass.setPackageName(packageName);
        graphicClass.setClassName(className);
       
        GraphicNode node = (GraphicNode)fxgNode;
        DefineSpriteTag sprite = createDefineSpriteTag("Graphic");
View Full Code Here

Examples of org.apache.flex.compiler.fxg.flex.FXGSymbolClass

    {
        startProfile(Operation.GET_SEMANTIC_PROBLEMS);
       
        final Collection<ICompilerProblem> problems = new ArrayList<ICompilerProblem>();
        Map<ITag, ITag> extraTags = new HashMap<ITag, ITag>();
        FXGSymbolClass symbolClass = null;
        FileNode fileNode = null;
        ASProjectScope projectScope = getProject().getScope();
       
        try
        {
            FXGSyntaxTreeRequestResult syntaxTreeResult = (FXGSyntaxTreeRequestResult)getSyntaxTreeRequest().get();
            IFXGNode tree = syntaxTreeResult.getRootNode();

            FlexFXG2SWFTranscoder transcoder = new FlexFXG2SWFTranscoder(getProject());          
            transcoder.setResourceResolver(new FXGFileResolver(FilenameUtils.getFullPath(getRootFileSpecification().getPath())));         

            symbolClass = transcoder.transcode(tree,
                    Multiname.getPackageNameForQName(qname), Multiname.getBaseNameForQName(qname), extraTags, problems);

           
            //Add dependencies to the classes required by the FXG processed by this compilation unit
            for (ITypeDefinition definition : transcoder.getDependencies())
            {
                getProject().addDependency(this, projectScope.getCompilationUnitForDefinition(definition),
                        DependencyType.EXPRESSION, definition.getQualifiedName());
            }

            StringBuilder sb = new StringBuilder(symbolClass.getGeneratedSource());
            if (symbolClass.getAdditionalSymbolClasses() != null)
            {
                for (FXGSymbolClass symbol : symbolClass.getAdditionalSymbolClasses())
                {
                    sb.append(symbol.getGeneratedSource());
                }
            }
View Full Code Here

Examples of org.apache.flex.compiler.fxg.flex.FXGSymbolClass

        FXGOutgoingDependenciesResult semanticResults = (FXGOutgoingDependenciesResult) getOutgoingDependenciesRequest().get();
        IABCBytesRequestResult byteResult = getABCBytesRequest().get();
       
        startProfile(Operation.GET_SWF_TAGS);
       
        final FXGSymbolClass symbolClass = semanticResults.symbolClass;
        final Map<ITag, ITag> extraTags = semanticResults.extraTags;
        final Collection<ICompilerProblem> problems = new ArrayList<ICompilerProblem>();      
        final DoABCTag abcTag = new DoABCTag();
       
        try
        {  
            abcTag.setName(qname);
            abcTag.setABCData(byteResult.getABCBytes());
        }
        catch (Exception e)
        {
            ICompilerProblem problem = new InternalCompilerProblem2(getRootFileSpecification().getPath(), e, SUB_SYSTEM);
            problems.add(problem);
        }
        finally
        {
            stopProfile(Operation.GET_SWF_TAGS);
        }
       
        return new ISWFTagsRequestResult()
        {
            @Override
            public boolean addToFrame(SWFFrame frame)
            {  
                ICharacterTag symbolTag = symbolClass.getSymbol();
               
                List<ITag> symbolTags = TagSorter.sortFullGraph(Collections.singletonList((ITag)symbolTag));
               
                for (ITag tag : symbolTags)
                {
                    frame.addTag(tag);
                    if (extraTags.containsKey(tag))
                    {
                        frame.addTag(extraTags.get(tag));
                    }
                }
               
                if (symbolClass.getAdditionalSymbolClasses() != null )
                {
                    for (FXGSymbolClass symbol : symbolClass.getAdditionalSymbolClasses())
                    {
                        frame.defineSymbol(symbol.getSymbol(), symbol.getQualifiedClassName());
                    }
                }

                frame.addTag(abcTag);
                frame.defineSymbol(symbolClass.getSymbol(), qname);
               
                return true;
            }
           
            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.