if (managers.isEmpty()) {
ProsePlugin.openErrorDialog("No Prose application", "No Prose application available to insert aspect.");
return;
}
ProseRunSelectionDialog dialog = new ProseRunSelectionDialog(ProsePlugin.getShell(), managers);
dialog.setTitle("Aspect manager selection");
dialog.open();
if (dialog.getReturnCode() == Dialog.OK) {
try {
dialog.getAspectManager().insertAspect(type);
} catch (UnreachableException e) {
ProsePlugin.openErrorDialog("Aspect insertion failed",
"Could not insert aspect because Prose application is not reachable.");
}
}