@Override public boolean handleOption(String head, Iterator<String> tail) { return super.handleOption(head, tail); }
@Override public Iterable<JavaFileObject> list(Location l, String packageName, Set<Kind> kinds, boolean recursive) { return fileTx.filter(l, packageName, super.list(l, packageName, kinds, recursive)); }
@Override public javax.tools.FileObject getFileForInput (final Location l, final String pkgName, final String relativeName) { final String rp = FileObjects.resolveRelativePath (pkgName, relativeName); final FileObject[] fileRootPair = findFile(rp); return fileRootPair == null ? null : FileObjects.sourceFileObject(fileRootPair[0], fileRootPair[1]); }
private boolean isModifiedByWorkingCopy() { final FileObject file = handle.resolveFileObject(false); if (file == null) { return false; } return SourceFileManager.getModifiedFiles().isModified(file.toURI()); }
new CachingFileManager (this.archiveProvider, this.cachedCompileClassPath, false, true), hasSources ? (!useModifiedFiles ? new CachingFileManager (this.archiveProvider, this.cachedSrcClassPath, filter, false, ignoreExcludes) : new SourceFileManager (this.cachedSrcClassPath, ignoreExcludes)) : null, cachedAptSrcClassPath != null ? new AptSourceFileManager(
register( SourceFileManager.ModifiedFilesTransaction.class, SourceFileManager.newModifiedFilesTransaction(srcIndex, checkForEditorModifications)); return txCtx;
@Override public javax.tools.FileObject getFileForOutput(final Location l, final String pkgName, final String relativeName, final javax.tools.FileObject sibling) throws IOException, UnsupportedOperationException, IllegalArgumentException { if (StandardLocation.SOURCE_PATH != l) { throw new UnsupportedOperationException("Only StandardLocation.SOURCE_PATH is supported."); // NOI18N } final String rp = FileObjects.resolveRelativePath (pkgName, relativeName); final FileObject[] fileRootPair = findFile(rp); if (fileRootPair == null) { final FileObject[] roots = this.sourceRoots.getRoots(); if (roots.length == 0) { throw new UnsupportedOperationException("No source path"); //NOI18N } final File rootFile = FileUtil.toFile(roots[0]); if (rootFile == null) { throw new UnsupportedOperationException("No source path"); //NOI18N } return FileObjects.sourceFileObject( BaseUtilities.toURI(new File(rootFile,FileObjects.convertFolder2Package(rp, File.separatorChar))).toURL(), roots[0]); } else { return FileObjects.sourceFileObject(fileRootPair[0], fileRootPair[1]); //Todo: wrap to protect from write } }