Alerts are modal messages that show up in the context the user is currently working in. You can use alerts to confirm that an action should be executed, inform the user of harmful consequences, or report the progress of a long-running action. Since alerts are modal they block the user interface.
To show alerts, inject the UiContext interface to your class. The
UiContext is implemented by
Shell, so if you have one of those at hand, just reuse them.