Package flex2.compiler.io

Examples of flex2.compiler.io.VirtualFile


            String name = entry.getKey();
            Source s = entry.getValue();

            for (Iterator j = s.getFileIncludes(); j.hasNext();)
            {
                VirtualFile f = (VirtualFile) j.next();
                if (!includeUpdated.contains(f.getNameForReporting()))
                {
                    ThreadLocalToolkit.getLogger().includedFileAffected(f.getNameForReporting());
                }
            }

            CompilationUnit compilationUnit = s.getCompilationUnit();
View Full Code Here


    private static int findResourceBundle(List<Source> sources, SourceList sourceList, SourcePathBase sourcePath, CompilerSwcContext swcContext,
                                          String[] locales, String namespaceURI, String localPart)
        throws CompilerException
    {
        Source s1, s2, s3;
        VirtualFile o1, o2, o3;
        ResourceFile rf1, rf2, rf3;

        s1 = (sourceList != null) ? sourceList.findSource(namespaceURI, localPart) : null;
        o1 = (s1 != null) ? s1.getBackingFile() : null;
View Full Code Here

            LinkedList tempExcludedPaths = new LinkedList();
            Iterator iterator = excludedPaths.iterator();
            while (iterator.hasNext())
            {
                String path = (String)iterator.next();
                VirtualFile file = getVirtualFile(path);
                tempExcludedPaths.add(file);
            }

            excludedPaths = tempExcludedPaths;
        }

    List<VirtualFile> list = new ArrayList<VirtualFile>(fileSetFromPaths(paths, true, mimeTypes, null, excludedPaths));
    for (int i = 0, len = list == null ? 0 : list.size(); i < len; i++)
    {
      VirtualFile f = list.get(i);
      array[(SourceList.calculatePathRoot(f, directories) == null) ? 0 : 1].add(f);
    }
    for (Iterator<VirtualFile> j = stylesheets.iterator(); j.hasNext(); )
    {
      VirtualFile f = j.next();
      array[(SourceList.calculatePathRoot(f, directories) == null) ? 0 : 1].add(f);
    }

        return array;
    }
View Full Code Here

      fileSet = new HashSet<VirtualFile>(paths.size());
    }
    for (Iterator<? extends Object> iter = paths.iterator(); iter.hasNext(); )
    {
      Object next = iter.next();
      VirtualFile file;
      if (next instanceof VirtualFile)
      {
        file = (VirtualFile) next;
      }
      else
      {
        String path = (next instanceof File) ? ((File)next).getAbsolutePath() : (String)next;

        file = getVirtualFile(path);

                if(excludedPaths != null && excludedPaths.contains(file)) {
                    excludedPaths.remove(file);
                    file = null;
                }
      }

      if (file != null)
      {
        if (recurse && file.isDirectory())
        {
          File dir = FileUtil.openFile(file.getName());
          if (dir == null)
          {
            throw new ConfigurationException.IOError(file.getName());
          }
                    fileSetFromPaths(Arrays.asList(dir.listFiles()), true, mimeTypes, fileSet, excludedPaths);
                }
                else if (topLevel || mimeTypes == null || mimeTypes.contains(file.getMimeType()))
                {
                    fileSet.add(file);
                }
            }
        }
View Full Code Here

    /**
     * Create virtual file for given file and throw configuration exception if not possible
     */
    public static VirtualFile getVirtualFile(String path, boolean reportError) throws ConfigurationException
    {
        VirtualFile result;
        File file = FileUtil.openFile(path);

        if (file != null && FileUtils.exists(file))
        {
            result = new LocalFile(FileUtil.getCanonicalFile(file));
View Full Code Here

            String message = i10n.getLocalizedTextString(new CircularLibraryDependencyException(null, null));
            throw new CircularLibraryDependencyException(message,
                            SwcDependencyUtil.SetOfVertexToString(cycles));
        }

        VirtualFile virtualLibrary = new LocalFile(targetLibrary);
        return info.getDependencies(virtualLibrary.getName());
    }
View Full Code Here

                // regenerate it to do a fresh compile.  This file is impacted if
                // either the locales or bundleNames have changed.
                I18nUtils.regenerateResourceModule((ApplicationCompilerConfiguration)localOEMConfiguration.configuration);
            }

            VirtualFile targetFile = (VirtualFile) files.get(files.size() - 1);

            WebTierAPI.checkSupportedTargetMimeType(targetFile);

            // create a FileSpec...
            data.fileSpec = new FileSpec(Collections.<VirtualFile>emptyList(), WebTierAPI.getFileSpecMimeTypes());
View Full Code Here

            Source cachedSource = applicationCache.getSource(className);

            if ((cachedSource != null) && !cachedSource.isUpdated())
            {
                CompilationUnit compilationUnit = source.getCompilationUnit();
                VirtualFile pathRoot = source.getPathRoot();
                CompilationUnit cachedCompilationUnit = cachedSource.getCompilationUnit();
                VirtualFile cachedSourcePathRoot = cachedSource.getPathRoot();

                if ((((pathRoot == null) && (cachedSourcePathRoot == null)) ||
                     ((pathRoot != null) && pathRoot.equals(cachedSource.getPathRoot()))) &&
                    (compilationUnit != null) && !compilationUnit.hasTypeInfo &&
                    (cachedCompilationUnit != null) && cachedCompilationUnit.hasTypeInfo)
View Full Code Here

                    compilers[i].initBenchmarks();
                }
            }

            ApplicationCompilerConfiguration config = (ApplicationCompilerConfiguration) data.configuration;
            VirtualFile projector = config.getProjector();

            if (benchmark != null)
            {
                benchmark.stopTime(Benchmark.PRECOMPILE, false);
            }

            if (projector != null && projector.getName().endsWith("avmplus.exe"))
            {
                units = CompilerAPI.compile(data.fileSpec, data.sourceList, null, data.sourcePath, data.resources, data.bundlePath,
                                                   swcContext, symbolTable, nameMappings, data.configuration, compilers,
                                                   null, licenseMap, sources);
            }
View Full Code Here

        try
        {
            OEMUtil.init(OEMUtil.getLogger(logger, messages), mimeMappings, meter, resolver, cc);

            ApplicationCompilerConfiguration appConfig = (ApplicationCompilerConfiguration) data.configuration;
            VirtualFile projector = appConfig.getProjector();
            PostLink postLink = null;

            if (config.optimize() && !config.debug())
            {
                postLink = new PostLink(config);
            }

            // link
            if (projector != null && projector.getName().endsWith("avmplus.exe"))
            {
                ConsoleApplication temp = data.app;
                data.app = LinkerAPI.linkConsole(data.units, postLink, config);
                size = encodeConsoleProjector(projector, out);
                if (hasChanged && temp != null)
View Full Code Here

TOP

Related Classes of flex2.compiler.io.VirtualFile

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.