Examples of parseFilename()


Examples of com.google.gxp.compiler.fs.FileSystem.parseFilename()

   * Runs compiler based on command line arguments. This method is invoked by
   * the JVM when this class is run from the command line.
   */
  public static void main(String[] args) throws IOException {
    FileSystem sysFs = SystemFileSystem.INSTANCE;
    FileRef cwd = sysFs.parseFilename(System.getProperty("user.dir"));
    int result = main(sysFs, System.err, cwd, args);
    System.exit(result);
  }

  /**
 
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

      throws Exception {
    // create in memory file
    String pkgDir = getPackage().replace('.', '/');
    InMemoryFileSystem schemaFs = new InMemoryFileSystem();
    String sourceName = "/" + pkgDir + "/" + name + ".xml";
    source = schemaFs.parseFilename(sourceName);

    // write GXP
    Writer writer = source.openWriter(Charsets.US_ASCII);
    writer.write(contents);
    writer.close();
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

    assertEquals(Severity.ERROR, alertPolicy.getSeverity(I18N_ALERT));
  }

  public void testParameterFile() throws Exception {
    InMemoryFileSystem inMemory = new InMemoryFileSystem();
    FileRef parameterFile = inMemory.parseFilename("/here/params");
    Writer out = parameterFile.openWriter();
    out.write("--help");
    out.close();
    GxpcFlags flags = new GxpcFlags(inMemory, inMemory.parseFilename("/here"), "@params");
    assertTrue(flags.showHelp());
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

    InMemoryFileSystem inMemory = new InMemoryFileSystem();
    FileRef parameterFile = inMemory.parseFilename("/here/params");
    Writer out = parameterFile.openWriter();
    out.write("--help");
    out.close();
    GxpcFlags flags = new GxpcFlags(inMemory, inMemory.parseFilename("/here"), "@params");
    assertTrue(flags.showHelp());
  }

  public void testParameterFileIsUtf8() throws Exception {
    InMemoryFileSystem inMemory = new InMemoryFileSystem();
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

    assertTrue(flags.showHelp());
  }

  public void testParameterFileIsUtf8() throws Exception {
    InMemoryFileSystem inMemory = new InMemoryFileSystem();
    FileRef parameterFile = inMemory.parseFilename("/here/params");
    Writer out = parameterFile.openWriter(Charsets.UTF_8);
    out.write("--output /here/\u00F6"); // An oe umlaut.
    out.close();
    GxpcFlags flags = new GxpcFlags(inMemory, inMemory.parseFilename("/here"), "@params");
    assertEquals("/here/\u00F6", flags.getAllowedOutputFiles().iterator().next().toFilename());
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

    InMemoryFileSystem inMemory = new InMemoryFileSystem();
    FileRef parameterFile = inMemory.parseFilename("/here/params");
    Writer out = parameterFile.openWriter(Charsets.UTF_8);
    out.write("--output /here/\u00F6"); // An oe umlaut.
    out.close();
    GxpcFlags flags = new GxpcFlags(inMemory, inMemory.parseFilename("/here"), "@params");
    assertEquals("/here/\u00F6", flags.getAllowedOutputFiles().iterator().next().toFilename());
  }
}
View Full Code Here

Examples of com.google.gxp.compiler.fs.InMemoryFileSystem.parseFilename()

      throws Exception {
    // create in memory file
    String pkgDir = getPackage().replace('.', '/');
    InMemoryFileSystem schemaFs = new InMemoryFileSystem();
    String sourceName = "/" + pkgDir + "/" + name + ".xml";
    source = schemaFs.parseFilename(sourceName);

    // write GXP
    Writer writer = source.openWriter(Charsets.US_ASCII);
    writer.write(contents);
    writer.close();
View Full Code Here

Examples of com.google.gxp.compiler.fs.SourcePathFileSystem.parseFilename()

                                                                 outputFileSystem.getRoot());

    this.sourceFiles = ImmutableSet.copyOf(sourcePathFs.getSourceFileRefs());
    this.schemaFiles = ImmutableSet.copyOf(sourceSchemas);
    this.sourceEntityResolver = new FileSystemEntityResolver(sourcePathFs);
    this.allowedOutputFiles = ImmutableSet.of(sourcePathFs.parseFilename(outputFile));
    this.compilationVersion = compilationVersion;
    this.alertPolicy = Preconditions.checkNotNull(alertPolicy);
  }

  @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.