Revision 34530272
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java | ||
---|---|---|
24 | 24 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
25 | 25 |
import eu.etaxonomy.cdm.model.molecular.Sequence; |
26 | 26 |
import eu.etaxonomy.cdm.model.molecular.SingleRead; |
27 |
import eu.etaxonomy.taxeditor.editor.Messages; |
|
27 | 28 |
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView; |
28 | 29 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
29 | 30 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
... | ... | |
60 | 61 |
@Override |
61 | 62 |
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { |
62 | 63 |
if(getPostOperationEnabled() instanceof ISaveablePart){ |
63 |
String confirmationQuestion = "Do you really want to delete the selected element";
|
|
64 |
String confirmationQuestion = Messages.DeleteDerivateOperation_REALLY_DELETE;
|
|
64 | 65 |
if(deleteConfigurator.isDeleteChildren()){ |
65 |
confirmationQuestion += " and its children";
|
|
66 |
confirmationQuestion += Messages.DeleteDerivateOperation_AND_CHILDREN;
|
|
66 | 67 |
} |
67 |
confirmationQuestion += "?"; |
|
68 |
if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, "Confirm Deletion", confirmationQuestion)){
|
|
68 |
confirmationQuestion += "?"; //$NON-NLS-1$
|
|
69 |
if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, Messages.DeleteDerivateOperation_CONFIRM, confirmationQuestion)){
|
|
69 | 70 |
return Status.CANCEL_STATUS; |
70 | 71 |
} |
71 | 72 |
if(((ISaveablePart) getPostOperationEnabled()).isDirty()){ |
72 |
MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
|
|
73 |
MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
|
|
73 | 74 |
return Status.CANCEL_STATUS; |
74 | 75 |
} |
75 | 76 |
} |
... | ... | |
97 | 98 |
} |
98 | 99 |
} |
99 | 100 |
else{ |
100 |
MessagingUtils.warningDialog("Deletion failed", this, deleteResult.toString());
|
|
101 |
MessagingUtils.warningDialog(Messages.DeleteDerivateOperation_DELETE_FAILED, this, deleteResult.toString());
|
|
101 | 102 |
return Status.CANCEL_STATUS; |
102 | 103 |
} |
103 | 104 |
return Status.OK_STATUS; |
Also available in: Unified diff
I18n for derivative module