Package flex2.compiler.config

Examples of flex2.compiler.config.ServicesDependenciesWrapper


        this.output = Configuration.getOutputPath(val, output);
  }

  public static ConfigurationInfo getOutputInfo()
  {
      return new ConfigurationInfo(1, "filename")
      {
          public boolean isRequired()
          {
              return false;
          }
View Full Code Here


              try
              {
                List l = cfgbuf.peekConfigurationVar(var);
                for (int j = 0, len = l == null ? 0 : l.size(); j < len; j++)
                {
                  ConfigurationValue val = (ConfigurationValue) l.get(j);
                  List valArgs = val.getArgs();
                  for (int k = 0, size = valArgs == null ? 0 : valArgs.size(); k < size; k++)
                  {
                    this.addComponent((String) valArgs.get(k));
                  }
                }
              }
              catch (ConfigurationException ex)
              {
              }
            }
            else if ("include-file".equals(var))
            {
              try
              {
                List l = cfgbuf.peekConfigurationVar(var);
                for (int j = 0, len = l == null ? 0 : l.size(); j < len; j++)
                {
                  ConfigurationValue val = (ConfigurationValue) l.get(j);
                  List valArgs = val.getArgs();
                  this.addArchiveFile((String) valArgs.get(0), new File((String) valArgs.get(1)));
                }
              }
              catch (ConfigurationException ex)
              {
              }
            }
            else if ("include-namespaces".equals(var))
            {
              try
              {
                List l = cfgbuf.peekConfigurationVar(var);
                for (int j = 0, len = l == null ? 0 : l.size(); j < len; j++)
                {
                  ConfigurationValue val = (ConfigurationValue) l.get(j);
                  List valArgs = val.getArgs();
                  for (int k = 0, size = valArgs == null ? 0 : valArgs.size(); k < size; k++)
                  {
                    try
                    {
                      this.addComponent(new URI((String) valArgs.get(k)));
                    }
                    catch (URISyntaxException ex)
                    {
                      ex.printStackTrace();
                    }
                  }
                }
              }
              catch (ConfigurationException ex)
              {
              }
            }
            else if ("include-resource-bundles".equals(var))
            {
              try
              {
                List l = cfgbuf.peekConfigurationVar(var);
                for (int j = 0, len = l == null ? 0 : l.size(); j < len; j++)
                {
                  ConfigurationValue val = (ConfigurationValue) l.get(j);
                  List valArgs = val.getArgs();
                  for (int k = 0, size = valArgs == null ? 0 : valArgs.size(); k < size; k++)
                  {
                    this.addResourceBundle((String) valArgs.get(k));
                  }
                }
              }
              catch (ConfigurationException ex)
              {
              }
            }
            else if ("include-sources".equals(var))
            {
              try
              {
                List l = cfgbuf.peekConfigurationVar(var);
                for (int j = 0, len = l == null ? 0 : l.size(); j < len; j++)
                {
                  ConfigurationValue val = (ConfigurationValue) l.get(j);
                  List valArgs = val.getArgs();
                  for (int k = 0, size = valArgs == null ? 0 : valArgs.size(); k < size; k++)
                  {
                    this.addComponent(new File((String) valArgs.get(k)));
                  }
                }
View Full Code Here

    public ServicesDependenciesWrapper getServicesDependencies()
    {
        if (servicesDependencies == null && servicesConfigFile != null)
        {
            String servicesPath = servicesConfigFile.getName();
            servicesDependencies = new ServicesDependenciesWrapper(servicesPath, null, getContextRoot());
        }

        return servicesDependencies;
    }
View Full Code Here

                                            SymbolTable symbolTable, SourceList sourceList, SourcePath sourcePath,
                                            ResourceContainer resources, CompilerSwcContext swcContext,
                                            Configuration configuration)
    {
        // The enterprise messaging config file may refer to some classes. We want to load them up-front.
        ServicesDependenciesWrapper services = configuration.getCompilerConfiguration().getServicesDependencies();
        if (services != null)
        {
            for (Iterator i = services.getChannelClasses().iterator(); i.hasNext();)
            {
                String clientType = (String) i.next();

                if (clientType != null)
                {
View Full Code Here

    public ServicesDependenciesWrapper getServicesDependencies()
    {
        if (servicesDependencies == null && servicesConfigFile != null)
        {
            String servicesPath = servicesConfigFile.getName();
            servicesDependencies = new ServicesDependenciesWrapper(servicesPath, null, getContextRoot());
        }

        return servicesDependencies;
    }
View Full Code Here

                                            SymbolTable symbolTable, SourceList sourceList, SourcePath sourcePath,
                                            ResourceContainer resources, CompilerSwcContext swcContext,
                                            Configuration configuration)
    {
        // The enterprise messaging config file may refer to some classes. We want to load them up-front.
        ServicesDependenciesWrapper services = configuration.getCompilerConfiguration().getServicesDependencies();
        if (services != null)
        {
            for (Iterator i = services.getChannelClasses().iterator(); i.hasNext();)
            {
                String clientType = (String) i.next();

                if (clientType != null)
                {
View Full Code Here

                                            SymbolTable symbolTable, SourceList sourceList, SourcePath sourcePath,
                                            ResourceContainer resources, CompilerSwcContext swcContext,
                                            Configuration configuration)
    {
        // The enterprise messaging config file may refer to some classes. We want to load them up-front.
        ServicesDependenciesWrapper services = configuration.getCompilerConfiguration().getServicesDependencies();
        if (services != null)
        {
            for (Iterator i = services.getChannelClasses().iterator(); i.hasNext();)
            {
                String clientType = (String) i.next();

                if (clientType != null)
                {
View Full Code Here

                                   Map<String, String> remoteClassAliases, Map<String, String> effectTriggers,
                                   Set<String> inheritingStyles, Configuration configuration)
    {
        StandardDefs standardDefs = ThreadLocalToolkit.getStandardDefs();
        CompilerConfiguration compilerConfig = configuration.getCompilerConfiguration();
        ServicesDependenciesWrapper servicesDependencies = compilerConfig.getServicesDependencies();

        StringBuilder sb = new StringBuilder();
        sb.append("package {\n");
        sb.append("import flash.display.DisplayObject;\n");
        sb.append("import flash.utils.*;\n");
        sb.append("import ").append(standardDefs.INTERFACE_IFLEXMODULEFACTORY_DOT).append(";\n");
        sb.append("import ").append(standardDefs.INTERFACE_ISTYLEMANAGER2_DOT).append(";\n");
        sb.append("import ").append(standardDefs.CLASS_REQUEST_DOT).append(";\n");
        sb.append("import ").append(standardDefs.CLASS_STYLEMANAGERIMPL_DOT).append(";\n");
        sb.append("import ").append(standardDefs.CLASS_SYSTEMMANAGERCHILDMANAGER_DOT).append(";\n");
        sb.append("import ").append(standardDefs.CLASS_TEXTFIELDFACTORY_DOT).append("; TextFieldFactory;\n");
        sb.append(codegenAccessibilityImports(accessibilityList));
        sb.append(codegenRemoteClassImports( remoteClassAliases ));
        sb.append(codegenEffectTriggerImports(effectTriggers, standardDefs));
        if (servicesDependencies != null)
            sb.append(servicesDependencies.getImports());
       
        sb.append(codegenResourceBundleMetadata(externalResourceBundleNames));
       
        sb.append("\n[Mixin]\n");
        sb.append("public class " + flexInitClassName + "\n");
        sb.append("{\n");
        sb.append("   public function " + flexInitClassName + "()\n");
        sb.append("   {\n");
        sb.append("       super();\n");
        sb.append("   }\n");
        sb.append("   public static function init(fbs:IFlexModuleFactory):void\n");
        sb.append("   {\n");
        sb.append("       new ChildManager(fbs);\n");

        sb.append("       var styleManager:IStyleManager2;\n");
        if ((configuration.getCompatibilityVersion() <= flex2.compiler.common.MxmlConfiguration.VERSION_3_0))
        {
            // For backwards compatibility use the top level style manager.
            sb.append("       styleManager = StyleManagerImpl.getInstance();\n");
            sb.append("       fbs.registerImplementation(\"mx.styles::IStyleManager2\", styleManager);\n");
        }
        else if (!configuration.getCompilerConfiguration().getIsolateStyles())
        {
            // If this module factory is not creating its own style factory, then use its parent if available.
            // Fall back to using the top level style manager.
            sb.append("       var request:mx.events.Request = new mx.events.Request(mx.events.Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);\n");
            sb.append("       DisplayObject(fbs).dispatchEvent(request);\n");
            sb.append("       var moduleFactory:IFlexModuleFactory = request.value as IFlexModuleFactory;\n");
            sb.append("       if (moduleFactory)\n");
            sb.append("           styleManager = IStyleManager2(moduleFactory.getImplementation(\"mx.styles::IStyleManager2\"));\n\n");
            sb.append("       if (!styleManager)\n");
            sb.append("           styleManager = StyleManagerImpl.getInstance();\n");
            sb.append("       fbs.registerImplementation(\"mx.styles::IStyleManager2\", styleManager);\n");
        }
        else
        {
            sb.append("       styleManager = new StyleManagerImpl(fbs);\n");
        }
       
        sb.append(codegenQualifiedTypeSelectors(configuration));
        sb.append(codegenEffectTriggerRegistration(effectTriggers));
        sb.append(codegenAccessibilityList(accessibilityList));
        sb.append(codegenRemoteClassAliases(remoteClassAliases, flexInitClassName, configuration));
        sb.append(codegenInheritingStyleRegistration(inheritingStyles));
        if (servicesDependencies != null)
            sb.append(servicesDependencies.getServerConfigXmlInit());
        sb.append("   }\n");
        if (servicesDependencies != null)
            sb.append(servicesDependencies.getReferences());

        sb.append("}  // FlexInit\n");
        sb.append("}  // package\n");

        return sb.toString();
View Full Code Here

    public ServicesDependenciesWrapper getServicesDependencies()
    {
        if (servicesDependencies == null && servicesConfigFile != null)
        {
            String servicesPath = servicesConfigFile.getName();
            servicesDependencies = new ServicesDependenciesWrapper(servicesPath, null, getContextRoot());
        }

        return servicesDependencies;
    }
View Full Code Here

        // it's not in the HashMap. let's locate it in the file system.
        File absolute = FileUtil.openFile(name);
        if (absolute != null && absolute.exists())
        {
            return new LocalFile(absolute);
        }
       
        File relative = FileUtil.openFile(fullName);
        if (relative != null && relative.exists())
        {
            return new LocalFile(relative);
        }
       
        return null;
    }
View Full Code Here

TOP

Related Classes of flex2.compiler.config.ServicesDependenciesWrapper

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.