* if true a cancel button is displayed offering the option to cancel
* the specified {@link ITask}
*/
public static void runTaskAndWait(final ITask task, final boolean cancelable) {
final Semaphore waitSemaphore = new Semaphore(0);
TaskManager.addTaskListener(new TaskManagerAdapter() {
@Override
public void taskFinished(ITask t) {
if (task == t) {
waitSemaphore.release();
}