/** * Removes a file with a given name and its related files. * * @param pathname the name of the file to be removed */ public void removeJavaFile(String pathname) { for (JavaFile jf : getJavaFiles()) { if (pathname.compareTo(jf.getPath()) == 0) { JavaClass.removeClassesRelatedTo(jf); } } cleanJavaProjects(); }
/** * Removes a file in this project. * * @param jf the file to be removed */ public void remove(JavaFile jf) { files.remove(jf.getPath()); }
/** * Adds a file contained in this project. * * @param jfile the file to be added */ public void addJavaFile(JavaFile jfile) { if (files.get(jfile.getPath()) == null) { files.put(jfile.getPath(), jfile); } }