JBIDE-18247 - better organized with better cancelation logic

This is a cleaned up version of the patch with better cancelation logic. Also, see inline notes
This specific one? No idea... but I figured since it wasn't documented we should at least get it logged and looked at.