del.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String org = _browserComposite.getOrganisation();
String mod = _browserComposite.getName();
String rev = _browserComposite.getRevision();
Visibility visibility = _browserComposite.getVisibility();
if (rev == null) {
MessageDialog.openInformation(Display.getDefault().getActiveShell(),
Messages.getString("moduleadmin.action.please.select.title"),
Messages.getString("moduleadmin.action.please.select"));
return;
}
if (MessageDialog.openQuestion(
Display.getDefault().getActiveShell(),
Messages.getString("moduleadmin.action.confirm.delete.title"),
Messages.getString("moduleadmin.action.confirm.delete", visibility+" "+org+" "+mod+" "+rev))) {
WojPlugin.log("deleting "+visibility+" "+org+" "+mod+" "+rev);
WojServicesHelper.getDefault().removeModule(visibility, org, mod, rev);
refresh();
}
}
});
_browserComposite.addRevisionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
if (_browserComposite.getRevision() == null) {
setSelectedModule(null);
} else {
String org = _browserComposite.getOrganisation();
String mod = _browserComposite.getName();
String rev = _browserComposite.getRevision();
Visibility visibility = _browserComposite.getVisibility();
ModuleDescriptor md = WojServicesHelper.getDefault().getModuleDescriptor(visibility, org, mod, rev);
setSelectedModule(md);
}
}