Shooting from the hip, I think you could implement a run() method in Display
that does the normal event loop and a runModalContext() to do modal loops
(replacing the Jface ModalContext).
Yes, a run() and a runModal() would be good (if we can agree on the
terminating condition
of the latter).
However, the ModalContext does more than running a modal event loop.
Basically it runs a piece of long running code in a separate thread and keeps
the UI thread alive so that the UI refreshes properly.
It addition it handles the case where long running (and calls to
ModalContext) are nested.
So it probably wouldn't go away if we had a runModalContext; just the
three line
event loop could be replaced.