Bug 53201 NPE when re-running newly generated javadoc.xml
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java
}
	
	private String getPathString(IPath fullPath) {
		if (fBasePath == null || !hasSameDevice(fullPath, fBasePath)) {
			return fullPath.toOSString();
		}
		int matchingSegments= fBasePath.matchingFirstSegments(fullPath);
		if (fBasePath.segmentCount() == matchingSegments) {
			return getRelativePath(fullPath, matchingSegments);
		}
		for (int i= 0; i < fJavaProjects.length; i++) {
			IProject proj= fJavaProjects[i].getProject();
			IPath projLoc= proj.getLocation();
			if (projLoc.segmentCount() <= matchingSegments && projLoc.isPrefixOf(fullPath)) {
				return getRelativePath(fullPath, matchingSegments);
			}
		}
		IPath workspaceLoc= ResourcesPlugin.getWorkspace().getRoot().getLocation();
		if (workspaceLoc.segmentCount() <= matchingSegments && workspaceLoc.isPrefixOf(fullPath)) {
			return getRelativePath(fullPath, matchingSegments);
		}		
		return fullPath.toOSString();
	}
	private String getRelativePath(IPath fullPath, int matchingSegments) {
		StringBuffer res= new StringBuffer();
		int backSegments= fBasePath.segmentCount() - matchingSegments;
		while (backSegments > 0) {
			res.append(".."); 
			res.append(PATH_SEPARATOR);
			backSegments--;