Package flex2.compiler.mxml.lang

Examples of flex2.compiler.mxml.lang.StandardDefs


        }

        String resolvedSource = asset.assetSource.getName().replace('\\', '/');
        ThreadLocalToolkit.addResolvedPath(resolvedSource, asset.assetSource);

        StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();

        StringBuilder source = new StringBuilder( 1024 );
        source.append( "package " );
        source.append( packageName );
        source.append( "\n{\nimport " + standardDefs.getCorePackage() + ".MovieClipLoaderAsset;\n" );
        source.append( "import flash.utils.ByteArray;\n\n" );
        source.append( "public class " );
        source.append( className );
        source.append( " extends MovieClipLoaderAsset\n{\n" );
        source.append( "\tpublic function " );
View Full Code Here


            benchmarkHelper.startPhase(CompilerBenchmarkHelper.PARSE1, source.getNameForReporting());
        }

        //System.out.println("parse1: " + source.getNameForReporting());
        TranslationInfo[] translations = new TranslationInfo[locales == null ? 0 : locales.length];
        StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();
       
        for (int i = 0, len = translations.length; i < len; i++)
        {
            try
            {
View Full Code Here

     */
    private Source generateWatcherSetupUtil(CompilationUnit compilationUnit, DataBindingInfo dataBindingInfo)
    {
        Template template;

        StandardDefs standardDefs = compilationUnit.getStandardDefs();
        String templatePath = TEMPLATE_PATH + standardDefs.getWatcherSetupUtilTemplate();

        try
        {
            template = VelocityManager.getTemplate(templatePath);
        }
View Full Code Here

    // The class name of the resource module must match the file name
    // without the extension.
    String fileName = resourceModuleFile.getName();
    String className = fileName.substring(0, fileName.length() - 3);

    StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();

    // Generate the code.
    String lineSep = System.getProperty("line.separator");
    String[] codePieces = new String[]
    {
      "package ", lineSep,
      "{", lineSep,
      lineSep,
      "import flash.utils.getDefinitionByName", lineSep,
      "import ", standardDefs.getModulesPackage(), ".ModuleBase;", lineSep,
      "import ", standardDefs.getResourcesPackage(), ".IResourceModule;", lineSep,
      "import ", standardDefs.getResourcesPackage(), ".ResourceBundle;", lineSep,
      lineSep,
      "[ExcludeClass]", lineSep, lineSep,
      codegenResourceBundleMetadata(bundleNames), lineSep,
      "public class ", className, " extends ModuleBase", lineSep,
      "    implements IResourceModule", lineSep,
View Full Code Here

                //    ResourceContainer will not have anything if any of the theme files is touched.
                return styleSource;
            }
      }

      StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();
      String fontFaceRulesTemplate = TEMPLATE_PATH + standardDefs.getFontFaceRulesTemplate();
    Template template;

        try
    {
            template = VelocityManager.getTemplate(fontFaceRulesTemplate);
View Full Code Here

                                       String packageName, String className, String genFileName)
    {
      //  load template

      Template template;
        StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();
        String styleDefTemplate = TEMPLATE_PATH + standardDefs.getStyleDefTemplate();

        try
    {
            template = VelocityManager.getTemplate(styleDefTemplate);
        }
View Full Code Here

  /**
   *
   */
  private final VirtualFile generateImplementation(MxmlDocument doc)
  {
      StandardDefs standardDefs = doc.getStandardDefs();
      String classDefTemplate = CLASSDEF_TEMPLATE_PATH + standardDefs.getClassDefTemplate();
      String classDefLibTemplate = CLASSDEF_TEMPLATE_PATH + standardDefs.getClassDefLibTemplate();

    //  load template
    Template template = VelocityManager.getTemplate(classDefTemplate, classDefLibTemplate);
    if (template == null)
    {
View Full Code Here

        if (tag == null)
        {
            return null;
        }

        StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();

        String cls = null;
        String SKIN_SPRITE = standardDefs.getCorePackage() + ".SpriteAsset";

        if (tag instanceof DefineButton)
            cls = standardDefs.getCorePackage() + ".ButtonAsset";
        else if (tag instanceof DefineFont)
            cls = standardDefs.getCorePackage() + ".FontAsset";
        else if (tag instanceof DefineText)
            cls = standardDefs.getCorePackage() + ".TextFieldAsset";
        else if (tag instanceof DefineSound)
            cls = standardDefs.getCorePackage() + ".SoundAsset";
        else if (tag instanceof DefineBits)
            cls = standardDefs.getCorePackage() + ".BitmapAsset";
        else if (tag instanceof DefineSprite)
            cls = standardDefs.getCorePackage() + ".SpriteAsset";

        if (cls != null && (defineTag == null || defineTag.isAssignableFrom(tag.getClass())))
        {
            if (((tag instanceof DefineSprite) && ((DefineSprite)tag).framecount > 1) && (cls.equals( SKIN_SPRITE )))
            {
                cls = standardDefs.getCorePackage() + ".MovieClipAsset";
            }
            return cls;
        }

        if (defineTag == null)
View Full Code Here

            ThreadLocalToolkit.addResolvedPath(path, asset.assetSource);
      }

        try
        {
            StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();

            String templateName = standardDefs.getEmbedClassTemplate();
            Template template = VelocityManager.getTemplate(CODEGEN_TEMPLATE_PATH + templateName);
            if (template == null)
            {
                throw new TemplateException( templateName );
            }
View Full Code Here

        // of framework.swc, but this prevents customers from using
        // skin assets from framework.swc in their runtime CSS
        // modules.
      if (!configuration.archiveClassesAndAssets())
      {
          StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();
         
            configuration.addExtern(standardDefs.CLASS_CSSSTYLEDECLARATION);
            configuration.addExtern(standardDefs.CLASS_DOWNLOADPROGRESSBAR);
            configuration.addExtern(standardDefs.CLASS_FLEXEVENT);
            configuration.addExtern(standardDefs.CLASS_FLEXSPRITE);
View Full Code Here

TOP

Related Classes of flex2.compiler.mxml.lang.StandardDefs

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.