I20220325-1800
Rebased original patch to head. This commit tries to handle as many cases as I could think of from 2 years ago. Change-Id: I2cf68e445f25c991684aac8b60117cbe19efb724 Signed-off-by: Nikolay Metchev <nikolaymetchev@gmail.com> Signed-off-by: Jeff Johnston <jjohnstn@redhat.com> Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/71284 Tested-by: JDT Bot <jdt-bot@eclipse.org>