Revision 8aac42d2
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
24 | 24 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
25 | 25 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
26 |
import eu.etaxonomy.taxeditor.editor.Messages; |
|
26 | 27 |
import eu.etaxonomy.taxeditor.editor.Page; |
27 | 28 |
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor; |
28 | 29 |
import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation; |
... | ... | |
35 | 36 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
36 | 37 |
|
37 | 38 |
/** |
38 |
* <p>DeleteTaxonBaseHandler class.</p> |
|
39 |
* |
|
40 | 39 |
* @author n.hoffmann |
41 | 40 |
* @created 21.04.2009 |
42 | 41 |
* @version 1.0 |
... | ... | |
44 | 43 |
public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler, IPostOperationEnabled { |
45 | 44 |
|
46 | 45 |
TaxonNameEditor editor; |
47 |
/* (non-Javadoc) |
|
48 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
49 |
*/ |
|
50 | 46 |
/** {@inheritDoc} */ |
51 | 47 |
@Override |
52 | 48 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
... | ... | |
59 | 55 |
return null; |
60 | 56 |
} |
61 | 57 |
|
62 |
/** |
|
63 |
* @param editor |
|
64 |
* @param selectedElement |
|
65 |
* @param operation |
|
66 |
* @param commandName |
|
67 |
*/ |
|
68 | 58 |
protected void doExecute(ExecutionEvent event, TaxonNameEditor editor, Object selectedElement) { |
69 | 59 |
AbstractPostOperation operation = null; |
70 | 60 |
String commandName = null; |
... | ... | |
86 | 76 |
} |
87 | 77 |
else if (selectedElement instanceof Taxon){ |
88 | 78 |
//TODO: how to get the actual classification |
89 |
if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Deletion", "Are you sure you want to delete the selected taxon?")){
|
|
79 |
if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_TAXON)){
|
|
90 | 80 |
return ; |
91 | 81 |
} |
92 | 82 |
|
... | ... | |
105 | 95 |
|
106 | 96 |
} |
107 | 97 |
else { |
108 |
throw new IllegalArgumentException("Element has to be Synonym, Misapplication or Concept");
|
|
98 |
throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
|
|
109 | 99 |
} |
110 | 100 |
|
111 | 101 |
AbstractUtility.executeOperation(operation); |
Also available in: Unified diff
I18n of login and data source view