Code example for URI

Methods: toASCIIString

0
	public String getValue(String variable, IResource resource) {
		IContainer parent= resource.getParent();
		if (parent != null) {
			URI locationURI= parent.getLocationURI();
			if (locationURI != null)
				return locationURI.toASCIIString();
		} 
		return null; 
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java