Package flex2.compiler.io

Examples of flex2.compiler.io.VirtualFile


    // 'load-externs' option
    //
   
    public void cfgLoadExterns( ConfigurationValue cfgval, String filename ) throws ConfigurationException
    {
        VirtualFile f = ConfigurationPathResolver.getVirtualFile( filename, configResolver, cfgval );

        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(false);

        try
        {
            SAXParser parser = factory.newSAXParser();
            parser.parse(f.getInputStream(),
                         new DefaultHandler()
                         {
                             public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
                             {
                                 if ("def".equals( qName ) || "pre".equals( qName ) || "ext".equals( qName ))
View Full Code Here


    }

    RslPathInfo info = new RslPathInfo();

    // validate the first argument, the swc or open directory, required.
    VirtualFile include = ConfigurationPathResolver.getVirtualFile(urls[0],
                                  configResolver,
                                  cfgval );
   
    info.setSwcPath(urls[0]);
    info.setSwcVf(include);
View Full Code Here

  private void addPathElementToListAsVirtualFile(String pathElement, ArrayList<VirtualFile> list, ConfigurationValue cv)
    throws ConfigurationException
  {
    try
    {
      VirtualFile vf = getVirtualFile(pathElement, cv);
      list.add(vf);
    }
    catch(ConfigurationException e)
    {
      if (cv == null)
View Full Code Here

  private void checkNewSourcePathElements(VirtualFile[] newPathElements, ConfigurationValue cv) throws ConfigurationException
  {
        for (int i = 0; i < newPathElements.length; i++)
    {
      VirtualFile pathElement = newPathElements[i];
      if (!pathElement.isDirectory())
      {
        if (cv == null)
        {
          throw new ConfigurationException.NotDirectory(
              pathElement.getName(), null, null, -1);
        }
        else
        {
          throw new ConfigurationException.NotDirectory(
              pathElement.getName(), cv.getVar(), cv.getSource(), cv.getLine());
        }
      }
    }
  }
View Full Code Here

        int i = 0;
        for (Iterator it = paths.iterator(); it.hasNext();)
        {
            String path = (String) it.next();
            addThemeName(path);
            VirtualFile theme = ConfigurationPathResolver.getVirtualFile( path,
                                                                          configResolver,
                                                                          cv );
            if (theme == null)
            {
                throw new ConfigurationException.ConfigurationIOError( path, cv.getVar(), cv.getSource(), cv.getLine() );
View Full Code Here

       
        // verify and add the paths given
        for (Iterator it = paths.iterator(); it.hasNext();)
        {
            final String path = (String) it.next();
            VirtualFile css = ConfigurationPathResolver.getVirtualFile(path,
                                                                       configResolver,
                                                                       cv);
            if (css == null)
            {
                throw new ConfigurationException.ConfigurationIOError(path,
View Full Code Here

            //  TODO ideally, we could just convert this in-place to a ClassNode for downstream processing
            //  Good example of why an explicit type descriptor enum is generally more useful than subclassing
            node.setClassQName(classQName);

            // Create a new Source for the node.
            VirtualFile virtualFile = new TextFile("", unit.getSource().getName() + "$" + className,
                                                   unit.getSource().getName(), unit.getSource().getParent(),
                                                   MimeMappings.MXML, unit.getSource().getLastModified());
            Source source = new Source(virtualFile, unit.getSource(), className, false, false);

            // Set the Source's syntax tree to the DocumentNode
View Full Code Here

            // TODO ideally, we could just convert this in-place to a ClassNode for downstream processing
            // Good example of why an explicit type descriptor enum is generally more useful than subclassing
            node.setName(classQName);

            // Create a new Source for the node.
            VirtualFile virtualFile = new TextFile("", unit.getSource().getName() + "$" + className,
                                                   unit.getSource().getName(), unit.getSource().getParent(),
                                                  MimeMappings.MXML, unit.getSource().getLastModified());
            Source source = new Source(virtualFile, unit.getSource(), className, false, false);

            // Set the Source's syntax tree to the DocumentNode
View Full Code Here

                String ns = entry.getKey();
                List<VirtualFile> files = entry.getValue();
                Iterator<VirtualFile> filesIterator = files.iterator();
                while (filesIterator.hasNext())
                {
                    VirtualFile file = filesIterator.next();
                    ManifestParser.parse(ns, file, mappings);
                }
            }
        }
        return mappings;
View Full Code Here

            }

            // collect the names of all the update file includes...
            for (Iterator j = source.getUpdatedFileIncludes(); j != null && j.hasNext();)
            {
                VirtualFile f = (VirtualFile) j.next();
                includeUpdated.add(f.getNameForReporting());
            }

            // register QName --> VirtualFile.getName()
            for (QName qName : u.topLevelDefinitions)
            {
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.