Package flex2.compiler.swc

Examples of flex2.compiler.swc.SwcScript


                    {
                        Source dependent = symbolTable.findSourceByQName((QName) name);

                        if (dependent.isSwcScriptOwner())
                        {
                            SwcScript swcScript = (SwcScript) dependent.getOwner();
                            Swc swc = swcScript.getLibrary().getSwc();
                       
                            // Make sure each dependency's minimum
                            // supported version is less than or equal to
                            // the compatibility version.
                            if (compatibilityVersion < swc.getVersions().getMinimumVersion())
                            {
                                DependencyNotCompatible message =
                                    new DependencyNotCompatible(swcScript.getName().replace('/', '.'),
                                                                swc.getLocation(),
                                                                swc.getVersions().getMinimumVersionString(),
                                                                compilerConfiguration.getCompatibilityVersionString());
                                ThreadLocalToolkit.log(message, u.getSource());
                            }
View Full Code Here


            assert compilationUnit != null : "Must have missed a forcedToStop() check after the most recent batch()";
            Source source = compilationUnit.getSource();

            if (source.isSwcScriptOwner())
            {
                SwcScript swcScript = (SwcScript) source.getOwner();
                Swc swc = swcScript.getLibrary().getSwc();
                VirtualFile defaultsCssFile = null;

                if (versionDefaultsCssFileName != null)
                {
                    defaultsCssFile = swc.getFile(versionDefaultsCssFileName);
View Full Code Here

                // this later to figure out which RSLs to load.
                Source source = u.getSource();
               
                if (!source.isInternal() && source.isSwcScriptOwner())
                {
                    SwcScript script = (SwcScript)source.getOwner();
                    contributingSwcs.add(script.getSwcLocation());
                }
            }
        }

        String flexInitClass = null;
View Full Code Here

    public static String nameFromSource(Source source)
    {
      if (source.isSwcScriptOwner())
      {
        SwcScript script = (SwcScript) source.getOwner();
        return script.getName();
      }
      else if (source.getCompilationUnit() != null)
      {
          return source.getCompilationUnit().topLevelDefinitions.first().toString().replace(':', '/').replace('.', '/');
      }
View Full Code Here

            if (compilationUnit != null)
            {
                for (QName topLevelDefinition : compilationUnit.topLevelDefinitions)
                {
                    SwcScript swcScript = compilerSwcContext.getCachedScript(topLevelDefinition);

                    // Make sure the SwcScript's cached CompilationUnit isn't reused.
                    if (swcScript != null)
                    {
                        CompilationUnit swcScriptCompilationUnit = swcScript.getCompilationUnit();

                        if (swcScriptCompilationUnit != null)
                        {
                            // SwcContext's getSource() has the side effect of
                            // copying cached type information into a new
                            // Source object, so we need to clean that up too.
                            swcScriptCompilationUnit.getSource().removeCompilationUnit();
                            swcScript.setCompilationUnit(null);
                        }
                    }
                }
            }
View Full Code Here

    {
        Source s = def2source.get( namespaceURI, localPart );

        if (s == null)
        {
            SwcScript script = def2script.get( namespaceURI, localPart );

            if (script != null)
            {
                s = createSource(script);

                if (s != null)
                {
                    Iterator<String> iterator = script.getDefinitionIterator();

                    while (iterator.hasNext())
                    {
                        def2source.put(new QName(iterator.next()), s);
                    }

                    name2source.put(s.getName(), s);

                    CompilationUnit cachedCompilationUnit = script.getCompilationUnit();

                    if ((cachedCompilationUnit != null) && (s.isInternal() || cachedCompilationUnit.hasTypeInfo))
                    {
                        Source.copyCompilationUnit(cachedCompilationUnit, s.getCompilationUnit(), false);
                    }

                    if (cacheSwcCompilationUnits)
                    {
                        script.setCompilationUnit(s.getCompilationUnit());
                    }
                }
            }
        }
View Full Code Here

    {
        Map<SwcScript, String> obsoleted = swcGroup.getObsoleted();

        for (Map.Entry<SwcScript, String> entry : obsoleted.entrySet())
        {
            SwcScript swcScript = entry.getKey();
            CompilationUnit compilationUnit = swcScript.getCompilationUnit();
                   
            if (compilationUnit != null)
            {
                Source source = compilationUnit.getSource();
               
View Full Code Here

  // C: Only the Flex Compiler API (flex-compiler-oem.jar) uses this method.
  //    Do not use it in the mxmlc/compc codepath.
  public flex2.tools.oem.Script getScript(QName def, boolean includeBytecodes)
  {
    SwcScript s = def2script.get(def);
    return (s != null) ? s.toScript(includeBytecodes) : null;
  }
View Full Code Here

      components = new HashSet<SwcComponent>();
     
      for (Iterator<QName> i = getDefinitionIterator(); i.hasNext(); )
      {
        QName def = i.next();
        SwcScript script = def2script.get(def);
        SwcComponent c = script.getLibrary().getSwc().getComponent(def.toString());
        if (c != null)
        {
          components.add(c);
        }
      }
View Full Code Here

    if (def == null)
    {
      throw new NullPointerException("getCheckSum: def may not be null");
    }
   
    SwcScript script = def2script.get(def);
    if (script != null)
    {
      return script.getSignatureChecksum();
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of flex2.compiler.swc.SwcScript

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.