Examples of FileKey


Examples of juzu.impl.common.FileKey

                return owner.resolveTagHandler(name);
              }

              @Override
              public void createResource(Path.Absolute path, CharSequence content) throws IOException {
                FileKey key = FileKey.newName(path);
                FileObject scriptFile = owner.application.getProcessingContext().createResource(StandardLocation.CLASS_OUTPUT, key, elements);
                Writer writer = null;
                try {
                  writer = scriptFile.openWriter();
                  writer.append(content);
View Full Code Here

Examples of juzu.impl.common.FileKey

      if (file == null) {
        throw new IllegalArgumentException("Could not find compilation unit: " + compilationUnit);
      }
      names.remove(names.size() - 1);
      String pkg = Tools.join('.', names);
      FileKey key = FileKey.newJavaName(pkg, name);
      javaFiles.add(manager.getReadable(key));
    }
    return javaFiles;
  }
View Full Code Here

Examples of juzu.impl.common.FileKey

        }
      }

      public void file(P file, String name) throws IOException {
        if (name.endsWith(".java")) {
          FileKey key = FileKey.newJavaName(buffer.substring(0, buffer.length() - 1), name);
          JavaFileObject fileObject = fileManager.getReadable(key);
          javaFiles.add(fileObject);
        }
      }
View Full Code Here

Examples of juzu.impl.common.FileKey

          list(packageName.isEmpty() ? name : packageName + "." + name, child, kinds, true, to);
        }
      }
      else {
        String name = fs.getName(child);
        FileKey key = FileKey.newName(packageName, name);
        if (kinds.contains(key.getKind())) {
          to.add(getReadable(key));
        }
      }
    }
  }
View Full Code Here

Examples of juzu.impl.common.FileKey

    }
  }

  @Override
  public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {
    FileKey key = FileKey.newResourceName(packageName, relativeName);
    FileManager files = getFiles(location);
    if (files != null) {
      return files.getReadable(key);
    }
    else {
View Full Code Here

Examples of juzu.impl.common.FileKey

    }
  }

  @Override
  public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) throws IOException {
    FileKey key = FileKey.newResourceName(packageName, relativeName);

    // Address a bug
    if (location == StandardLocation.SOURCE_PATH) {
      FileObject file = sourcePath.getReadable(key);
      if (file == null) {
        throw new FileNotFoundException("Not found:" + key.toString());
      }
      return file;
    }
    else {
      FileManager files = getFiles(location);
View Full Code Here

Examples of juzu.impl.common.FileKey

    }
  }

  @Override
  public boolean isSameFile(FileObject a, FileObject b) {
    FileKey ka = ((JavaFileObjectImpl)a).getKey();
    FileKey kb = ((JavaFileObjectImpl)b).getKey();
    return ka.equals(kb);
  }
View Full Code Here

Examples of juzu.impl.common.FileKey

  @Override
  public JavaFileObject getJavaFileForOutput(Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException {
    FileManager files = getFiles(location);
    if (files != null) {
      FileKey key = FileKey.newJavaName(className, kind);
      return files.getWritable(key);
    }
    else {
      throw new UnsupportedOperationException("Location " + location + " not supported");
    }
View Full Code Here

Examples of org.eclipse.jgit.lib.RepositoryCache.FileKey

      File dir = FileKey.resolve(new File(base, name), FS.DETECTED);
      if (dir == null)
        continue;

      try {
        FileKey key = FileKey.exact(dir, FS.DETECTED);
        db = RepositoryCache.open(key, true);
      } catch (IOException e) {
        throw new RepositoryNotFoundException(name, e);
      }
View Full Code Here

Examples of org.eclipse.jgit.lib.RepositoryCache.FileKey

  }

  private AlternateHandle openAlternate(File objdir) throws IOException {
    final File parent = objdir.getParentFile();
    if (FileKey.isGitRepository(parent, fs)) {
      FileKey key = FileKey.exact(parent, fs);
      FileRepository db = (FileRepository) RepositoryCache.open(key);
      return new AlternateRepository(db);
    }

    ObjectDirectory db = new ObjectDirectory(config, objdir, null, fs, null);
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.