From: Patrick Plitzner
Date: Wed, 9 Sep 2015 11:22:41 +0000 (+0200)
Subject: I18n for derivative module
X-Git-Tag: 3.8.0^2~17
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/34530272755aee8f94bd7e3a95d86d06a214017e
I18n for derivative module
---
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
index 5eafb0216..9b2fa8319 100644
--- a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
+++ b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
@@ -17,3 +17,21 @@ DerivateView_DERIVATIVE_EDITOR=Derivative Editor
DerivateView_SAVING_HIERARCHY=Saving hierarchy
DerivateView_UNSAVED_CHANGES=View has unsaved changes
DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
+
+DeleteDerivateOperation_AND_CHILDREN= and its children
+DeleteDerivateOperation_CONFIRM=Confirm Deletion
+DeleteDerivateOperation_DELETE_FAILED=Deletion failed
+DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
+
+DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
+
+DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
+DerivateViewEditorInput_NO_ROOT=No root element found\!
+
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
+
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Derivative Editor
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
index ca3ff7f83..2fc5cfc61 100644
--- a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
+++ b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
@@ -13,7 +13,25 @@ SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
-DerivateView_DERIVATIVE_EDITOR=Derivate Editor
-DerivateView_SAVING_HIERARCHY=Speichere Hierarie
+DerivateView_DERIVATIVE_EDITOR=Derivat-Editor
+DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
DerivateView_UNSAVED_CHANGES=Ungepeicherte Änderungen
DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
+
+DeleteDerivateOperation_CONFIRM=Löschen bestätigen
+DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
+DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
+DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
+
+DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
+
+DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
+DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
+
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
+
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Derivat-Editor nicht öffnen
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
index 0d822abc3..34684d15d 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
@@ -28,10 +28,23 @@ public class Messages extends NLS {
public static String CreateDerivateContextMenu_SINGLE_READ;
public static String CreateDerivateContextMenu_SPECIMEN;
public static String CreateDerivateContextMenu_TISSUE_SAMPLE;
+ public static String DeleteDerivateOperation_AND_CHILDREN;
+ public static String DeleteDerivateOperation_CONFIRM;
+ public static String DeleteDerivateOperation_DELETE_FAILED;
+ public static String DeleteDerivateOperation_REALLY_DELETE;
+ public static String DerivateDropListener_MOVE_TO;
public static String DerivateView_DERIVATIVE_EDITOR;
public static String DerivateView_SAVING_HIERARCHY;
public static String DerivateView_UNSAVED_CHANGES;
public static String DerivateView_YOU_NEED_TO_SAVE;
+ public static String DerivateViewEditorInput_FAIL_INIT;
+ public static String DerivateViewEditorInput_NO_ROOT;
+ public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
+ public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
+ public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
+ public static String OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN;
+ public static String OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
+ public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java
index 55b2f7752..4b5a12a5b 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java
@@ -18,6 +18,7 @@ import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.TransferData;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.operation.MoveDerivateOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -36,13 +37,10 @@ public class DerivateDropListener extends ViewerDropAdapter {
this.derivateView = derivateView;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
- */
@Override
public boolean performDrop(Object data) {
if(derivateView.isDirty()){
- MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+ MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return false;
}
Object target = getCurrentTarget();
@@ -51,16 +49,13 @@ public class DerivateDropListener extends ViewerDropAdapter {
TreeNode targetNode = (TreeNode) target;
TreeNode draggedNode = EditorUtil.getTreeNodeOfSelection(derivateViewSelection.getSelection());
if(draggedNode!=null){
- MoveDerivateOperation moveDerivateOperation = new MoveDerivateOperation("Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\"", EditorUtil.getUndoContext(), derivateView, draggedNode, targetNode);
+ MoveDerivateOperation moveDerivateOperation = new MoveDerivateOperation(String.format(Messages.DerivateDropListener_MOVE_TO, derivateView.getLabelProvider().getDerivateText(draggedNode), derivateView.getLabelProvider().getDerivateText(targetNode)), EditorUtil.getUndoContext(), derivateView, draggedNode, targetNode);
return AbstractUtility.executeOperation(moveDerivateOperation).equals(Status.OK_STATUS)?true:false;
}
}
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
- */
@Override
public boolean validateDrop(Object target, int operation, TransferData transferType) {
return LocalSelectionTransfer.getTransfer().isSupportedType(transferType) && target instanceof TreeNode;
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java
index 7050078e1..3527fe5ed 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
@@ -75,7 +76,7 @@ public class DerivateViewEditorInput implements IEditorInput{
rootUUIDs = derivateUUIDs;
}
if(rootUUIDs.isEmpty()){
- MessagingUtils.messageDialog("Failed initializing editor", DerivateViewEditorInput.class, "No root element found!");
+ MessagingUtils.messageDialog(Messages.DerivateViewEditorInput_FAIL_INIT, DerivateViewEditorInput.class, Messages.DerivateViewEditorInput_NO_ROOT);
}
}
@@ -138,7 +139,7 @@ public class DerivateViewEditorInput implements IEditorInput{
name = DerivateLabelProvider.getDerivateText(specimen, conversationHolder);
}
else{
- name += " + "+DerivateLabelProvider.getDerivateText(specimen, conversationHolder);
+ name += " + "+DerivateLabelProvider.getDerivateText(specimen, conversationHolder); //$NON-NLS-1$
}
}
}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
index fdc4901b2..2438c4325 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
@@ -194,7 +194,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
if(selectedDerivate instanceof DnaSample && ((DnaSample) selectedDerivate).getRecordBasis()==SpecimenOrObservationType.DnaSample){
DnaSample dnaSample = (DnaSample)selectedDerivate;
if(childClass.equals(Sequence.class)){
- Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0);
+ Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
createdElement = newInstance;
}
}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java
index da8c8db71..e57cbfbf7 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java
@@ -19,7 +19,7 @@ public class CreateFieldUnitHandler extends AbstractHandler {
if(AbstractUtility.getActivePart() instanceof DerivateView){
DerivateView derivateView = (DerivateView)AbstractUtility.getActivePart();
if(derivateView.isDirty()){
- MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+ MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return null;
}
FieldUnit fieldUnit = FieldUnit.NewInstance();
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
index 1f429451b..28d7f2bd6 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
@@ -42,9 +42,6 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
*/
public class DeleteDerivateHandler extends AbstractHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
/** {@inheritDoc} */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -66,10 +63,10 @@ public class DeleteDerivateHandler extends AbstractHandler {
if(value instanceof SpecimenOrObservationBase> || value instanceof Sequence || value instanceof SingleRead){
if(postOperationEnabled instanceof IConversationEnabled){
ConversationHolder conversationHolder = ((IConversationEnabled) postOperationEnabled).getConversationHolder();
- label += " "+DerivateLabelProvider.getDerivateText(value, conversationHolder);
+ label += " "+DerivateLabelProvider.getDerivateText(value, conversationHolder); //$NON-NLS-1$
}
SpecimenDeleteConfigurator config = new SpecimenDeleteConfigurator();
- boolean deepDelete = event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivate.deepDelete");
+ boolean deepDelete = event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivate.deepDelete"); //$NON-NLS-1$
config.setDeleteChildren(deepDelete);
config.setDeleteMolecularData(deepDelete);
DeleteDerivateOperation deleteDerivateOperation = new DeleteDerivateOperation(label, undoContext, (CdmBase) value, (TreeNode) object, postOperationEnabled, config);
@@ -82,7 +79,7 @@ public class DeleteDerivateHandler extends AbstractHandler {
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set");
}
return null;
}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivateEditorForTaxonHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivateEditorForTaxonHandler.java
index 5f2922765..7b30737f9 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivateEditorForTaxonHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivateEditorForTaxonHandler.java
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -40,6 +41,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
*/
public class OpenDerivateEditorForTaxonHandler extends AbstractHandler {
+ private static final String COULD_NOT_OPEN_DERIVATIVE_EDITOR = Messages.OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
+
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@@ -61,16 +64,16 @@ public class OpenDerivateEditorForTaxonHandler extends AbstractHandler {
}
}
if(derivateUuids.isEmpty()){
- MessagingUtils.warningDialog("Could not open Derivative Editor", this, "No Derivatives found");
+ MessagingUtils.warningDialog(COULD_NOT_OPEN_DERIVATIVE_EDITOR, this, Messages.OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND);
return null;
}
DerivateViewEditorInput input = new DerivateViewEditorInput(derivateUuids);
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, COULD_NOT_OPEN_DERIVATIVE_EDITOR, e);
} catch (NullPointerException npe){
- MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivative hierarchy is corrupted!", npe);
+ MessagingUtils.messageDialog(Messages.OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN, OpenDerivateViewHandler.class, Messages.OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED, npe);
}
}
return null;
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
index c467a943e..839beb546 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
@@ -24,6 +24,7 @@ import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.molecular.Sequence;
import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -60,16 +61,16 @@ public class DeleteDerivateOperation extends AbstractPostOperation {
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(getPostOperationEnabled() instanceof ISaveablePart){
- String confirmationQuestion = "Do you really want to delete the selected element";
+ String confirmationQuestion = Messages.DeleteDerivateOperation_REALLY_DELETE;
if(deleteConfigurator.isDeleteChildren()){
- confirmationQuestion += " and its children";
+ confirmationQuestion += Messages.DeleteDerivateOperation_AND_CHILDREN;
}
- confirmationQuestion += "?";
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, "Confirm Deletion", confirmationQuestion)){
+ confirmationQuestion += "?"; //$NON-NLS-1$
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, Messages.DeleteDerivateOperation_CONFIRM, confirmationQuestion)){
return Status.CANCEL_STATUS;
}
if(((ISaveablePart) getPostOperationEnabled()).isDirty()){
- MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+ MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return Status.CANCEL_STATUS;
}
}
@@ -97,7 +98,7 @@ public class DeleteDerivateOperation extends AbstractPostOperation {
}
}
else{
- MessagingUtils.warningDialog("Deletion failed", this, deleteResult.toString());
+ MessagingUtils.warningDialog(Messages.DeleteDerivateOperation_DELETE_FAILED, this, deleteResult.toString());
return Status.CANCEL_STATUS;
}
return Status.OK_STATUS;
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
index e7bfe694f..5a1756b9c 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.molecular.SingleRead;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -53,9 +54,6 @@ public class MoveDerivateOperation extends AbstractPostOperation {
this.targetNode = targetNode;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DerivateView derivateView = null;
@@ -63,11 +61,11 @@ public class MoveDerivateOperation extends AbstractPostOperation {
derivateView = (DerivateView) getPostOperationEnabled();
}
if(derivateView==null){
- MessagingUtils.operationDialog(this, new NullPointerException("Derivative Editor was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel());
+ MessagingUtils.operationDialog(this, new NullPointerException("Derivative Editor was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel()); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
if(derivateView.isDirty()){
- MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+ MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return Status.CANCEL_STATUS;
}
@@ -79,7 +77,7 @@ public class MoveDerivateOperation extends AbstractPostOperation {
return postExecute(null);
}
else{
- MessagingUtils.warningDialog("Moving derivatives not possible!", derivateView, "Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\" is not possible!");
+ MessagingUtils.warningDialog(Messages.MoveDerivateOperation_MOVE_NOT_POSSIBLE, derivateView, String.format(Messages.MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE, derivateView.getLabelProvider().getDerivateText(draggedNode), derivateView.getLabelProvider().getDerivateText(targetNode)));
}
return Status.CANCEL_STATUS;
}
@@ -123,10 +121,6 @@ public class MoveDerivateOperation extends AbstractPostOperation {
return false;
}
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
//swap fromNode and targetNode
@@ -134,9 +128,6 @@ public class MoveDerivateOperation extends AbstractPostOperation {
return execute(new NullProgressMonitor(), null);
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
//swap fromNode and targetNode