+ /**
+ * Returns the file that is specified by its complete path.
+ *
+ * @param completePath
+ * The complete path of the file
+ * @return The project file at the given path, or <code>null</code> if
+ * there is no such file
+ */
+ public ProjectFile getFile(String completePath) {
+ if (rootProjectFile == null) {
+ getBaseFile();
+ }
+ if ((rootProjectFile == null) || (completePath.length() == 0)) {
+ return rootProjectFile;
+ }
+ String[] pathParts = completePath.split("\\" + File.separator);
+ ProjectFileImpl currentProjectFile = rootProjectFile;
+ for (String pathPart: pathParts) {
+ currentProjectFile = currentProjectFile.getFile(pathPart);
+ if (currentProjectFile == null) {
+ return null;
+ }
+ }
+ return currentProjectFile;
+ }
+