configurer.setShowPerspectiveBar(true);
configurer.setTitle("EDIT Taxonomic Editor");
configurer.setShowProgressIndicator(true);
-
}
public void postWindowOpen() {
handleOpeningOfMultipleTaxonNodes(taxonNodes);
}else{
- warningDialog("You chose to open a name that has no connection to a taxa. The Editor does not support editing of such a content type at the moment.");
+ warningDialog("Not implemented yet", "You chose to open a name that has no connection to a taxa. The Editor does not support editing of such a content type at the moment.");
logger.warn("Could not open editor for selection. Selection was of type: " + selection.getClass().getSimpleName());
}
openEditor(taxonNodes.iterator().next());
}else{
// FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
- warningDialog("The accepted taxon is either in multiple taxonomic views or the synonym has" +
+ warningDialog("Not implemented yet", "The accepted taxon is either in multiple taxonomic views or the synonym has" +
" more than one accepted taxon. This case is not handled yet by the software.");
}
}
CdmStore.getLoginManager().authenticate(token);
}catch(BadCredentialsException e){
logger.error("Bad credentials", e);
- StoreUtil.warningDialog("Could not authenticate. Reason: Bad Credentials.");
+ StoreUtil.warningDialog("Could not authenticate", "Could not authenticate. Reason: Bad Credentials.");
}catch(LockedException e){
logger.error("Account is locked", e);
- StoreUtil.warningDialog("Could not authenticate. Reason: Account is locked.");
+ StoreUtil.warningDialog("Could not authenticate", "Could not authenticate. Reason: Account is locked.");
}catch(IllegalArgumentException e){
logger.error("Null argument for either user or password", e);
- StoreUtil.warningDialog("Could not authenticate. Reason: Username and/or Password empty.");
+ StoreUtil.warningDialog("Could not authenticate", "Could not authenticate. Reason: Username and/or Password empty.");
}
super.okPressed();
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.FontRegistry;
import org.eclipse.swt.SWT;
* This method is for developer convenience.
*/
public static void notImplementedMessage(){
- warningDialog("Not yet implemented");
+ warningDialog("Not yet implemented", "This functionality is not yet implemented.");
}
- public static void warningDialog(String warning){
- MessageBox messageBox = new MessageBox(getShell(), SWT.ICON_WARNING | SWT.OK);
- messageBox.setText(warning);
- messageBox.open();
+ public static void warningDialog(String title, String message){
+ MessageDialog.openWarning(getShell(), title, message);
}
public static IStatus executeOperation(IUndoableOperation operation){