SetSecundumHandler_configureSettings=Configure the settings for secundum reference exchange of the subtree
SetSecundumHandler_confirm=Confirm the exchange of secundum reference
+
+DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN=Specimen editor could not be opened
+DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon/synonym
+DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon node
+
+OpenChecklistEditorHandler_CHOOSE_AREA=Please choose the areas you want to display.
+OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Could not open Distribution Editor.
+OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Could not open Distribution Editor
+OpenChecklistEditorHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenChecklistEditorHandler_GOTO_PREFERENCES=For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.
+OpenChecklistEditorHandler_NO_AREAS=No Areas to display
+OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen editor could not be opened
+
+DeleteNodeHandler_CANCEL=Cancel
+DeleteNodeHandler_CONFIRM_DELETE=Confirm deletion of children
+DeleteNodeHandler_NO=No
+DeleteNodeHandler_NODE_HAS_CHILDREN=The selected node has children, do you want to delete them, too?
+DeleteNodeHandler_REALLY_DELETE=Do you really want to delete the node. This operation is not reversable.
+DeleteNodeHandler_SAVE_CHANGES_MESSAGE=You have made changes that must be saved before you can delete the node. Would you like to proceed?
+DeleteNodeHandler_SAVE_CHANGES_TITLE=Save changes
+DeleteNodeHandler_YES=Yes
+
+DeleteNodeOperation_DELETE_FAILED=Exception occured. Delete not possible
+InsertPolytomousKeyNodeOperation_INSERT_KEY=Insert new polytomous key node
+RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY=Create new polytomous key node
+
+PolytomousKeyEditorLabels_CREATE_NODE=Create Child Polytomous Key Node
+PolytomousKeyEditorLabels_CREATE_SIBLING=Create Sibling Polytomous Key Node
+PolytomousKeyEditorLabels_DELETE_NODE=Delete Polytomous Key Node
+PolytomousKeyEditorLabels_INSERT_NODE=Insert Polytomous Key Node
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE=No Key Node Selected.Please right-click on a specific key node to create a new key node.
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE=No Key Node Selected.
+PolytomousKeyGraphContentProvider_WRONG_PARENT=Parent element has to be PolytomousKeyNode or PolytomousKey, but was:
+PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON=leaf but no taxon
+PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET=No node number set
+PolytomousKeyListEditor_EDGE=Edge
+PolytomousKeyListEditor_LINK=Link
+PolytomousKeyListEditor_NODE=Node
+PolytomousKeyListEditor_QUESTION=Question
+PolytomousKeyListEditor_STATEMENT=Statement
+PolytomousKeyListEditor_TAXON=Taxon
+PolytomousKeyListItem_NO_STATEMENT=No statement
+PolytomousKeyListItem_TAXON_EMPTY=Taxon empty
+
+TaxonNameEditor_INVALID_INPUT=Invalid Input: Must be IEditorInput
+TaxonNameEditor_INVALID_INPUT_TAXON_NULL=Invalid Input: Taxon cannot be null
+TaxonNameEditor_SAVING_COMPOSITES=Saving composite:
+TaxonNameEditor_SAVING_NAMES=Saving names
+TaxonNameEditor_THERE_SHOULD_ALWAYS_BE=There should always be a selected object.
+
+ValidationDaemon_RUNNING_DAEMON=Running validation daemon
+ValidationDaemon_VALIDATION_EXCEPTION=Validation module terminated unexpectedly:
+ValidationDaemon_VALIDATION_STOPPED=Validation module stopped
+
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION=Choose Classification
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE=The taxon is part of multiple classification. Please choose the one you want to open.
+EditorStateManager_ERROR_OPEN_WINDOW=Error opening an editor window
+EditorStateManager_REFRESH_EDITOR=Refreshing Editors
+EditorStateManager_RESTORE_EDITORS=Restoring Editors
+EditorUtil_COMFIRM_SAVE=Confirm save
+EditorUtil_CONFIRM_SAVE_MESSAGE=Warning - this operation will save the editor. This will also save all other unsaved changes in your working editor to the database. Please 'Cancel' if you are not ready to do this.
+EditorUtil_ORPHAN_ACCEPTED_TAXON=Orphaned accepted taxon
+EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE=The accepted taxon of this synonym is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+EditorUtil_ORPHAN_TAXON=Orphaned Taxon
+EditorUtil_ORPHAN_TAXON_MESSAGE=This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxa in the name editor is currently not supported. Try editing with the bulk editor
+MultiPageTaxonEditor_INVALID_INPUT=Invalid Input: Must be TaxonEditorInput
+MultiPageTaxonEditor_NEW_TAXON=New taxon
+MultiPageTaxonEditor_NO_NAME_SPECIFIED=No Name Specified
+MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE=An attempt was made to save a taxon or synonym with an empty name. Operation was cancelled.
+MultiPageTaxonEditor_POST_OP_CALLED=postOperation called on MultiPageTaxonEditor. Can you make it more specific?
+MultiPageTaxonEditor_POST_OP_NOT_ENABLED=postOperation not enabled for editor
+MultiPageTaxonEditor_REFRESH_ERROR=Error refreshing editor
+MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE=Could not refresh this editor
+MultiPageTaxonEditor_SAVING_EDITOR=Saving Editor
+MultiPageTaxonEditor_SAVING_TAXON=saving a taxon
+MultiPageTaxonEditor_SAVING_TAXON_MESSAGE=Please close and reopen the taxon again.
+MultiPageTaxonEditor_UNSAVED_DATA=Editor has unsaved data
+MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE=This editor can not be refreshed because it contains unsaved data. Refreshing this editor would discard the changes. Please save this editor, close and reopen it manually in order to get the latest content
+SimpleSelectionProvider_SETTING_SELECTION=Setting Selection
+TaxonEditorInput_INCORRECT_STATE=Incorrect state
+TaxonEditorInput_NEW_TAXON=New taxon
+TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT=Trying to open accepted taxon for a synonym or misapplication but no accepted taxa are present. This should not have happened.
+TaxonEditorInput_NOT_IMPLEMENTED=Not yet implemented
+TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE=Selected element is not type TaxonBase.
+TaxonEditorInput_OPEN_MISSAPPLIED_NAME=trying to open Mispplied Name
+TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION=The accepted taxon is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+TaxonEditorInputFactory_COULD_NOT_CREATE=Could not create element
+TaxonEditorInputFactory_NOT_FOUND_TAXON=Couldn't find taxon node with UUID
+UseObjectManager_RESET_DATA=Reset usage data
SetSecundumHandler_configureSettings=Konfigurieren Sie das Ersetzen der Secundum Referenz für den ausgewählten Teilbaum.
SetSecundumHandler_confirm=Ersetzen der Secundum Referenz bestätigen
+
+DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden
+DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Taxon-Editor für Taxon/Synonym konnte nicht geöffnet werden
+DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Taxon-Editor für Taxonknoten konnte nicht geöffnet werden
+
+OpenChecklistEditorHandler_CHOOSE_AREA=Bitte wählen Sie das Gebiet aus, das dargestellt werden soll
+OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Der Verbreitungs-Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Der Verbreitungs-Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_FAILED_TO_OPEN=Der Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_GOTO_PREFERENCES=Hierfür gehen Sie zu den Preferences, wählen Sie Checklist Editor und dann die Gebiete in dem Verbreitungs-Wizard.
+OpenChecklistEditorHandler_NO_AREAS=Keine Gebiete, die angezeigt werden können
+OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden.
+
+DeleteNodeHandler_CANCEL=Abbrechen
+DeleteNodeHandler_CONFIRM_DELETE=Löschen der Kindknoten bestätigen
+DeleteNodeHandler_NO=Nein
+DeleteNodeHandler_NODE_HAS_CHILDREN=Der ausgewählte Knoten hat Kindknoten. Sollen diese auch gelöscht werden?
+DeleteNodeHandler_REALLY_DELETE=Wollen Sie wirklich den Knoten löschen? Diese Operation ist nicht rückgängig zu machen.
+DeleteNodeHandler_SAVE_CHANGES_MESSAGE=Sie haben ungespeicherte Änderungen, die vor dem Löschen des Knotens gespeichert werden müssen. Wollen Sie fortfahren?
+DeleteNodeHandler_SAVE_CHANGES_TITLE=Änderungen speichern
+DeleteNodeHandler_YES=Ja
+
+DeleteNodeOperation_DELETE_FAILED=Ein Fehler ist aufgetreten. Löschen nicht möglich
+InsertPolytomousKeyNodeOperation_INSERT_KEY=Neuen polytomen Bestimmungsschlüssel einfügen
+RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY=Neuen polytomen Bestimmungsschlüssel anlegen
+
+PolytomousKeyEditorLabels_CREATE_NODE=Neuen polytomen Bestimmungsschlüssel anlegen
+PolytomousKeyEditorLabels_CREATE_SIBLING=Neuen polytomen Bestimmungsschlüssel anlegen
+PolytomousKeyEditorLabels_DELETE_NODE=Polytomen Bestimmungsschlüssel löschen
+PolytomousKeyEditorLabels_INSERT_NODE=Polytomen Bestimmungsschlüssel einfügen
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE=Kein Schlüssel ausgewählt. Um einen Schlüssel anzulegen, bitte auf einen ausgewählten Schlüssel einen Rechts-Klick ausführen.
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE=Kein Schlüssel ausgewählt.
+PolytomousKeyGraphContentProvider_WRONG_PARENT=Der Elternknoten muss ein PolytomousKeyNode oder PolytomousKey sein, war aber:
+PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON=leaf but no taxon
+PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET=Keine Knotennummer angegeben
+PolytomousKeyListEditor_EDGE=Edge
+PolytomousKeyListEditor_LINK=Link
+PolytomousKeyListEditor_NODE=Node
+PolytomousKeyListEditor_QUESTION=Question
+PolytomousKeyListEditor_STATEMENT=Statement
+PolytomousKeyListEditor_TAXON=Taxon
+PolytomousKeyListItem_NO_STATEMENT=No statement
+PolytomousKeyListItem_TAXON_EMPTY=Taxon leer
+
+TaxonNameEditor_INVALID_INPUT=Ungültige Eingabe: Muss IEditorInput sein
+TaxonNameEditor_INVALID_INPUT_TAXON_NULL=Ungültige Eingabe: Taxon darf nicht null sein
+TaxonNameEditor_SAVING_COMPOSITES=Speichere Composites:
+TaxonNameEditor_SAVING_NAMES=Speichere Namen
+TaxonNameEditor_THERE_SHOULD_ALWAYS_BE=Es muss immer ein Objekt ausgewählt sein.
+
+ValidationDaemon_RUNNING_DAEMON=Validation daemon läuft
+ValidationDaemon_VALIDATION_EXCEPTION=Validation-Modul wurde unerwartet beendet:
+ValidationDaemon_VALIDATION_STOPPED=Validation-Modul angehalten
+
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION=Klassifiaktion wählen
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE=Das Taxon ist in mehreren Klassifikationen vorhanden. Bitte wählen sie, welche sie öffnen möchten.
+EditorStateManager_ERROR_OPEN_WINDOW=Fehler beim Öffnen des Editors
+EditorStateManager_REFRESH_EDITOR=Aktualisiere Editor
+EditorStateManager_RESTORE_EDITORS=Editor wird wiederhergestellt
+EditorUtil_COMFIRM_SAVE=Speichern bestätigen
+EditorUtil_CONFIRM_SAVE_MESSAGE=Warnung - Diese Operation wird den Editor speichern. Ebenso werden alle weiteren ungespeicherten Änderungen gespeichert. Um das zu verhindern, drücken Sie 'Abbrechen'.
+EditorUtil_ORPHAN_ACCEPTED_TAXON=Verwaistes akzeptiertes Taxon
+EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE=Das akzeptierte Taxon dieses Synonyms ist in keiner Klassifikation vorhanden. Editieren mit dem Namens-Editor ist noch nicht implementiert. Benutzen Sie den Bulk-Editor.
+EditorUtil_ORPHAN_TAXON=Verwaistes Taxon
+EditorUtil_ORPHAN_TAXON_MESSAGE=Dies ist ein verwaistes Taxon d.h. ein Taxon, welches in keiner Klassifikation vorhanden ist und keine Taxonverknüpfungen hat. Editieren von verwaisten Taxa im Namens-Editor ist noch nicht implementiert. Benutzen Sie den Bulk-Editor.
+MultiPageTaxonEditor_INVALID_INPUT=Ungültiger Input: Muss TaxonEditorInput sein
+MultiPageTaxonEditor_NEW_TAXON=Neues Taxon
+MultiPageTaxonEditor_NO_NAME_SPECIFIED=Kein Name angegeben
+MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE=Es wurde versucht ein Taxon oder Synonym mit einem leeren Namen zu speichern. Vorgang abgebrochen.
+MultiPageTaxonEditor_POST_OP_CALLED=postOperation called on MultiPageTaxonEditor. Can you make it more specific?
+MultiPageTaxonEditor_POST_OP_NOT_ENABLED=postOperation not enabled for editor
+MultiPageTaxonEditor_REFRESH_ERROR=Fehler beim Aktualisieren des Editors
+MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE=Konnte Editor nicht aktualisieren
+MultiPageTaxonEditor_SAVING_EDITOR=Speichere Editor
+MultiPageTaxonEditor_SAVING_TAXON=Speichere Taxon
+MultiPageTaxonEditor_SAVING_TAXON_MESSAGE=Bitte Taxon schließen und erneut öffnen.
+MultiPageTaxonEditor_UNSAVED_DATA=Editor hat ungespeicherte Änderungen
+MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE=Der Editor kann nicht aktualisiert werden, weil es ungespeicherte Änderungen gibt. Aktualisieren würde diese Änderungen verwerfen. Bitte den Editor speichern, schließen und wieder öffnen, um den Inhalt zu aktualisieren.
+SimpleSelectionProvider_SETTING_SELECTION=Auswahl setzen
+TaxonEditorInput_INCORRECT_STATE=Ungültiger Zustand
+TaxonEditorInput_NEW_TAXON=Neues Taxon
+TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT=Öffnen eins akzeptierten Taxons für ein Synonym oder eine Misapplikation, aber kein akzeptiertes Taxon gefunden. Das sollte nicht passieren.
+TaxonEditorInput_NOT_IMPLEMENTED=Noch nicht implementiert
+TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE=Ausgewähltes Element ist nicht vom Typ TaxonBase.
+TaxonEditorInput_OPEN_MISSAPPLIED_NAME=Öffnen einer Misapplikation
+TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION=Das akzeptierte Taxon ist in keiner Klassifikation vorhanden. Editieren mit dem Namens-Editor ist noch nicht implementier. Benutzen Sie den Bulk-Editor.
+TaxonEditorInputFactory_COULD_NOT_CREATE=Element konnte nicht erstellt werden
+TaxonEditorInputFactory_NOT_FOUND_TAXON=Konnte Taxonknoten nicht finden. UUID
+UseObjectManager_RESET_DATA=Wiederherstellen der Nutzugsdaten
\r
viewCommandMapping.viewerName.NAME_EDITOR = Name Editor\r
viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen Editor\r
-viewCommandMapping.viewerName.CHECKLIST_EDITOR = Distribution Editor
\ No newline at end of file
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Distribution Editor\r
+command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN = Open specimen editor for type specimen
\ No newline at end of file
viewCommandMapping.viewerName.NAME_EDITOR = Namenseditor
viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen-Editor
-viewCommandMapping.viewerName.CHECKLIST_EDITOR = Verbreitungs-Editor
\ No newline at end of file
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Verbreitungs-Editor
+command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN = Öffne Specimen-Editor für Typusbelege
\ No newline at end of file
<command
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenSpecimenEditorForTypeSpecimenHandler"
id="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
- name="Open specimen editor for type specimen">
+ name="%command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN">
</command>
</extension>
<viewCommandMapping
commandId="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
selection="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"
- viewerName="Specimen Editor">
+ viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
</viewCommandMapping>
</extension>
</plugin>
private static int SEPARATOR = -10;
private static int EOF = -20;
- private static final String TYPE_NAME = "cdmdata-transfer-format";
+ private static final String TYPE_NAME = "cdmdata-transfer-format"; //$NON-NLS-1$
private static final int TYPE_ID = registerType (TYPE_NAME);
private static final CdmDataTransfer instance = new CdmDataTransfer();
public ChooseFromMultipleTaxonNodesDialog(Shell parent) {
super(parent);
- setTitle("Choose Classification");
- setMessage("The taxon is part of multiple classification. Please choose the one you want to open.");
+ setTitle(Messages.ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION);
+ setMessage(Messages.ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE);
setContentProvider(new ClassificationContentProvider());
setLabelProvider(new ClassificationLabelProvider());
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
*/
public class EditorStateManager extends ContextListenerAdapter {
- private static final String EDITORS = "editors";
+ private static final String EDITORS = "editors"; //$NON-NLS-1$
- private static final String EDITOR = "editor";
+ private static final String EDITOR = "editor"; //$NON-NLS-1$
private TaxonEditorInputFactory inputFactory;
-
+
/**
* <p>Constructor for EditorStateManager.</p>
*/
public EditorStateManager() {
inputFactory = new TaxonEditorInputFactory();
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
*/
EditorUtil.closeAll();
resetConstantViews();
}
-
+
/**
- *
+ *
*/
private void resetConstantViews() {
AbstractCdmEditorViewPart descriptiveView = (AbstractCdmEditorViewPart) EditorUtil.getView(DescriptiveViewPart.ID, false);
AbstractCdmEditorViewPart mediaView = (AbstractCdmEditorViewPart) EditorUtil.getView(MediaViewPart.ID, false);
AbstractCdmEditorViewPart conceptView = (AbstractCdmEditorViewPart) EditorUtil.getView(ConceptViewPart.ID, false);
-
+
if(descriptiveView != null){
descriptiveView.showEmptyPage();
}
public void contextStart(IMemento memento, IProgressMonitor monitor) {
restoreEditors(memento, monitor);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.model.ContextListenerAdapter#contextRefresh(org.eclipse.core.runtime.IProgressMonitor)
*/
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
saveEditorState(memento);
}
-
+
/**
- * Reads taxon node UUIDs from the given memento and tries to open an editor
+ * Reads taxon node UUIDs from the given memento and tries to open an editor
* for each of the found UUIDs.
- *
+ *
* @param memento
*/
private void restoreEditors(final IMemento memento, IProgressMonitor monitor){
if(memento == null){
return;
}
-
+
IProgressMonitor subProgressMonitor = EditorUtil.getSubProgressMonitor(monitor, 1);
-
+
IMemento editorMementos = memento.getChild(EDITORS);
IMemento[] editorInputs = editorMementos.getChildren(EDITOR);
-
- subProgressMonitor.beginTask("Restoring Editors", 1 + editorInputs.length * 2);
- subProgressMonitor.subTask("Restoring Editors");
+
+ String taskName = Messages.EditorStateManager_RESTORE_EDITORS;
+ subProgressMonitor.beginTask(taskName, 1 + editorInputs.length * 2);
+ subProgressMonitor.subTask(taskName);
subProgressMonitor.worked(1);
-
+
for(IMemento editorInput : editorInputs){
TaxonEditorInput input = (TaxonEditorInput) inputFactory.createElement(editorInput);
subProgressMonitor.worked(1);
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(getClass(), "Error opening an editor window", e);
+ MessagingUtils.error(getClass(), Messages.EditorStateManager_ERROR_OPEN_WINDOW, e);
}
}
subProgressMonitor.worked(1);
}
subProgressMonitor.done();
}
-
+
/**
* @param monitor
*/
private void refreshEditors(IProgressMonitor monitor) {
IProgressMonitor subProgressMonitor = EditorUtil.getSubProgressMonitor(monitor, 1);
-
+
Set<IEditorPart> openEditors = EditorUtil.getOpenEditors();
-
-
- subProgressMonitor.beginTask("Refreshing Editors", openEditors.size() * 2);
-
+
+
+ subProgressMonitor.beginTask(Messages.EditorStateManager_REFRESH_EDITOR, openEditors.size() * 2);
+
Set<UUID> uuids = new HashSet<UUID>();
-
+
for(IEditorPart editor : openEditors){
if(editor instanceof MultiPageTaxonEditor){
try {
uuids.add(((TaxonEditorInput) editor.getEditorInput()).getTaxonNode().getUuid());
-
+
// ((MultiPageTaxonEditor) editor).close(false);
EditorUtil.close((MultiPageTaxonEditor)editor);
subProgressMonitor.worked(1);
}
}
}
-
+
for(UUID uuid : uuids){
try {
EditorUtil.openTaxonNode(uuid);
}
subProgressMonitor.worked(1);
}
-
+
subProgressMonitor.done();
}
-
+
/**
- * Saves the UUIDs
- *
+ * Saves the UUIDs
+ *
* @param memento
*/
private void saveEditorState(IMemento memento){
if(memento == null){
return;
}
-
+
Set<IEditorPart> editors = EditorUtil.getOpenEditors();
-
+
IMemento editorMementos = memento.createChild(EDITORS);
-
+
for(IEditorPart editor : editors){
IEditorInput input = editor.getEditorInput();
if(input instanceof IPersistable){
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
if (taxonBase != null && taxonBase.isOrphaned()) {
if(taxonBase.isInstanceOf(Synonym.class)){
- MessagingUtils.warningDialog("Orphaned accepted taxon", TaxonEditorInput.class, "The accepted "
- + "taxon of this synonym is not part of any classification. Editing with the "
- + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
+ MessagingUtils.warningDialog(Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON, TaxonEditorInput.class, Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE);
return;
}
else{
- MessagingUtils.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon "
- + "i.e. a taxon that is not connected to a classification and not having any taxonomic "
- + "relationships. Editing of orphaned taxa in the name editor is currently not supported. "
- + "Try editing with the bulk editor");
+ MessagingUtils.warningDialog(Messages.EditorUtil_ORPHAN_TAXON, TaxonEditorInput.class, Messages.EditorUtil_ORPHAN_TAXON_MESSAGE);
return;
}
}
if (editor.isDirty()) {
boolean doSave = MessageDialog
- .openConfirm(shell, "Confirm save",
- "Warning - this operation will save the editor. This will also save all other unsaved changes " +
- "in your working editor to the database. Please 'Cancel' if you are not ready to do this.");
+ .openConfirm(shell, Messages.EditorUtil_COMFIRM_SAVE,
+ Messages.EditorUtil_CONFIRM_SAVE_MESSAGE);
if (!doSave) {
return false;
*/
public class Messages extends NLS {
private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
+ public static String CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR;
+ public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION;
+ public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE;
public static String ConceptGraphView_VIEWER_NAME;
public static String ConceptViewPart_VIEWER_NAME;
public static String CreateDerivateContextMenu_ADD;
public static String CreateDerivateContextMenu_TISSUE_SAMPLE;
public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT;
public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR;
- public static String DeleteDerivateOperation_AND_CHILDREN;
+ public static String DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN;
+ public static String DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN;
+ public static String DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN;
+ 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 DeleteNodeHandler_CANCEL;
+ public static String DeleteNodeHandler_CONFIRM_DELETE;
+ public static String DeleteNodeHandler_NO;
+ public static String DeleteNodeHandler_NODE_HAS_CHILDREN;
+ public static String DeleteNodeHandler_REALLY_DELETE;
+ public static String DeleteNodeHandler_SAVE_CHANGES_MESSAGE;
+ public static String DeleteNodeHandler_SAVE_CHANGES_TITLE;
+ public static String DeleteNodeHandler_YES;
+ public static String DeleteNodeOperation_DELETE_FAILED;
public static String DeleteTaxonBaseHandler_CONFIRM_DELETION;
public static String DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT;
public static String DeleteTaxonBaseHandler_REALLY_DELETE_TAXON;
public static String DescriptiveViewPart_EXPAND_ALL;
public static String DescriptiveViewPart_FACTUAL_DATA;
public static String DescriptiveViewPart_SHOW_ALL_DATA;
+ public static String EditorStateManager_ERROR_OPEN_WINDOW;
+ public static String EditorStateManager_REFRESH_EDITOR;
+ public static String EditorStateManager_RESTORE_EDITORS;
+ public static String EditorUtil_COMFIRM_SAVE;
+ public static String EditorUtil_CONFIRM_SAVE_MESSAGE;
+ public static String EditorUtil_ORPHAN_ACCEPTED_TAXON;
+ public static String EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE;
+ public static String EditorUtil_ORPHAN_TAXON;
+ public static String EditorUtil_ORPHAN_TAXON_MESSAGE;
+ public static String InsertPolytomousKeyNodeOperation_INSERT_KEY;
public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
+ public static String MultiPageTaxonEditor_INVALID_INPUT;
+ public static String MultiPageTaxonEditor_NEW_TAXON;
+ public static String MultiPageTaxonEditor_NO_NAME_SPECIFIED;
+ public static String MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE;
+ public static String MultiPageTaxonEditor_POST_OP_CALLED;
+ public static String MultiPageTaxonEditor_POST_OP_NOT_ENABLED;
+ public static String MultiPageTaxonEditor_REFRESH_ERROR;
+ public static String MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE;
+ public static String MultiPageTaxonEditor_SAVING_EDITOR;
+ public static String MultiPageTaxonEditor_SAVING_TAXON;
+ public static String MultiPageTaxonEditor_SAVING_TAXON_MESSAGE;
+ public static String MultiPageTaxonEditor_UNSAVED_DATA;
+ public static String MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE;
+ public static String OpenChecklistEditorHandler_CHOOSE_AREA;
+ public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
+ public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
+ public static String OpenChecklistEditorHandler_FAILED_TO_OPEN;
+ public static String OpenChecklistEditorHandler_GOTO_PREFERENCES;
+ public static String OpenChecklistEditorHandler_NO_AREAS;
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 OpenDerivateViewHandler_COULD_NOT_OPEN;
+ public static String PolytomousKeyEditorLabels_CREATE_NODE;
+ public static String PolytomousKeyEditorLabels_CREATE_SIBLING;
+ public static String PolytomousKeyEditorLabels_DELETE_NODE;
+ public static String PolytomousKeyEditorLabels_INSERT_NODE;
+ public static String PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE;
+ public static String PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE;
+ public static String PolytomousKeyGraphContentProvider_WRONG_PARENT;
+ public static String PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON;
+ public static String PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET;
+ public static String PolytomousKeyListEditor_EDGE;
+ public static String PolytomousKeyListEditor_LINK;
+ public static String PolytomousKeyListEditor_NODE;
+ public static String PolytomousKeyListEditor_QUESTION;
+ public static String PolytomousKeyListEditor_STATEMENT;
+ public static String PolytomousKeyListEditor_TAXON;
+ public static String PolytomousKeyListItem_NO_STATEMENT;
+ public static String PolytomousKeyListItem_TAXON_EMPTY;
+ public static String RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
+ public static String SimpleSelectionProvider_SETTING_SELECTION;
public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
- public static String UsesViewPart_VIEWER_NAME;
+ public static String UseObjectManager_RESET_DATA;
+ public static String UsesViewPart_VIEWER_NAME;
public static String SetSecundumHandler_configureSettings;
public static String SetSecundumHandler_confirm;
+ public static String TaxonEditorInput_INCORRECT_STATE;
+ public static String TaxonEditorInput_NEW_TAXON;
+ public static String TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT;
+ public static String TaxonEditorInput_NOT_IMPLEMENTED;
+ public static String TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE;
+ public static String TaxonEditorInput_OPEN_MISSAPPLIED_NAME;
+ public static String TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION;
+ public static String TaxonEditorInputFactory_COULD_NOT_CREATE;
+ public static String TaxonEditorInputFactory_NOT_FOUND_TAXON;
+ public static String TaxonNameEditor_INVALID_INPUT;
+ public static String TaxonNameEditor_INVALID_INPUT_TAXON_NULL;
+ public static String TaxonNameEditor_SAVING_COMPOSITES;
+ public static String TaxonNameEditor_SAVING_NAMES;
+ public static String TaxonNameEditor_THERE_SHOULD_ALWAYS_BE;
+ public static String ValidationDaemon_RUNNING_DAEMON;
+ public static String ValidationDaemon_VALIDATION_EXCEPTION;
+ public static String ValidationDaemon_VALIDATION_STOPPED;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon"; //$NON-NLS-1$
private boolean dirty;
/** {@inheritDoc} */
@Override
public void doSave(IProgressMonitor monitor) {
- monitor.beginTask("Saving Editor", 4);
+ monitor.beginTask(Messages.MultiPageTaxonEditor_SAVING_EDITOR, 4);
try {
if (!conversation.isBound()) {
conversation.bind();
for (IEditorPart editorPage : getPages()) {
if (editorPage instanceof TaxonNameEditor) {
if (((TaxonNameEditor) editorPage).checkForEmptyNames()) {
- MessageDialog.openWarning(AbstractUtility.getShell(), "No Name Specified",
- "An attempt was made to save a taxon or synonym with "
- + "an empty name. Operation was cancelled.");
+ MessageDialog.openWarning(AbstractUtility.getShell(), Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED,
+ Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE);
return;
}
}
// commit the conversation and start a new transaction immediately
input.merge();
-
+
conversation.commit(true);
CdmApplicationState.getCurrentDataChangeService()
.fireChangeEvent(new CdmChangeEvent(Action.Update, input.getTaxonNode() , MultiPageTaxonEditor.class), true);
monitor.worked(1);
} catch (Exception e) {
setFocus();
- MessagingUtils.operationDialog(this, e, TaxeditorEditorPlugin.PLUGIN_ID,"saving a taxon", " Please close and reopen the taxon again.");
+ MessagingUtils.operationDialog(this, e, TaxeditorEditorPlugin.PLUGIN_ID,Messages.MultiPageTaxonEditor_SAVING_TAXON, Messages.MultiPageTaxonEditor_SAVING_TAXON_MESSAGE);
disableEditor(true);
} finally {
monitor.done();
if (!(input instanceof TaxonEditorInput)) {
throw new PartInitException(
- "Invalid Input: Must be TaxonEditorInput");
+ Messages.MultiPageTaxonEditor_INVALID_INPUT);
}
this.input = (TaxonEditorInput) input;
partName = name.getTitleCache();
}
- if (partName == null || partName.equals("")) {
- partName = ("New taxon");
+ if (partName == null || partName.equals("")) { //$NON-NLS-1$
+ partName = (Messages.MultiPageTaxonEditor_NEW_TAXON);
}
setPartName(partName);
if (editor instanceof IPostOperationEnabled) {
((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
} else {
- MessagingUtils.warn(getClass(), "postOperation not enabled for editor " + editor);
+ MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_NOT_ENABLED + editor);
}
}
- MessagingUtils.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
+ MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_CALLED);
return false;
}
*/
public void reload() {
if (isDirty()) {
- MessagingUtils.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
- + "refreshed because it contains unsaved data. Refreshing "
- + "this editor would discard the changes. Please save this editor, "
- + "close and reopen it manually in order to get the latest content");
+ MessagingUtils.warningDialog(Messages.MultiPageTaxonEditor_UNSAVED_DATA, getClass(), Messages.MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE);
} else {
TaxonEditorInput input = (TaxonEditorInput) getEditorInput();
editorPart.redraw();
}
} catch (Exception e) {
- MessagingUtils.messageDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
+ MessagingUtils.messageDialog(Messages.MultiPageTaxonEditor_REFRESH_ERROR, getClass(), Messages.MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE, e);
}
}
}
@Override
public String toString() {
- return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
+ return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput()); //$NON-NLS-1$
}
@Override
if((event.getEntity() instanceof TaxonNode)
&& input.getTaxonNode().equals(event.getEntity())){
//EditorUtil.close(source);
- logger.debug("Closing open editor for deleted taxon.");
+ logger.debug("Closing open editor for deleted taxon."); //$NON-NLS-1$
}
}
}
if(input.getTaxon().getName().equals(event.getEntity())){
// set the name of the editor window
source.setPartName();
- logger.debug("Updating title of taxons editor.");
+ logger.debug("Updating title of taxons editor."); //$NON-NLS-1$
}
}
// TODO other stuff to happen
* @version 1.0
*/
public enum Page {
- NAME ("Name", TaxonNameEditor.class, 0);
+ NAME ("Name", TaxonNameEditor.class, 0); //$NON-NLS-1$
private String title;
private Class<?> clazz;
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
*/
public class SimpleSelectionProvider implements ISelectionProvider {
- private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
+ private static final String SETTING_SELECTION = Messages.SimpleSelectionProvider_SETTING_SELECTION;
+ private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
private ISelection selection;
private Job job;
-
+
/*
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
/** {@inheritDoc} */
- public void addSelectionChangedListener(
+ @Override
+ public void addSelectionChangedListener(
ISelectionChangedListener listener) {
selectionChangedListeners.add(listener);
}
*
* @return a {@link org.eclipse.jface.viewers.ISelection} object.
*/
- public ISelection getSelection() {
+ @Override
+ public ISelection getSelection() {
if (selection != null){
return selection;
}
* @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
/** {@inheritDoc} */
- public void removeSelectionChangedListener(
+ @Override
+ public void removeSelectionChangedListener(
ISelectionChangedListener listener) {
selectionChangedListeners.remove(listener);
}
* @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
*/
/** {@inheritDoc} */
- public void setSelection(ISelection selection) {
+ @Override
+ public void setSelection(ISelection selection) {
this.selection = selection;
-
+
// cancel previous selection setting
if(job != null){
if(job.getState() != Job.NONE){
}
job = null;
}
-
+
if(job == null){
final SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
final Display display = Display.getCurrent();
- job = new Job("Setting Selection"){
-
+ job = new Job(SETTING_SELECTION){
+
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Setting Selection", 10);
-
+ monitor.beginTask(SETTING_SELECTION, 10);
+
if(!monitor.isCanceled()){
display.asyncExec(new Runnable() {
-
- public void run() {
+
+ @Override
+ public void run() {
SimpleSelectionProvider.this.fireSelectionChanged(selectionChangedEvent);
}
});
}
-
+
return Status.OK_STATUS;
}
-
+
};
-
+
job.setPriority(Job.DECORATE);
job.schedule();
}
-
+
}
private void fireSelectionChanged(final SelectionChangedEvent event) {
-
+
for (final ISelectionChangedListener listener : selectionChangedListeners) {
SafeRunnable.run(new SafeRunnable() {
- public void run() {
+ @Override
+ public void run() {
listener.selectionChanged(event);
}
});
*/
public class TaxonEditorInput extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled, IPersistableElement {
+ private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
+
private final ConversationHolder conversation;
private TaxonNode taxonNode;
TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths());
if(taxonNode == null){
- MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
+ MessagingUtils.warningDialog(Messages.TaxonEditorInput_NOT_IMPLEMENTED, TaxonEditorInput.class, Messages.TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE);
}
init(taxonNode);
if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
// TODO get accepted taxon
- MessagingUtils.info("trying to open Mispplied Name ");
+ MessagingUtils.info(Messages.TaxonEditorInput_OPEN_MISSAPPLIED_NAME);
Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
}
} else if (taxonNodes.size() == 0) {
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state",TaxonEditorInput.class,"The accepted "
- + "taxon is not part of any classification. Editing with the "
- + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
+ MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInput.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
}
}
setInputForMultipleNodes(conversation, taxonNodes);
}else if(taxa.size() == 0){
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
- " no accepted taxa are present. This should not have happened.");
+ MessagingUtils.warningDialog(INCORRECT_STATE, TaxonEditorInput.class, Messages.TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT);
}
}
}
TaxonNameBase<?, ?> name = getTaxon().getName();
if (name == null || name.getTitleCache() == null) {
- return "New taxon";
+ return Messages.TaxonEditorInput_NEW_TAXON;
} else {
return name.getTitleCache();
}
private List<String> getTaxonNodePropertyPaths() {
List<String> taxonNodePropertyPaths = new ArrayList<String>();
for(String propertyPath : getTaxonBasePropertyPaths()) {
- taxonNodePropertyPaths.add("taxon." + propertyPath);
+ taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
}
return taxonNodePropertyPaths;
}
private List<String> getTaxonBasePropertyPaths() {
List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
- "sec",
- "createdBy",
- "updatedBy",
- "annotations",
- "markers",
- "credits",
- "extensions",
- "rights",
- "sources",
- "descriptions",
- "relationsToThisTaxon",
- "relationsFromThisTaxon",
- "taxonNodes",
- "descriptions.descriptionElements.feature",
- "descriptions.descriptionElements.area",
- "descriptions.descriptionElements.status",
- "descriptions.markers",
- "name.descriptions",
- "name.typeDesignations",
- "name.status",
- "name.nomenclaturalReference.inReference",
- "name.taxonBases.taxonNodes",
- "name.relationsFromThisName",
- "name.relationsToThisName",
- "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
- "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
- "synonymRelations.synonym.name.status.type",
- "synonymRelations.synonym.name.relationsToThisName.fromName",
- "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
- "synonymRelations.synonym.name.nomenclaturalReference.authorship",
- "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+ "sec", //$NON-NLS-1$
+ "createdBy", //$NON-NLS-1$
+ "updatedBy", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "credits", //$NON-NLS-1$
+ "extensions", //$NON-NLS-1$
+ "rights", //$NON-NLS-1$
+ "sources", //$NON-NLS-1$
+ "descriptions", //$NON-NLS-1$
+ "relationsToThisTaxon", //$NON-NLS-1$
+ "relationsFromThisTaxon", //$NON-NLS-1$
+ "taxonNodes", //$NON-NLS-1$
+ "descriptions.descriptionElements.feature", //$NON-NLS-1$
+ "descriptions.descriptionElements.area", //$NON-NLS-1$
+ "descriptions.descriptionElements.status", //$NON-NLS-1$
+ "descriptions.markers", //$NON-NLS-1$
+ "name.descriptions", //$NON-NLS-1$
+ "name.typeDesignations", //$NON-NLS-1$
+ "name.status", //$NON-NLS-1$
+ "name.nomenclaturalReference.inReference", //$NON-NLS-1$
+ "name.taxonBases.taxonNodes", //$NON-NLS-1$
+ "name.relationsFromThisName", //$NON-NLS-1$
+ "name.relationsToThisName", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.status.type", //$NON-NLS-1$
+ "synonymRelations.synonym.name.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations" //$NON-NLS-1$
});
return taxonBasePropertyPaths;
return null;
}
if (taxonNodeUuid == null || CdmStore.getService(IClassificationService.class).getTaxonNodeByUuid(UUID.fromString(taxonNodeUuid)) == null) {
- MessagingUtils.warn(this.getClass(), "Couldn't find taxon node with UUID " + taxonNodeUuid);
+ MessagingUtils.warn(this.getClass(), Messages.TaxonEditorInputFactory_NOT_FOUND_TAXON + taxonNodeUuid);
return null;
}
try {
return TaxonEditorInput.NewInstance(UUID.fromString(taxonNodeUuid));
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create element", TaxonEditorInputFactory.class, e.getMessage());
+ MessagingUtils.warningDialog(Messages.TaxonEditorInputFactory_COULD_NOT_CREATE, TaxonEditorInputFactory.class, e.getMessage());
}
return null;
}
/**\r
* The context listener will call this class when a new context is started.\r
* It will reset the UseObjectStore to guarantee the static\r
- * content of the store will be refreshed each time we load a new context. \r
+ * content of the store will be refreshed each time we load a new context.\r
* @author a.theys\r
* @author a.mueller\r
* @created mar 13, 2012\r
*/\r
public class UseObjectManager extends ContextListenerAdapter{\r
\r
- public UseObjectManager() {\r
+ private static final String RESET_USAGE_DATA = Messages.UseObjectManager_RESET_DATA;\r
+\r
+\r
+ public UseObjectManager() {\r
CdmStore.getContextManager().addContextListener(this);\r
}\r
\r
\r
@Override\r
public void contextRefresh(IProgressMonitor monitor) {\r
- monitor.subTask("Reset usage data");\r
- MessagingUtils.warn(getClass(), "Reset usage data");\r
+ monitor.subTask(RESET_USAGE_DATA);\r
+ MessagingUtils.warn(getClass(), RESET_USAGE_DATA);\r
UseObjectStore.reset();\r
}\r
\r
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.ui.group.grantedauthority.CdmAuthorityCompositeViewer;
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving CDM Authority Editor", 1);
+ monitor.beginTask(Messages.CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR, 1);
getConversationHolder().commit(true);
((CdmAuthorityEditorInput) getEditorInput()).merge();
dirty = false;
--- /dev/null
+CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR=Saving CDM Authority Editor
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- logger.debug("Handler called: " + this.getClass().getCanonicalName());
+ logger.debug("Handler called: " + this.getClass().getCanonicalName()); //$NON-NLS-1$
try {
EditorUtil.openEmpty(null);
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
public class OpenChecklistEditorHandler extends DefaultOpenHandlerBase<ITaxonTreeNode> {
- @Override
+ private static final String FAILED_TO_OPEN_EDITOR = Messages.OpenChecklistEditorHandler_FAILED_TO_OPEN;
+ private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
+ private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
+
+ @Override
protected ITaxonTreeNode getEntity(UUID uuid) {
ITaxonTreeNode taxonTreeNode = CdmStore.getService(ITaxonNodeService.class).load(uuid);
if(taxonTreeNode==null){
protected void open(ExecutionEvent event, ITaxonTreeNode entity) {
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE)) {
if (StringUtils.isBlank(PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.DISTRIBUTION_AREA_OCCURENCE_STATUS) )){
- MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
- + "For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+ MessagingUtils.informationDialog(Messages.OpenChecklistEditorHandler_NO_AREAS, Messages.OpenChecklistEditorHandler_CHOOSE_AREA
+ + Messages.OpenChecklistEditorHandler_GOTO_PREFERENCES);
this.dispose();
return;
}
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+ MessagingUtils.error(OpenChecklistEditorHandler.class, COULD_NOT_OPEN_DISTRIBUTION_EDITOR, e);
} catch (NullPointerException npe) {
- MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
- "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+ MessagingUtils.messageDialog(FAILED_TO_OPEN_EDITOR, OpenChecklistEditorHandler.class,
+ COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED, npe);
}
} else if (entity instanceof TaxonNode) {
ChecklistEditorInput input = new ChecklistEditorInput((TaxonNode) entity);
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+ MessagingUtils.error(OpenChecklistEditorHandler.class, COULD_NOT_OPEN_DISTRIBUTION_EDITOR, e);
} catch (NullPointerException npe) {
- MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
- "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+ MessagingUtils.messageDialog(FAILED_TO_OPEN_EDITOR, OpenChecklistEditorHandler.class,
+ COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED, npe);
}
}
- }
+ }
}
}
import org.eclipse.ui.PartInitException;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.open(new DerivateViewEditorInput());
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, Messages.OpenDerivateViewHandler_COULD_NOT_OPEN, e);
}
return null;
}
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- throw new RuntimeException("Open parent not supported anymore");
+ throw new RuntimeException("Open parent not supported anymore"); //$NON-NLS-1$
// Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent();
//
// if(parent != null){
*/
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- logger.debug("Handler called: " + this.getClass().getCanonicalName());
+ logger.debug("Handler called: " + this.getClass().getCanonicalName()); //$NON-NLS-1$
// TODO what is this for?
EditorUtil.setSaving(true);
* @author BenStoever
*/
public class SpecimenPropertyTester extends PropertyTester {
- private static final String SEQUENCE = "isSequence";
- private static final String SINGLE_READ = "isSingleRead";
- private static final String IS_SINGLEREAD_REUSABLE_HERE = "isSingleReadReusableHere";
- private static final String IS_SINGLEREAD_REUSED = "isSingleReadReused";
+ private static final String SEQUENCE = "isSequence"; //$NON-NLS-1$
+ private static final String SINGLE_READ = "isSingleRead"; //$NON-NLS-1$
+ private static final String IS_SINGLEREAD_REUSABLE_HERE = "isSingleReadReusableHere"; //$NON-NLS-1$
+ private static final String IS_SINGLEREAD_REUSED = "isSingleReadReused"; //$NON-NLS-1$
public SpecimenPropertyTester() {}
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.open(new DerivateViewEditorInput(entity.getUuid()));
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenSpecimenEditorForTypeSpecimenHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(DefaultOpenSpecimenEditorForTypeSpecimenHandler.class, Messages.DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN, e);
}
}
import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
try {
EditorUtil.openTaxonBase(entity.getUuid());
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenTaxonEditorForTaxonBaseHandler.class, "Could not open taxon editor for taxon/synonym "+entity, e);
+ MessagingUtils.error(DefaultOpenTaxonEditorForTaxonBaseHandler.class, Messages.DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN+entity, e);
}
}
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, "Could not open taxon editor for taxon "+input.getTaxon(), e);
+ MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, Messages.DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN+input.getTaxon(), e);
}
}
// The plug-in ID
/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.editor"</code> */
- public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
+ public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor"; //$NON-NLS-1$
// The shared instance
private static TaxeditorEditorPlugin plugin;
// CdmStore.getContextManager().addContextListener(vcl);
plugin = this;
- logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
+ logger.trace("Plugin started: " + this.getBundle().getSymbolicName()); //$NON-NLS-1$
}
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
- logger.trace("Plugin stopped");
+ logger.trace("Plugin stopped"); //$NON-NLS-1$
}
/**
Map<Object,List<String>> propertyPathsMap = new HashMap<Object,List<String>>();
List<String> polytomousKeyNodePropertyPaths = Arrays.asList(new String[] {
- "statement"
+ "statement" //$NON-NLS-1$
});
- propertyPathsMap.put("children", polytomousKeyNodePropertyPaths);
+ propertyPathsMap.put("children", polytomousKeyNodePropertyPaths); //$NON-NLS-1$
return propertyPathsMap;
}
*/
package eu.etaxonomy.taxeditor.editor.key.polytomous;
+import eu.etaxonomy.taxeditor.editor.Messages;
+
/**
* @author cmathew
* @date 21 Jul 2015
*/
public interface PolytomousKeyEditorLabels {
- public static final String CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL = "Create Child Polytomous Key Node";
- public static final String CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL = "Create Sibling Polytomous Key Node";
- public static final String INSERT_NODE_POLYTOMOUS_KEY_NODE_LABEL = "Insert Node Polytomous Key Node";
- public static final String DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL = "Insert Node Polytomous Key Node";
+ public static final String CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_CREATE_NODE;
+ public static final String CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_CREATE_SIBLING;
+ public static final String INSERT_NODE_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_INSERT_NODE;
+ public static final String DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_DELETE_NODE;
- public static final String NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new child key node.";
- public static final String NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new sibling key node.";
- public static final String NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new key node.";
+ public static final String NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE = Messages.PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE;
+ public static final String NO_KEY_NODE_SELECTED = Messages.PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE;
}
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
/**
children.add(((PolytomousKey) parent).getRoot());
} else {
throw new RuntimeException(
- "Parent element has to be PolytomousKeyNode or PolytomousKey, but was: "
+ Messages.PolytomousKeyGraphContentProvider_WRONG_PARENT
+ parent.getClass());
}
AbstractGraphKeyEditor<PolytomousKey> implements
IPolytomousKeyEditorPage {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.graph";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.graph"; //$NON-NLS-1$
private final KeyEditor editor;
/**
import eu.etaxonomy.cdm.model.description.KeyStatement;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
import eu.etaxonomy.taxeditor.store.CdmStore;
class PolytomousKeyLabelProvider extends LabelProvider implements
IEntityStyleProvider {
- public static final String LEAF_BUT_NO_TAXON = "leaf but no taxon";
- public static final String NO_NODE_NUMBER = "No node number set";
- public static final String EMPTY = "";
+ public static final String LEAF_BUT_NO_TAXON = Messages.PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON;
+ public static final String NO_NODE_NUMBER = Messages.PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET;
+ public static final String EMPTY = ""; //$NON-NLS-1$
@Override
public String getText(Object element) {
}
if (keyNode.getNodeNumber() != null) {
- String statementLabel = "";
+ String statementLabel = ""; //$NON-NLS-1$
String nodeNumber = keyNode.getNodeNumber().toString();
KeyStatement question = keyNode.getQuestion();
if (question != null) {
- statementLabel += " "
+ statementLabel += " " //$NON-NLS-1$
+ question.getLabelText(CdmStore
.getDefaultLanguage());
}
- return String.format("%s. %s", nodeNumber, statementLabel);
+ return String.format("%s. %s", nodeNumber, statementLabel); //$NON-NLS-1$
} else {
return NO_NODE_NUMBER;
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
}
}
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.list";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.list"; //$NON-NLS-1$
private TableViewer viewer;
// This will create the columns for the table
private void createColumns(TableViewer viewer) {
Table table = viewer.getTable();
- String[] titles = { "Node", "Question", "Edge", "Statement", "Link", "Taxon" };
+ String[] titles = { Messages.PolytomousKeyListEditor_NODE, Messages.PolytomousKeyListEditor_QUESTION, Messages.PolytomousKeyListEditor_EDGE, Messages.PolytomousKeyListEditor_STATEMENT, Messages.PolytomousKeyListEditor_LINK, Messages.PolytomousKeyListEditor_TAXON };
int[] bounds = { 50, 200, 50, 200, 100, 200 };
for (int i = 0; i < titles.length; i++) {
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
label_statement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
Link link = new Link(getLayoutComposite(), SWT.NONE);
- link.setText("<a>" + getItemLink() + "</a>");
+ link.setText("<a>" + getItemLink() + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
link.setData(getItemLinkData());
link.addSelectionListener(getLinkSelectionListener());
private String getItemNumber() {
if (isParentRoot()) {
- return "root";
+ return "root"; //$NON-NLS-1$
} else {
PolytomousKeyNode parent = getParent();
String itemNumber = parent.getNodeNumber() != null ? parent
- .getNodeNumber().toString() : "NaN";
+ .getNodeNumber().toString() : "NaN"; //$NON-NLS-1$
int index = parent.getChildren().indexOf(entity);
for (int i = 0; i < index; i++) {
- itemNumber += "'";
+ itemNumber += "'"; //$NON-NLS-1$
}
return itemNumber;
private String getItemQuestion() {
if (isParentRoot()) {
- return "";
+ return ""; //$NON-NLS-1$
} else {
KeyStatement question = getParent().getQuestion();
return question != null ? question.getLabelText(CdmStore
- .getDefaultLanguage()) : "";
+ .getDefaultLanguage()) : ""; //$NON-NLS-1$
}
}
private String getItemStatement() {
KeyStatement statement = entity.getStatement();
return statement != null ? CdmUtils.Nz(statement.getLabelText(CdmStore
- .getDefaultLanguage())) : "No statement";
+ .getDefaultLanguage())) : Messages.PolytomousKeyListItem_NO_STATEMENT;
}
private String getItemLink() {
String taxonString = entity.getTaxon() != null ? entity.getTaxon()
- .getName().getTitleCache() : "Taxon empty";
+ .getName().getTitleCache() : Messages.PolytomousKeyListItem_TAXON_EMPTY;
return entity.getChildren().isEmpty() ? taxonString : entity
.getNodeNumber().toString();
SWT.COLOR_BLUE);
private Styler styler;
- private static final String EMPTY = "";
+ private static final String EMPTY = ""; //$NON-NLS-1$
// TODO make this configurable via preferences
- private static final String INCREMENTOR_CHARACTER = "'";
+ private static final String INCREMENTOR_CHARACTER = "'"; //$NON-NLS-1$
/*
* (non-Javadoc)
private String getItemNumber(PolytomousKeyNode node) {
if (isParentRoot(node)) {
- return "root";
+ return "root"; //$NON-NLS-1$
} else {
String itemNumber = (node.getParent().getNodeNumber() != null) ? node.getParent().getNodeNumber().toString() : EMPTY;
private String getItemQuestion(PolytomousKeyNode node) {
if (isParentRoot(node)) {
- return "";
+ return ""; //$NON-NLS-1$
} else {
KeyStatement question = getParent(node).getQuestion();
return question != null ? CdmUtils.Nz(question.getLabelText(CdmStore.getDefaultLanguage())) : EMPTY;
*
*/
public class PolytomousKeyPropertyTester extends PropertyTester {
- private static final String KEYNODE = "isKeyNode";
+ private static final String KEYNODE = "isKeyNode"; //$NON-NLS-1$
/**
* {@inheritDoc}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.CreateNodeOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
/**
* @author n.hoffmann
- *
+ *
*/
public class CreateChildNodeHandler extends AbstractHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
if (editorPage instanceof PolytomousKeyListEditor) {
PolytomousKeyListEditor klEditor = (PolytomousKeyListEditor) editorPage;
if(klEditor.getTableItemCount() == 0) {
- PolytomousKey pk = (PolytomousKey)klEditor.getViewerInputKey();
+ PolytomousKey pk = klEditor.getViewerInputKey();
try {
String label = event.getCommand().getName();
IUndoContext undoContext = EditorUtil.getUndoContext();
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, pk.getRoot(), editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, keyNode, editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to create a new child key node.");
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
}
}
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.CreateNodeOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
/**
* Handler responsible for creating sibling nodes of Polytomous Key Nodes
- * @author c.mathew
- *
+ * @author c.mathew
+ *
*/
public class CreateSiblingNodeHandler extends AbstractHandler {
- /*
+ /*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
.getActiveEditor();
- if (editorPage instanceof PolytomousKeyListEditor) {
+ if (editorPage instanceof PolytomousKeyListEditor) {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
.getCurrentSelection(event);
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, keyNode.getParent(), editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to create a new sibling key node.");
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
}
- }
+ }
return null;
}
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.DeleteNodeOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
public class DeleteNodeHandler extends AbstractPolytomousKeyNodeHandler {
+ private static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE = Messages.DeleteNodeHandler_REALLY_DELETE;
+ private static final String CONFIRM_DELETION_OF_CHILDREN = Messages.DeleteNodeHandler_CONFIRM_DELETE;
+ private static final String NO = Messages.DeleteNodeHandler_NO;
+ private static final String CANCEL = Messages.DeleteNodeHandler_CANCEL;
+ private static final String YES = Messages.DeleteNodeHandler_YES;
PolytomousKeyNode nodeToBeDeleted;
boolean deleteChildren;
/**
nodeToBeDeleted = node;
MessageDialog dialog;
if (node.getChildren().size()>0){
- String[] buttonLables = {"Yes", "No","Cancel"};
- dialog = new MessageDialog(null, "Confirm deletion of children", null, "Do you really want to delete the node. This operation is not reversable. The selected node has children, do you want to delete them, too?", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+ String[] buttonLables = {YES, NO,CANCEL};
+ dialog = new MessageDialog(null, CONFIRM_DELETION_OF_CHILDREN, null, DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE+Messages.DeleteNodeHandler_NODE_HAS_CHILDREN, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
int returnCode = dialog.open();
if (returnCode == 0){
} else if (returnCode == 1){
deleteChildren = true;
} else{
- return new Status(IStatus.CANCEL, "unknown",
+ return new Status(IStatus.CANCEL, "unknown", //$NON-NLS-1$
null);
}
}else{
- String[] buttonLables = {"Yes", "Cancel"};
- dialog = new MessageDialog(null, "Confirm deletion of children", null, "Do you really want to delete the node. This operation is not reversable.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 1);
+ String[] buttonLables = {YES, CANCEL};
+ dialog = new MessageDialog(null, CONFIRM_DELETION_OF_CHILDREN, null, DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 1);
int returnCode = dialog.open();
if (returnCode == 0){
deleteChildren = false;
} else if (returnCode == 1){
- return new Status(IStatus.CANCEL, "unknown",
+ return new Status(IStatus.CANCEL, "unknown", //$NON-NLS-1$
null);
}
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to delete a key node.");
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
return Status.OK_STATUS;
@Override
public AbstractOperation prepareOperation(ExecutionEvent event) {
IUndoContext undoContext = EditorUtil.getUndoContext();
- String label = "";
+ String label = ""; //$NON-NLS-1$
IEditorPart editor = HandlerUtil.getActiveEditor(event);
if (editor.isDirty()){
boolean proceed = MessageDialog.openQuestion(null,
- "Save changes", "You have made changes that must be saved before you can delete the node. Would you like to proceed?");
+ Messages.DeleteNodeHandler_SAVE_CHANGES_TITLE, Messages.DeleteNodeHandler_SAVE_CHANGES_MESSAGE);
if (!proceed) {
return null;
}else{
try {
label = event.getCommand().getName();
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
DeleteNodeOperation operation ;
if (deleteChildren){
parentNode = ((PolytomousKeyNode) selection.getFirstElement()).getParent();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
}
}
label, undoContext, keyNode, editorPage);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
parentNode = (PolytomousKeyNode) selection.getFirstElement();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
}
}
parentNode = (PolytomousKeyNode) selection.getFirstElement();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
return Status.OK_STATUS;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
}else {
t = result.getExceptions().iterator().next();
}
- MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
+ MessagingUtils.errorDialog(Messages.DeleteNodeOperation_DELETE_FAILED, getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
}
return postExecute(null);
}
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
private final PolytomousKeyNode parentNode;
- private final static String LABEL = "Insert new polytomous key node";
+ private final static String LABEL = Messages.InsertPolytomousKeyNodeOperation_INSERT_KEY;
/**
*
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
return childNode;
}
- private final static String LABEL = "Create new polytomous key node";
+ private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
public RemotingCreatePolytomousKeyNodeOperation(Object source,
boolean async,
--- /dev/null
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION=Choose Classification
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE=The taxon is part of multiple classification. Please choose the one you want to open.
+EditorStateManager_ERROR_OPEN_WINDOW=Error opening an editor window
+EditorStateManager_REFRESH_EDITOR=Refreshing Editors
+EditorStateManager_RESTORE_EDITORS=Restoring Editors
+EditorUtil_COMFIRM_SAVE=Confirm save
+EditorUtil_CONFIRM_SAVE_MESSAGE=Warning - this operation will save the editor. This will also save all other unsaved changes in your working editor to the database. Please 'Cancel' if you are not ready to do this.
+EditorUtil_ORPHAN_ACCEPTED_TAXON=Orphaned accepted taxon
+EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE=The accepted taxon of this synonym is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+EditorUtil_ORPHAN_TAXON=Orphaned Taxon
+EditorUtil_ORPHAN_TAXON_MESSAGE=This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxa in the name editor is currently not supported. Try editing with the bulk editor
+MultiPageTaxonEditor_INVALID_INPUT=Invalid Input: Must be TaxonEditorInput
+MultiPageTaxonEditor_NEW_TAXON=New taxon
+MultiPageTaxonEditor_NO_NAME_SPECIFIED=No Name Specified
+MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE=An attempt was made to save a taxon or synonym with an empty name. Operation was cancelled.
+MultiPageTaxonEditor_POST_OP_CALLED=postOperation called on MultiPageTaxonEditor. Can you make it more specific?
+MultiPageTaxonEditor_POST_OP_NOT_ENABLED=postOperation not enabled for editor
+MultiPageTaxonEditor_REFRESH_ERROR=Error refreshing editor
+MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE=Could not refresh this editor
+MultiPageTaxonEditor_SAVING_EDITOR=Saving Editor
+MultiPageTaxonEditor_SAVING_TAXON=saving a taxon
+MultiPageTaxonEditor_SAVING_TAXON_MESSAGE=\ Please close and reopen the taxon again.
+MultiPageTaxonEditor_UNSAVED_DATA=Editor has unsaved data
+MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE=This editor can not be refreshed because it contains unsaved data. Refreshing this editor would discard the changes. Please save this editor, close and reopen it manually in order to get the latest content
+SimpleSelectionProvider_SETTING_SELECTION=Setting Selection
+TaxonEditorInput_INCORRECT_STATE=Incorrect state
+TaxonEditorInput_NEW_TAXON=New taxon
+TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT=Trying to open accepted taxon for a synonym or misapplication but no accepted taxa are present. This should not have happened.
+TaxonEditorInput_NOT_IMPLEMENTED=Not yet implemented
+TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE=Selected element is not type TaxonBase.
+TaxonEditorInput_OPEN_MISSAPPLIED_NAME=trying to open Mispplied Name
+TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION=The accepted taxon is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+TaxonEditorInputFactory_COULD_NOT_CREATE=Could not create element
+TaxonEditorInputFactory_NOT_FOUND_TAXON=Couldn't find taxon node with UUID
+UseObjectManager_RESET_DATA=Reset usage data
import eu.etaxonomy.taxeditor.editor.IDropTargetable;
import eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage;
import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
ISelectionListener, IDropTargetable, ISecuredEditor {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon.name"</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name"; //$NON-NLS-1$
private Taxon taxon;
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
if (getSelectedContainer() == null) {
throw new IllegalStateException(
- "There should always be a selected object.");
+ Messages.TaxonNameEditor_THERE_SHOULD_ALWAYS_BE);
}
getSelectedContainer().setSelected();
@Override
public void doSave(IProgressMonitor monitor) {
- monitor.beginTask("Saving names", getGroupedContainers().size());
+ monitor.beginTask(Messages.TaxonNameEditor_SAVING_NAMES, getGroupedContainers().size());
try {
// check for empty names
for (AbstractGroupedContainer container : getGroupedContainers()) {
- monitor.subTask("Saving composite: "
+ monitor.subTask(Messages.TaxonNameEditor_SAVING_COMPOSITES
+ container.getTaxonBase().getTitleCache());
container.persistName();
throws PartInitException {
if (!(input != null)) {
- throw new PartInitException("Invalid Input: Must be IEditorInput");
+ throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT);
}
if (input.getAdapter(Taxon.class) != null) {
taxon = CdmBase.deproxy(input.getAdapter(Taxon.class), Taxon.class);
} else {
- throw new PartInitException("Invalid Input: Taxon cannot be null");
+ throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT_TAXON_NULL);
}
setSite(site);
*/\r
public class MarkerManager {\r
\r
- public static final String MARKER_TYPE_ID = "eu.etaxonomy.taxeditor.markers.validationerror";\r
+ public static final String MARKER_TYPE_ID = "eu.etaxonomy.taxeditor.markers.validationerror"; //$NON-NLS-1$\r
\r
/**\r
* The primary key (id) of the EntityConstraintViolation record\r
*/\r
- public static final String ATTRIB_DATABASE_ID = "databaseId";\r
+ public static final String ATTRIB_DATABASE_ID = "databaseId"; //$NON-NLS-1$\r
\r
// The values of the following constants must correspond to the attributes\r
// defined for the org.eclipse.core.resources.markers extension point in\r
/**\r
* A user-friendly description of the type of the entity\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_TYPE_NAME = "userFriendlyTypeName";\r
+ public static final String ATTRIB_USER_FRIENDLY_TYPE_NAME = "userFriendlyTypeName"; //$NON-NLS-1$\r
/**\r
* A user-friendly description of the entity\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_DESCRIPTION = "userFriendlyDescription";\r
+ public static final String ATTRIB_USER_FRIENDLY_DESCRIPTION = "userFriendlyDescription"; //$NON-NLS-1$\r
/**\r
* The field whose value violated a constraint\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_FIELD_NAME = "userFriendlyFieldName";\r
+ public static final String ATTRIB_USER_FRIENDLY_FIELD_NAME = "userFriendlyFieldName"; //$NON-NLS-1$\r
/**\r
* The value violating a constraint\r
*/\r
- public static final String ATTRIB_INVALID_VALUE = "invalidValue";\r
+ public static final String ATTRIB_INVALID_VALUE = "invalidValue"; //$NON-NLS-1$\r
/**\r
* The message from the {@link Validator} about what was wrong.\r
*/\r
- public static final String ATTRIB_VALIDATOR_MESSAGE = "validatorMessage";\r
+ public static final String ATTRIB_VALIDATOR_MESSAGE = "validatorMessage"; //$NON-NLS-1$\r
/**\r
* The class of the {@link Validator} coding for the constraint\r
*/\r
- public static final String ATTRIB_VALIDATOR_CLASS = "validatorClass";\r
+ public static final String ATTRIB_VALIDATOR_CLASS = "validatorClass"; //$NON-NLS-1$\r
/**\r
* The class of the validated entity\r
*/\r
- public static final String ATTRIB_ENTITY_CLASS = "entityClass";\r
+ public static final String ATTRIB_ENTITY_CLASS = "entityClass"; //$NON-NLS-1$\r
/**\r
* The id of the validated entity\r
*/\r
- public static final String ATTRIB_ENTITY_ID = "entityId";\r
+ public static final String ATTRIB_ENTITY_ID = "entityId"; //$NON-NLS-1$\r
\r
private final List<EntityConstraintViolation> problems;\r
\r
\r
import eu.etaxonomy.cdm.api.service.IEntityValidationService;\r
import eu.etaxonomy.cdm.model.validation.EntityValidation;\r
+import eu.etaxonomy.taxeditor.editor.Messages;\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
\r
\r
\r
public ValidationDaemon(){\r
- super("Running validation daemon");\r
+ super(Messages.ValidationDaemon_RUNNING_DAEMON);\r
entityValidationService = CdmStore.getService(IEntityValidationService.class);\r
}\r
\r
markerManager.createMarkers();\r
Thread.sleep(SLEEP_TIME);\r
}\r
- MessagingUtils.info("Validation module stopped");\r
+ MessagingUtils.info(Messages.ValidationDaemon_VALIDATION_STOPPED);\r
return Status.OK_STATUS;\r
}\r
catch (Throwable t) {\r
- MessagingUtils.info("Validation module terminated unexpectedly: " + t.getMessage());\r
+ MessagingUtils.info(Messages.ValidationDaemon_VALIDATION_EXCEPTION + t.getMessage());\r
return Status.CANCEL_STATUS;\r
}\r
}\r