/** * Add a working directory to the project. * * @param dirName * the directory to add * @return true if the working directory was added, or false if the working * directory was already present */ public boolean addWorkingDir(String dirName) { if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList, new File(dirName)); }
/** * Add a file to the project. * * @param fileName * the file to add * @return true if the file was added, or false if the file was already * present */ public boolean addFile(String fileName) { return addToListInternal(analysisTargets, makeAbsoluteCWD(fileName)); }
/** * Add an auxiliary classpath entry * * @param auxClasspathEntry * the entry * @return true if the entry was added successfully, or false if the given * entry is already in the list */ public boolean addAuxClasspathEntry(String auxClasspathEntry) { return addToListInternal(auxClasspathEntryList, makeAbsoluteCWD(auxClasspathEntry)); }
/** * Add source directories to the project. * * @param sourceDirs * The source directories to add. These can be either absolute paths * or relative to any of the working directories in this project object. * @return true if a source directory was added or false if all source * directories were already present */ public boolean addSourceDirs(Collection<String> sourceDirs) { boolean isNew = false; if (sourceDirs == null || sourceDirs.isEmpty()) { return isNew; } for (String dirName : sourceDirs) { for (String dir : makeAbsoluteCwdCandidates(dirName)) { isNew = addToListInternal(srcDirList, dir) || isNew; } } IO.close(sourceFinder); sourceFinder = new SourceFinder(this); return isNew; }
/** * Add a working directory to the project. * * @param dirName * the directory to add * @return true if the working directory was added, or false if the working * directory was already present */ public boolean addWorkingDir(String dirName) { if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList, new File(dirName)); }
/** * Add a file to the project. * * @param fileName * the file to add * @return true if the file was added, or false if the file was already * present */ public boolean addFile(String fileName) { return addToListInternal(analysisTargets, makeAbsoluteCWD(fileName)); }
/** * Add an auxiliary classpath entry * * @param auxClasspathEntry * the entry * @return true if the entry was added successfully, or false if the given * entry is already in the list */ public boolean addAuxClasspathEntry(String auxClasspathEntry) { return addToListInternal(auxClasspathEntryList, makeAbsoluteCWD(auxClasspathEntry)); }
/** * Add a source directory to the project. * * @param dirName * the directory to add * @return true if the source directory was added, or false if the source * directory was already present */ public boolean addSourceDir(String dirName) { boolean isNew = false; for (String dir : makeAbsoluteCwdCandidates(dirName)) { isNew = addToListInternal(srcDirList, dir) || isNew; } sourceFinder = new SourceFinder(this); return isNew; }