/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(final File srcDir, final File destDir, final String[] files) { final GlobPatternMapper m = new GlobPatternMapper(); for (String extension : findSupportedFileExtensions()) { m.setFrom(extension); m.setTo("*.class"); final SourceFileScanner sfs = new SourceFileScanner(this); final File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { lookForPackageInfos(srcDir, newFiles); final File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } } }
return null; String modName = modifyName(sourceFileName); if (fromPrefix == null || (sourceFileName.length() < (prefixLength + postfixLength)) || (!fromContainsStar && !modName.equals(modifyName(fromPrefix)) && (!modName.startsWith(modifyName(fromPrefix)) || !modName.endsWith(modifyName(fromPostfix))) ? extractVariablePart(sourceFileName) + toPostfix : "")};
GlobPatternMapper mapper = new GlobPatternMapper(); inputExtension = ".xml"; mapper.setFrom("*" + inputExtension); mapper.setTo("*" + newExtension); String[] sa = mapper.mapFileName(file); outf = new File(task.getOutdir(), sa[0]); } else {
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles; for (String extension : getScriptExtensions()) { m.setFrom("*." + extension); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }
mapper.add(zfs); GlobPatternMapper gm = new GlobPatternMapper(); gm.setFrom("WEB-INF/classes/*"); gm.setTo("*"); mapper.add(gm);
CompilationUnit compilation = new CompilationUnit(config, null, gcl); GlobPatternMapper mapper = new GlobPatternMapper(); mapper.setFrom("*.groovy"); mapper.setTo("*.class");
final GlobPatternMapper gm = new GlobPatternMapper(); gm.setFrom("*"); String prefix = zfs.getPrefix(getProject()); if (!prefix.endsWith("/") && !prefix.endsWith("\\")) { prefix += "/"; gm.setTo(prefix + "*"); myMapper = gm;
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir the source directory * @param destDir the destination directory * @param files the files to scan */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.exml"); m.setTo("*.as"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir the source directory * @param destDir the destination directory * @param files the files to scan */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.properties"); m.setTo("*.as"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir the source directory * @param destDir the destination directory * @param files the files to scan */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.exml"); m.setTo("*.as"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir the source directory * @param destDir the destination directory * @param files the files to scan */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.properties"); m.setTo("*.as"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir the source directory * @param destDir the destination directory * @param files the files to scan */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*" + Jooc.INPUT_FILE_SUFFIX); m.setTo("*.js"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); if (newFiles.length > 0) { File[] newCompileList = new File[compileList.length + newFiles.length]; System.arraycopy(compileList, 0, newCompileList, 0, compileList.length); System.arraycopy(newFiles, 0, newCompileList, compileList.length, newFiles.length); compileList = newCompileList; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.groovy"); m.setTo("*.class"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.groovy"); m.setTo("*.class"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.groovy"); m.setTo("*.class"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles; for (String extension : getScriptExtensions()) { m.setFrom("*." + extension); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList */ protected void scanFiles(String files[]) throws BuildException { File file; // TODO: create an own pattern mapper GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.idl"); m.setTo("*.java"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newfiles = sfs.restrictAsFiles(files, _srcdir, _destdir, m); _compileList = new File[ newfiles.length ]; for (int i = 0; i < newfiles.length; i++) { log("scan file: " + newfiles[ i ].getPath(), Project.MSG_DEBUG); file = newfiles[ i ]; if (!file.exists()) { throw new BuildException("The input file \"" + file.getPath() + "\" does not exist !"); } _compileList[ i ] = file; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList */ protected void scanFiles(String files[]) throws BuildException { File file; // TODO: create an own pattern mapper GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.idl"); m.setTo("*.java"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newfiles = sfs.restrictAsFiles(files, _srcdir, _destdir, m); _compileList = new File[ newfiles.length ]; for (int i = 0; i < newfiles.length; i++) { log("scan file: " + newfiles[ i ].getPath(), Project.MSG_DEBUG); file = newfiles[ i ]; if (!file.exists()) { throw new BuildException("The input file \"" + file.getPath() + "\" does not exist !"); } _compileList[ i ] = file; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList */ protected void scanFiles(String files[]) throws BuildException { File file; // TODO: create an own pattern mapper GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*.idl"); m.setTo("*.java"); SourceFileScanner sfs = new SourceFileScanner(this); File[] newfiles = sfs.restrictAsFiles(files, _srcdir, _destdir, m); _compileList = new File[ newfiles.length ]; for (int i = 0; i < newfiles.length; i++) { log("scan file: " + newfiles[ i ].getPath(), Project.MSG_DEBUG); file = newfiles[ i ]; if (!file.exists()) { throw new BuildException("The input file \"" + file.getPath() + "\" does not exist !"); } _compileList[ i ] = file; } }
/** * Scans the directory looking for source files to be compiled. * The results are returned in the class variable compileList * * @param srcDir The source directory * @param destDir The destination directory * @param files An array of filenames */ protected void scanDir(File srcDir, File destDir, String[] files) { GlobPatternMapper m = new GlobPatternMapper(); SourceFileScanner sfs = new SourceFileScanner(this); File[] newFiles; for (String extension : getScriptExtensions()) { m.setFrom("*." + extension); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } if (jointCompilation) { m.setFrom("*.java"); m.setTo("*.class"); newFiles = sfs.restrictAsFiles(files, srcDir, destDir, m); addToCompileList(newFiles); } }