Add function to shorten labels in property tree.

Change-Id: Iced6387f18067f2d2d3d28d9e032fc6e1e8b92fe