deleteRepositoryLocAction = new Action() {
public void run() {
ISelection selection = viewer.getSelection();
Object obj = ((IStructuredSelection)selection).getFirstElement();
if (obj instanceof TreeParent) {
GuvnorRepository rep = ((TreeParent)obj).getGuvnorRepository();
if (MessageDialog.openConfirm(RepositoryView.this.getSite().getShell(),
Messages.getString("remove.rep.dialog.caption"), //$NON-NLS-1$
MessageFormat.format(Messages.getString("remove.rep.dialog.msg"), //$NON-NLS-1$
new Object[] { rep.getLocation() }))) {
Activator.getLocationManager().removeRepository(rep.getLocation());
}
}
}
};
deleteRepositoryLocAction.setText(Messages.getString("action.delete.rep")); //$NON-NLS-1$