Extracted eclipse SWT functionality from RedDeer handlers (fixes #886)