if (location.equalsIgnoreCase(USER_HOME)) location = computeDefaultUserAreaLocation(userDefaultAppendage); if (location.equalsIgnoreCase(USER_DIR)) location = new File(System.getProperty(PROP_USER_DIR), userDefaultAppendage).getAbsolutePath();
if (location.startsWith(USER_HOME)) { String base = substituteVar(location, USER_HOME, PROP_USER_HOME); location = new File(base, userDefaultAppendage).getAbsolutePath(); } else if (location.startsWith(USER_DIR)) { String base = substituteVar(location, USER_DIR, PROP_USER_DIR); location = new File(base, userDefaultAppendage).getAbsolutePath(); }
	private static Location buildLocation(String property, URL defaultLocation, String userDefaultAppendage, boolean readOnly) {		BasicLocation result = null;		String location = System.getProperty(property);		System.getProperties().remove(property);		// if the instance location is not set, predict where the workspace will be and 		// put the instance area inside the workspace meta area.		if (location == null)			result = new BasicLocation(property, defaultLocation, readOnly);		else if (location.equalsIgnoreCase(NONE))			return null;		else if (location.equalsIgnoreCase(NO_DEFAULT))			result = new BasicLocation(property, null, readOnly);		else {			if (location.equalsIgnoreCase(USER_HOME))				location = computeDefaultUserAreaLocation(userDefaultAppendage);			if (location.equalsIgnoreCase(USER_DIR))				location = new File(System.getProperty(PROP_USER_DIR), userDefaultAppendage).getAbsolutePath();			URL url = buildURL(location, true);			if (url != null) {				result = new BasicLocation(property, null, readOnly);				result.setURL(url, false);			}		}		return result;	}