Package flex2.compiler.util

Examples of flex2.compiler.util.QName


                    ManagedClassInfo classInfo = getClassOfManagedMember(varNode);

                    if (classInfo != null)
                    {
                        setPropertyMode(context, metaDataNode, classInfo,
                            new QName(NodeMagic.getUserNamespace(varNode), NodeMagic.getVariableName(varNode)));
                    }
                    else
                    {
                        context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                    }
                }
                else if (metaDataNode.def instanceof FunctionDefinitionNode)
                {
                    FunctionDefinitionNode node = (FunctionDefinitionNode)metaDataNode.def;
                    ManagedClassInfo classInfo = getClassOfManagedMember(node);

                    if (classInfo != null)
                    {
                        setPropertyMode(context, metaDataNode, classInfo,
                            new QName(NodeMagic.getUserNamespace(node), NodeMagic.getFunctionName(node)));
                    }
                    else
                    {
                        context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                    }
                }
                else
                {
                    context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                }
            }
        }

        //  now prune manual mode properties
        if (managedClasses != null)
        {
             for (Iterator<ManagedClassInfo> iter = managedClasses.values().iterator(); iter.hasNext(); )
             {
                 ManagedClassInfo info = iter.next();
                 Map accessors = info.getAccessors();

                 if (accessors != null)
                 {
                     for (Iterator propIter = accessors.entrySet().iterator(); propIter.hasNext(); )
                     {
                         Map.Entry entry = (Map.Entry)propIter.next();
                         QName propQName = (QName)entry.getKey();
                         int mode = info.getPropertyMode(propQName);

                         if (mode == ManagedClassInfo.MODE_MANUAL)
                         {
                             propIter.remove();
View Full Code Here


                StylesContainer rootStylesContainer = u.getStylesContainer();

                // If the backgroundColor wasn't specified inline, go looking for it in CSS.
                if ((u.swfMetaData == null) || (u.swfMetaData.getValue("backgroundColor") == null))
                {
                    QName qName = u.topLevelDefinitions.last();
                   
                    if (qName != null)
                    {
                        String def = qName.toString();
                        lookupBackgroundColor(stylesContainer, rootStylesContainer, u.styleName,
                                              NameFormatter.toDot(def), symbolTable, configuration);
                    }
                }

                if (rootStylesContainer != null)
                {
                    // Swap in root's Logger, so warnings get associated correctly.
                    Logger originalLogger = ThreadLocalToolkit.getLogger();
                    ThreadLocalToolkit.setLogger(u.getSource().getLogger());
                    rootStylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(),
                                                 compilerConfiguration.getThemeNames(), null);
                    ThreadLocalToolkit.setLogger(originalLogger);
                }

                Source source = u.getSource();

                // Now that we're done validating the StyleContainer,
                // we can disconnect the root's logger.
                source.disconnectLogger();

                // Clear the root's path resolver, so the
                // CompilationUnit doesn't hold onto the global path
                // resolver, which has strong references to things
                // like the SourcePath, which we want freed up at the
                // end of a compilation.  All the other
                // CompilationUnit's have their PathResolver cleared
                // when they reach the ABC state.  We hold onto the
                // root's path resolver until now, because of the
                // styles
                source.setPathResolver(null);

                // C: we don't need the styles container anymore
                u.setStylesContainer(null);
            }
            else if (generatedLoaderClass && !u.getSource().isInternal() && !u.getSource().isSwcScriptOwner())
            {
                // Check if the source is a module or an application. If it is and we know it
                // is not the root then generate a warning.
                if (typeAnalyzer != null)
                {
                    for (QName qName : u.topLevelDefinitions)
                    {
                        ClassInfo info = typeAnalyzer.getClassInfo(qName.toString());
                        checkForModuleOrApplication(standardDefs, typeAnalyzer, info, qName, configuration);
                    }
                }
            }
           
View Full Code Here

                    configuration.setRootClassName(u.loaderClass);
                }

                // set the last top level definition as the main definition.  Setting the last one allows
                // for Embed classes at the top of the file
                QName qName = u.topLevelDefinitions.last();

                if (qName != null)
                {
                    String def = qName.toString();
                    configuration.setMainDefinition(def);
                    u.getContext().setAttribute("mainDefinition", def);

          // i.e. isApplication... need loader class for styles.
          // We also need styles for an AS file that subclasses Application or Module.
View Full Code Here

          for (Iterator iter = signatureChecksums.entrySet().iterator(); iter.hasNext();)
          {
            Map.Entry entry = (Map.Entry)iter.next();
           
            // lookup definition in swc context
                    QName qName = (QName) entry.getKey();
            Long dataSignatureChecksum = (Long)entry.getValue();
            Long swcSignatureChecksum = swcContext.getChecksum(qName);
                    if (swcSignatureChecksum == null && qName != null)
                    {
                        Source source = swcContext.getSource(qName.getNamespace(), qName.getLocalPart());
                        if (source != null)
                        {
                            swcSignatureChecksum = new Long(source.getLastModified());
                        }
                    }
View Full Code Here

    if (data.swcDefSignatureChecksums != null)
    {
      for (Iterator iter = unit.topLevelDefinitions.iterator(); iter.hasNext();)
        {
          QName qname = (QName) iter.next();
            data.swcDefSignatureChecksums.put(qname, signatureChecksum);
        }
    }
  }
View Full Code Here

                    if (additionalAsset.getSymbol() != null)
                    {
                        Source additionalSource = generateAdditionalSource(unit, additionalAsset);
                        if (additionalSource != null)
                        {
                            QName additionalQName = new QName(additionalAsset.getPackageName(), additionalAsset.getClassName());
                            additionalSources.put(additionalQName, additionalSource);
                        }
                    }
                }
                unit.addGeneratedSources(additionalSources);
View Full Code Here

          }
          else
          {
              if (verbose)
                System.out.println("new application");
              job = new AppJob(new Application(mainAppFile));
              apps.put(key, job);
          }
            job.app.setProgressMeter(progress);
             
            //compilations one at the time on the same project
View Full Code Here

  private static final long serialVersionUID = 1L;
 
  @Override
  public void init() throws ServletException {
    //make sure we have "application.home" set. it is set by an Application static block.
    new Application();
   
    log("MB STARTUP");
  }
View Full Code Here

                File tmpFile = File.createTempFile("mbcompiler", ".xml");
                BufferedWriter bw = new BufferedWriter(new FileWriter(tmpFile));
                bw.write(config);
                bw.close();
               
                Configuration conf = job.app.getDefaultConfiguration();
                conf.addConfiguration(tmpFile);
                job.app.setConfiguration(conf);
              }
             
              File outFile = new File(outPath);
              File outDir = new File(outFile.getParent());
View Full Code Here

    final ProgressHelper ph = new ProgressHelper();
   
    //we output 101 chars so we can track progress without sending actual data
    response.setContentLength(101);
   
    String log = CompileManager.inst().compile(xml, new ProgressMeter() {
     
      public void start() { }
     
      public void percentDone(int p) {
        ph.set(p);
View Full Code Here

TOP

Related Classes of flex2.compiler.util.QName

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.