Merged the 3.1 compatibility patches from the eclipse3_1compat branch into the HEAD.