if (base.length() > srcFile.length()) return srcFile; String root = srcFile.substring(0, base.length()); if (!root.equals(base)) return srcFile;
if (base.length() <= srcFile.length()) { String root = srcFile.substring(0, base.length()); if (root.equals(base)) {  return "." + System.getProperty("file.separator") + srcFile.substring(base.length()); } }   int slashPos = srcFile.indexOf(slash); int branchPoint; if (slashPos >= 0) { String subPath = srcFile.substring(0,slashPos); if ((subPath.length() == 0) || base.startsWith(subPath)) { branchPoint = slashPos+1; slashPos = srcFile.indexOf(slash, branchPoint); while (slashPos >= 0) { subPath = srcFile.substring(0,slashPos); if (base.startsWith(subPath)) branchPoint = slashPos + 1; else break; slashPos = srcFile.indexOf(slash, branchPoint); }  int slashCount = 0; slashPos = base.indexOf(slash,branchPoint); while (slashPos >= 0) { slashCount++; slashPos = base.indexOf(slash,slashPos+1); }  StringBuffer path = new StringBuffer(); String upDir = ".." + slash; for (int i = 0; i < slashCount; i++) path.append(upDir); path.append(srcFile.substring(branchPoint)); return path.toString(); } }   return srcFile;
	private String convertToRelative(String srcFile, String base) {		// At present relative paths are only calculated if the fileName is		// below the project file. This need not be the case, and we could use ..		// syntax to move up the tree. (To Be Added)	  		String slash = System.getProperty("file.separator");		if (FILE_IGNORE_CASE) {			srcFile = srcFile.toLowerCase();			base = base.toLowerCase();		}		if (base.equals(srcFile))			return ".";					if (!base.endsWith(slash))			base = base + slash;		// Base directory pathname must be a prefix of the file		if (base.length() > srcFile.length())			return srcFile;		String root = srcFile.substring(0, base.length());		if (!root.equals(base))			return srcFile;		// Strip off the base directory, make relative		return "." + System.getProperty("file.separator") + srcFile.substring(base.length());	}