CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR=Saving CDM Authority Editor
+EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES=Could not open CDM Authority Editor
+EditCdmAuthoritiesHandler_OPEN_AUTHORITIES=Opening Cdm Authorities
+
+KeyEditor_GRAPH=Graph
+KeyEditor_LIST=List
+KeyEditor_SAVING=Saving Editor
+
+AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW=This name may only be edited in the details view.
+AbstractGroupedContainer_MULTIPLE_USE=The name of this taxons is used multiple times.
+AbstractGroupedContainer_NEW_HETERO_SYNONYM=New Heterotypic Synonym
+ConceptContainer_SEC_REQUIRED=This taxon requires a sec. reference.
+EditorAnnotation_ERROR=Error:
+EditorAnnotation_WARNING=Warning:
+IContainerConstants_CLICK_ADD_NAME=Click to add name
+MisapplicationContainer_SEC_REF_REQUIRED=This misapplication requires a sec. reference.
+SynonymContainer_SYNONYM_NULL_NAME=Synonym with a null name detected. This should never happen.
+
+NameEditorDropTargetListener_CHANGE=Change
+NameEditorDropTargetListener_CHANGE_ACC_TAXON=Change accepted Taxon
+NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP=Change Homotypical Group
+NameEditorDropTargetListener_CHANGE_SYNONYM=Change to Synonym
+NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP=Change Synonym to Misapplication
+NameEditorDropTargetListener_UNSUCCESSFULL_DROP=User unsuccessfully tried to drop: %s. Target: %s
+
+ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON=Change synonym to accepted taxon
+ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE=Could not create Taxon
+ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT=Select parent
+MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON=Change accepted Taxon of Synonym
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION=No selection
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE=No synonym selected
+MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON=Select new accepted taxon
+SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN=Could not open editor for taxon
+
+ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED=Not implemented yet. See developer documentation for details
+ChangeConceptToSynonymOperation_MULTI_REPS=Multiple relations between taxa
+ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE=There are multiple relations between the accepted and the related taxon. This case is not handled by the software yet.
+ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA=Operation may lead to inconsistent data
+ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED=Not yet implemented
+SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED=Not yet implemented
+SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON=Swap Synonym And Accepted Taxon Operation
+
+ChecklistDropdownSelectionListener_ADD_DISTRIBUTION=Add Distribution
+
+ChecklistEditor_DIST_STATUS=Distribution Status
+ChecklistEditor_DIST_STATUS_TOOLTIP=Show Distribution Status for selected Areas
+ChecklistEditor_ELEMENT_COUNT=Element count:
+ChecklistEditor_LOAD_CNT_TAXA=Loading %d Taxa...
+ChecklistEditor_LOAD_TAXA=loading Taxa
+ChecklistEditor_NO_AREAS=No Areas to display
+ChecklistEditor_NO_AREAS_MESSAGE=Please choose the areas you want to display. Go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.
+ChecklistEditor_RANK=Rank
+ChecklistEditor_RETRIEVE_NODES=Retrieving TaxonNodes
+ChecklistEditor_SAVE_EDITOR=Saving Editor
+ChecklistEditor_SEARCH=Search:
+ChecklistEditor_TAXON=Taxon
+ChecklistEditor_UNKNOWN=unknown
+
+OpenRelatedConceptHandler_COULD_NOT_OPEN=Could not open taxon
+OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE=Could not open the taxon: %s
+
+ListenToSelectionChangeContextMenu_LINK=Link with taxon selection
+ListenToSelectionChangeContextMenu_UNLINK=Unlink from taxon selection
+
+DeleteDerivateHandler_INVALID_SELECTION=Selection is not valid for this delete handler
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS=No specimens found
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE=No specimens found for the selected object. (Maybe there are unsaved changes)
+OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN=Specimen editor could not be opened
+
+DerivateSearchComposite_ALL=All
+DerivateSearchComposite_DERIVATE_TYPE=Derivative Type
+DerivateSearchComposite_NEW_TEXT=New Text
+DerivateSearchComposite_NO=No
+DerivateSearchComposite_SEARCH=Search
+DerivateSearchComposite_TAXON=Taxon
+DerivateSearchComposite_TAXON_ASSIGNMENT=Taxon assignment
+DerivateSearchComposite_TITLE_CACHE=Title Cache
+DerivateSearchComposite_YES=Yes
UseObjectManager_RESET_DATA=Wiederherstellen der Nutzugsdaten
CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR=Speichere CDM Authority Editor
+
+EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES=Konnte CDM-Authority-Editor nicht öffnen
+EditCdmAuthoritiesHandler_OPEN_AUTHORITIES=Öffne Cdm-Authorities
+
+KeyEditor_GRAPH=Graph
+KeyEditor_LIST=Liste
+KeyEditor_SAVING=Speichere Editor
+
+AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW=Diser Name kann nur im Details-View bearbeitet werden.
+AbstractGroupedContainer_MULTIPLE_USE=Dieser Taxonname wird mehrfach verwendet.
+AbstractGroupedContainer_NEW_HETERO_SYNONYM=Neues heterotypisches Synonym
+ConceptContainer_SEC_REQUIRED=Dieses Taxon benötigt eine sec. Referenz.
+EditorAnnotation_ERROR=Error:
+EditorAnnotation_WARNING=Warunung:
+IContainerConstants_CLICK_ADD_NAME=Klicken, um Namen hinzuzufügen
+MisapplicationContainer_SEC_REF_REQUIRED=Diese Misapplikation benötigt eine sec. Referenz.
+SynonymContainer_SYNONYM_NULL_NAME=Synonym mit einem null-Namen entdeckt. Das sollte nicht passieren.
+
+NameEditorDropTargetListener_CHANGE=Ändern
+NameEditorDropTargetListener_CHANGE_ACC_TAXON=Ändere akzeptiertes Taxon
+NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP=Ändere homotypische Gruppe
+NameEditorDropTargetListener_CHANGE_SYNONYM=Ändere in Synonym
+NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP=Ändere Synonym in Misapplikation
+NameEditorDropTargetListener_UNSUCCESSFULL_DROP=Das Ziehen von %s auf %s war nicht erfolgreich.
+
+ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON=Ändere Synonym in akzeptiertes Taxon
+ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE=Konnte Taxon nicht erstellen
+ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT=Wähle Elternelement
+MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON=Ändere akzeptiertes Taxon des Synonyms
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION=Keine Auswahl
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE=Kein Synonym ausgewählt
+MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON=Wähle neues akzeptiertes Taxon
+SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN=Konnte Editor für Taxon nicht öffnen
+
+ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED=Noch nicht implementiert. Für Details bitte in die Entwickler-Dokumentation schauen
+ChangeConceptToSynonymOperation_MULTI_REPS=Mehrere Verknüpfungen zwischen Taxa
+ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE=Es gibt mehrere Verknüpfungen zwischen dem akzeptierten und dem verknüpften Taxon. Dieser Fall wird noch nicht von der Software unterstützt.
+ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA=Vorgang kann zu inkonsistenten Daten führen
+ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED=Noch nicht implementiert
+SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED=Noch nicht implementiert
+SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON=Tausche Synonym und akzeptiertes Taxon
+
+ChecklistDropdownSelectionListener_ADD_DISTRIBUTION=Verbreitung hinzufügen
+
+ChecklistEditor_DIST_STATUS=Verbreitungsstatus
+ChecklistEditor_DIST_STATUS_TOOLTIP=Zeige den Verbreitungsstatus für die ausgewählten Gebiete
+ChecklistEditor_ELEMENT_COUNT=Anzahl der Elemente:
+ChecklistEditor_LOAD_CNT_TAXA=Lade %d Taxa...
+ChecklistEditor_LOAD_TAXA=Lade Taxa
+ChecklistEditor_NO_AREAS=Keine Gebiete zum Anzeigen
+ChecklistEditor_NO_AREAS_MESSAGE=Bitte wählen Sie die Gebiete, die sie anzeigen möchten. Unter Einstellungen->Checklist-Editor lassen sich die Gebiete mit dem Verbreitungs-Wizard auswählen.
+ChecklistEditor_RANK=Rang
+ChecklistEditor_RETRIEVE_NODES=Lade Taxonknoten
+ChecklistEditor_SAVE_EDITOR=Speichere Editor
+ChecklistEditor_SEARCH=Suche:
+ChecklistEditor_TAXON=Taxon
+ChecklistEditor_UNKNOWN=unbekannt
+
+OpenRelatedConceptHandler_COULD_NOT_OPEN=Konnte Taxon nicht öffnen
+OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE=Konnte Taxon nicht öffnen: %s
+
+ListenToSelectionChangeContextMenu_LINK=Verknüpfe mit Taxonauswahl
+ListenToSelectionChangeContextMenu_UNLINK=Verknüpfung mit Taxonauswahl aufheben
+
+DeleteDerivateHandler_INVALID_SELECTION=Auswahl ungültig
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS=Keine Specimens gefunden
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE=Keine Specimens für die Auswahl. (Gibt es vielleicht noch ungespeicherte Änderungen?)
+OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden
+
+DerivateSearchComposite_ALL=Alle
+DerivateSearchComposite_DERIVATE_TYPE=Derivat-Typ
+DerivateSearchComposite_NEW_TEXT=Neuer Text
+DerivateSearchComposite_NO=Nein
+DerivateSearchComposite_SEARCH=Suche
+DerivateSearchComposite_TAXON=Taxon
+DerivateSearchComposite_TAXON_ASSIGNMENT=Taxonbestimmung
+DerivateSearchComposite_TITLE_CACHE=Titlecache
+DerivateSearchComposite_YES=Ja
*/
public class Messages extends NLS {
private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
+ public static String AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW;
+ public static String AbstractGroupedContainer_MULTIPLE_USE;
+ public static String AbstractGroupedContainer_NEW_HETERO_SYNONYM;
public static String CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR;
+ public static String ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED;
+ public static String ChangeConceptToSynonymOperation_MULTI_REPS;
+ public static String ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE;
+ public static String ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON;
+ public static String ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE;
+ public static String ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT;
+ public static String ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA;
+ public static String ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED;
+ public static String ChecklistDropdownSelectionListener_ADD_DISTRIBUTION;
+ public static String ChecklistEditor_DIST_STATUS;
+ public static String ChecklistEditor_DIST_STATUS_TOOLTIP;
+ public static String ChecklistEditor_ELEMENT_COUNT;
+ public static String ChecklistEditor_LOAD_CNT_TAXA;
+ public static String ChecklistEditor_LOAD_TAXA;
+ public static String ChecklistEditor_NO_AREAS;
+ public static String ChecklistEditor_NO_AREAS_MESSAGE;
+ public static String ChecklistEditor_RANK;
+ public static String ChecklistEditor_RETRIEVE_NODES;
+ public static String ChecklistEditor_SAVE_EDITOR;
+ public static String ChecklistEditor_SEARCH;
+ public static String ChecklistEditor_TAXON;
+ public static String ChecklistEditor_UNKNOWN;
public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION;
public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE;
+ public static String ConceptContainer_SEC_REQUIRED;
public static String ConceptGraphView_VIEWER_NAME;
public static String ConceptViewPart_VIEWER_NAME;
public static String CreateDerivateContextMenu_ADD;
public static String DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN;
public static String DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN;
public static String DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN;
+ public static String DeleteDerivateHandler_INVALID_SELECTION;
public static String DeleteDerivateOperation_AND_CHILDREN;
public static String DeleteDerivateOperation_CONFIRM;
public static String DeleteDerivateOperation_DELETE_FAILED;
public static String DerivateDropListener_MOVE_TO;
+ public static String DerivateSearchComposite_ALL;
+ public static String DerivateSearchComposite_DERIVATE_TYPE;
+ public static String DerivateSearchComposite_NEW_TEXT;
+ public static String DerivateSearchComposite_NO;
+ public static String DerivateSearchComposite_SEARCH;
+ public static String DerivateSearchComposite_TAXON;
+ public static String DerivateSearchComposite_TAXON_ASSIGNMENT;
+ public static String DerivateSearchComposite_TITLE_CACHE;
+ public static String DerivateSearchComposite_YES;
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 DerivateViewEditorInput_SPECIMEN_EDITOR;
+ public static String DescriptionElementTransfer_0;
public static String DescriptiveViewPart_COLLAPSE_ALL;
public static String DescriptiveViewPart_EXPAND_ALL;
public static String DescriptiveViewPart_FACTUAL_DATA;
public static String DescriptiveViewPart_SHOW_ALL_DATA;
+ public static String EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES;
+ public static String EditCdmAuthoritiesHandler_OPEN_AUTHORITIES;
+ public static String EditorAnnotation_ERROR;
+ public static String EditorAnnotation_WARNING;
public static String EditorStateManager_ERROR_OPEN_WINDOW;
public static String EditorStateManager_REFRESH_EDITOR;
public static String EditorStateManager_RESTORE_EDITORS;
public static String EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE;
public static String EditorUtil_ORPHAN_TAXON;
public static String EditorUtil_ORPHAN_TAXON_MESSAGE;
+ public static String IContainerConstants_CLICK_ADD_NAME;
public static String InsertPolytomousKeyNodeOperation_INSERT_KEY;
- public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
+ public static String KeyEditor_GRAPH;
+ public static String KeyEditor_LIST;
+ public static String KeyEditor_SAVING;
+ public static String ListenToSelectionChangeContextMenu_LINK;
+ public static String ListenToSelectionChangeContextMenu_UNLINK;
+ public static String MisapplicationContainer_SEC_REF_REQUIRED;
+ public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON;
public static String MultiPageTaxonEditor_INVALID_INPUT;
public static String MultiPageTaxonEditor_NEW_TAXON;
public static String MultiPageTaxonEditor_NO_NAME_SPECIFIED;
public static String MultiPageTaxonEditor_SAVING_TAXON_MESSAGE;
public static String MultiPageTaxonEditor_UNSAVED_DATA;
public static String MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE;
+ public static String NameEditorDropTargetListener_CHANGE_ACC_TAXON;
+ public static String NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP;
+ public static String NameEditorDropTargetListener_CHANGE;
+ public static String NameEditorDropTargetListener_CHANGE_SYNONYM;
+ public static String NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP;
+ public static String NameEditorDropTargetListener_UNSUCCESSFULL_DROP;
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 OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
public static String OpenDerivateViewHandler_COULD_NOT_OPEN;
+ public static String OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS;
+ public static String OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE;
+ public static String OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+ public static String OpenRelatedConceptHandler_COULD_NOT_OPEN;
+ public static String OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE;
public static String PolytomousKeyEditorLabels_CREATE_NODE;
public static String PolytomousKeyEditorLabels_CREATE_SIBLING;
public static String PolytomousKeyEditorLabels_DELETE_NODE;
public static String UsesViewPart_VIEWER_NAME;
public static String SetSecundumHandler_configureSettings;
public static String SetSecundumHandler_confirm;
+ public static String SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN;
+ public static String SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED;
+ public static String SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON;
+ public static String SynonymContainer_SYNONYM_NULL_NAME;
public static String TaxonEditorInput_INCORRECT_STATE;
public static String TaxonEditorInput_NEW_TAXON;
public static String TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT;
/**
* 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.
*/
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditor;
import eu.etaxonomy.taxeditor.model.LineSelection;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
/**
* Handler which opens an instance of the {@link CdmAuthorityEditor} for a particluar group.
- *
+ *
* @author cmathew
* @created Mar 28, 2013
*
public class EditCdmAuthoritiesHandler extends AbstractHandler {
- /* (non-Javadoc)
+ private static final String OPENING_CDM_AUTHORITIES = Messages.EditCdmAuthoritiesHandler_OPEN_AUTHORITIES;
+
+ /* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
BulkEditor editor = (BulkEditor) EditorUtil.getActiveEditor();
-
- ISelection selection = editor.getSite().getSelectionProvider().getSelection();
+
+ ISelection selection = editor.getSite().getSelectionProvider().getSelection();
if(selection instanceof LineSelection){
-
+
final LineSelection lineSelection = (LineSelection) selection;
-
- Job job = new Job("Opening Cdm Authorities"){
+
+ Job job = new Job(OPENING_CDM_AUTHORITIES){
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Cdm Authorities", lineSelection.size());
-
+ monitor.beginTask(OPENING_CDM_AUTHORITIES, lineSelection.size());
+
for(final Object selectedObject : lineSelection.toArray()){
if(selectedObject instanceof Group){
-
+
Display.getDefault().asyncExec(new Runnable(){
@Override
- public void run() {
+ public void run() {
try {
EditorUtil.openCdmAuthorities(((Group)selectedObject).getUuid());
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not open CDM Authority Editor", EditorUtil.class, e.getMessage());
+ MessagingUtils.warningDialog(Messages.EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES, EditorUtil.class, e.getMessage());
}
}
-
+
});
monitor.worked(1);
}
monitor.done();
return Status.OK_STATUS;
}
-
+
};
-
+
job.setPriority(Job.SHORT);
- job.schedule();
-
+ job.schedule();
+
}
return null;
}
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyGraphEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
public class KeyEditor extends FormEditor implements IConversationEnabled,
IDirtyMarkable, IPartContentHasDetails, ICdmChangeListener {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key"; //$NON-NLS-1$
private ConversationHolder conversation;
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving Editor", 1);
+ monitor.beginTask(Messages.KeyEditor_SAVING, 1);
getConversationHolder().bind();
getConversationHolder().commit(true);
polytomousKeyEditorInput.merge();
try {
addPage(0, new PolytomousKeyListEditor(this), polytomousKeyEditorInput);
- setPageText(0, "List");
+ setPageText(0, Messages.KeyEditor_LIST);
addPage(1, new PolytomousKeyGraphEditor(this), polytomousKeyEditorInput);
- setPageText(1, "Graph");
+ setPageText(1, Messages.KeyEditor_GRAPH);
} catch (PartInitException e) {
MessagingUtils.error(getClass(), e);
}
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.container.EditorAnnotation.EditorAnnotationType;
import eu.etaxonomy.taxeditor.editor.name.dnd.NameEditorDragListener;
.addAnnotation(
new EditorAnnotation(EditorAnnotationType.WARNING,
0,
- "This name may only be edited in the details view."));
+ Messages.AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW));
}
if (isNameUsedMultipleTimes()) {
getNameViewer().addAnnotation(
new EditorAnnotation(EditorAnnotationType.WARNING, 0,
- "This taxons name is used multiple times."));
+ Messages.AbstractGroupedContainer_MULTIPLE_USE));
}
}
.parseReferencedName(text, null);
EditorUtil.executeOperation(new CreateSynonymInNewGroupOperation(
- "New Heterotypic Synonym", getEditor().getUndoContext(),
+ Messages.AbstractGroupedContainer_NEW_HETERO_SYNONYM, getEditor().getUndoContext(),
getEditor().getTaxon(), synonymName, getEditor()));
}
*/
public AbstractGroup getGroup() {
if (group == null) {
- throw new IllegalStateException("Group shall not be null.");
+ throw new IllegalStateException("Group shall not be null."); //$NON-NLS-1$
}
return group;
}
control.layout();
} else {
new RuntimeException(
- "Couldn't indent - composite's layout must be TableWrapLayout.");
+ "Couldn't indent - composite's layout must be TableWrapLayout."); //$NON-NLS-1$
}
}
public NameViewer getNameViewer() {
if (nameViewer == null) {
throw new RuntimeException(
- "The Name Viewer is corrupt for Name Container: "
+ "The Name Viewer is corrupt for Name Container: " //$NON-NLS-1$
+ getTaxonBase().getName().getTitleCache());
}
return nameViewer;
public void focusGained(FocusEvent e) {
if (document.get().equals(prompt)) {
textControl.setFont(getViewerFont());
- document.set("");
+ document.set(""); //$NON-NLS-1$
}
}
if (draggableControls == null) {
throw new NullPointerException(
- "Draggable controls must be set to add draggability");
+ "Draggable controls must be set to add draggability"); //$NON-NLS-1$
}
Transfer[] types = new Transfer[] { CdmDataTransfer.getInstance() };
info = info.toUpperCase();
if (append) {
- nonEditableText += ", " + info;
- nonEditableHoverText += "\n" + info;
+ nonEditableText += ", " + info; //$NON-NLS-1$
+ nonEditableHoverText += "\n" + info; //$NON-NLS-1$
} else {
nonEditableText = info;
nonEditableHoverText = info;
if (nonEditableInfoLabel == null) {
nonEditableInfoLabel = getEditor().getToolkit().createLabel(
- control, "");
+ control, ""); //$NON-NLS-1$
TableWrapData layoutData = new TableWrapData(
TableWrapData.FILL_GRAB, TableWrapData.TOP);
// Set indent to viewer ruler's width
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.preference.Resources;
}
if (getTaxonBase().getSec() == null) {
- setNonEditableInfo("sec. ???", false);
+ setNonEditableInfo("sec. ???", false); //$NON-NLS-1$
} else {
- setNonEditableInfo("sec. " + getTaxonBase().getSec().getTitleCache(), false);
+ setNonEditableInfo("sec. " + getTaxonBase().getSec().getTitleCache(), false); //$NON-NLS-1$
}
}
public void showAnnotations() {
if(getData().getSec() == null){
getNameViewer().addAnnotation(
- new EditorAnnotation(0, "This taxon requires a sec. reference."));
+ new EditorAnnotation(0, Messages.ConceptContainer_SEC_REQUIRED));
}
super.showAnnotations();
}
import org.eclipse.swt.widgets.Canvas;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.ImageResources;
/**
@Override
public String getText() {
if (EditorAnnotationType.ERROR.name().equals(getType())) {
- return "Error: " + text;
+ return Messages.EditorAnnotation_ERROR + text;
}
if (EditorAnnotationType.WARNING.name().equals(getType())) {
- return "Warning: " + text;
+ return Messages.EditorAnnotation_WARNING + text;
}
return super.getText();
}
import org.eclipse.swt.graphics.Image;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.ImageResources;
/**
* ************ COMPOSITE TYPES ************
*/
/** Constant <code>ACCEPTED_TAXON="accepted_name_composite"</code> */
- public static final String ACCEPTED_TAXON = "accepted_name_composite";
+ public static final String ACCEPTED_TAXON = "accepted_name_composite"; //$NON-NLS-1$
/** Constant <code>HOMOTYPIC_SYNONYM="homotypic_name_composite"</code> */
- public static final String HOMOTYPIC_SYNONYM = "homotypic_name_composite";
+ public static final String HOMOTYPIC_SYNONYM = "homotypic_name_composite"; //$NON-NLS-1$
/** Constant <code>HETEROTYPIC_SYNONYM="heterotypic_name_composite"</code> */
- public static final String HETEROTYPIC_SYNONYM = "heterotypic_name_composite";
+ public static final String HETEROTYPIC_SYNONYM = "heterotypic_name_composite"; //$NON-NLS-1$
/** Constant <code>MISAPPLIED_NAME="misappliedname_name_composite"</code> */
- public static final String MISAPPLIED_NAME = "misappliedname_name_composite";
+ public static final String MISAPPLIED_NAME = "misappliedname_name_composite"; //$NON-NLS-1$
/** Constant <code>CONCEPTRELATION="concept_name_composite"</code> */
- public static final String CONCEPTRELATION = "concept_name_composite";
+ public static final String CONCEPTRELATION = "concept_name_composite"; //$NON-NLS-1$
/**
* ************ INDENTATIONS ************
/**
* ************ TRANSFORMATIONS ************
*/
- public static final String ADD_GROUP_BASIONYM = "add_group_basionym";
+ public static final String ADD_GROUP_BASIONYM = "add_group_basionym"; //$NON-NLS-1$
/** Constant <code>REMOVE_GROUP_BASIONYM="remove_group_basionym"</code> */
- public static final String REMOVE_GROUP_BASIONYM = "remove_group_basionym";
+ public static final String REMOVE_GROUP_BASIONYM = "remove_group_basionym"; //$NON-NLS-1$
- public static final String EMPTY_NAME_PROMPT = "Click to add name";
+ public static final String EMPTY_NAME_PROMPT = Messages.IContainerConstants_CLICK_ADD_NAME;
}
public abstract class LineBreakListener implements VerifyListener{
- private static String LINE_BREAK = System.getProperty("line.separator");
+ private static String LINE_BREAK = System.getProperty("line.separator"); //$NON-NLS-1$
/**
// make a new, empty synonym
if (widgetText.length() == cursorPosition &&
verifyText.equals(LINE_BREAK)) {
- handleSplitText("");
+ handleSplitText(""); //$NON-NLS-1$
return;
}
public class LineWrapSquigglesStrategy extends SquigglesStrategy {
/** Constant <code>ID="linewrap_squigglesstrategy"</code> */
- public static final String ID = "linewrap_squigglesstrategy";
+ public static final String ID = "linewrap_squigglesstrategy"; //$NON-NLS-1$
private GC gc;
if (viewer == null) {
throw new IllegalArgumentException(
- "The provided TextViewer object is null.");
+ "The provided TextViewer object is null."); //$NON-NLS-1$
}
// this.viewer = viewer;
this.lineCount = textWidget.getLinePixel(textWidget.getLineCount());
this.scrolledForm = form.getForm();
- logger.trace(this.getClass().getSimpleName() + " created");
+ logger.trace(this.getClass().getSimpleName() + " created"); //$NON-NLS-1$
}
/**
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.preference.Resources;
/**
if (getMisappliedName().getAppendedPhrase() != null ){
setNonEditableInfo(getMisappliedName().getAppendedPhrase(), false);
}else{
- setNonEditableInfo("sec. ???", false);
+ setNonEditableInfo("sec. ???", false); //$NON-NLS-1$
}
} else {
String title = getMisappliedName().getSec().getTitleCache();
- title = title.replace("&", "&&");
- String sec = "sec. ";
+ title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
+ String sec = "sec. "; //$NON-NLS-1$
if (getMisappliedName().getAppendedPhrase() != null ){
- sec = getMisappliedName().getAppendedPhrase() + " "+sec;
+ sec = getMisappliedName().getAppendedPhrase() + " "+sec; //$NON-NLS-1$
}
setNonEditableInfo(sec + title, false);
}
public void showAnnotations() {
if(getData().getSec() == null){
getNameViewer().addAnnotation(
- new EditorAnnotation(0, "This misapplication requires a sec. reference."));
+ new EditorAnnotation(0, Messages.MisapplicationContainer_SEC_REF_REQUIRED));
}
super.showAnnotations();
}
ruler.getControl().moveAbove(getTextWidget());
annotationModel = new AnnotationModel();
- this.setDocument(new Document(""), annotationModel);
+ this.setDocument(new Document(""), annotationModel); //$NON-NLS-1$
createAnnotationPainter();
if (ruler instanceof RulerWithIcon) {
((RulerWithIcon) ruler).setIcon(icon);
} else {
- throw new IllegalStateException("Viewer's IVerticalRuler is not an instance of RulerWithIcon.");
+ throw new IllegalStateException("Viewer's IVerticalRuler is not an instance of RulerWithIcon."); //$NON-NLS-1$
}
}
*/
public void setText(String text) {
if (text == null) {
- text = "";
+ text = ""; //$NON-NLS-1$
}
try {
Assert.isNotNull(text);
Rectangle r = icon.getBounds();
if (r.width > size.x || r.height > size.y) {
- logger.warn(r.width + "x" + r.height + " icon too big for " + size.x + "x" + size.y + " Canvas.");
+ logger.warn(r.width + "x" + r.height + " icon too big for " + size.x + "x" + size.y + " Canvas."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} else {
// Set destination coordinates to center icon
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.Resources;
setFont(getViewerFont());
if(getName() == null){
- MessagingUtils.warn(getClass(), "Synonym with a null name detected. This should never happen.");
+ MessagingUtils.warn(getClass(), Messages.SynonymContainer_SYNONYM_NULL_NAME);
}
initTextViewer();
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.editor.name.dnd;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.IDropTargetable;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractHomotypicalGroupContainer;
import eu.etaxonomy.taxeditor.editor.name.container.MisappliedGroup;
* @version $Id: $
*/
public class NameEditorDropTargetListener extends DropTargetAdapter {
-
+
private IDropTargetable target;
-
+
/**
* <p>Constructor for NameEditorDropTargetListener.</p>
public NameEditorDropTargetListener(IDropTargetable target){
this.target = target;
}
-
+
/** {@inheritDoc} */
- public void dragEnter(DropTargetEvent dropTargetEvent) {
+ @Override
+ public void dragEnter(DropTargetEvent dropTargetEvent) {
target.dragEntered();
-
+
// if(! EditorUtil.getActiveMultiPageTaxonEditor().equals(editor.getMultiPageTaxonEditor())){
// editor.getMultiPageTaxonEditor().setFocus();
// }
}
-
+
/** {@inheritDoc} */
- public void dragLeave(DropTargetEvent dropTargetEvent) {
+ @Override
+ public void dragLeave(DropTargetEvent dropTargetEvent) {
target.dragLeft();
}
-
+
/** {@inheritDoc} */
- public void drop(DropTargetEvent dropTargetEvent) {
-
+ @Override
+ public void drop(DropTargetEvent dropTargetEvent) {
+
TaxonBase taxonBase = getDroppedTaxonBase(dropTargetEvent);
-
+
Assert.isNotNull(taxonBase);
-
+
if(taxonBase.getHomotypicGroup().equals(getHomotypicalGroup())){
// do nothing when dragged to the same group
dropTargetEvent.detail = DND.DROP_NONE;
return;
}
-
+
// Execute operations at end of drag event
AbstractPostOperation operation = createOperation(taxonBase);
-
+
// Execute operation if it has been initiated
if (operation == null) {
- MessagingUtils.warn(getClass(), "User unsuccessfully tried to drop: " + taxonBase.getClass() +
- ". Target: " + target);
+ MessagingUtils.warn(getClass(), String.format(Messages.NameEditorDropTargetListener_UNSUCCESSFULL_DROP, taxonBase.getClass(), target));
dropTargetEvent.detail = DND.DROP_NONE;
} else {
EditorUtil.executeOperation(operation);
if (!target.equals(EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor())){
((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).redraw();
((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();
-
+
}
target.getEditor().redraw();
-
+
}
-
+
private AbstractPostOperation createOperation(TaxonBase taxonBase) {
-
+
if(taxonBase instanceof Synonym){
Synonym synonym = (Synonym) taxonBase;
-
+
if(target instanceof AbstractHomotypicalGroupContainer){
HomotypicalGroup homotypicalGroup = ((AbstractHomotypicalGroupContainer) target).getGroup();
-
- return new ChangeHomotypicGroupOperation("Change Homotypical Group", getEditor().getUndoContext(),
+
+ return new ChangeHomotypicGroupOperation(Messages.NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, homotypicalGroup, target);
}
else if(target instanceof MisappliedGroup){
- return new ChangeSynonymToMisapplicationOperation("Change Synonym to Misapplication", getEditor().getUndoContext(),
+ return new ChangeSynonymToMisapplicationOperation(Messages.NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, target);
}
else if(target instanceof TaxonNameEditor){
if (target.equals(getEditor())){
- return new ChangeHomotypicGroupOperation("Change Homotypical Group", getEditor().getUndoContext(),
+ return new ChangeHomotypicGroupOperation(Messages.NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, null, target);
} else{
getEditor().getConversationHolder().commit();
((TaxonNameEditor) target).getConversationHolder().commit();
-
- return new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon", getEditor().getUndoContext(), getEditor().getTaxon().getUuid(), synonym.getUuid(), ((TaxonNameEditor) target).getTaxon(), null );
-
+
+ return new MoveSynonymToAnotherAcceptedTaxonOperation(Messages.NameEditorDropTargetListener_CHANGE_ACC_TAXON, getEditor().getUndoContext(), getEditor().getTaxon().getUuid(), synonym.getUuid(), ((TaxonNameEditor) target).getTaxon(), null );
+
}
}
-
+
}else if(taxonBase instanceof Taxon){
Taxon concept = (Taxon) taxonBase;
-
+
if(target instanceof AbstractHomotypicalGroupContainer){
HomotypicalGroup homotypicalGroup = ((AbstractHomotypicalGroupContainer) target).getGroup();
-
- return new ChangeConceptToSynonymOperation("Change to Synonym", getEditor().getUndoContext(),
+
+ return new ChangeConceptToSynonymOperation(Messages.NameEditorDropTargetListener_CHANGE_SYNONYM, getEditor().getUndoContext(),
getEditor().getTaxon(), concept, homotypicalGroup, target);
}
else if(target instanceof MisappliedGroup ){
- return new ChangeConceptRelationshipTypeOperation("Change", getEditor().getUndoContext(),
+ return new ChangeConceptRelationshipTypeOperation(Messages.NameEditorDropTargetListener_CHANGE, getEditor().getUndoContext(),
getEditor().getTaxon(), concept, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), target);
}
}
-
+
return null;
}
// pass
}
-
+
private HomotypicalGroup getHomotypicalGroup() {
if(target instanceof AbstractHomotypicalGroupContainer){
return ((AbstractHomotypicalGroupContainer) target).getGroup();
}
return null;
- }
-
+ }
+
private TaxonBase getDroppedTaxonBase(DropTargetEvent dropTargetEvent){
if(dropTargetEvent.data instanceof ICdmBase[]){
-
+
ICdmBase[] cdmBaseObjects = (ICdmBase[]) dropTargetEvent.data;
-
+
if(cdmBaseObjects[0] instanceof TaxonBase){
return (TaxonBase) cdmBaseObjects[0];
}
}
return null;
}
-
+
/**
- * @return
- *
+ * @return
+ *
*/
private TaxonNameEditor getEditor() {
return (TaxonNameEditor) EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor();
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.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxonOperation;
IEditorInput input = editor.getEditorInput();
if (!(input instanceof TaxonEditorInput)) {
- logger.error("Editor input is not TaxonEditorInput");
+ logger.error("Editor input is not TaxonEditorInput"); //$NON-NLS-1$
return null;
}
// Get synonym from selection
StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!(selection.getFirstElement() instanceof Synonym)) {
- logger.error("Selection does not contain a Synonym");
+ logger.error("Selection does not contain a Synonym"); //$NON-NLS-1$
return null;
}
List<UUID> excludeTaxa = new ArrayList<UUID>();
//excludeTaxa.add(taxon.getUuid());//there are some cases where the accepted taxon should be the parent of the new created accepted taxon
- TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select parent", null, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
+ TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), Messages.ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT, null, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
if(newParentNode != null){
HomotypicalGroup group = synonym.getHomotypicGroup();
Set<TaxonNameBase> namesInGroup = group.getTypifiedNames();
// FIXME with this implementation we can not create a taxonNode that is a direct child of the classification node
- AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation("Change synonym to accepted taxon", EditorUtil.getUndoContext(),
+ AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation(Messages.ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON, EditorUtil.getUndoContext(),
taxon, newParentNode, synonym, namesInGroup, this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); //$NON-NLS-1$
EditorUtil.executeOperation(operation);
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE, this, e.getMessage());
}
}
return true;
EditorUtil.executeOperation(operation);
}
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getUndoContext(), editor.getTaxon(), newSynonymName, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getUndoContext(), editor.getTaxon(), concept, type, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getTaxon(), group, newSynonymName, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
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.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;
}
if (!(input instanceof TaxonEditorInput)) {
- logger.error("Editor input is not TaxonEditorInput");
+ logger.error("Editor input is not TaxonEditorInput"); //$NON-NLS-1$
return null;
}
if (selection==null || !(selection.getFirstElement() instanceof Synonym)) {
- MessagingUtils.warningDialog("No selection", this, "No synonym selected");
- logger.error("Selection does not contain a Synonym");
+ MessagingUtils.warningDialog(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION, this, Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE);
+ logger.error("Selection does not contain a Synonym"); //$NON-NLS-1$
return null;
}
excludeTaxa.add(oldParent.getUuid());
- TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
+ TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), Messages.MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON, excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
if(newParentNode!=null){
- MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
+ MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON, EditorUtil.getUndoContext(),
oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);
AbstractUtility.executeOperation(operation);
*/
public class NameEditorMenuPropertyTester extends PropertyTester {
- private static final String ACCEPTED = "isAcceptedTaxon";
- private static final String SYNONYM = "isSynonym";
- private static final String MISAPPLICATION = "isMisapplication";
- private static final String TAXONBASE = "isTaxonBase";
- private static final String CONCEPT = "isConceptRelation";
- private static final String EMPTY_NAMES = "hasEmptyNames";
- private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms";
- private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon";
- private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms";
- private static final String IS_ORPHANED = "isOrphaned";
+ private static final String ACCEPTED = "isAcceptedTaxon"; //$NON-NLS-1$
+ private static final String SYNONYM = "isSynonym"; //$NON-NLS-1$
+ private static final String MISAPPLICATION = "isMisapplication"; //$NON-NLS-1$
+ private static final String TAXONBASE = "isTaxonBase"; //$NON-NLS-1$
+ private static final String CONCEPT = "isConceptRelation"; //$NON-NLS-1$
+ private static final String EMPTY_NAMES = "hasEmptyNames"; //$NON-NLS-1$
+ private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms"; //$NON-NLS-1$
+ private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon"; //$NON-NLS-1$
+ private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms"; //$NON-NLS-1$
+ private static final String IS_ORPHANED = "isOrphaned"; //$NON-NLS-1$
/**
* <p>Constructor for NameEditorMenuPropertyTester.</p>
editor.getTaxon(), selectedTaxonBase, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getTaxon(), selectedTaxonBase, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.openTaxonBase(taxon.getUuid());
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not open editor for taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
Set<TaxonRelationship> taxonRelationships = taxon.getTaxonRelations(relatedTaxon);
if(taxonRelationships.size() > 1){
- MessagingUtils.warningDialog("Multiple relations between taxa", this, "There are multiple relations between the " +
- "accepted and the related taxon. This case is not handled by the software yet");
+ MessagingUtils.warningDialog(ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS, this, ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE);
return;
}
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
// see FIXME in execute()
- MessagingUtils.warn(this.getClass(), "Not implemented yet. See developer documentation for details");
+ MessagingUtils.warn(this.getClass(), Messages.ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED);
return null;
}
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
public class ChangeConceptToSynonymOperation extends
AbstractPostTaxonOperation {
- private Taxon concept;
+ protected static final String CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE = Messages.ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE;
+ protected static final String CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS = Messages.ChangeConceptToSynonymOperation_MULTI_REPS;
+
+ private Taxon concept;
private HomotypicalGroup homotypicalGroup;
Set<TaxonRelationship> taxonRelationships = taxon.getTaxonRelations(concept);
if(taxonRelationships.size() > 1){
- MessagingUtils.warningDialog("Multiple relations between taxa", this, "There are multiple relations between the " +
- "accepted and the related taxon. This case is not handled by the software yet");
+ MessagingUtils.warningDialog(CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS, this, CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE);
return;
}
this.synonym = synonym;
if(synonym == null){
throw new IllegalArgumentException(
- "A null synonym was provided.");
+ "A null synonym was provided."); //$NON-NLS-1$
}
this.oldHomotypicalGroup = synonym.getHomotypicGroup();
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
parentNode.getUuid(),
true).getCdmEntity();
} catch (HomotypicalGroupChangeException e) {
- MessagingUtils.warningDialog("Operation may lead to inconsistent data", getClass(), e.getMessage());
+ MessagingUtils.warningDialog(Messages.ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA, getClass(), e.getMessage());
return postExecute(null);
}
monitor.worked(20);
throws ExecutionException {
// TODO implement - biggest problem is that any window open for new taxon must be closed first
- MessagingUtils.warn(this.getClass(), "Not yet implemented");
+ MessagingUtils.warn(this.getClass(), Messages.ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED);
return postExecute(element);
}
\r
super(label, undoContext, taxon, postOperationEnabled);\r
List<String> propertyPaths = new ArrayList<String>();\r
- propertyPaths.add("synonymRelations");\r
+ propertyPaths.add("synonymRelations"); //$NON-NLS-1$\r
this.element = (Taxon) CdmStore.getService(ITaxonService.class).load(taxon.getUuid(),propertyPaths);\r
this.oldTaxon = (Taxon) CdmStore.getService(ITaxonService.class).load(oldTaxonUUID);\r
this.synonym = (Synonym) CdmStore.getService(ITaxonService.class).load(synonymUUID);\r
if(synonym == null){\r
throw new IllegalArgumentException(\r
- "A null synonym was provided.");\r
+ "A null synonym was provided."); //$NON-NLS-1$\r
}\r
}\r
\r
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
public SwapSynonymAndAcceptedOperation(String label, IUndoContext undoContext,
Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled,
ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
- super("Swap Synonym And Accepted Taxon Operation", undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
+ super(Messages.SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON, undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
this.synonym = synonym;
}
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- MessagingUtils.error(this.getClass(), "Not yet implemented", null);
+ MessagingUtils.error(this.getClass(), Messages.SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED, null);
return null;
}
}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
import eu.etaxonomy.taxeditor.editor.view.checklist.edit.DistributionEditingSupport;
import eu.etaxonomy.taxeditor.editor.view.checklist.filter.ChecklistEditorFilter;
* @version 1.0
*/
public class ChecklistEditor extends EditorPart implements ISelectionListener, IPartContentHasFactualData, IConversationEnabled,
- IContextListener, IPartContentHasDetails, IDirtyMarkable{//, ICdmEntitySessionEnabled {
-
- private static final Logger logger = Logger.getLogger(ChecklistEditor.class);
- /**
- * Key used for storing Checklist Editor View
- */
- private static final String CHECKLIST_EDITOR_MEMENTO_KEY = "checklistEditor";
+ IContextListener, IPartContentHasDetails, IDirtyMarkable{
+ private static final String LOADING_TAXA = Messages.ChecklistEditor_LOAD_TAXA;
+ private static final String UNKNOWN = Messages.ChecklistEditor_UNKNOWN;
+ private static final String ELEMENT_COUNT = Messages.ChecklistEditor_ELEMENT_COUNT;
+ public static final String TYPE_FILTER_TEXT = "type filter text"; //$NON-NLS-1$
+ private static final Logger logger = Logger.getLogger(ChecklistEditor.class);
private class ChecklistJob extends Job {
@Override
public IStatus run(final IProgressMonitor monitor) {
try {
- logger.debug("Begin of eclipse core runtime Job to Retrieve datasources");
- monitor.beginTask("Retrieving TaxonNodes", taxonNodes.size() + 1);
+ logger.debug("Begin of eclipse core runtime Job to Retrieve datasources"); //$NON-NLS-1$
+ monitor.beginTask(Messages.ChecklistEditor_RETRIEVE_NODES, taxonNodes.size() + 1);
final List<Taxon> taxonList = new ArrayList<Taxon>();
* Constant
* <code>ID="eu.etaxonomy.taxeditor.store.datasource"{trunked}</code>
*/
- public static String ID = "eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor";
+ public static String ID = "eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor"; //$NON-NLS-1$
private TableViewer viewer;
selectionService.addSelectionListener(this);
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
labelProvider = new ChecklistLabelProvider(this.viewer);
-
+
terms = labelProvider.getNamedAreas();
if (terms == null){
- MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
- + "Therefore go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+ MessagingUtils.informationDialog(Messages.ChecklistEditor_NO_AREAS, Messages.ChecklistEditor_NO_AREAS_MESSAGE);
this.dispose();
return;
}
*/
private Text createSearchBar(Composite parent) {
Label searchLabel = new Label(parent, SWT.NONE);
- searchLabel.setText("Search: ");
+ searchLabel.setText(Messages.ChecklistEditor_SEARCH);
final Text searchText = new Text(parent, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.CANCEL);
searchText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
- searchText.setText("type filter text");
+ searchText.setText(TYPE_FILTER_TEXT);
return searchText;
}
private void createToolbar(Composite parent) {
ToolBar toolBar = new ToolBar(parent, SWT.NONE);
toolItem = new ToolItem(toolBar, SWT.DROP_DOWN | SWT.BORDER);
- toolItem.setText("Distribution Status");
- toolItem.setToolTipText("Show Distribution Status for selected Areas");
+ toolItem.setText(Messages.ChecklistEditor_DIST_STATUS);
+ toolItem.setToolTipText(Messages.ChecklistEditor_DIST_STATUS_TOOLTIP);
createToolbarItems();
toolItem.addSelectionListener(dropListener);
toolBar.pack();
private void createToolbarItems() {
dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
-
+
for (DefinedTermBase<DefinedTermBase> term : terms) {
if(term!=null){
dropListener.add(term);
gridData.horizontalAlignment = GridData.FILL;
statusLabel = new Label(composite, SWT.LEFT);
- statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "uknown"));
+ statusLabel.setText(ELEMENT_COUNT + (countNodes != null ? countNodes : UNKNOWN));
statusLabel.setLayoutData(gridData);
}
List<String> titles = new ArrayList<String>();
List<Integer> bounds = new ArrayList<Integer>();
if (PreferencesUtil.isShowRankInChecklistEditor()){
- Collections.addAll(titles, "Taxon", "Rank");
+ Collections.addAll(titles, Messages.ChecklistEditor_TAXON, Messages.ChecklistEditor_RANK);
Collections.addAll(bounds, 300, 200);
} else{
- Collections.addAll(titles, "Taxon");
+ Collections.addAll(titles, Messages.ChecklistEditor_TAXON);
Collections.addAll(bounds, 300);
}
TaxonNode taxonNode = checklistEditorInput.getTaxonNode();
if (classification != null && taxonNode == null) {
countNodes = taxonNodeService.countAllNodesForClassification(classification);
- statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "unknown"));
+ statusLabel.setText(ELEMENT_COUNT + (countNodes != null ? countNodes : UNKNOWN));
// This should not kill the view nor the editor if something goes
// wrong
// TODO: don't load the whole taxonNode Object but rather a small
// FIXME: May be don't open classification which are greater than
// 3000 Taxa
selectedTaxonNodes = taxonNodeService.listAllNodesForClassification(classification, 0, countNodes);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
}
if (taxonNode != null) {
selectedTaxonNodes = taxonNodeService.loadChildNodesOfTaxonNode(taxonNode, NODE_INIT_STRATEGY, true, null);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
}
}
public void dispose() {
this.checklistEditorInput.dispose();
super.dispose();
-
+
conversation.unregisterForDataStoreChanges(this);
conversation.unbind();
-
+
//conversation.close();
conversation = null;
}
// viewer.getTable().setEnabled(!busy);
if (busy) {
partNameCache = getPartName();
- setPartName("Loading " + countNodes + " Taxa...");
+ setPartName(String.format(Messages.ChecklistEditor_LOAD_CNT_TAXA, countNodes));
} else {
if (partNameCache != null) {
setPartName(partNameCache);
acitivateNewColumnInDropDownMenu(term);
}
viewer.setLabelProvider(labelProvider);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
table.setRedraw(true);
viewer.refresh();
}
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving Editor", 1);
+ monitor.beginTask(Messages.ChecklistEditor_SAVE_EDITOR, 1);
if (!conversation.isBound()) {
conversation.bind();
}
setInput(input);
if (input instanceof ChecklistEditorInput) {
checklistEditorInput = (ChecklistEditorInput) input;
- setPartName(getPartName() + ": " + checklistEditorInput.getName());
+ setPartName(getPartName() + ": " + checklistEditorInput.getName()); //$NON-NLS-1$
conversation = checklistEditorInput.getConversation();
conversation.registerForDataStoreChanges(this);
}
conversation = null;
}
- private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state", "feature", "feature.*", "childNodes", "childNodes.taxon",
- "childNodes.taxon.name", "taxonNodes", "taxonNodes.*", "taxonNodes.taxon.*", "taxon.*",
- "taxon.descriptions", "taxon.sec", "taxon.name.*", "terms", "name.*",
- "name.rank.representations", "name.status.type.representations", "stateData.$" });
+ private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state", "feature", "feature.*", "childNodes", "childNodes.taxon", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "childNodes.taxon.name", "taxonNodes", "taxonNodes.*", "taxonNodes.taxon.*", "taxon.*", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "taxon.descriptions", "taxon.sec", "taxon.name.*", "terms", "name.*", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "name.rank.representations", "name.status.type.representations", "stateData.$" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/*
* (non-Javadoc)
return conversation;
}
-
-
+
+
}
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;
*/
public class ChecklistLabelProvider extends LabelProvider implements ITableLabelProvider {
- public static final String DEFAULT_ENTRY = "";
+ public static final String DEFAULT_ENTRY = ""; //$NON-NLS-1$
private IDescriptionService descriptionService;
private final SortedSet<DefinedTermBase> namedAreas;
TableViewer viewer = null;
}
- private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state" });
+ private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state" }); //$NON-NLS-1$ //$NON-NLS-2$
private SortedSet<DefinedTermBase> loadNamedAreas() {
IPreferenceStore preferenceStore = PreferencesUtil.getPreferenceStore();
String values = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_AREA_OCCURENCE_STATUS);
- if (values != null && values != "") {
- String[] split = values.split(",");
+ if (values != null && values != "") { //$NON-NLS-1$
+ String[] split = values.split(","); //$NON-NLS-1$
List<String> listValue = Arrays.asList(split);
List<DefinedTermBase> termlist = new ArrayList<DefinedTermBase>();
Set<UUID> uuidList = new HashSet<UUID>();
}
}
- private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state" });
+ private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state" }); //$NON-NLS-1$ //$NON-NLS-2$
/**
*
public void setSearchText(String s) {
// Search must be a substring of the existing value
- if(s.contains("*")){
- s=s.replace("*", ".*");
+ if(s.contains("*")){ //$NON-NLS-1$
+ s=s.replace("*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
}
- this.searchString = ".*" + s + ".*";
+ this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
operation = operationCreationInstance(event.getCommand().getName(), event, description, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
} else {
- MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description"));
+ MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description")); //$NON-NLS-1$
return null;
}
return null;
operation = createTaxonOperation(event.getCommand().getName(), taxon, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
// specimen description
operation = new CreateSpecimenDescriptionOperation(event.getCommand().getName(), EditorUtil.getUndoContext(), (SpecimenOrObservationBase<?>) viewerInput, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
return null;
}
private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[]{
- "descriptions",
- "descriptions.*",
- "description.state"
+ "descriptions", //$NON-NLS-1$
+ "descriptions.*", //$NON-NLS-1$
+ "description.state" //$NON-NLS-1$
});
import org.eclipse.swt.widgets.ToolItem;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard;
for(int i=0; i<columns.length; i++){
if(selected.getText().equalsIgnoreCase(columns[i].getText())){
column = columns[i];
- logger.info("Column no " +i +" Column Header "+ column.getText() );
+ logger.info("Column no " +i +" Column Header "+ column.getText() ); //$NON-NLS-1$ //$NON-NLS-2$
for (DefinedTermBase<DefinedTermBase> term : termSet) {
if(column.getText().equalsIgnoreCase(term.getTitleCache())){
selectedTerm = term;
private void initialMenuItem(){
MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
- menuItem.setText("Add Distribution");
+ menuItem.setText(Messages.ChecklistDropdownSelectionListener_ADD_DISTRIBUTION);
menuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
import org.eclipse.swt.widgets.Text;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.preference.Resources;
public class ChecklistFocusListener implements FocusListener{
- private final Text searchText;
- private final ModifyListener modifyListener;
+ private final Text searchText;
+ private final ModifyListener modifyListener;
- /**
- *
- */
public ChecklistFocusListener(Text searchText, ModifyListener modifyListener) {
this.searchText = searchText;
this.modifyListener = modifyListener;
@Override
public void focusGained(FocusEvent e) {
- if ("type filter text".equals(searchText.getText())) {
+ if (ChecklistEditor.TYPE_FILTER_TEXT.equals(searchText.getText())) {
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOCUS));
- searchText.setText("");
+ searchText.setText(""); //$NON-NLS-1$
}
}
@Override
public void focusLost(FocusEvent e) {
- if ("".equals(searchText.getText())) {
+ if ("".equals(searchText.getText())) { //$NON-NLS-1$
//TODO: set demo string
searchText.removeModifyListener(modifyListener);
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
- searchText.setText("type filter text");
+ searchText.setText(ChecklistEditor.TYPE_FILTER_TEXT);
searchText.addModifyListener(modifyListener);
}
return formatRelationship((Entry<TaxonRelationship, Taxon>) element);
}
- return "";
+ return ""; //$NON-NLS-1$
}
/**
Taxon sourceTaxon = entry.getValue();
TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, entry.getKey());
Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, entry.getKey());
- String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon);
+ String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon); //$NON-NLS-1$
return string;
}
} else if( element instanceof TaxonRelationship) {
return ((TaxonRelationship)element).getType().getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)).getAbbreviatedLabel();
}
- return "TODO";
+ return "TODO"; //$NON-NLS-1$
}
@Override
try {
handlerService.executeCommand(getCommandName(), event);
} catch (Exception e) {
- MessagingUtils.error(getClass(), "Error executing command", e);
+ MessagingUtils.error(getClass(), "Error executing command", e); //$NON-NLS-1$
}
}
});
editor.getUndoContext(), editor.getTaxon(), selectedElement, type, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
public class ChangeConceptRelationshipTypeMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeConceptRelationshipType";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeConceptRelationshipType"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
public class ChangeToConceptRelationMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeToConceptRelation";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeToConceptRelation"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
undoContext, taxon, relatedConcept, typeInverseContainer, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
public class CreateConceptRelationMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.createConceptRelation";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.createConceptRelation"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
editor.getUndoContext(), editor.getTaxon(), relations, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.openTaxonBase(relatedTaxon.getUuid());
} catch (PartInitException e) {
- MessagingUtils.messageDialog("Could not open taxon", getClass(),
- String.format("Could not open the taxon: %s" ,relatedTaxon), e);
+ MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+ String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), e);
}
}
}
public class DerivateView extends EditorPart implements IPartContentHasFactualData, IConversationEnabled,
ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
IContextListener, ISelectionListener {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"; //$NON-NLS-1$
+ private static final String SPECIMEN_EDITOR = "Specimen Editor";
+
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView";
public static final String YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION = Messages.DerivateView_YOU_NEED_TO_SAVE;
public static final String VIEW_HAS_UNSAVED_CHANGES = Messages.DerivateView_UNSAVED_CHANGES;
labelProvider.updateLabelCache(rootElements);
viewer.setInput(rootElements);
- getEditorSite().getActionBars().getStatusLineManager().setMessage(rootElements.size() +" derivative hierarchies found");
+ getEditorSite().getActionBars().getStatusLineManager().setMessage(String.format("%d derivative hierarchies found", rootElements.size()));
//set selection to derivatives if the filter criteria
//taxon assignment or derivative type are set
conversation.commit(true);
CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-
+
monitor.worked(1);
this.setDirty(false);
}
checkWarnThreshold(uuids);
updateRootEntities(uuids);
- setPartName("Derivative Editor: " + selectedTaxon.getName());
+ setPartName(SPECIMEN_EDITOR+": " + selectedTaxon.getName());
}
}
}
private void checkWarnThreshold(Collection<UUID> uuids) {
if(uuids!=null && uuids.size()>WARN_THRESHOLD){
- MessagingUtils.warningDialog("Performance warning", this.getClass(), String.format("Specimens will not be loaded!\n"
- + "There are %d specimens associated with the current "
- + "selection. If you really want to show all of them in the specimen editor please "
- + "use the taxon filter in the search bar.", uuids.size()));
+ MessagingUtils.warningDialog("Performance warning", this.getClass(), String.format("Specimens will not be loaded!\n There are %d specimens associated with the current selection. If you really want to show all of them in the specimen editor please use the taxon filter in the search bar.", uuids.size()));
uuids.clear();
}
}
derivateSearchCompositeController.setEnabled(!listenToSelectionChange);
if(!listenToSelectionChange){
selectedTaxon = null;
- setPartName("Derivative Editor");
+ setPartName(SPECIMEN_EDITOR);
}
else if(selectedTaxon==null){
- setPartName("Derivative Editor [no taxon selected]");
+ setPartName(SPECIMEN_EDITOR+" [no taxon selected]");
}
}
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
+import eu.etaxonomy.taxeditor.editor.Messages;
+
/**
* Editor input for the {@link DerivateView}
*
}
private String getEditorName() {
- return "Derivative Editor";
+ return Messages.DerivateViewEditorInput_SPECIMEN_EDITOR;
}
}
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
DerivateView derivateView = (DerivateView)receiver;
- if(property.equals("isLinkedWithTaxonSelection")){
+ if(property.equals("isLinkedWithTaxonSelection")){ //$NON-NLS-1$
return derivateView.isListenToSelectionChange();
}
return false;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.CompoundContributionItem;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.ImageResources;
final DerivateView derivateView = (DerivateView) activePart;
MenuItem item = new MenuItem(menu, SWT.NONE);
if(derivateView.isListenToSelectionChange()){
- item.setText("Unlink from taxon selection");
+ item.setText(Messages.ListenToSelectionChangeContextMenu_UNLINK);
}
else{
- item.setText("Link with taxon selection");
+ item.setText(Messages.ListenToSelectionChangeContextMenu_LINK);
}
item.setImage(ImageResources.getImage(ImageResources.SYNCED));
item.addSelectionListener(new SelectionAdapterExtension(derivateView));
import eu.etaxonomy.cdm.model.molecular.SingleRead;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.operation.DeleteDerivateOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
}
}
else{
- MessagingUtils.error(getClass(), "Selection is not valid for this delete handler", null);
+ MessagingUtils.error(getClass(), Messages.DeleteDerivateHandler_INVALID_SELECTION, null);
}
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
}
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
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.handler.defaultHandler.DefaultOpenHandlerBase;
@Override
protected void open(ExecutionEvent event, IndividualsAssociation entity) {
if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){
- MessagingUtils.messageDialog("No specimens found", this, "No specimens found for the selected object. (Maybe there are unsaved changes)");
+ MessagingUtils.messageDialog(Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS, this, Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE);
return;
}
SpecimenOrObservationBase associatedSpecimenOrObservation = entity.getAssociatedSpecimenOrObservation();
try {
EditorUtil.open(new DerivateViewEditorInput(Collections.singletonList(specimenUuid)));
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, OpenDerivativeEditorForTaxonNode.OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
}
}
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
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.handler.defaultHandler.DefaultOpenHandlerBase;
public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBase<TaxonNode> {
+ protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+
@Override
protected TaxonNode getEntity(UUID uuid) {
return CdmStore.getService(ITaxonNodeService.class).load(uuid);
try {
EditorUtil.open(new DerivateViewEditorInput(specimenUuids, taxonUuid));
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
}
}
TreeNode selectedTreeNode = EditorUtil.getTreeNodeOfSelection(selection);
if(activeEditor instanceof DerivateView) {
DerivateView derivateView = (DerivateView)activeEditor;
- if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard")){
+ if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard")){ //$NON-NLS-1$
LocalSelectionTransfer.getTransfer().setSelection(selection);
}
- else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead")){
+ else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead")){ //$NON-NLS-1$
if(activeEditor.isDirty()){
MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return null;
}
}
}
- else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence")){
+ else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence")){ //$NON-NLS-1$
if(activeEditor.isDirty()){
MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return null;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.wb.swt.ResourceManager;
+import eu.etaxonomy.taxeditor.editor.Messages;
+
/**
* The widgets of the {@link DerivateSearchView}<br>
*
setLayout(new GridLayout(7, false));
lblTaxon = new Label(this, SWT.NONE);
- lblTaxon.setText("Taxon");
+ lblTaxon.setText(Messages.DerivateSearchComposite_TAXON);
- textTaxonName = formToolkit.createText(this, "New Text", SWT.BORDER);
+ textTaxonName = formToolkit.createText(this, Messages.DerivateSearchComposite_NEW_TEXT, SWT.BORDER);
textTaxonName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textTaxonName.setEnabled(false);
- textTaxonName.setText("");
+ textTaxonName.setText(""); //$NON-NLS-1$
- btnBrowseTaxa = formToolkit.createButton(this, "", SWT.NONE);
+ btnBrowseTaxa = formToolkit.createButton(this, "", SWT.NONE); //$NON-NLS-1$
btnBrowseTaxa.setAlignment(SWT.RIGHT);
- btnBrowseTaxa.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/prj_obj.gif"));
+ btnBrowseTaxa.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/prj_obj.gif")); //$NON-NLS-1$ //$NON-NLS-2$
- btnClearTaxon = formToolkit.createButton(this, "", SWT.NONE);
+ btnClearTaxon = formToolkit.createButton(this, "", SWT.NONE); //$NON-NLS-1$
btnClearTaxon.setAlignment(SWT.RIGHT);
btnClearTaxon.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
- btnClearTaxon.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
+ btnClearTaxon.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif")); //$NON-NLS-1$ //$NON-NLS-2$
lbltaxonAssignment = new Label(this, SWT.NONE);
lbltaxonAssignment.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lbltaxonAssignment.setText("Taxon assignment");
+ lbltaxonAssignment.setText(Messages.DerivateSearchComposite_TAXON_ASSIGNMENT);
comboTaxonAssignment = new Combo(this, SWT.NONE);
- comboTaxonAssignment.setItems(new String[] { "All", "Yes", "No" });
+ comboTaxonAssignment.setItems(new String[] { Messages.DerivateSearchComposite_ALL, Messages.DerivateSearchComposite_YES, Messages.DerivateSearchComposite_NO });
comboTaxonAssignment.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
formToolkit.adapt(comboTaxonAssignment);
formToolkit.paintBordersFor(comboTaxonAssignment);
lblTitleCache = new Label(this, SWT.NONE);
lblTitleCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblTitleCache.setText("Title Cache");
+ lblTitleCache.setText(Messages.DerivateSearchComposite_TITLE_CACHE);
- searchField = formToolkit.createText(this, "New Text", SWT.BORDER);
+ searchField = formToolkit.createText(this, "New Text", SWT.BORDER); //$NON-NLS-1$
searchField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1));
- searchField.setText("");
+ searchField.setText(""); //$NON-NLS-1$
lblDerivateType = new Label(this, SWT.NULL);
lblDerivateType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblDerivateType.setText("Derivative Type");
+ lblDerivateType.setText(Messages.DerivateSearchComposite_DERIVATE_TYPE);
comboDerivateType = new Combo(this, SWT.READ_ONLY);
comboDerivateType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
buttonSearch = new Button(this, SWT.NONE);
formToolkit.adapt(buttonSearch, true, true);
- buttonSearch.setText("Search");
+ buttonSearch.setText(Messages.DerivateSearchComposite_SEARCH);
}
}
else if(eventSource==derivateSearchComposite.getBtnClearTaxon()){
selectedTaxon = null;
- derivateSearchComposite.getTextTaxonName().setText("");
+ derivateSearchComposite.getTextTaxonName().setText(""); //$NON-NLS-1$
derivateSearchComposite.getComboTaxonAssignment().select(DerivateSearchComposite.ALL_SPECIMENS);
derivateSearchComposite.getComboTaxonAssignment().setEnabled(true);
derivateSearchComposite.getLbltaxonAssignment().setEnabled(true);
*/
public void reset(){
if(!derivateSearchComposite.isDisposed()){
- derivateSearchComposite.getSearchField().setText("");
+ derivateSearchComposite.getSearchField().setText(""); //$NON-NLS-1$
derivateSearchComposite.getComboDerivateType().deselectAll();
comboSpecimenTypeController.setSelection(SpecimenOrObservationType.Unknown);
}