Fix CommandEnablementTest
SWTbot was changed today to do selections in trees differently, and
also to do event notification differently.[1] This makes these tests
fail consistently because evidently the command enablement has not
been recomputed yet when we test it, and command.isHandled() is still
false. It's a timing issue; running in the debugger the tests can be
made to succeed.
With [1], SWTbot sends event notifications inside an asyncExec.
Previously, it sent them outside. I don't know if our test was broken
all along and succeeded just by chance, or whether [1] introduced a
bug in SWTbot. In any case selecting the the tree node inside a
Display.syncExec() ensures that the selection is done and event
notifications have occurred before the test proceeds.
[1] https://git.eclipse.org/r/#/c/87761/
Change-Id: Ib46803eb58ea23208cc87b34421711455bc94290
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>