Merge branch 'release/4.6.0' 4.6.0
authorjenkins <jenkins-int@bgbm.org>
Mon, 13 Mar 2017 11:32:48 +0000 (12:32 +0100)
committerjenkins <jenkins-int@bgbm.org>
Mon, 13 Mar 2017 11:32:48 +0000 (12:32 +0100)
467 files changed:
.gitignore
eu.etaxonomy.taxeditor.application/.classpath
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/plugin.xml
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/admin/UserGroupContributionItem.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/.classpath
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/build.properties
eu.etaxonomy.taxeditor.bulkeditor/plugin.xml
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/LineAnnotation.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/handler/NewObjectHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorSelectionPropertyTester.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/OpenBulkEditorContributionItem.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/BulkEditorInputType.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/GroupCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/AbstractDateComparator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/ReferenceSortProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/TitleCacheComparator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/Messages.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages.properties [new file with mode: 0755]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages_de.properties [new file with mode: 0755]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsLabelProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java [moved from eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java with 70% similarity]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties [moved from eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties with 59% similarity]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties [moved from eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties with 51% similarity]
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacherConnectionProvider.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml
eu.etaxonomy.taxeditor.editor/.classpath
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties [deleted file]
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties [deleted file]
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
eu.etaxonomy.taxeditor.editor/build.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/CdmDataTransfer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/ChooseFromMultipleTaxonNodesDialog.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorStateManager.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java [deleted file]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditorDataChangeBehaviour.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Page.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/SimpleSelectionProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputFactory.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/handler/EditCdmAuthoritiesHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/EditNewTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenChecklistEditorHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenDerivateViewHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenParentHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SaveAllHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/internal/TaxeditorEditorPlugin.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/KeyEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorLabels.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyGraphContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyGraphEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListItem.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/CreateChildNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/CreateSiblingNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/DeleteNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/InsertNewNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RefreshNodeNumberingHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateChildPolytomousKeyNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateSiblingPolytomousKeyNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/InsertPolytomousKeyNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RemotingCreatePolytomousKeyNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/ConceptContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/EditorAnnotation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/IContainerConstants.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/LineBreakListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/LineWrapSquigglesStrategy.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/LineWrapSupport.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/NameViewer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/RulerWithIcon.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/SynonymContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/dnd/NameEditorDropTargetListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToConceptRelationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToMisapplicationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHeterotypicSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHomotypicSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateMisapplicationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateSynonymInHomotypicalGroupHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteAllEmptyNamesHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/RemoveBasionymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SetBasionymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExistingHomotypicalGroupOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/MoveSynonymToAnotherAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/validation/MarkerManager.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/validation/ValidationDaemon.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/edit/DistributionEditingSupport.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/filter/ChecklistEditorFilter.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/handler/CreateDescriptionElementHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/handler/CreateDescriptionHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/handler/OpenDistributionHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/listener/ChecklistDropdownSelectionListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/listener/ChecklistFocusListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/AbstractDynamicConceptRelationMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeToConceptRelationMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/DeleteConceptRelationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/OpenRelatedConceptHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/OpenRelatedConceptInBulkEditorHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateViewEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivativeEditorPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateFieldUnitContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/ListenToSelectionChangeContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/SingleReadHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchComposite.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementTransfer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionElementHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DescriptionsMenuPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionToOtherTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/AddDerivedUnitFacadeMediaOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateDescriptionElementOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateSpecimenDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteDescriptionElementOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/EditInXper2Handler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionToOtherTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/AddExistingMediaHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/AddImageGalleryHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/CreateMediaHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/DeleteMediaHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/MoveImageDownInListHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/handler/MoveImageUpInListHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/MoveMediaInListOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/EntityClassMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/EntityIdMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/InvalidValueMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/UserFriendlyDescriptionMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/UserFriendlyFieldNameMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/UserFriendlyTypeNameMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/ValidationProblemsView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/ValidatorClassMarkerField.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/validation/ValidatorMessageMarkerField.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExisitingHomotypicalGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInNewGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
eu.etaxonomy.taxeditor.feature.jre.linux64/feature.xml
eu.etaxonomy.taxeditor.feature.jre.linux64/pom.xml
eu.etaxonomy.taxeditor.feature.platform/feature.xml
eu.etaxonomy.taxeditor.feature.platform/pom.xml
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.feature/pom.xml
eu.etaxonomy.taxeditor.help/.classpath
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.molecular.lib/.classpath
eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular.lib/pom.xml
eu.etaxonomy.taxeditor.molecular/.classpath
eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages.properties [deleted file]
eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages_de.properties [deleted file]
eu.etaxonomy.taxeditor.molecular/pom.xml
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/Messages.java [deleted file]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramMouseListener.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramViewPart.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AlignmentEditorPasteHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramLeftHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramRightHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/EditSequenceHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ExportSequenceToFileHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/HandlerTools.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/LoadPherogramHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ShowPherogramHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleLeftRightInsertionHandler.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/CDMPherogramAlignmentObjectTranslator.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/CDMSequenceMatrixAdapter.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/SequenceIDIterator.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/SingleReadAlignmentRDFXMLConstants.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentFileFormatPage.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentOptionsPage.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentWizard.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentWizardModel.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/Messages.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/.classpath
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle_de.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties [deleted file]
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties [deleted file]
eu.etaxonomy.taxeditor.navigation/build.properties
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/internal/TaxeditorNavigationPlugin.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewLabels.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPartDataChangeBehavior.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/EditPolytomousKeyNodesHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RefreshPolytomousKeyNodesHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingDeletePolytomousKeyHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingDeletePolytomousKeyOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingUpdatePolytomousKeyAllNodesOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/Messages.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/ClassificationLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/Root.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/SynonymLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonLinkHelper.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDataChangeBehavior.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorLabels.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeNavigatorComparator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodePropertyTester.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/ChangeAcceptedTaxonToSynonymHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CloneClassificationHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CreateClassificationHierarchyHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveFactualDataHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveFactualDataOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetSecundumForSubtreeOperation.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateNewTaxonHierarchyOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateTaxonNode.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/Messages.java [deleted file]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultView.java
eu.etaxonomy.taxeditor.printpublisher/.classpath
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/handler/GeneratePdfHandler.java
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectServiceWizardPage.java
eu.etaxonomy.taxeditor.store/.classpath
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/build.properties
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabasePreferencesWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabaseRepairSortIndexPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/DatabaseRepairTitleCacheUpdatePage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/Test.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermMenu.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java with 77% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties [moved from eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties with 79% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties [moved from eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties with 79% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/FeatureNodeContainerTree.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/ExternalReferenceServiceWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGrantedAuthorityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractDescriptionPostOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsConfigurator.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/OrderPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TemplatePreferencePage.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalCodePreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/AbstractComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/ConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorComposite.java with 90% similarity, mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteConfiguratorDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorDialog.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteMediaConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteMediaConfiguratorComposite.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteNameConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteNameConfiguratorComposite.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteNodeConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteNodeConfiguratorComposite.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteSpecimenConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteSpecimenConfiguratorComposite.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteTaxonBaseConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteTaxonBaseConfiguratorComposite.java with 99% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteTaxonConfiguratorComposite.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteTaxonConfiguratorComposite.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmEnumSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractUriWithExceptionLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MinMaxTextSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/EditPasswordElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/SourceComparator.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/grantedAuthority/GrantedAuthorityCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/grantedAuthority/GrantedAuthorityDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/grantedAuthority/GrantedAuthorityDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/ScopeRestrictionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractOriginalSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/PresenceAbsenceTermDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SaveImportedSpecimenAction.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/ChangeConnectionHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/NameProtectTitleCacheTest.java
eu.etaxonomy.taxeditor.test/.classpath
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.test/pom.xml
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml
eu.etaxonomy.taxeditor.webapp/.classpath
eu.etaxonomy.taxeditor.webapp/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.webapp/pom.xml
eu.etaxonomy.taxeditor/.classpath
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre
eu.etaxonomy.taxeditor/pom.xml
lifecycle-mapping-metadata.xml [new file with mode: 0644]
pom.xml
setup-project.sh [new file with mode: 0755]
src/site/fml/troubleshooting.fml
src/site/site.xml

index a8aaf71fffb469ffa6dfbae45b229220b1621f12..8ba1a0ec2b79280e4939cf0f86f4ef4a4a4287c9 100644 (file)
@@ -1,9 +1,11 @@
 .project
+.classpath
 integration-test.log
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/*
 .settings
 target
 .directory
+bin
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
 eu.etaxonomy.taxeditor.cdmlib/dist
index 6bca977bed3b6d2bc7f202c8a811de4878f0c42b..a9750fff5f29da3075d1f432c920829822e33475 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry kind="src" path="src/test/java"/>
index d06acdf25284ae26c5b6e05c67b1d563fbca3d6f..a4db3394c5b49a8db949ab407f6c667d5e5f2931 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Application
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: OSGI-INF/l10n/plugin
index d5ced8dd85f74d955af8dd6b0464896d8c73bfc4..fdad8b284077acf80629a32ccaf896fece22e5a9 100644 (file)
                </and>
             </visibleWhen>
          </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem"
+               id="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem">
+            <visibleWhen
+                  checkEnabled="true">
+               <and>
+                  <reference
+                        definitionId="hasROLE_PROJECT_MANAGER">
+                  </reference>
+                  <reference
+                        definitionId="isCdmStoreConnected">
+                  </reference>
+               </and>
+            </visibleWhen>
+         </dynamic>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.help">
index cc9c8a03692304ce3a23b3850ae4051ce768e6e6..37f5f9de571870daeb102d12c993e755c3c54cc1 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 02d13bd9f53d8fa14b656bf06fcfbe75e91727d9..d6baf5fef54e7588ed62103bea098a7adcb38de1 100644 (file)
@@ -168,8 +168,8 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
                                MessagingUtils.REMOTE_ACCESS_FAILURE_MESSAGE + System.getProperty("line.separator"),
                                pluginId,
                                t,
-                               true,
-                               false);
+                               false,
+                               true);
                        return true;
                    }
                    return false;
diff --git a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/admin/UserGroupContributionItem.java b/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/admin/UserGroupContributionItem.java
new file mode 100644 (file)
index 0000000..4b99ceb
--- /dev/null
@@ -0,0 +1,35 @@
+// $Id$
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.admin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.IContributionItem;
+
+import eu.etaxonomy.taxeditor.bulkeditor.command.OpenBulkEditorContributionItem;
+import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
+
+/**
+ * @author pplitzner
+ * @date Mar 9, 2017
+ *
+ */
+public class UserGroupContributionItem extends OpenBulkEditorContributionItem {
+
+    /** {@inheritDoc} */
+    @Override
+    protected IContributionItem[] getContributionItems() {
+        List<IContributionItem> contributionItems = new ArrayList<IContributionItem>();
+        contributionItems.add(BulkEditorInputType.USER.createContributionItem());
+        contributionItems.add(BulkEditorInputType.GROUP.createContributionItem());
+        return contributionItems.toArray(new IContributionItem[contributionItems.size()]);
+    }
+}
index 264aebb561ee41e11130a5ba4ef3780ff1c43348..a3ec70cfe5e50f567c0208ecc705ad661561fa87 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
index 0c072823fb87bb8792cd95789282ec239636cc9e..084a95da97f7e9c1a78fcde16e454604753a731d 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Bulkeditor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
index 03f8b95ae611b481257680f4fbd06766c6b70980..bc338967aa7f1bdfdfb95ed764e0455fac878273 100644 (file)
@@ -7,6 +7,6 @@ bin.includes = META-INF/,\
                p2.inf,\\r
                OSGI-INF/l10n/bundle.properties,\\r
                OSGI-INF/l10n/bundle_de.properties,\\r
-               OSGI-INF/l10n/messages.properties,\\r
-               OSGI-INF/l10n/messages_de.properties\r
+               src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties,\\r
+               src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties\r
                
\ No newline at end of file
index abb836ab25513f66bc7336c174c9927424507af9..6983d4811e1d9c551badcf421ab1943b4b3a0f96 100644 (file)
             class="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
             commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity">
          <activeWhen>
-            <reference
-                  definitionId="isBulkEditorSupported">
-            </reference>
+            <and>
+               <reference
+                     definitionId="isBulkEditorSupported">
+               </reference>
+               <not>
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="bulkeditor.editor">
+                     </equals>
+                  </with>
+               </not>
+            </and>
          </activeWhen>
       </handler>
       
index 0e68d40502bf4635b4b0ec68f95768c2f1a0f629..c1fc0b2b6c4ee121f05b5d77f875f7d3e89979fd 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.5.1</version>
+               <version>4.6.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 5634b6297c872753ea623bc3513f7b83468d57d5..1f4f7ee7f8e081d9c286947409028bc4cf918f4c 100644 (file)
@@ -14,7 +14,6 @@ import org.apache.log4j.Logger;
 import org.eclipse.jface.text.source.Annotation;
 
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
-import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
 
 /**
  * An <code>Annotation</code> which spans an entire line and holds an object associated
@@ -40,6 +39,7 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
        private boolean markedAsNew;
        private T mergeTarget;
        private DeleteConfiguratorBase configurator= null;
+       private boolean markAsDelete;
 
 
        /**
@@ -264,6 +264,6 @@ public class LineAnnotation<T> extends Annotation implements IEntityContainer<T>
 
        public void setDeleteConfigurator(DeleteConfiguratorBase config) {
                this.configurator = config;
-               
+
        }
 }
index 9fd646e5fdebcacf359ffb9cc2af116db9f22ebc..a83930d077a997bcb1e6768227baf73a757da4d6 100644 (file)
@@ -1,17 +1,14 @@
 /**
 * 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.
 */
 
 package eu.etaxonomy.taxeditor.annotatedlineeditor.handler;
 
-import java.net.URI;
-import java.net.URISyntaxException;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -25,6 +22,8 @@ import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor;
+import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.GroupCreator;
+import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.UserCreator;
 
 /**
  * <p>NewObjectHandler class.</p>
@@ -39,49 +38,50 @@ public class NewObjectHandler extends AbstractHandler {
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+
                IEditorPart editor = HandlerUtil.getActiveEditor(event);
                IEditorInput input = editor.getEditorInput();
-               
+
                if (editor instanceof AnnotatedLineEditor) {
-                       
+
                        Object key = ((Event)event.getTrigger()).data;
                        if (key != null) {
                                if(!(key instanceof SpecimenOrObservationType)) {
-                                       String text = ((Event)event.getTrigger()).text; 
-                                       
+                                       String text = ((Event)event.getTrigger()).text;
+
                                        //FIXME : This should probably go into some ValidatorFactory
                                        IInputValidator nonEmptyInputValidator = null;
-                                       //FIXME : This is a workaround to not allow empty strings in the 
-                                       //        input dialog for User and Group entities. 
+                                       //FIXME : This is a workaround to not allow empty strings in the
+                                       //        input dialog for User and Group entities.
                                        //        Normally this should be default
                                        //        behaviour, so we need to discuss whether this handler
                                        //        should be used to handle the creating new entities of
                                        //        type other than User and Group.
                                        //        Once #4348 is fixed this check can be removed.
-                                       if(text.equals("User") || text.equals("Group")) {
+                                       if(text.equals(UserCreator.USER) || text.equals(GroupCreator.GROUP)) {
                                                nonEmptyInputValidator = new IInputValidator() {
-                                                       public String isValid(String text) {                                                    
+                                                       @Override
+                            public String isValid(String text) {
                                                                if(text == null || text.isEmpty()) {
                                                                        return "Input cannot be empty";
                                                                }
                                                                return null;
-                                                       }                       
+                                                       }
                                                };
                                        }
-                                       InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event), 
-                                                       "Create " + text, 
-                                                       "Enter new " + text, "",
-                                                       nonEmptyInputValidator); 
+                                       InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event),
+                                                       String.format("Create %s", text), String.format("Enter new %s", text), "",
+                                                       nonEmptyInputValidator);
 
-                                       if (dialog.open() != Window.CANCEL) { 
-                                               ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, dialog.getValue()); 
+                                       if (dialog.open() != Window.CANCEL) {
+                                               ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, dialog.getValue());
                                        }
                                } else {
-                                       ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, "Untitled"); 
+                                       ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, "Untitled");
                                }
-                               
+
                        } else {
                                ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject();
                        }
index 1f5b7016e22cf166d0f81cb9babacf60f38c65e7..4a2aee996d6e799100586f37d4c5f05fc874f1bf 100644 (file)
@@ -2,6 +2,7 @@ package eu.etaxonomy.taxeditor.bulkeditor.command;
 
 import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
 
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
@@ -20,6 +21,10 @@ public class BulkEditorSelectionPropertyTester extends PropertyTester {
                                if(selectedElement!=null){
                                    if(selectedElement instanceof UuidAndTitleCache){
                                        return BulkEditorInputType.getByType(((UuidAndTitleCache) selectedElement).getType())!=null;
+                                   }
+                                   else if(selectedElement instanceof TreeNode){
+                                       System.out.println(BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null);
+                                       return BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null;
                                    }
                                        return BulkEditorInputType.getByType(selectedElement.getClass())!=null;
                                }
index 9ce4ab952253a629a3d1ba989d9c806efbfb8a82..c2b0cbe301b2b420da75401425cdee6e3360a00f 100644 (file)
 package eu.etaxonomy.taxeditor.bulkeditor.command;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.Separator;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.menus.CommandContributionItem;
-import org.eclipse.ui.menus.CommandContributionItemParameter;
 
-import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
 import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
 
 /**
- * <p>
- * OpenBulkEditorContributionItem class.
- * </p>
  *
  * @author p.ciardelli
  * @created 19.08.2009
@@ -36,32 +26,13 @@ import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
  */
 public class OpenBulkEditorContributionItem extends CompoundContributionItem {
 
-    /**
-     * <p>
-     * Constructor for OpenBulkEditorContributionItem.
-     * </p>
-     */
     public OpenBulkEditorContributionItem() {
     }
 
-    /**
-     * <p>
-     * Constructor for OpenBulkEditorContributionItem.
-     * </p>
-     *
-     * @param id
-     *            a {@link java.lang.String} object.
-     */
     public OpenBulkEditorContributionItem(String id) {
         super(id);
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
-     */
     /** {@inheritDoc} */
     @Override
     protected IContributionItem[] getContributionItems() {
@@ -75,29 +46,10 @@ public class OpenBulkEditorContributionItem extends CompoundContributionItem {
         contributionItems.add(BulkEditorInputType.NAME.createContributionItem());
         contributionItems.add(BulkEditorInputType.TAXON.createContributionItem());
         contributionItems.add(new Separator(groupName));
-        contributionItems.add(BulkEditorInputType.OCCURRENCE.createContributionItem());
-        contributionItems.add(new Separator(groupName));
         contributionItems.add(BulkEditorInputType.MEDIA.createContributionItem());
         contributionItems.add(new Separator(groupName));
-        contributionItems.add(BulkEditorInputType.USER.createContributionItem());
-        contributionItems.add(BulkEditorInputType.GROUP.createContributionItem());
+        contributionItems.add(BulkEditorInputType.OCCURRENCE.createContributionItem());
         return contributionItems.toArray(new IContributionItem[contributionItems.size()]);
     }
 
-    /**
-     * @param key
-     * @param object
-     * @return
-     */
-    private IContributionItem createContributionItem(String label, String inputType) {
-        CommandContributionItemParameter parameter = new CommandContributionItemParameter(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), null, IBulkEditorConstants.DYNAMIC_OPEN_MENU_ID, SWT.NONE);
-
-        parameter.label = label;
-
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put(IBulkEditorConstants.INPUT_TYPE_PARAMETER_ID, inputType);
-        parameter.parameters = parameters;
-
-        return new CommandContributionItem(parameter);
-    }
 }
index 3ced1198424a5b660ae3af4cfab56ddfff14db76..cbc2768acb62ada7e82fcebcabda070a8efe0af1 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
@@ -54,7 +54,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
 import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 
 /**
@@ -99,7 +99,7 @@ public class DeleteHandler extends AbstractHandler {
 
 
                                        try {
-                                           ICdmApplicationConfiguration controller;
+                                           ICdmRepository controller;
                                            controller = CdmStore.getCurrentApplicationConfiguration();
                                            if (object instanceof SpecimenOrObservationBase){
                                                IOccurrenceService service = controller.getOccurrenceService();
@@ -124,7 +124,7 @@ public class DeleteHandler extends AbstractHandler {
                                                if (object != null){
                                                    config = new NameDeletionConfigurator();
 
-                                                   DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                                                   DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
                                                    int result_dialog= dialog.open();
                                                    if (result_dialog != Status.OK){
                                                        return null;
@@ -140,7 +140,7 @@ public class DeleteHandler extends AbstractHandler {
                                                                Synonym synonym = HibernateProxyHelper.deproxy(object, Synonym.class);
                                                                config = new SynonymDeletionConfigurator();
                                                                errorMessage = "The synonym ";
-                                                               DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                                                               DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
                                     int result_dialog= dialog.open();
                                     if (result_dialog != Status.OK){
                                          return null;
@@ -159,7 +159,7 @@ public class DeleteHandler extends AbstractHandler {
                                                                config = new TaxonDeletionConfigurator();
                                                                ((TaxonDeletionConfigurator) config).setDeleteInAllClassifications(true);
                                                                DeleteConfiguratorDialog dialog;
-                                                           dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                                                           dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
                                                                int result_dialog= dialog.open();
                                     if (result_dialog != Status.OK){
                                          return null;
@@ -168,13 +168,13 @@ public class DeleteHandler extends AbstractHandler {
 
                                                        }
                                            } else if (object instanceof TeamOrPersonBase){
-
+                                               result = controller.getAgentService().isDeletable(((CdmBase) object).getUuid(), null);
                                                  errorMessage = "The team or person ";
                                           } else if (object instanceof Media){
                                               config = new MediaDeletionConfigurator();
                                               Media media = HibernateProxyHelper.deproxy(object, Media.class);
                                               DeleteConfiguratorDialog dialog;
-                                                  dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                                                  dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
                                                   int result_dialog= dialog.open();
                                if (result_dialog != Status.OK){
                                    return null;
index 9dcbd7fde34208cea0bbe6b870170a94effb8519..51806e3cb97197c4b41b53a9df5ccf0ee484b070 100644 (file)
@@ -151,13 +151,17 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        @Override
        public TeamOrPersonBase save(TeamOrPersonBase entity) {
           return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-          
+
        }
 
        @Override
        public boolean delete(TeamOrPersonBase entity, DeleteConfiguratorBase config)
                        throws ReferencedObjectUndeletableException {
-               return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+           if (entity.getUuid() != null){
+               return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+           }else{
+               return false;
+           }
        }
 
     /* (non-Javadoc)
index ddbbbe9da10a7cabf962d7874bbf6e7c11d715a0..25b52c6666249006289c25582496ebbe07430635 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 public enum BulkEditorInputType {
        AGENT(Messages.BulkEditorInputType_0, AgentEditorInput.ID),
index e535191f12737cb4bb3a5be7a98fb0834d333e46..9464f338766aed782347c24c19b697e83362c7d7 100644 (file)
@@ -31,7 +31,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *
  * @author n.hoffmann
  * @created Jun 16, 2010
- * @version 1.0
  */
 public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObservationBase> {
 
@@ -57,9 +56,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return instance;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#listEntities(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator)
-        */
        /** {@inheritDoc} */
        @Override
        protected List<SpecimenOrObservationBase> listEntities(
@@ -67,9 +63,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return CdmStore.getSearchManager().findOccurrences(configurator);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
-        */
        /** {@inheritDoc}
        @Override
        protected SpecimenOrObservationBase loadEntity(UUID entityUuid) {
@@ -77,9 +70,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths);
        }*/
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getName()
-        */
        /**
         * <p>getName</p>
         *
@@ -90,9 +80,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return BulkEditorInputType.OCCURRENCE.label;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getToolTipText()
-        */
        /**
         * <p>getToolTipText</p>
         *
@@ -103,9 +90,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return getName();
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
-        */
        @Override
        public String getTypeText(Object entity) {
         if(HibernateProxyHelper.isInstanceOf(entity, SpecimenOrObservationBase.class)){
@@ -123,9 +107,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return ID;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
-        */
        /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
        @Override
@@ -133,28 +114,18 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return CdmStore.getService(IOccurrenceService.class).delete(entity) != null;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
-    public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
+    public SpecimenOrObservationBase<?> save(SpecimenOrObservationBase entity) {
            return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
           
        }
 
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
-        */
        @Override
        protected IEntityCreator<SpecimenOrObservationBase> createEntityCreator() {
                return new OccurrenceCreator();
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
-        */
        @Override
        public List<IBulkEditorSortProvider<SpecimenOrObservationBase>> getSortProviders() {
                List<IBulkEditorSortProvider<SpecimenOrObservationBase>> sortProviders = super.getSortProviders();
@@ -164,9 +135,6 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                return sortProviders;
        }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
-     */
     @Override
     public void merge() {
 
@@ -177,5 +145,4 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
                List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths);
        }
-
 }
index f2b56eb37070d8400ff6ce37c83ea6234e76f97b..a5c8687490a06559bd4662827f4d0e3bdffdd80b 100644 (file)
@@ -31,7 +31,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *
  * @author p.ciardelli
  * @created 25.06.2009
- * @version 1.0
  */
 public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
 
@@ -133,7 +132,11 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
         * @throws ReferencedObjectUndeletableException */
        @Override
     public boolean delete(Reference entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException {
-               return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+           if (entity.getUuid() != null){
+               return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+           }else{
+               return false;
+           }
        }
 
        /** {@inheritDoc} */
index a2076ebb896703ec1cad481796898eb17977049b..1f18560bddbd054f3c0d20a56c63eee371c181eb 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -22,7 +22,9 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
  */
 public class GroupCreator implements IEntityCreator<Group> {
 
-       /* (non-Javadoc)
+    public static final String GROUP = "Group";
+
+    /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
         */
        @Override
@@ -44,7 +46,7 @@ public class GroupCreator implements IEntityCreator<Group> {
        @Override
        public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new HashMap<Object, String>();
-               result.put(Group.class, "Group");
+               result.put(Group.class, GROUP);
                return result;
        }
 
index 0abba8e900b681add629bf6d1148863859394996..0897eb32944a45c855a02bd0bcfd5b4060fd8b6c 100644 (file)
 package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.springframework.security.access.AccessDeniedException;
 
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -27,7 +30,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class UserCreator  implements IEntityCreator<User>{
 
-       /* (non-Javadoc)
+    public static final String USER = "User";
+
+    /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
         */
        @Override
@@ -42,9 +47,15 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                       CdmStore.getService(IUserService.class).createUser(user);
-                       user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
-                       return user;
+                       List<User> userList =CdmStore.getService(IUserService.class).listByUsername(user.getUsername(), MatchMode.EXACT, null, 100, 0, null, null);
+                       if (userList.isEmpty()){
+                       CdmStore.getService(IUserService.class).createUser(user);
+                       user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
+                       return user;
+                       } else{
+                           MessagingUtils.messageDialog(Messages.USER_CREATOR_user_exists_title, user, Messages.USER_CREATOR_user_exists);
+                   return null;
+                       }
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
                        return null;
@@ -57,7 +68,7 @@ public class UserCreator  implements IEntityCreator<User>{
        @Override
        public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new HashMap<Object, String>();
-               result.put(User.class, "User");
+               result.put(User.class, USER);
                return result;
        }
 
index 7536b882a17b4bb9910175049a4034f3c6948de0..fd1219a69262d94544814a13d0e9bf0414139eeb 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -21,10 +21,15 @@ import eu.etaxonomy.cdm.model.common.ICdmBase;
  * @version 1.0
  */
 public abstract class AbstractDateComparator<T extends ICdmBase> implements Comparator<T>{
-       
-       public int compare(T o1, T o2) {                
+
+       @Override
+    public int compare(T o1, T o2) {
+           if (o1.equals(o2)){
+               return 0;
+           }
+
                return getDate(o1).compareTo(getDate(o2));
        };
-       
+
        protected abstract DateTime getDate(T object);
 }
index c61b504d4e4e8b2d3ca751736b396b3954cfa30d..ebdc23b07969a5ee26300ce904b720f0eb777103 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -22,7 +22,7 @@ import eu.etaxonomy.cdm.model.reference.Reference;
 public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
 
        /**
-        * 
+        *
         */
        public ReferenceSortProvider() {
                comparators.put("Type", new ReferenceTypeComparator());
@@ -30,20 +30,21 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
        }
 
        private class ReferenceYearComparator implements Comparator<Reference> {
-               
+
                /**
                 * @param o1
                 * @return
                 */
                private String getYearString(Reference o) {
-                       TimePeriod datePublished = o == null ? null : o.getDatePublished(); 
+                       TimePeriod datePublished = o == null ? null : o.getDatePublished();
                        return datePublished == null? null : datePublished.toString();
                }
-               
+
                /* (non-Javadoc)
                 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
                 */
-               public int compare(Reference o1, Reference o2) {
+               @Override
+        public int compare(Reference o1, Reference o2) {
                        String yearString1 = getYearString(o1);
                        String yearString2 = getYearString(o2);
                        if (yearString1 == null) {
@@ -58,19 +59,21 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
                        }
                        int returnVal = yearString1.compareToIgnoreCase(yearString2);
                        if (returnVal == 0) {
-                               return new TitleCacheComparator<Reference>().compare(o1, o2);
-                       } else {
-                               return returnVal;
+                               returnVal = new TitleCacheComparator<Reference>().compare(o1, o2);
+
                        }
-               }               
+                       return returnVal;
+
+               }
        }
-       
+
        private class ReferenceTypeComparator implements Comparator<Reference> {
-               
+
                /* (non-Javadoc)
                 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
                 */
-               public int compare(Reference o1, Reference o2) {
+               @Override
+        public int compare(Reference o1, Reference o2) {
                        String typeString1 = o1.getClass().toString();
                        String typeString2 = o2.getClass().toString();
                        if (typeString1 == null) {
@@ -85,12 +88,13 @@ public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
                        }
                        int returnVal = typeString1.compareToIgnoreCase(typeString2);
                        if (returnVal == 0) {
+                           //the TitleCacheComparator already fulfills the comparator contract
                                return new TitleCacheComparator<Reference>().compare(o1, o2);
                        } else {
                                return returnVal;
                        }
-               }               
+               }
        }
 
-       
+
 }
index 842417ca8ac9404701fcf7edc7bfd6e6e0bcd75e..4d5892d9610f831e7231ca4fe7e6eef53d20ac4e 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -21,18 +21,19 @@ import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
  * @version 1.0
  */
 public class TitleCacheComparator<T extends IIdentifiableEntity> implements Comparator<T> {
-       
+
     private boolean fIgnoreCase;
 
        private String getTitleCache(T o) {
                return o == null ? null : o.getTitleCache();
        }
-       
+
        /* (non-Javadoc)
         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
         */
        /** {@inheritDoc} */
-       public int compare(T o1, T o2) {
+       @Override
+    public int compare(T o1, T o2) {
                String titleCache1 = getTitleCache(o1);
                String titleCache2 = getTitleCache(o2);
                if (titleCache1 == null && titleCache2 == null) {
@@ -43,8 +44,13 @@ public class TitleCacheComparator<T extends IIdentifiableEntity> implements Comp
                }
                if (titleCache2 == null) {
                        return 1;
-               }                               
-        return fIgnoreCase ? titleCache1.compareToIgnoreCase(titleCache2) : 
+               }
+        int result =  fIgnoreCase ? titleCache1.compareToIgnoreCase(titleCache2) :
                                                        titleCache1.compareTo(titleCache2);
+
+        if (result == 0){
+            result = o1.getUuid().compareTo(o2.getUuid());
+        }
+        return result;
        }
 }
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/Messages.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/Messages.java
new file mode 100755 (executable)
index 0000000..768046e
--- /dev/null
@@ -0,0 +1,28 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.bulkeditor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author k.luther
+ * @date 10.03.2017
+ *
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.bulkeditor.l10n.messages"; //$NON-NLS-1$
+    public static String ReferencingObjectsLabelProvider_No_description_available;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages.properties b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages.properties
new file mode 100755 (executable)
index 0000000..5cb5303
--- /dev/null
@@ -0,0 +1 @@
+ReferencingObjectsLabelProvider_No_description_available=No description available
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/l10n/messages_de.properties
new file mode 100755 (executable)
index 0000000..bfcb11a
--- /dev/null
@@ -0,0 +1 @@
+ReferencingObjectsLabelProvider_No_description_available=Keine Beschreibung verfügbar
\ No newline at end of file
index 21f7b52a3fa88301c86f76f3a0792afc845b7745..84322e296d9dd5cfe0aadd63b1449cf5b5f77373 100644 (file)
@@ -9,6 +9,7 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.referencingobjects;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
@@ -16,6 +17,7 @@ import org.eclipse.swt.graphics.Image;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.bulkeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.DescriptionHelper;
 
 /**
@@ -60,11 +62,11 @@ public class ReferencingObjectsLabelProvider extends LabelProvider implements IT
                        }
                }else if (columnIndex == 3) {
                        if(element instanceof CdmBase){
-                               text = ((CdmBase) element).getId() + "";
+                               text = ((CdmBase) element).getId() + ""; //$NON-NLS-1$
                        }
                }
 
-               return text == null ? element.toString() : text;
+               return (StringUtils.isBlank(text)) ? Messages.ReferencingObjectsLabelProvider_No_description_available : text;
 
        }
 }
index 1eba7aca1a697a3a24e4ac3c327a8729373f9514..00bcc23f174f97c644bdde4ed9c6af51817d4111 100644 (file)
@@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.ui.IWorkbenchPart;
+import org.springframework.remoting.RemoteAccessException;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
@@ -73,6 +74,7 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.DescriptionHelper;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -94,6 +96,11 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
        private String referencedObjectTitleCache;
        private ConversationHolder conversation;
        private final ICdmEntitySession cdmEntitySession;
+       private UUID actualUuid;
+       List<CdmBase> referencingObjects = null;
+       Set<CdmBase> referencingObjectsSet = null;
+       IProgressMonitor actualMonitor = null;
+       private Job currentJob = null;
 
        public ReferencingObjectsView() {
            cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession();
@@ -178,46 +185,103 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
        }
 
        public void updateReferencingObjects(final UUID entityUUID, final Class objectClass) {
-
-               final Display display = Display.getCurrent();
-
-               Job job = new Job("Update Referencing Objects") {
+           if (actualUuid == entityUUID){
+               return ;
+           }
+           showEmptyPage();
+           if(actualMonitor!=null && !actualMonitor.isCanceled()){
+//             boolean success = false;
+//             //wait for cancel to be done
+//             while(!success){
+//                 success = currentJob.cancel();
+//             }
+//             currentJob = null;
+               while(!actualMonitor.isCanceled()){
+                   actualMonitor.setCanceled(true);
+               }
+
+           }
+               currentJob = new Job("Update Referencing Objects " + entityUUID) {
 
                        @Override
                        protected IStatus run(IProgressMonitor monitor) {
-                               monitor.beginTask("Calculating referencing objects", 10);
-
-                               monitor.worked(3);
-
-                               display.asyncExec(new Runnable() {
-
-                                       @Override
-                                       public void run() {
-                                               if (entityUUID != null){
-                                                   ICdmEntitySession previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
-                                                   cdmEntitySession.bind();
-                                                       List<CdmBase> referencingObjects = getReferencingObjects(entityUUID, objectClass);
-                                                       if(previousCdmEntitySession != null) {
-                                                           previousCdmEntitySession.bind();
-                                                       }
-                                                       updateView(referencingObjects);
-
-                                               }
-                                       }
-                               });
+                               monitor.beginTask("Calculating referencing objects", 100);
+                               actualUuid = entityUUID;
+
+                               monitor.worked(5);
+                               referencingObjects = new ArrayList<>();
+                               if(monitor.isCanceled()) {
+                                   actualUuid = null;
+                    return Status.CANCEL_STATUS;
+                }
+                               if (actualMonitor != null){
+                                   actualMonitor.setCanceled(true);
 
+                               }
+                               actualMonitor = monitor;
+                               if (entityUUID != null){
+                                   ICdmEntitySession previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
+                       cdmEntitySession.bind();
+                       referencingObjectsSet = getReferencingObjects(entityUUID, objectClass);
+
+                       if(monitor.isCanceled()) {
+                           actualUuid = null;
+
+                           return Status.CANCEL_STATUS;
+                       }
+                       monitor.worked(30);
+                       referencingObjects = sortReferencing();
+                       if (referencingObjects == null){
+                           if (monitor.isCanceled()){
+                               actualUuid = null;
+
+                               return Status.CANCEL_STATUS;
+                           }
+                       }
+
+                       if(monitor.isCanceled()) {
+                           if(previousCdmEntitySession != null) {
+                               previousCdmEntitySession.bind();
+                           }
+
+                           return Status.CANCEL_STATUS;
+                       }
+                       monitor.worked(80);
+                    updateView();
+
+                       if(previousCdmEntitySession != null) {
+                           previousCdmEntitySession.bind();
+                       }
+                      // actualUuid = entityUUID;
+                               }
                                monitor.done();
 
 
                                return Status.OK_STATUS;
+
+
                        }
                };
+               currentJob.setUser(true);
+
+               currentJob.schedule();
+//             final IJobChangeListener listener;
+//             listener =  new JobChangeAdapter() {
+//            @Override
+//            public void done(IJobChangeEvent event) {
+//                System.err.println("Job is done" + entityUUID);
+//                //event.getJob().cancel();
+//            }
+//
+//        };
+//        currentJob.addJobChangeListener(listener);
+
+
+
 
-               job.setPriority(Job.DECORATE);
-               job.schedule();
        }
 
-       private List<CdmBase> getReferencingObjects(UUID entity, Class objectClass) {
+       private Set<CdmBase> getReferencingObjects(UUID entity, Class objectClass) {
                CdmBase referencedObject = null;
         try {
                if (objectClass.getSuperclass().equals(TeamOrPersonBase.class) ){
@@ -268,71 +332,109 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
                    else if(referencedObject.isInstanceOf(DescriptionElementBase.class)){
                        referencedObjectTitleCache = DescriptionHelper.getLabel(referencedObject);
                    }
-                   else{
+                   else if (referencedObject.isInstanceOf(User.class)){
+                       referencedObjectTitleCache = ((User)referencedObject).getUsername();
+                   }else{
                        referencedObjectTitleCache = null;
                    }
                        setOfReferencingObjects = CdmStore.getCommonService().getReferencingObjects(referencedObject);
+                       return setOfReferencingObjects;
                }
-               if (setOfReferencingObjects != null){
-                       List<CdmBase> referencingObjects = new ArrayList<CdmBase>(setOfReferencingObjects);
 
-                       Collections.sort(referencingObjects, new ReferencingClassComparator());
-
-                       return referencingObjects;
-
-               }
         } catch (Exception e) {
-            logger.error("Error retrieving referencing objects", e);
-            setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
+            logger.debug("Error retrieving referencing objects", e);
+            e.printStackTrace();
+            updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
         }
                return null;
        }
+       private List<CdmBase> sortReferencing(){
+
+           if (referencingObjectsSet != null){
+            List<CdmBase> referencingObjects = new ArrayList<CdmBase>(referencingObjectsSet);
+            try{
+                Collections.sort(referencingObjects, new ReferencingClassComparator());
+            }catch (RemoteAccessException e){
+                logger.debug(e.getStackTrace());
+                return null;
+            }
+            return referencingObjects;
+
+        }
+
+           return null;
+       }
 
-       class ReferencingClassComparator implements Comparator<CdmBase> {
+
+       class ReferencingClassComparator implements Comparator<CdmBase>   {
 
                @Override
         public int compare(CdmBase o1, CdmBase o2) {
                        String string1 = o1.getClass().getSimpleName();
                        String string2 = o2.getClass().getSimpleName();
-                       int classCompare = string1.compareToIgnoreCase(string2);
-                       if (classCompare == 0) {
+                       int result = string1.compareToIgnoreCase(string2);
+                       if (result == 0) {
                                string1 = DescriptionHelper.getObjectDescription(o1);
                                string2 = DescriptionHelper.getObjectDescription(o2);
-                               return string1.compareToIgnoreCase(string2);
-                       } else {
-                               return classCompare;
+
+                               result = string1.compareToIgnoreCase(string2);
+                               if (result == 0){
+                                   return o1.getUuid().compareTo(o2.getUuid());
+                               }
                        }
+                               return result;
                }
        }
 
-       private void updateView(List<CdmBase> referencingObjects) {
-               if (viewer != null && !viewer.getControl().isDisposed()){
-                       try{
-                               viewer.setInput(referencingObjects);
-                               if (referencedObjectTitleCache != null){
-                                       setContentDescription("'" + referencedObjectTitleCache + "' is referenced by:");
-                               } else {
-                                       setContentDescription("");
-                               }
-                               showViewer();
-                               //enable/disable table
-                               viewer.getControl().setEnabled(referencingObjects!=null);
-                       }catch(Exception e){
-                               setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
-                       }
+       private void updateView() {
+           Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                       if (viewer != null && !viewer.getControl().isDisposed()){
+                               try{
+                                       viewer.setInput(referencingObjects);
 
-               }
+                                       showViewer();
+
+                                       //enable/disable table
+                                       viewer.getControl().setEnabled(referencingObjects!=null);
+
+                               }catch(Exception e){
+                                   e.printStackTrace();
+                                   logger.debug(e.getStackTrace());
+                                   updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
+                               }
+
+                       }
+            }
+            });
        }
 
+
+       private void updateDescription(final String description){
+           Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                   if (referencedObjectTitleCache != null){
+                    setContentDescription(description);
+                } else {
+                    setContentDescription(description);
+                }
+            }
+
+         });
+        }
+
        /** {@inheritDoc} */
        @Override
     public void selectionChanged(IWorkbenchPart part, ISelection selection) {
         if(part == this){
             return;
         }
+
         if(selection instanceof IStructuredSelection){
-               referencedObjectTitleCache = null;
-            showViewer(part, (IStructuredSelection) selection);
+               //referencedObjectTitleCache = null;
+               showViewer(part, (IStructuredSelection) selection);
         }
        }
 
@@ -346,11 +448,35 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
                    firstElement = ((TreeNode) firstElement).getValue();
                }
                if(firstElement instanceof CdmBase){
-                   updateReferencingObjects(((CdmBase) firstElement).getUuid(),firstElement.getClass() );
+                   CdmBase referencedCdmObject = (CdmBase) firstElement;
+                   if (referencedCdmObject.getUuid() == actualUuid){
+                       return;
+                   }
+                   if (referencedCdmObject != null){
+                if(referencedCdmObject.isInstanceOf(IdentifiableEntity.class)){
+                    referencedObjectTitleCache = (HibernateProxyHelper.deproxy(referencedCdmObject, IdentifiableEntity.class)).getTitleCache();
+                }
+                else if(referencedCdmObject.isInstanceOf(DescriptionElementBase.class)){
+                    referencedObjectTitleCache = DescriptionHelper.getLabel(referencedCdmObject);
+                }
+                else if (referencedCdmObject.isInstanceOf(User.class)){
+                    referencedObjectTitleCache = ((User)referencedCdmObject).getUsername();
+                }else if (referencedCdmObject.isInstanceOf(TaxonNode.class)){
+                    referencedObjectTitleCache = "TaxonNode of "+(HibernateProxyHelper.deproxy(referencedCdmObject, TaxonNode.class)).getTaxon().getTitleCache();
+                }
+                   }
+                   if (referencedObjectTitleCache != null){
+                       updateDescription("'" + referencedObjectTitleCache + "' is referenced by:");
+                   } else{
+                       updateDescription("");
+                   }
+
+                   updateReferencingObjects(referencedCdmObject.getUuid(),firstElement.getClass() );
+
                }
-               else{
-                   updateView(null);
-            setContentDescription("");
+               else if (firstElement != null){
+                   updateView();
+            updateDescription("");
                }
        }
 
similarity index 70%
rename from eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java
rename to eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
index 1f9f2727381220bd03575f35836311f85a59a200..66eb00b60d027257a77d0299af364a8d0217b80b 100644 (file)
@@ -1,23 +1,25 @@
-package eu.etaxonomy.taxeditor.bulkeditor.input;\r
-\r
-import org.eclipse.osgi.util.NLS;\r
-\r
-public class Messages extends NLS {\r
-       private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$\r
-       public static String BulkEditorInputType_0;\r
-       public static String BulkEditorInputType_1;\r
-       public static String BulkEditorInputType_2;\r
-       public static String BulkEditorInputType_3;\r
-       public static String BulkEditorInputType_4;\r
-       public static String BulkEditorInputType_5;\r
-       public static String BulkEditorInputType_6;\r
-       public static String BulkEditorInputType_7;\r
-       public static String BulkEditorInputType_8;\r
-       static {\r
-               // initialize resource bundle\r
-               NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
-       }\r
-\r
-       private Messages() {\r
-       }\r
-}\r
+package eu.etaxonomy.taxeditor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
+    public static String USER_CREATOR_user_exists_title;
+    public static String USER_CREATOR_user_exists;
+       public static String BulkEditorInputType_0;
+       public static String BulkEditorInputType_1;
+       public static String BulkEditorInputType_2;
+       public static String BulkEditorInputType_3;
+       public static String BulkEditorInputType_4;
+       public static String BulkEditorInputType_5;
+       public static String BulkEditorInputType_6;
+       public static String BulkEditorInputType_7;
+       public static String BulkEditorInputType_8;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
similarity index 59%
rename from eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties
rename to eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
index 2250072f6e6ce7ae774be79a11d1b57234f1f32e..ec3eba487a8ede1eb82653fb8827a72b04a2d138 100644 (file)
@@ -1,9 +1,12 @@
-BulkEditorInputType_0=Persons and Teams\r
-BulkEditorInputType_1=References\r
-BulkEditorInputType_2=Names\r
-BulkEditorInputType_3=Name Relationships\r
-BulkEditorInputType_4=Specimen and Observations\r
-BulkEditorInputType_5=Users\r
-BulkEditorInputType_6=Groups\r
-BulkEditorInputType_7=Taxa\r
-BulkEditorInputType_8=Media\r
+BulkEditorInputType_0=Persons and Teams
+BulkEditorInputType_1=References
+BulkEditorInputType_2=Names
+BulkEditorInputType_3=Name Relationships
+BulkEditorInputType_4=Specimen and Observations (bulk)
+BulkEditorInputType_5=Users
+BulkEditorInputType_6=Groups
+BulkEditorInputType_7=Taxa
+BulkEditorInputType_8=Media
+
+USER_CREATOR_user_exists_title=The user already exists
+USER_CREATOR_user_exists=The user already exists in database
\ No newline at end of file
similarity index 51%
rename from eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties
rename to eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
index 4bf7416ffc36876518d48d4d323cd148c2922b75..83a53ae51609d2c28491a93db66259828fb0e0da 100644 (file)
@@ -1,9 +1,12 @@
-BulkEditorInputType_0=Personen und Teams \r
-BulkEditorInputType_1=Referenzen\r
-BulkEditorInputType_2=Namen\r
-BulkEditorInputType_3=Namensbeziehungen\r
-BulkEditorInputType_4=Belege und Beobachtungen\r
-BulkEditorInputType_5=Nutzer\r
-BulkEditorInputType_6=Nutzergruppen\r
-BulkEditorInputType_7=Taxa\r
-BulkEditorInputType_8=Medien
\ No newline at end of file
+BulkEditorInputType_0=Personen und Teams 
+BulkEditorInputType_1=Referenzen
+BulkEditorInputType_2=Namen
+BulkEditorInputType_3=Namensbeziehungen
+BulkEditorInputType_4=Belege und Beobachtungen (bulk)
+BulkEditorInputType_5=Nutzer
+BulkEditorInputType_6=Nutzergruppen
+BulkEditorInputType_7=Taxa
+BulkEditorInputType_8=Medien
+
+USER_CREATOR_user_exists_title=Der Benutzer existiert bereits
+USER_CREATOR_user_exists=Der Benutzer existiert bereits in der Datenbank.
index 8ad395aeab56fe3edae0744b5d46fd1193fbeea7..64c2e14e33798e3881564bb02294319228e01607 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-oauth2-2.0.11.RELEASE.jar"/>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry kind="src" path="src/main/java"/>\r
-       <classpathentry kind="src" path="src/main/resources"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.5.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-ext/4.3.0-SNAPSHOT/cdmlib-ext-4.5.1-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-io/4.3.0-SNAPSHOT/cdmlib-io-4.5.1-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-model/4.3.0-SNAPSHOT/cdmlib-model-4.5.1-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-services/4.3.0-SNAPSHOT/cdmlib-services-4.5.1-sources.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cglib-3.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-3.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/classmate-1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/codemodel-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-csv-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.3.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dtd-parser-1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymock-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/FastInfoset-1.2.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/guava-19.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2-1.4.190.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-5.0.7.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-5.0.1.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-5.0.7.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-5.0.7.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-5.0.7.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-5.0.7.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.1-api-1.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-5.5.2.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-5.5.2.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-5.2.2.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-cdi-5.2.2.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hsqldb-2.3.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-cache-4.2.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpmime-4.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-2.21.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/istack-commons-tools-2.21.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.5.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.6.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-core-2.6.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.6.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jandex-2.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javassist-3.20.0-GA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javax.el-2.2.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javax.el-api-2.2.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.12.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-core-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-jxc-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.3.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.7.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdom2-2.0.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-arq-2.13.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.13.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jena-tdb-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.9.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/json-20090211.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jsonld-java-0.5.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jta-1.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-4.12.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.7.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/libthrift-0.9.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-backward-codecs-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-core-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-join-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-sandbox-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-suggest-5.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mapstruct-1.0.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.38.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.15.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.4-1206-jdbc4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/relaxngDatatype-20020414.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/rngom-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/Saxon-HE-9.7.0-2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-nop-1.7.13.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-aop-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-aspects-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-beans-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-core-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-expression-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-jdbc-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-orm-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-oxm-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-plugin-core-1.2.0.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-plugin-metadata-1.2.0.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-4.0.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-4.0.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-web-4.0.3.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-test-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-tx-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-web-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-webmvc-4.2.4.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-core-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-schema-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-spi-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-spring-web-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-swagger-common-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/springfox-swagger2-2.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/standard-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/stax-ex-1.7.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.5.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/swagger-models-1.5.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/tools.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/txw2-2.2.11.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.4.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.1.0.Final.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.6.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xom-1.2.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xsom-20140925.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.5.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cglib-3.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-3.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/classmate-1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/codemodel-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.10.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-csv-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.3.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dtd-parser-1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymock-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/FastInfoset-1.2.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/guava-19.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2-1.4.190.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-5.0.7.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-5.0.1.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-5.0.7.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-5.0.7.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-5.0.7.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-5.0.7.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.1-api-1.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-5.5.2.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-5.5.2.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-5.2.2.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-cdi-5.2.2.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb-2.3.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-cache-4.2.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpmime-4.5.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-2.21.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/istack-commons-tools-2.21.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.5.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.6.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-core-2.6.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.6.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jandex-2.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javassist-3.20.0-GA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javax.el-2.2.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javax.el-api-2.2.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.12.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-core-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-jxc-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.3.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.7.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdom2-2.0.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-arq-2.13.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.13.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jena-tdb-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.9.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/json-20090211.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsonld-java-0.5.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jta-1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-4.12.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.7.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/libthrift-0.9.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-backward-codecs-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-core-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-join-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-sandbox-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-suggest-5.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mapstruct-1.0.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.38.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.15.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.4-1206-jdbc4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/relaxngDatatype-20020414.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/rngom-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/Saxon-HE-9.7.0-2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-nop-1.7.13.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-aop-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-aspects-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-beans-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-core-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-expression-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-jdbc-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-orm-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-oxm-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-plugin-core-1.2.0.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-plugin-metadata-1.2.0.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-4.0.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-4.0.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-web-4.0.3.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-test-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-tx-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-web-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-webmvc-4.2.4.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-core-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-schema-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-spi-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-spring-web-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-swagger-common-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/springfox-swagger2-2.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/standard-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/stax-ex-1.7.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.5.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/swagger-models-1.5.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/tools.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/txw2-2.2.11.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.4.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/validation-api-1.1.0.Final.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.6.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xom-1.2.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xsom-20140925.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-oauth2-2.0.11.RELEASE.jar"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 2daba24487dc04e2d8411bfd9dceb2427b027d47..d7092d24928e01238a4acb4e3f18fe81cdb29556 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: CDM Library Dependencies Plugin
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
@@ -539,15 +539,15 @@ Bundle-ClassPath: .,
  lib/batik-util-1.7.jar,
  lib/batik-xml-1.7.jar,
  lib/c3p0-0.9.5.2.jar,
- lib/cdmlib-commons-4.5.1.jar,
- lib/cdmlib-ext-4.5.1.jar,
- lib/cdmlib-io-4.5.1.jar,
- lib/cdmlib-model-4.5.1.jar,
- lib/cdmlib-persistence-4.5.1.jar,
- lib/cdmlib-print-4.5.1.jar,
- lib/cdmlib-remote-4.5.1.jar,
- lib/cdmlib-services-4.5.1.jar,
- lib/cdmlib-test-4.5.1.jar,
+ lib/cdmlib-commons-4.6.0.jar,
+ lib/cdmlib-ext-4.6.0.jar,
+ lib/cdmlib-io-4.6.0.jar,
+ lib/cdmlib-model-4.6.0.jar,
+ lib/cdmlib-persistence-4.6.0.jar,
+ lib/cdmlib-print-4.6.0.jar,
+ lib/cdmlib-remote-4.6.0.jar,
+ lib/cdmlib-services-4.6.0.jar,
+ lib/cdmlib-test-4.6.0.jar,
  lib/cglib-3.2.0.jar,
  lib/cglib-nodep-3.2.0.jar,
  lib/classmate-1.3.1.jar,
index 5467e372f291ebc03267a0ebb48f00d90d0f171f..4bdb6e202a1d078f0a9f5b8828a4ab2311db03fe 100644 (file)
@@ -25,15 +25,15 @@ bin.includes = META-INF/,\
                lib/batik-util-1.7.jar,\
                lib/batik-xml-1.7.jar,\
                lib/c3p0-0.9.5.2.jar,\
-               lib/cdmlib-commons-4.5.1.jar,\
-               lib/cdmlib-ext-4.5.1.jar,\
-               lib/cdmlib-io-4.5.1.jar,\
-               lib/cdmlib-model-4.5.1.jar,\
-               lib/cdmlib-persistence-4.5.1.jar,\
-               lib/cdmlib-print-4.5.1.jar,\
-               lib/cdmlib-remote-4.5.1.jar,\
-               lib/cdmlib-services-4.5.1.jar,\
-               lib/cdmlib-test-4.5.1.jar,\
+               lib/cdmlib-commons-4.6.0.jar,\
+               lib/cdmlib-ext-4.6.0.jar,\
+               lib/cdmlib-io-4.6.0.jar,\
+               lib/cdmlib-model-4.6.0.jar,\
+               lib/cdmlib-persistence-4.6.0.jar,\
+               lib/cdmlib-print-4.6.0.jar,\
+               lib/cdmlib-remote-4.6.0.jar,\
+               lib/cdmlib-services-4.6.0.jar,\
+               lib/cdmlib-test-4.6.0.jar,\
                lib/cglib-3.2.0.jar,\
                lib/cglib-nodep-3.2.0.jar,\
                lib/classmate-1.3.1.jar,\
index 01f3d536c3f4019269a7f01374404fb44e3e9e27..8da8b8ecb1e493c7aba2a5e188c7fadeab085100 100644 (file)
@@ -4,7 +4,7 @@
   <parent>\r
     <groupId>eu.etaxonomy</groupId>\r
     <artifactId>taxeditor-parent</artifactId>\r
-    <version>4.5.1</version>\r
+    <version>4.6.0</version>\r
   </parent>\r
   <modelVersion>4.0.0</modelVersion>\r
   <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
index 2579773260a2facc141046eae6f28a9c92bb8880..23ff835ae9fdbea80210275c695efb39dbe99834 100644 (file)
Binary files a/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser and b/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser differ
index 2cb31436b9f5f14cb5e81d8d3235b8703ab57d52..32d451a4e0b3d61e09960a3e7bd201f9a18b472e 100644 (file)
@@ -62,6 +62,7 @@ import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.api.service.IPreferenceService;\r
 import eu.etaxonomy.cdm.api.service.IProgressMonitorService;\r
 import eu.etaxonomy.cdm.api.service.IReferenceService;\r
+import eu.etaxonomy.cdm.api.service.IRightsService;\r
 import eu.etaxonomy.cdm.api.service.IService;\r
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;\r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
@@ -100,7 +101,7 @@ import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
  *\r
  */\r
 @Component\r
-public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfiguration, ApplicationContextAware  {\r
+public class CdmApplicationRemoteConfiguration implements ICdmRepository, ApplicationContextAware  {\r
 \r
     @SuppressWarnings("unused")\r
     private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
@@ -295,6 +296,11 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
         return (ITermService) getService(ITermService.class, "/remoting/term.service", new TermServiceRequestExecutor());\r
     }\r
 \r
+    @Override\r
+    public IRightsService getRightsService(){\r
+        return (IRightsService) getService(IRightsService.class, "/remoting/rights.service", new CdmServiceRequestExecutor());\r
+    }\r
+\r
     @Override\r
     public ICommonService getCommonService(){\r
         return (ICommonService) getService(ICommonService.class, "/remoting/common.service", new CdmServiceRequestExecutor());\r
@@ -414,7 +420,7 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
     public IGroupService getGroupService(){\r
         return (IGroupService) getService(IGroupService.class, "/remoting/group.service", new CdmServiceRequestExecutor());\r
     }\r
-    \r
+\r
     @Override\r
     public IPreferenceService getPreferenceService(){\r
         return (IPreferenceService) getService(IPreferenceService.class, "/remoting/preference.service", new CdmServiceRequestExecutor());\r
index 716357a251533f93b9e872abfcbd2d656f8b0182..796727a2c1b049f3d44da581d006ac5cf19d1262 100644 (file)
@@ -47,7 +47,7 @@ public class CdmApplicationState {
 
     private static CdmApplicationState cdmApplicationState;
 
-    private ICdmApplicationConfiguration appConfig;
+    private ICdmRepository appConfig;
 
     private ICdmDataChangeService dataChangeService;
 
@@ -66,7 +66,7 @@ public class CdmApplicationState {
         return cdmApplicationState;
     }
 
-    public void setAppConfig(ICdmApplicationConfiguration appConfig) {
+    public void setAppConfig(ICdmRepository appConfig) {
         this.appConfig = appConfig;
         if(appConfig instanceof CdmApplicationRemoteController) {
             CdmBase.setNewEntityListener(new DefaultNewEntityListener());
@@ -75,15 +75,15 @@ public class CdmApplicationState {
         }
     }
 
-    public ICdmApplicationConfiguration getAppConfig() {
+    public ICdmRepository getAppConfig() {
         return appConfig;
     }
 
-    public static void setCurrentAppConfig(ICdmApplicationConfiguration appConfig) {
+    public static void setCurrentAppConfig(ICdmRepository appConfig) {
         getInstance().setAppConfig(appConfig);
     }
 
-    public static ICdmApplicationConfiguration getCurrentAppConfig() {
+    public static ICdmRepository getCurrentAppConfig() {
         return getInstance().getAppConfig();
     }
 
@@ -151,7 +151,7 @@ public class CdmApplicationState {
 
 
     /**
-     * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+     * Generic method that will scan the getters of {@link ICdmRepository} for the given service
      * interface. If a matching getter is found the according service implementation is returned by
      * invoking the getter otherwise the method returns <code>null</code>.
      *
@@ -161,9 +161,9 @@ public class CdmApplicationState {
      * @throws CdmApplicationException
      */
     public static <T extends IService> T getService(Class<T> serviceClass) throws CdmApplicationException {
-        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+        ICdmRepository configuration = getCurrentAppConfig();
 
-        Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
+        Method[] methods = ICdmRepository.class.getDeclaredMethods();
 
         T service = null;
 
@@ -193,14 +193,14 @@ public class CdmApplicationState {
      * As ICommonService is not extending IService we need a specific request here
      */
     public static ICommonService getCommonService() {
-        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+        ICdmRepository configuration = getCurrentAppConfig();
 
         return configuration.getCommonService();
 
     }
 
     public static IIOService getIOService() {
-        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+        ICdmRepository configuration = getCurrentAppConfig();
 
         return ((CdmApplicationRemoteController)configuration).getIOService();
 
@@ -208,14 +208,14 @@ public class CdmApplicationState {
 
 
     public static ITestService getTestService() {
-        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+        ICdmRepository configuration = getCurrentAppConfig();
 
         return ((CdmApplicationRemoteController)configuration).getTestService();
 
     }
 
     public static ICachedCommonService getCachedCommonService() {
-        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+        ICdmRepository configuration = getCurrentAppConfig();
 
         return ((CdmApplicationRemoteController)configuration).getCachedCommonService();
 
index dcfff9f24c6ce8ad71b32bbab38ca1125394aa88..88f0aab8867089bbf7b82e43fcbd8005810078aa 100644 (file)
@@ -1,13 +1,13 @@
 package eu.etaxonomy.cdm.api.cache;
 
+import java.io.File;
 import java.util.UUID;
 
-import net.sf.ehcache.config.CacheConfiguration;
-import net.sf.ehcache.config.SizeOfPolicyConfiguration;
-
 import org.springframework.stereotype.Component;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.config.EhCacheConfiguration;
+import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermBase;
@@ -19,6 +19,9 @@ import eu.etaxonomy.taxeditor.session.CdmEntitySession;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.DiskStoreConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
 
 /**
  * Class which uses CDM services to cache cdm entities
@@ -31,9 +34,8 @@ import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
  *
  * @param <T>
  */
-@Component
-public class CdmServiceCacher extends CdmCacher  implements ICdmEntitySessionManagerObserver {
-
+@Component //FIXME This indicates that the CdmServiceCacher is initialized as Spring Component but it seems only to be instantiated directly
+public class CdmServiceCacher extends CdmCacher implements ICdmEntitySessionManagerObserver {
 
 
     private ICdmEntitySessionManager cdmEntitySessionManager;
@@ -44,11 +46,35 @@ public class CdmServiceCacher extends CdmCacher  implements ICdmEntitySessionMan
 
     @Override
     protected void setup() {
+
+        setUpCacheManager();
+
         DefinedTermBase.setCacher(this);
         CdmTransientEntityCacher.setDefaultCacher(this);
         TermServiceRequestExecutor.setDefaultCacher(this);
 
         cacheLoader = new CacheLoader(this);
+
+    }
+
+
+    /**
+     *
+     */
+    private void setUpCacheManager() {
+
+        EhCacheConfiguration cacheConfig = new EhCacheConfiguration();
+
+        DiskStoreConfiguration diskStoreConfiguration = new DiskStoreConfiguration();
+        File ehcacheFolder = CdmUtils.getCdmSubDir("taxeditor-ehcache");
+        // FIXME use subfolder per taxeditor version to allow running multiple installations in parallel
+        // String taxEditorVersion = ..;
+        // File ehcacheFolder = new File(ehcacheFolder, taxEditorVersion);
+        diskStoreConfiguration.setPath(ehcacheFolder.getAbsolutePath());
+
+        cacheConfig.setDiskStoreConfiguration(diskStoreConfiguration);
+        addCacheManager(cacheConfig.cacheManager());
+
     }
 
 
index 0ba73ba4e70b9c47ddef3871586edf772213692b..af18a29a979ff7aefd45a9e53dad26eedf018461 100644 (file)
@@ -30,11 +30,18 @@ import org.hibernate.property.access.spi.Getter;
 import org.osgi.framework.Bundle;
 
 
+/**
+ * This class serializing and deserializing the CDM model for performance purposes.
+ * To serialize it see the comments on {@link #main(String[])} and on 
+ * https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ * 
+ * @author c.mathew
+ * @date 2015
+ *
+ */
 public class CdmModelCacher {
 
 
-
-
     public static String HB_CONFIG_FILE_PATH= "/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml";
 
     public static final String CDM_MAP_SER_FILE_PATH = "resources/cdm.map.ser";
@@ -62,7 +69,8 @@ public class CdmModelCacher {
 
         FileInputStream fin = new FileInputStream(modelMapFilePath);
         ObjectInputStream ois = new ObjectInputStream(fin);
-        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
+        @SuppressWarnings("unchecked")
+               Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
         ois.close();
         return modelClassMap;
     }
@@ -143,6 +151,8 @@ public class CdmModelCacher {
         // To re-create the serialised cdm map run,
         // mvn exec:java -Dexec.mainClass="eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacher"
         // in the eu.etaxonomy.taxeditor.cdmlib project root dir
+       // See also https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+       //Note AM: does not fully work for me, but running the main from the IDE works. 
         String CDM_MAP_SER_DIR = "resources/";
 
         CdmModelCacher cdmModelCacher = new CdmModelCacher();
index 097c3b496698d0ba7e926c20b959b467cb16ce7f..20aee0c4d631b7e184deaaf069ffa150dd033711 100644 (file)
@@ -9,11 +9,16 @@ import eu.etaxonomy.cdm.database.CdmDataSource;
 /**
  * This is a very preliminary class to get the model cache running. Need to better understand how 
  * the datasource works with hibernate service registry before implementing the correct way.
+
  * Or use a running source.
+ * 
+ * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions 
+ * 
  * @author a.mueller
  *
  */
 public class CdmModelCacherConnectionProvider extends DatasourceConnectionProviderImpl{
+       private static final long serialVersionUID = 454393966637126346L;
 
        public CdmModelCacherConnectionProvider() {
                super();
index d1c9bf79396681960395bae628440290102dea33..21c04da4253df485339cd494cbcc874963347cb9 100644 (file)
@@ -17,14 +17,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-import net.sf.ehcache.Status;
-import net.sf.ehcache.config.CacheConfiguration;
-import net.sf.ehcache.config.SizeOfPolicyConfiguration;
-import net.sf.ehcache.statistics.LiveCacheStatistics;
-
 import org.apache.log4j.Logger;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
@@ -35,6 +27,13 @@ import eu.etaxonomy.cdm.model.ICdmCacher;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.persistence.dto.MergeResult;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+import net.sf.ehcache.Status;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+import net.sf.ehcache.statistics.LiveCacheStatistics;
 
 /**
  *
index d8a07325c67aef0ee3b8a773eca14d5256e9332c..783845df10ad827d29ee6bc422043d5119a80c43 100644 (file)
@@ -54,9 +54,16 @@ public class CdmServiceRequestExecutor extends CdmAuthenticatedHttpInvokerReques
                RemoteInvocationResult rir = fromCache(currentRemoteInvocation);
 
                if(rir == null) {
-                   logger.info("Remote invoking : " + currentRemoteInvocation.getMethodName() + "@" + config.getServiceUrl());
-                       rir = super.doExecuteRequest(config, baos);
+
+                   if (!(currentRemoteInvocation.getMethodName() == null) && !(config.getServiceUrl() == null)){
+                      // logger.info("Remote invoking : " + currentRemoteInvocation.getMethodName() + "@" + config.getServiceUrl());
+                   }
+                   rir = super.doExecuteRequest(config, baos);
                        if(rir.getValue() != null && !rir.hasException()) {
+                           if (currentRemoteInvocation == null){
+                               logger.debug("return RemoteInvocationResult without caching" );
+                               return rir;
+                           }
                 if(cachableMethods.contains(currentRemoteInvocation.getMethodName())) {
                     rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), true));
                 } else if(rir.getValue() instanceof UpdateResult){
index 56a8e35096a57f3a283fd9bce7ad99a3d61293ce..0c2620e0a722f901d2b879687db548e8771260c6 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE hibernate-configuration PUBLIC\r
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"\r
- "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">\r
-\r
-<hibernate-configuration>\r
-    <session-factory>\r
-\r
-      <property name="connection.release_mode">after_transaction</property>\r
-      \r
-      <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>\r
-      \r
-\r
-      <!-- Connection Pooling -->\r
-<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->\r
-      <!-- <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property>\r
-          -->\r
-             <property name="hibernate.connection.provider_class">eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacherConnectionProvider</property>\r
-          \r
-            <!--\r
-          Configuring the C3P0ConnectionProvider\r
-          ========================================\r
-          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific\r
-          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)\r
-\r
-          IMPORTANT:\r
-          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used\r
-          for the Cdm Library because it requires the dataSource bean in some cases.\r
-\r
-          (1)\r
-          Do NOT specify the dataSource in the sessionFactory for example in the\r
-          org.springframework.orm.hibernate3.LocalSessionFactoryBean\r
-          !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!\r
-                         If this is set, the Hibernate settings should not define a connection provider to\r
-                     avoid meaningless double configuration.\r
-          (2)\r
-          Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0\r
-          is beeing used.  Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +\r
-\r
-          (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties\r
-          in your hibernate configuration, using hibernate-specific configuration keys.\r
-          All other properties must be defined as usual in a c3p0.properties file.\r
-          This is confusing, and will hopefully be simplified some time in the future, but for now...\r
-          \r
-          DOCUMENTATION UPDATE (2015-05-22):\r
-          Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which, \r
-          if set in your hibernate configuration, will override any configuration you may have set \r
-          in a c3p0.properties file.\r
-          TODO: are points (2) and (3) still valid? I don't think so! (AK)\r
-\r
-            hibernate.c3p0.acquire_increment\r
-                       hibernate.c3p0.idle_test_period\r
-                       hibernate.c3p0.timeout\r
-                       hibernate.c3p0.max_size\r
-                       hibernate.c3p0.max_statements\r
-                       hibernate.c3p0.min_size\r
-                       hibernate.c3p0.validate\r
-      -->\r
-      <mapping package="eu.etaxonomy.cdm.model.common"/>\r
-      <!-- Annotation Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>\r
-      <!-- Common Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Group"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Language"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.common.User"/>\r
-      <!-- Description Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.State"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>\r
-      <!-- Location Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.location.Point"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>\r
-      <!-- Media Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>\r
-      <!-- Meta Data Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>\r
-      <!-- Molecular Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>\r
-      <!-- Name Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>\r
-      <!-- Occurrence Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>\r
-      <!-- Reference Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>\r
-\r
-      <!-- Taxon Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>\r
-      \r
-      <!-- Validation Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>\r
-      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>\r
-      \r
-      <!-- View Package -->\r
-      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>\r
-      \r
-\r
-\r
-    </session-factory>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+    <session-factory>
+
+      <property name="connection.release_mode">after_transaction</property>
+
+      <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>
+      <!-- NOTE: if integrated in spring this is handled there (see persistence.xml) -->
+      <!-- Connection Pooling -->
+<!--       <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->
+<!--       <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property> -->
+         <property name="hibernate.connection.provider_class">eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacherConnectionProvider</property>
+          
+           <!--
+          Configuring the C3P0ConnectionProvider
+          ========================================
+          see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific
+          and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
+
+          IMPORTANT:
+          Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used
+          for the Cdm Library because it requires the dataSource bean in some cases.
+
+          (1)
+          Do NOT specify the dataSource in the sessionFactory for example in the
+          org.springframework.orm.hibernate3.LocalSessionFactoryBean
+          !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!
+                         If this is set, the Hibernate settings should not define a connection provider to
+                     avoid meaningless double configuration.
+          (2)
+          Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0
+          is beeing used.  Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +
+
+          (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties
+          in your hibernate configuration, using hibernate-specific configuration keys.
+          All other properties must be defined as usual in a c3p0.properties file.
+          This is confusing, and will hopefully be simplified some time in the future, but for now...
+          
+          DOCUMENTATION UPDATE (2015-05-22):
+          Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which, 
+          if set in your hibernate configuration, will override any configuration you may have set 
+          in a c3p0.properties file.
+          TODO: are points (2) and (3) still valid? I don't think so! (AK)
+
+            hibernate.c3p0.acquire_increment
+                       hibernate.c3p0.idle_test_period
+                       hibernate.c3p0.timeout
+                       hibernate.c3p0.max_size
+                       hibernate.c3p0.max_statements
+                       hibernate.c3p0.min_size
+                       hibernate.c3p0.validate
+      -->
+      <mapping package="eu.etaxonomy.cdm.model.common"/>
+      <!-- Annotation Package -->
+      <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>
+      <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>
+      <!-- Common Package -->
+      <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Group"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Language"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>
+      <mapping class="eu.etaxonomy.cdm.model.common.User"/>
+      <!-- Description Package -->
+      <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.State"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>
+      <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>
+      <!-- Location Package -->
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>
+      <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>
+      <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>
+      <mapping class="eu.etaxonomy.cdm.model.location.Point"/>
+      <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
+      <!-- Media Package -->
+      <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>
+      <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>
+      <!-- Meta Data Package -->
+      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>
+      <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>
+      <!-- Molecular Package -->
+      <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>
+      <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>
+      <!-- Name Package -->
+      <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>
+      <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>
+      <!-- Occurrence Package -->
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>
+      <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>
+      <!-- Reference Package -->
+      <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>
+
+      <!-- Taxon Package -->
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>
+      <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>
+      
+      <!-- Validation Package -->
+      <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>
+      <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>
+      
+      <!-- View Package -->
+      <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>
+      
+      <!-- for filling caches -->
+      <!-- since hibernate 4 listeners are not handled via hibernate.cfg.xml anymore -->
+      <!--  http://stackoverflow.com/questions/8616146/eventlisteners-using-hibernate-4-0-with-spring-3-1-0-release
+            https://community.jboss.org/wiki/HibernateCoreMigrationGuide40 -->
+
+    </session-factory>
 </hibernate-configuration>
\ No newline at end of file
index 604b197fbf54a92f9dd9fe280cbd241fd55c9ddf..7dc046a2e40c02011b2ae00794b1ba4ec4ac8a33 100644 (file)
   <bean id="cdmApplicationRemoteConfiguration" \r
     class="eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration" />\r
 \r
-  \r
   <bean id="cdmServiceRequestExecutor" \r
     class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor" />\r
     \r
   <bean id="cachedCommonService" \r
-    class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" />\r
-    \r
+    class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" />    \r
   \r
   <bean id="defaultExport"\r
     class="eu.etaxonomy.cdm.io.common.CdmApplicationAwareDefaultExport" />\r
index 13a030a921aeff76fcc5b7e9a4e2ef05c8eda717..a8f5931fa9a3cefe7384cb28ecd2d23a91dd5c6e 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
index fe6879c11948d7569b11fcfe125dc816246caf11..ecfae0eb7446adbf577b5b1cac55f73ebc5e2803 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: OSGI-INF/l10n/plugin
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
deleted file mode 100644 (file)
index 3519191..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-CreateDerivateContextMenu_ADD=Add...
-CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
-CreateDerivateContextMenu_MEDIA=Media...
-CreateDerivateContextMenu_MEDIA_EXISTING=Use existing media item
-CreateDerivateContextMenu_MEDIA_SPECIMEN=Media item
-CreateDerivateContextMenu_NO_CHILD_DERIVATE=No child derivatives
-CreateDerivateContextMenu_SEQUENCE=Consensus Sequence
-CreateDerivateContextMenu_SINGLE_READ=Single Read
-CreateDerivateContextMenu_SPECIMEN=Specimen
-CreateDerivateContextMenu_TISSUE_SAMPLE=Tissue Sample
-
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Create new field unit
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Create new field unit for %s
-
-SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence
-SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence
-SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here
-
-DerivateView_DERIVATIVE_EDITOR=Specimen Editor
-DerivateView_SAVING_HIERARCHY=Saving hierarchy
-DerivateView_UNSAVED_CHANGES=View has unsaved changes
-DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
-
-DeleteDerivateOperation_AND_CHILDREN= and its children
-DeleteDerivateOperation_CONFIRM=Confirm Deletion
-DeleteDerivateOperation_DELETE_FAILED=Deletion failed
-DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
-
-DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
-
-DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
-DerivateViewEditorInput_NO_ROOT=No root element found\!
-
-MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
-MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
-
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Specimen Editor
-OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
-OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
-OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
-
-DeleteTaxonBaseHandler_CONFIRM_DELETION=Confirm Deletion
-DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element has to be Synonym, Misapplication or Concept
-DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Are you sure you want to delete the selected taxon?
-DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Are you sure you want to delete the selected synoym, this is irreversible?
-DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The Synonym could be deleted, but related object(s) could not be deleted
-DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The misapplied name could be deleted, but related object(s) could not be deleted
-
-DescriptiveViewPart_COLLAPSE_ALL=Collapse All
-DescriptiveViewPart_EXPAND_ALL=Expand All
-DescriptiveViewPart_FACTUAL_DATA=Factual Data
-DescriptiveViewPart_SHOW_ALL_DATA=Show all factual data
-
-ConceptGraphView_VIEWER_NAME=Concept Graph
-ConceptViewPart_VIEWER_NAME=Concept Relations
-UsesViewPart_VIEWER_NAME=Uses
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
deleted file mode 100644 (file)
index dd77383..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-CreateDerivateContextMenu_ADD=Hinzufügen...
-CreateDerivateContextMenu_DNA_SAMPLE=DNA Probe
-CreateDerivateContextMenu_MEDIA=Media...
-CreateDerivateContextMenu_MEDIA_EXISTING=Vorhandendes Medienobjekt verwenden
-CreateDerivateContextMenu_MEDIA_SPECIMEN=Medienobjekt
-CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
-CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
-CreateDerivateContextMenu_SINGLE_READ=Single Read
-CreateDerivateContextMenu_SPECIMEN=Beleg
-CreateDerivateContextMenu_TISSUE_SAMPLE=Gewebeprobe
-
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Erzeuge neue Field Unit
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Erzeuge neue Field Unit für %s
-
-SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
-SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
-SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
-
-DerivateView_DERIVATIVE_EDITOR=Specimen-Editor
-DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
-DerivateView_UNSAVED_CHANGES=Ungepeicherte Ã„nderungen
-DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
-
-DeleteDerivateOperation_CONFIRM=Löschen bestätigen
-DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
-DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
-DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
-
-DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
-
-DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
-DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
-
-MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
-MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
-
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Specimen-Editor nicht Ã¶ffnen
-OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
-OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
-OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
-
-DeleteTaxonBaseHandler_CONFIRM_DELETION=Löschen bestätigen
-DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element muss Synonym, Misapplikation oder Konzept sein
-DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Wollen Sie wirklich das ausgewählte Taxon löschen?
-DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Wollen Sie das ausgewählte Synonym wirklich löschen, dieser Vorgang ist nicht reversibel.
-DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Das Synonym konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
-DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Die Misapplikation konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
-
-
-DescriptiveViewPart_COLLAPSE_ALL=Alles einklappen
-DescriptiveViewPart_EXPAND_ALL=Alles ausklappen
-DescriptiveViewPart_FACTUAL_DATA=Faktendaten
-DescriptiveViewPart_SHOW_ALL_DATA=Zeige alle Faktendaten
-
-ConceptGraphView_VIEWER_NAME=Konzeptgraph
-ConceptViewPart_VIEWER_NAME=Konzeptrelationen
-UsesViewPart_VIEWER_NAME=Nutzung
index 55681cf701ee8145f2af42d88e7cd2bf9cbe4e10..cbecb3f1aed169a0077329c5b51589fe8d75cca5 100644 (file)
@@ -171,7 +171,7 @@ command.name.50 = delete
 command.name.51 = delete
 \r
 editor.name.DERIVATIVE_EDITOR = Specimen Editor\r
-command.label.DERIVATIVE_EDITOR = Specimen Editor\r
+command.label.DERIVATIVE_EDITOR = Specimen Editor (hierarchy)\r
 command.label.LINK_WITH_TAXON_SELECTION = Link with taxon selection\r
 command.label.UNLINK_FROM_TAXON_SELECTION = Unlink from taxon selection\r
 command.label.REUSE_SINGLE_READ_HERE = Reuse single read here\r
@@ -188,4 +188,5 @@ command.name.TOGGLE_LINK_WITH_TAXON_SELECTION = Toggle link with taxon selection
 \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
index 6d1d7a8c78fdc988c98df24b083535f28c089392..e379ed14869f6a689386be49257b019251ea2b19 100644 (file)
@@ -168,7 +168,7 @@ command.name.51 = L\u00f6schen
 command.name.57 = Setze als Basionym der homotypischen Gruppe
 
 editor.name.DERIVATIVE_EDITOR = Specimen-Editor
-command.label.DERIVATIVE_EDITOR = Specimen-Editor
+command.label.DERIVATIVE_EDITOR = Specimen-Editor (Hierarchie)
 command.label.LINK_WITH_TAXON_SELECTION = Verknüpfe mit Taxonauswahl
 command.label.UNLINK_FROM_TAXON_SELECTION = Verknüpfung mit Taxonauswahl aufheben
 command.label.REUSE_SINGLE_READ_HERE = Single-Read hier wiederverwenden
@@ -185,4 +185,5 @@ command.name.TOGGLE_LINK_WITH_TAXON_SELECTION = De-/Aktiviere Verkn
 
 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
index 24738e1dfaf717fa166e7801e0a6fd638a42219c..4c503785dbe93d03e9ab426e9d11c21606108c82 100644 (file)
@@ -5,4 +5,6 @@ bin.includes = META-INF/,\
                plugin.xml,\
                icons/,\
                p2.inf,\
-               OSGI-INF/
+               OSGI-INF/,\
+               src/main/java/eu/etaxonomy/taxeditor/editor/l10n/
+bin.excludes = src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java
index 0a893e8f0e5817225d0f8dbb47d5c6ccf53d8e84..838b9514af65cf2fa786cf76c63e7ffdeab24fa9 100644 (file)
                </and>
             </visibleWhen>
          </command>
-         <separator
-               name="eu.etaxonomy.taxeditor.store.separator_derivative_start"
-               visible="true">
-         </separator>
-         <command
-               commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
-               label="%command.label.DERIVATIVE_EDITOR"
-               style="push">
-            <visibleWhen
-                  checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
-            </visibleWhen>
-         </command>
-         <separator
-               name="eu.etaxonomy.taxeditor.editor.separator1"
-               visible="true">
-         </separator>
       </menuContribution>
       <menuContribution
             locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.internal">
                   id="eu.etaxonomy.taxeditor.editor.view.concept.menus.new">
             </dynamic>
          </menu>
-         <command
-               commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
-               label="%command.label.43"
-               style="push">
-         </command>
+         <dynamic
+               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+               id="eu.etaxonomy.taxeditor.view.context.CdmViewerContextMenu">
+         </dynamic>
          <separator
                name="eu.etaxonomy.taxeditor.editor.view.concept.menu.separator1"
                visible="true">
             </command>
          </toolbar>
       </menuContribution>
+      <menuContribution
+            locationURI="menu:bulkeditor.menus.openmenu">
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
+               label="%command.label.DERIVATIVE_EDITOR"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isCdmStoreConnected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.OpenDerivativeEditorForSpecimenOrOBservationBase"
+            commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="bulkeditor.editor">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
             commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler">
       <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>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.OpenRelatedConceptInBulkEditorHandler"
+            id="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+            name="Open bulk editor for taxon relationship">
       </command>
         
    </extension>
       </propertyTester>
       <propertyTester
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DescriptionsMenuPropertyTester"
-            id="eu.etaxonomy.taxeditor.descriptions.PropertyTester"
+            id="eu.etaxonomy.taxeditor.descriptions.propertyTester"
             namespace="eu.etaxonomy.taxeditor.descriptions.propertyTester"
             properties="isMedia,isDescription,isDescriptionElement,isDeletable,isFeatureNodeContainer,isImageGallery,isTaxonEditor,isBulkEditor,isDerivateEditor, isIndividualsAssociation"
             type="org.eclipse.jface.viewers.TreeSelection">
       <viewCommandMapping
             commandId="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
             selection="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"
+            viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
+            selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+            viewerName="Name Editor">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+            selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+            viewerName="Bulk Editor">
+      </viewCommandMapping>
+      <viewCommandMapping
+            commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
+            selection="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"
             viewerName="Specimen Editor">
       </viewCommandMapping>
     </extension>
index 9665708d464dc4b92cb9d77f3734c16b7cd6da9b..015d34e47dcb4aad4183b648ef883e1a2c894c80 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
index 62038000a50d3d02b230898a3621eb47b23cf5d5..41403b53ae7eb49791defe99dad501713e85c05b 100644 (file)
@@ -42,7 +42,7 @@ public class CdmDataTransfer extends ByteArrayTransfer {
 
        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();
        
index dd5a51271051d8af83cd627fb5353dc443c4f297..3cef27580de37047ac1a5ef5b15a4c6fc4061306 100644 (file)
@@ -22,6 +22,7 @@ import org.eclipse.ui.dialogs.ListDialog;
 
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 
 /**
  * <p>ChooseClassificationWizard class.</p>
@@ -51,8 +52,8 @@ public class ChooseFromMultipleTaxonNodesDialog extends ListDialog {
        
        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());
        }
index da4905cf110f48913fd39b80263b0392bf8e9cf1..1939f83ac9db9b5476fdf76a2e8fb3567e279197 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -20,6 +20,7 @@ import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPersistable;
 import org.eclipse.ui.PartInitException;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.concept.ConceptViewPart;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
 import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
@@ -36,19 +37,19 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
  */
 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)
         */
@@ -67,15 +68,15 @@ public class EditorStateManager extends ContextListenerAdapter {
                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();
                }
@@ -95,7 +96,7 @@ public class EditorStateManager extends ContextListenerAdapter {
        public void contextStart(IMemento memento, IProgressMonitor monitor) {
                restoreEditors(memento, monitor);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.model.ContextListenerAdapter#contextRefresh(org.eclipse.core.runtime.IProgressMonitor)
         */
@@ -112,27 +113,28 @@ public class EditorStateManager extends ContextListenerAdapter {
        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);
@@ -140,32 +142,32 @@ public class EditorStateManager extends ContextListenerAdapter {
                                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);
@@ -175,7 +177,7 @@ public class EditorStateManager extends ContextListenerAdapter {
                                }
                        }
                }
-               
+
                for(UUID uuid : uuids){
                        try {
                                EditorUtil.openTaxonNode(uuid);
@@ -185,24 +187,24 @@ public class EditorStateManager extends ContextListenerAdapter {
                        }
                        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){
index 522bd59e370f8a163ee79fe5495353e9d1c4fa67..b61dc0eda6b8444827dd93afe1ecdc006aa3efd8 100644 (file)
@@ -41,6 +41,7 @@ import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditorInput;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
 import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
 //import eu.etaxonomy.taxeditor.store.view.dataimport.BioCaseEditorInput;
@@ -175,16 +176,11 @@ public class EditorUtil extends AbstractUtility {
            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;
             }
         }
@@ -361,9 +357,8 @@ public class EditorUtil extends AbstractUtility {
                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;
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
deleted file mode 100644 (file)
index e2b86be..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (C) 2015 EDIT
- * 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.
- */
-package eu.etaxonomy.taxeditor.editor;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author pplitzner
- * @date 09.09.2015
- *
- */
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
-    public static String ConceptGraphView_VIEWER_NAME;
-       public static String ConceptViewPart_VIEWER_NAME;
-       public static String CreateDerivateContextMenu_ADD;
-    public static String CreateDerivateContextMenu_DNA_SAMPLE;
-    public static String CreateDerivateContextMenu_MEDIA;
-    public static String CreateDerivateContextMenu_MEDIA_EXISTING;
-    public static String CreateDerivateContextMenu_MEDIA_SPECIMEN;
-    public static String CreateDerivateContextMenu_NO_CHILD_DERIVATE;
-    public static String CreateDerivateContextMenu_SEQUENCE;
-    public static String CreateDerivateContextMenu_SINGLE_READ;
-    public static String CreateDerivateContextMenu_SPECIMEN;
-    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 DeleteDerivateOperation_CONFIRM;
-    public static String DeleteDerivateOperation_DELETE_FAILED;
-    public static String DeleteDerivateOperation_REALLY_DELETE;
-    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 DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM;
-    public static String DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
-    public static String DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
-
-
-    public static String DerivateDropListener_MOVE_TO;
-    public static String DerivateView_DERIVATIVE_EDITOR;
-    public static String DerivateView_SAVING_HIERARCHY;
-    public static String DerivateView_UNSAVED_CHANGES;
-    public static String DerivateView_YOU_NEED_TO_SAVE;
-    public static String DerivateViewEditorInput_FAIL_INIT;
-    public static String DerivateViewEditorInput_NO_ROOT;
-    public static String 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 MoveDerivateOperation_MOVE_NOT_POSSIBLE;
-    public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
-    public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
-    public static String OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN;
-    public static String OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
-    public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
-    public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
-    public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
-    public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
-       public static String UsesViewPart_VIEWER_NAME;
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
index 6887838ddd4b127ed75a2d088b99913fd4aacbbd..7241f84ffbdc77c2d2f34bb212e65229b4d9f0d4 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
@@ -61,7 +62,7 @@ IPartContentHasFactualData, IConversationEnabled, IPostOperationEnabled,
 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;
 
@@ -124,7 +125,7 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
     /** {@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();
@@ -134,9 +135,8 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
             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;
                     }
                 }
@@ -148,7 +148,7 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
             // 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);
@@ -158,7 +158,7 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
             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();
@@ -252,7 +252,7 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
 
         if (!(input instanceof TaxonEditorInput)) {
             throw new PartInitException(
-                    "Invalid Input: Must be TaxonEditorInput");
+                    Messages.MultiPageTaxonEditor_INVALID_INPUT);
         }
 
         this.input = (TaxonEditorInput) input;
@@ -294,8 +294,8 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
             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);
@@ -447,10 +447,10 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
             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;
     }
@@ -530,10 +530,7 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
      */
     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();
 
@@ -548,14 +545,14 @@ IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
                     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
index 2ff0bd9bb5eeb53e43f4b17816be98c227a05296..62152525891e2857f4a10c3fbb3229612f2efc2f 100644 (file)
@@ -84,7 +84,7 @@ public class MultiPageTaxonEditorDataChangeBehaviour extends AbstractDataChangeB
                        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$
                        }
                }
        }
@@ -100,7 +100,7 @@ public class MultiPageTaxonEditorDataChangeBehaviour extends AbstractDataChangeB
                                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
index f1f0c78b1d4c0fdaa1f897b3ac2c5db100b0cf38..ae645c436ceb2290d607ed29099fd963a3f54b83 100644 (file)
@@ -19,7 +19,7 @@ import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
  * @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;
index a1c38a7db597cc9d69136574534ffa9080e4f643..355b5e4537384e97b18e434f9682eeb04a317321 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -24,6 +24,8 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.widgets.Display;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
 /**
  * <p>SimpleSelectionProvider class.</p>
  *
@@ -34,16 +36,18 @@ import org.eclipse.swt.widgets.Display;
  */
 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);
        }
@@ -57,7 +61,8 @@ public class SimpleSelectionProvider implements ISelectionProvider {
         *
         * @return a {@link org.eclipse.jface.viewers.ISelection} object.
         */
-       public ISelection getSelection() {
+       @Override
+    public ISelection getSelection() {
                if (selection != null){
                        return selection;
                }
@@ -71,7 +76,8 @@ public class SimpleSelectionProvider implements ISelectionProvider {
         * @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);
        }
@@ -81,9 +87,10 @@ public class SimpleSelectionProvider implements ISelectionProvider {
         * @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){
@@ -91,41 +98,43 @@ public class SimpleSelectionProvider implements ISelectionProvider {
                        }
                        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);
                                }
                        });
index 782cd3da554dda7a52435064945b114108542814..6fbc031970d775b58b1cda5458b285cb2950e755 100644 (file)
@@ -37,6 +37,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -52,6 +53,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 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;
@@ -100,7 +103,7 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
         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);
 
@@ -114,7 +117,7 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
 
                 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();
@@ -177,9 +180,7 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
             }
         } 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);
         }
     }
 
@@ -196,8 +197,7 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
             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);
         }
     }
 
@@ -275,7 +275,7 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
         }
         TaxonNameBase<?, ?> name = getTaxon().getName();
         if (name == null || name.getTitleCache() == null) {
-            return "New taxon";
+            return Messages.TaxonEditorInput_NEW_TAXON;
         } else {
             return name.getTitleCache();
         }
@@ -470,44 +470,44 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
     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;
index 6f7c64f89f9a18cf11eb382063ed701e821379b9..1e7abe005668ffca80583bfb7ec6907980cde295 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.ui.IElementFactory;
 import org.eclipse.ui.IMemento;
 
 import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -51,13 +52,13 @@ public class TaxonEditorInputFactory implements IElementFactory {
                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;
        }       
index 4755d34bccd3b39fa3b56299bd20ee447d2788fc..747e0b69e02d32fc1c82f2092e1dfd8c12b8cd07 100644 (file)
@@ -11,6 +11,7 @@ package eu.etaxonomy.taxeditor.editor;
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.ui.IMemento;\r
 \r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;\r
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
@@ -19,22 +20,25 @@ import eu.etaxonomy.taxeditor.store.UseObjectStore;
 /**\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
index 5c697e7f343913c9e74973b25e29bcc3c14cf198..02fc68758eeb2a5d8b489529aae41857bbef77a8 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.ui.group.grantedauthority.CdmAuthorityCompositeViewer;
 
@@ -75,7 +76,7 @@ public class CdmAuthorityEditor extends EditorPart implements IConversationEnabl
        @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;
index 71a9b0c77eda800adaba84c2230f22bb815c730d..a52db81caaff5b13d066af8fd3d4678eec62007d 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -22,13 +22,14 @@ import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 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
  *
@@ -36,38 +37,40 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 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);
                                                }
@@ -75,12 +78,12 @@ public class EditCdmAuthoritiesHandler  extends AbstractHandler {
                                        monitor.done();
                                        return Status.OK_STATUS;
                                }
-                               
+
                        };
-                       
+
                        job.setPriority(Job.SHORT);
-                       job.schedule();                 
-                       
+                       job.schedule();
+
                }
                return null;
        }
index f46fb3a62001706b87397c287f55075523dbf1ec..181a00cb041ffeae5189254e2dc8f5dde31266ee 100644 (file)
@@ -36,7 +36,7 @@ public class EditNewTaxonHandler extends AbstractHandler implements IHandler {
        /** {@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);
index 44dadd8e9b9e8122486c3c291330d2be0c10677b..245f8fb6d8b8d03310472238621062c83f2a4646 100644 (file)
@@ -12,6 +12,7 @@ import eu.etaxonomy.cdm.model.taxon.Classification;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -21,7 +22,11 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 
 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){
@@ -34,8 +39,8 @@ public class OpenChecklistEditorHandler extends DefaultOpenHandlerBase<ITaxonTre
        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;
                        }
@@ -44,22 +49,22 @@ public class OpenChecklistEditorHandler extends DefaultOpenHandlerBase<ITaxonTre
                                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);
                                }
                        }
-               }               
+               }
        }
 }
index 4ef59f6c1433f5935d69d4292783e69bb6cca948..04101f6cdbd9b9da38a03c62888c1e4f03508698 100644 (file)
@@ -6,6 +6,7 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.ui.PartInitException;
 
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
@@ -16,7 +17,7 @@ public class OpenDerivateViewHandler extends AbstractHandler {
         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;
     }
index 9e3d94e134f1147e8e27cddd5cc910618e948c33..d10d68466f2618cddd732267303341bb6f8f2ece 100644 (file)
@@ -25,7 +25,7 @@ public class OpenParentHandler extends AbstractHandler implements IHandler {
 
        /** {@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){
index 41b142bb1ce002f6659635e4ffc37fb2c47d1244..fd9c52f53a6eb6676d7ae8edacbfa83d7f4d2043 100644 (file)
@@ -33,7 +33,7 @@ public class SaveAllHandler extends AbstractHandler implements IHandler {
         */
        /** {@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);
index ec87507347dcae1450e3727e8a03b29fea76c186..9b171707d88a6939a811e24c5ab1a082643bc851 100644 (file)
@@ -23,10 +23,10 @@ import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
  * @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() {}
index 3cbc0a4d2cb880671e29ba6b099ceba361130a32..9c186819c6ba346e77c8d4f26e91f55920e34466 100644 (file)
@@ -6,6 +6,7 @@ import org.eclipse.ui.PartInitException;
 
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -25,7 +26,7 @@ public class DefaultOpenSpecimenEditorForTypeSpecimenHandler extends
         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);
         }              
        }
 
index 1f9b37cd4da66ad3ef06cce385972e7c708ab21e..431a898cc644005da84819b7f121788be3a2f0b5 100644 (file)
@@ -7,6 +7,7 @@ import org.eclipse.ui.PartInitException;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -24,7 +25,7 @@ public class DefaultOpenTaxonEditorForTaxonBaseHandler extends DefaultOpenHandle
         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);
         }
     }
 
index 52937c8af4ba93477101b999053bda8923847af0..b6c18e6ef5b791de2523708eb60861e340643df7 100644 (file)
@@ -8,6 +8,7 @@ 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.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -26,7 +27,7 @@ public class DefaultOpenTaxonEditorForTaxonNodeHandler extends DefaultOpenHandle
         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);
         }
     }
 
index 639395b3522b4652a45b9da557f25bde79f65ac7..0eaba0acc4b282be4902ece101cc62ad537f8053 100644 (file)
@@ -22,7 +22,7 @@ public class TaxeditorEditorPlugin extends AbstractUIPlugin {
        
        // 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;
@@ -47,7 +47,7 @@ public class TaxeditorEditorPlugin extends AbstractUIPlugin {
 //             CdmStore.getContextManager().addContextListener(vcl);
                
                plugin = this;
-               logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
+               logger.trace("Plugin started: " + this.getBundle().getSymbolicName()); //$NON-NLS-1$
        }
 
 
@@ -55,7 +55,7 @@ public class TaxeditorEditorPlugin extends AbstractUIPlugin {
        public void stop(BundleContext context) throws Exception {
                plugin = null;
                super.stop(context);
-               logger.trace("Plugin stopped");
+               logger.trace("Plugin stopped"); //$NON-NLS-1$
        }
 
        /**
index 90b0c34799f822fb16ae91b35c52baac1cdc57b2..1cd36d71140333db6215542671b71fa2194de4de 100644 (file)
@@ -27,6 +27,7 @@ import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyGraphEditor;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
@@ -40,7 +41,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 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;
 
@@ -73,7 +74,7 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
        @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();
@@ -147,7 +148,9 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
         */
        @Override
        public void changed(Object element) {
-               editorDirtyStateChanged();
+           if (element != null){
+               editorDirtyStateChanged();
+           }
                IEditorPart activeEditor = getActiveEditor();
                if (activeEditor instanceof IDirtyMarkable) {
                        ((IDirtyMarkable) activeEditor).changed(element);
@@ -222,9 +225,9 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
 
                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);
                }
index e75a1262272b753c8679e86ea875f44b25ab2f58..c0c2d477841ad66a63da490637989903d2cd2362 100644 (file)
@@ -100,9 +100,9 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
         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;
     }
 
index 03843d512dad80e14524f9bf817a68822103b25a..94d7fd20d07b428381a3184fc233a416b345c3ca 100644 (file)
@@ -8,6 +8,8 @@
 */
 package eu.etaxonomy.taxeditor.editor.key.polytomous;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
 /**
  * @author cmathew
  * @date 21 Jul 2015
@@ -15,12 +17,11 @@ package eu.etaxonomy.taxeditor.editor.key.polytomous;
  */
 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;
     }
index 9a0bf8eb9c5b31aa8cd3e8e5c6004066988a7f28..f2ac1a9c3c08aa633b4d539f8a7852463376aebd 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.zest.core.viewers.IGraphContentProvider;
 
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 
 /**
@@ -61,7 +62,7 @@ class PolytomousKeyGraphContentProvider implements IGraphContentProvider {
                        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());
                }
 
index 61544abb7ad1b16e1a280888c9f81d13d1bf464d..469727c24826de8bfb902df9025452247c8af789 100644 (file)
@@ -19,7 +19,7 @@ public class PolytomousKeyGraphEditor extends
                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;
 
        /**
index 52869b3bb9b1afb51bf46b49571af61d7c8cd1bb..506d2cec6d5aaf20099642fab1ce43e2566ab0a6 100644 (file)
@@ -19,6 +19,7 @@ import eu.etaxonomy.cdm.model.common.Language;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -31,9 +32,9 @@ 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) {
@@ -50,18 +51,18 @@ class PolytomousKeyLabelProvider extends LabelProvider implements
                        }
 
                        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;
                        }
index 330539ce1eb1e40eb207fc3a72e7aff1a472d380..61e859296a41a8aa836d08b9f602187deb2fb076 100644 (file)
@@ -45,6 +45,7 @@ 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.key.KeyEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
@@ -145,7 +146,7 @@ public class PolytomousKeyListEditor extends EditorPart implements
         }
        }
 
-       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;
 
@@ -295,7 +296,7 @@ public class PolytomousKeyListEditor extends EditorPart implements
        // 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++) {
index ee44f7fcfcb28f52a3b66808254e046336a41dd0..187900a79d77e615ff01d9fab7634bd43f6dee19 100644 (file)
@@ -27,6 +27,7 @@ import eu.etaxonomy.cdm.model.description.KeyStatement;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -70,7 +71,7 @@ public class PolytomousKeyListItem extends AbstractCdmFormElement implements
                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());
 
@@ -112,16 +113,16 @@ public class PolytomousKeyListItem extends AbstractCdmFormElement implements
 
        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;
@@ -130,11 +131,11 @@ public class PolytomousKeyListItem extends AbstractCdmFormElement implements
 
        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$
                }
 
        }
@@ -142,12 +143,12 @@ public class PolytomousKeyListItem extends AbstractCdmFormElement implements
        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();
index 76bf8b81a2517fee8a9dc34c8366c181be9be4cb..9a4e1658dc61c0e5fb3937cca21fe1cd905b677e 100644 (file)
@@ -36,9 +36,9 @@ public class PolytomousKeyListLabelProvider extends StyledCellLabelProvider {
                        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)
@@ -109,7 +109,7 @@ public class PolytomousKeyListLabelProvider extends StyledCellLabelProvider {
 
        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;                                   
@@ -137,7 +137,7 @@ public class PolytomousKeyListLabelProvider extends StyledCellLabelProvider {
        
        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;
index 1964e04f533d16644def4a040cffdb3596065aae..181539db71aefb87d9d26305347c898ad939ce64 100644 (file)
@@ -19,7 +19,7 @@ import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
  *
  */
 public class PolytomousKeyPropertyTester extends PropertyTester {
-    private static final String KEYNODE = "isKeyNode";
+    private static final String KEYNODE = "isKeyNode"; //$NON-NLS-1$
 
     /**
      * {@inheritDoc}
index e9df7653e513c966c10a8fbbedaf35d366ba6f4c..7df790d0a9ff1210bf046f7a509493f6c1c56509 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
 
@@ -18,20 +18,22 @@ 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;
 
 /**
  * @author n.hoffmann
- * 
+ *
  */
 public class CreateChildNodeHandler extends AbstractHandler {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
         * ExecutionEvent)
@@ -48,7 +50,7 @@ public class CreateChildNodeHandler extends AbstractHandler {
                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();
@@ -56,9 +58,9 @@ public class CreateChildNodeHandler extends AbstractHandler {
 
                            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 {
 
@@ -75,15 +77,16 @@ public class CreateChildNodeHandler extends AbstractHandler {
 
                                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
+                                   );
                        }
                    }
                }
index f0c00125aaf61fb3cc668e18af5c8642dfe5ad92..f34fd782bc2eab6780c18b63117106d3274a194a 100644 (file)
@@ -10,27 +10,28 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 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)
@@ -44,7 +45,7 @@ public class CreateSiblingNodeHandler extends AbstractHandler {
                        IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
                                        .getActiveEditor();
 
-                       if (editorPage instanceof PolytomousKeyListEditor) {                            
+                       if (editorPage instanceof PolytomousKeyListEditor) {
 
                                IStructuredSelection selection = (IStructuredSelection) HandlerUtil
                                                .getCurrentSelection(event);
@@ -59,18 +60,19 @@ public class CreateSiblingNodeHandler extends AbstractHandler {
 
                                                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;
        }
index a3cc0b6e1b2b5360ce2ad05761b49aaf7e9e1440..01a42bedc7a49ff31b3b5171d846e6f50bd57dff 100644 (file)
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
 
 import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.commands.operations.AbstractOperation;
 import org.eclipse.core.commands.operations.IUndoContext;
@@ -21,14 +20,14 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 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.DeleteNodeOperation;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 
@@ -40,7 +39,13 @@ 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;
     /**
      * @param label
      */
@@ -55,84 +60,70 @@ public class DeleteNodeHandler extends AbstractPolytomousKeyNodeHandler {
         super(PolytomousKeyEditorLabels.DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL);
     }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
-        * ExecutionEvent)
-        */
-       @Override
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               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?");
-                       if (!proceed) {
-                               return null;
-                       }else{
-                               editor.doSave(EditorUtil.getMonitor());
-                       }
-               }
-               if (editor instanceof KeyEditor) {
-                       IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
-                                       .getActiveEditor();
-
-                       IStructuredSelection selection = (IStructuredSelection) HandlerUtil
-                                       .getCurrentSelection(event);
-
-                       if (selection.getFirstElement() instanceof PolytomousKeyNode) {
-                               try {
-                                       String label = event.getCommand().getName();
-                                       IUndoContext undoContext = EditorUtil.getUndoContext();
-
-                                       for (Object element : selection.toArray()) {
-                                               PolytomousKeyNode keyNode = HibernateProxyHelper.deproxy(element, PolytomousKeyNode.class);
-
-                                               AbstractPostOperation operation = new DeleteNodeOperation(
-                                                               label, undoContext, keyNode, editorPage);
-                                               EditorUtil.executeOperation(operation);
-                                       }
-
-                               } catch (NotDefinedException e) {
-                                       MessagingUtils.warn(getClass(), "Command name not set.");
-                               }
-                       } else {
-                       MessageDialog.openInformation(
-                               EditorUtil.getShell(),
-                               "No Key Node Selected",
-                               "Please right-click on a specific key node to delete a key node.");
-                       }
-               }
-
-               return null;
-       }
-
     /**
      * {@inheritDoc}
      */
     @Override
     public IStatus allowOperations(ExecutionEvent event) {
         IEditorPart editor = HandlerUtil.getActiveEditor(event);
-
+        IStructuredSelection selection = (IStructuredSelection) HandlerUtil
+                .getCurrentSelection(event);
+        AbstractPostOperation operation;
         if (editor instanceof KeyEditor) {
             editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
                     .getActiveEditor();
+        }
 
-            if (editorPage instanceof PolytomousKeyListEditor) {
-                PolytomousKeyListEditor klEditor = (PolytomousKeyListEditor) editorPage;
-                IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
-                    if (selection.getFirstElement() instanceof PolytomousKeyNode) {
-                        nodeToBeDeleted = (PolytomousKeyNode) selection.getFirstElement();
-                    } else {
-                        return new Status(IStatus.ERROR,
-                                "unknown",
-                                PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+
+        if (selection.getFirstElement() instanceof PolytomousKeyNode) {
+            try {
+                String label = event.getCommand().getName();
+                IUndoContext undoContext = EditorUtil.getUndoContext();
+                PolytomousKeyNode node = (PolytomousKeyNode)selection.getFirstElement();
+                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+Messages.DeleteNodeHandler_NODE_HAS_CHILDREN, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+                    int returnCode = dialog.open();
+
+                    if (returnCode == 0){
+                        deleteChildren = false;
+                    } else if (returnCode == 1){
+                        deleteChildren = true;
+                    } else{
+                        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);
+                    int returnCode = dialog.open();
+
+                    if (returnCode == 0){
+                        deleteChildren = false;
+                    } else if (returnCode == 1){
+                       return new Status(IStatus.CANCEL, "unknown", //$NON-NLS-1$
+                                null);
                     }
                 }
 
+
+
+
+            } catch (NotDefinedException e) {
+                MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
+            }
+        } else {
+                MessageDialog.openInformation(
+                        AbstractUtility.getShell(),
+                        PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+                        PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+                        );
         }
+
         return Status.OK_STATUS;
     }
 
@@ -142,13 +133,31 @@ public class DeleteNodeHandler extends AbstractPolytomousKeyNodeHandler {
     @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,
+                    Messages.DeleteNodeHandler_SAVE_CHANGES_TITLE, Messages.DeleteNodeHandler_SAVE_CHANGES_MESSAGE);
+            if (!proceed) {
+                return null;
+            }else{
+                editor.doSave(EditorUtil.getMonitor());
+            }
+        }
+
         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$
         }
-        return new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage);
+        DeleteNodeOperation operation ;
+        if (deleteChildren){
+            operation = new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage, true);
+        }else{
+            operation =  new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage, false);
+        }
+
+        return operation;
     }
 
     /**
index 62fce56baa3866eabbc9ecb1b554e8087daa520e..4b14c7e208a9733380f8e7ff51b2977b11a6e405 100644 (file)
@@ -62,8 +62,8 @@ public class InsertNewNodeHandler extends AbstractPolytomousKeyNodeHandler{
                         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);
                     }
                 }
             }
index e077a60ae26de5de8bd7abf893cddef5fb8cb889..c34fef3a3d372493af6b00f565d2700ec226e9d2 100644 (file)
@@ -47,7 +47,7 @@ public class RefreshNodeNumberingHandler extends AbstractHandler {
                                                                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$
                                        }
                                } 
                        }
index c01933d6e3467ae56d609cf368d1a9d14d01a2a9..dcdba9838f98162c83da9ff998973cc075f24987 100644 (file)
@@ -61,8 +61,8 @@ public class RemotingCreateChildPolytomousKeyNodeHandler extends AbstractPolytom
                         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);
                     }
                 }
             }
index 175a2dce53b1c6214acb32d6ae7287d36d1da2e4..98846a407b307f903d2957db3d4da297525224d0 100644 (file)
@@ -48,8 +48,8 @@ public class RemotingCreateSiblingPolytomousKeyNodeHandler extends AbstractPolyt
             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;
index 92803c8d4e533d83eb3857c14d5f6b8746fd6f86..1f04dd1d463591d67bc3ea3c462a5bec132a0b2c 100644 (file)
@@ -8,14 +8,14 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -29,14 +29,15 @@ public class DeleteNodeOperation extends AbstractPostOperation<PolytomousKeyNode
 
        private final PolytomousKeyNode parent;
        private final PolytomousKeyNode node;
-
+       private final boolean deleteChildren;
 
        public DeleteNodeOperation(String label, IUndoContext undoContext,
-                       PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) {
+                       PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled, boolean deleteChildren) {
            super(label, undoContext, node, postOperationEnabled);
            HibernateProxyHelper.deproxy(node, PolytomousKeyNode.class);
                this.node = node;
                this.parent = node.getParent();
+               this.deleteChildren = deleteChildren;
        }
 
        /*
@@ -51,7 +52,7 @@ public class DeleteNodeOperation extends AbstractPostOperation<PolytomousKeyNode
                        throws ExecutionException {
 
                //parent.removeChild(node);
-               ICdmApplicationConfiguration controller;
+               ICdmRepository controller;
 
                controller = CdmStore.getCurrentApplicationConfiguration();
 
@@ -59,7 +60,7 @@ public class DeleteNodeOperation extends AbstractPostOperation<PolytomousKeyNode
                DeleteResult result;
 
                if (node.getChildren().size()>0){
-                       if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) {
+                       if(deleteChildren) {
                                result = service.delete(node.getUuid(), false);
                        } else{
                                result = service.delete(node.getUuid(), true);
@@ -77,7 +78,7 @@ public class DeleteNodeOperation extends AbstractPostOperation<PolytomousKeyNode
                        }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);
        }
index 5a95d4ef44a40ce7873baf671ef58c52b584338b..092bf795b6bdb106dabfb02773af1e06c8d13080 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
 
@@ -29,7 +30,7 @@ public class InsertPolytomousKeyNodeOperation extends RemotingCdmDefaultOperatio
 
     private final PolytomousKeyNode parentNode;
 
-    private final static String LABEL = "Insert new polytomous key node";
+    private final static String LABEL = Messages.InsertPolytomousKeyNodeOperation_INSERT_KEY;
 
     /**
     *
index 9cdacd7b7a97b20b4cca30461bca549e51b8d3f5..ad7844a1e26651c722845c23d45e1b5f7f486c03 100644 (file)
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
 
@@ -35,7 +36,7 @@ public class RemotingCreatePolytomousKeyNodeOperation extends RemotingCdmDefault
         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,
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java
new file mode 100644 (file)
index 0000000..72aba13
--- /dev/null
@@ -0,0 +1,260 @@
+/**
+ * Copyright (C) 2015 EDIT
+ * 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.
+ */
+package eu.etaxonomy.taxeditor.editor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author pplitzner
+ * @date 09.09.2015
+ *
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.editor.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 AddDerivedUnitFacadeMediaOperation_CREATE_FAILED;
+    public static String AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE;
+    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 CreateDerivateContextMenu_DNA_SAMPLE;
+    public static String CreateDerivateContextMenu_MEDIA;
+    public static String CreateDerivateContextMenu_MEDIA_EXISTING;
+    public static String CreateDerivateContextMenu_MEDIA_SPECIMEN;
+    public static String CreateDerivateContextMenu_NO_CHILD_DERIVATE;
+    public static String CreateDerivateContextMenu_SEQUENCE;
+    public static String CreateDerivateContextMenu_SINGLE_READ;
+    public static String CreateDerivateContextMenu_SPECIMEN;
+    public static String CreateDerivateContextMenu_TISSUE_SAMPLE;
+    public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT;
+       public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR;
+       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 DeleteDerivateOperation_REALLY_DELETE;
+    public static String DeleteDescriptionElementOperation_DESC_NOT_FOUND;
+    public static String DeleteHandler_CONFIRM_DELETION;
+    public static String DeleteHandler_CONFIRM_DELETION_MESSAGE;
+    public static String DeleteHandler_DELETE;
+    public static String DeleteHandler_INVALID_SELECTION;
+    public static String DeleteHandler_SKIP;
+    public static String DeleteMediaHandler_CONFIRM;
+    public static String DeleteMediaHandler_CONFIRM_MESSAGE;
+    public static String DeleteMediaHandler_DELETE;
+    public static String DeleteMediaHandler_SKIP;
+    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 DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM;
+    public static String DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION;
+    public static String DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
+    public static String DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
+
+
+    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_CNT_DERIVATIVES_FOUND;
+    public static String DerivateView_DERIVATIVE_EDITOR;
+    public static String DerivateView_NO_TAXON_SELECTED;
+    public static String DerivateView_PERF_WARNING;
+    public static String DerivateView_PERF_WARNING_MESSAGE;
+    public static String DerivateView_SAVING_HIERARCHY;
+    public static String DerivateView_SPECIMEN_EDITOR;
+    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 DescriptionElementDropAdapter_MOVE_DESC;
+    public static String DescriptionElementDropAdapter_NOT_SUPPORTED;
+    public static String DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT;
+    public static String DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT;
+    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_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 IContainerConstants_CLICK_ADD_NAME;
+    public static String InsertPolytomousKeyNodeOperation_INSERT_KEY;
+       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 MediaViewPart_MEDIA;
+    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 MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON;
+    public static String MoveDescriptionElementsHandler_CREATE_FAILURE;
+    public static String MoveDescriptionElementsHandler_ELEMENTS_MOVED;
+    public static String MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON;
+    public static String MoveDescriptionToOtherTaxonHandler_CREATE_FAILED;
+    public static String MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES;
+    public static String MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE;
+    public static String MoveDescriptionToOtherTaxonOperation_MOVED_FROM;
+    public static String MoveMediaInListOperation_MORE_DESC;
+    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_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 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 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 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 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 UseObjectManager_RESET_DATA;
+    public static String UsesLabelProvider_NO_DATA;
+    public static String UsesLabelProvider_NO_LABEL;
+    public static String UsesLabelProvider_USE;
+    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;
+    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);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties
new file mode 100644 (file)
index 0000000..93392a7
--- /dev/null
@@ -0,0 +1,231 @@
+CreateDerivateContextMenu_ADD=Add...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Use existing media item
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Media item
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=No child derivatives
+CreateDerivateContextMenu_SEQUENCE=Consensus Sequence
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Specimen
+CreateDerivateContextMenu_TISSUE_SAMPLE=Tissue Sample
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Create new field unit
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Create new field unit for %s
+SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence
+SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence
+SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here
+DerivateView_CNT_DERIVATIVES_FOUND=%d derivative hierarchies found
+DerivateView_DERIVATIVE_EDITOR=Specimen Editor
+DerivateView_NO_TAXON_SELECTED=\ [no taxon selected]
+DerivateView_PERF_WARNING=Performance warning
+DerivateView_PERF_WARNING_MESSAGE=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.
+DerivateView_SAVING_HIERARCHY=Saving hierarchy
+DerivateView_SPECIMEN_EDITOR=Specimen Editor
+DerivateView_UNSAVED_CHANGES=View has unsaved changes
+DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
+DeleteDerivateOperation_AND_CHILDREN= and its children
+DeleteDerivateOperation_CONFIRM=Confirm Deletion
+DeleteDerivateOperation_DELETE_FAILED=Deletion failed
+DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
+DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
+DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
+DerivateViewEditorInput_NO_ROOT=No root element found\!
+MediaViewPart_MEDIA=Media
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
+MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON=Choose the accepted taxon
+MoveDescriptionElementsHandler_CREATE_FAILURE=Could not create taxon
+MoveDescriptionElementsHandler_ELEMENTS_MOVED=Elements moved from %s
+MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON=Choose the accepted taxon
+MoveDescriptionToOtherTaxonHandler_CREATE_FAILED=Could not create Taxon
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES=Save changes
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE=You have made changes that must be saved before this query can be executed. Would you like to proceed?
+MoveDescriptionToOtherTaxonOperation_MOVED_FROM=Description moved from %s
+MoveMediaInListOperation_MORE_DESC=More than one description element in this image gallery
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Specimen Editor
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Confirm Deletion
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element has to be Synonym, Misapplication or Concept
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Are you sure you want to delete the selected taxon?
+DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Are you sure you want to delete the selected synoym, this is irreversible?
+DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The Synonym could be deleted, but related object(s) could not be deleted
+DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The misapplied name could be deleted, but related object(s) could not be deleted
+DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION=Are you sure you want to delete the selected misapplication, this is irreversible?
+DescriptionElementDropAdapter_MOVE_DESC=Move Descriptions
+DescriptionElementDropAdapter_NOT_SUPPORTED=Operation not supported yet
+DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT=We are unable to drag and drop empty descriptions
+DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT=We are currently unable to drag and drop a newly created element. Please save the editor to make this work.
+DescriptiveViewPart_COLLAPSE_ALL=Collapse All
+DescriptiveViewPart_EXPAND_ALL=Expand All
+DescriptiveViewPart_FACTUAL_DATA=Factual Data
+DescriptiveViewPart_SHOW_ALL_DATA=Show all factual data
+ConceptGraphView_VIEWER_NAME=Concept Graph
+ConceptViewPart_VIEWER_NAME=Concept Relations
+UsesLabelProvider_NO_DATA=No data provided
+UsesLabelProvider_NO_LABEL=No label provided
+UsesLabelProvider_USE=Use: 
+UsesViewPart_VIEWER_NAME=Uses
+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
+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
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED=Image gallery creation failed
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE=Only one image gallery is possible.
+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
+DeleteDescriptionElementOperation_DESC_NOT_FOUND=Couldn't find element's description!
+DeleteHandler_CONFIRM_DELETION=Confirm Deletion
+DeleteHandler_CONFIRM_DELETION_MESSAGE=Do you really want to delete the media?
+DeleteHandler_DELETE=Delete
+DeleteHandler_INVALID_SELECTION=Selection is not valid for this delete handler
+DeleteHandler_SKIP=Skip
+DeleteMediaHandler_CONFIRM=Confirm Deletion
+DeleteMediaHandler_CONFIRM_MESSAGE=Do you really want to delete the media?
+DeleteMediaHandler_DELETE=Delete
+DeleteMediaHandler_SKIP=Skip
+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
+DerivateViewEditorInput_SPECIMEN_EDITOR=Specimen Editor
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties
new file mode 100644 (file)
index 0000000..870b8f5
--- /dev/null
@@ -0,0 +1,231 @@
+CreateDerivateContextMenu_ADD=Hinzufügen...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Probe
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Vorhandendes Medienobjekt verwenden
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Medienobjekt
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
+CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Beleg
+CreateDerivateContextMenu_TISSUE_SAMPLE=Gewebeprobe
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Erzeuge neue Field Unit
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Erzeuge neue Field Unit für %s
+SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
+SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
+SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
+DerivateView_CNT_DERIVATIVES_FOUND=%d Derivat-Hierarchien gefunden
+DerivateView_DERIVATIVE_EDITOR=Specimen-Editor
+DerivateView_NO_TAXON_SELECTED=\ [kein Taxon ausgewählt]
+DerivateView_PERF_WARNING=Performance-Warnung
+DerivateView_PERF_WARNING_MESSAGE=Specimens werden nicht geladen\!\n Es gibt %d Specimens für die aktuelle Auswahl. Wenn wirklich alle Specimens im Specimen-Editor angezeigt werden sollen, dann nutzen Sie bitte den Taxon-Filter in der Suchleiste.
+DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
+DerivateView_SPECIMEN_EDITOR=Specimen-Editor
+DerivateView_UNSAVED_CHANGES=Ungepeicherte Ã„nderungen
+DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
+DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
+DeleteDerivateOperation_CONFIRM=Löschen bestätigen
+DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
+DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
+DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
+DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
+DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
+MediaViewPart_MEDIA=Media
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
+MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON=Wähle akzeptiertes Taxon
+MoveDescriptionElementsHandler_CREATE_FAILURE=Konnte Taxon nicht erstellen
+MoveDescriptionElementsHandler_ELEMENTS_MOVED=Elemente verschoben von %s
+MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON=Wähle akzeptiertes Taxon
+MoveDescriptionToOtherTaxonHandler_CREATE_FAILED=Konnte Taxon nicht erstellen
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES=Änderungen speichern
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE=Änderungen müssen gespeichert werden, bevor die Anfrage ausgeführt werden kann. Fortfahren?
+MoveDescriptionToOtherTaxonOperation_MOVED_FROM=Beschreibung verschoben von %s
+MoveMediaInListOperation_MORE_DESC=Mehr als eine Beschreibung in dieser Bildergalerie
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Specimen-Editor nicht Ã¶ffnen
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Löschen bestätigen
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element muss Synonym, Misapplikation oder Konzept sein
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Wollen Sie wirklich das ausgewählte Taxon löschen?
+DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Wollen Sie das ausgewählte Synonym wirklich löschen, dieser Vorgang ist nicht reversibel.
+DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Das Synonym konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
+DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Die Misapplikation konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
+DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION=Wollen Sie die ausgewählte Misapplikation wirklich löschen, dieser Vorgang ist nicht reversibel.
+DescriptionElementDropAdapter_MOVE_DESC=Verschiebe Beschreibungen
+DescriptionElementDropAdapter_NOT_SUPPORTED=Vorgang noch nicht unterstützt
+DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT=Drag and Drop für leeren Beschreibungen noch nicht unterstützt
+DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT=Drag and Drop für neu erstellte Elemente noch nicht unterstützt. Bitte Editor speichern, um den Vorgang auszuführen.
+DescriptiveViewPart_COLLAPSE_ALL=Alles einklappen
+DescriptiveViewPart_EXPAND_ALL=Alles ausklappen
+DescriptiveViewPart_FACTUAL_DATA=Faktendaten
+DescriptiveViewPart_SHOW_ALL_DATA=Zeige alle Faktendaten
+ConceptGraphView_VIEWER_NAME=Konzeptgraph
+ConceptViewPart_VIEWER_NAME=Konzeptrelationen
+UsesLabelProvider_NO_DATA=Keine Daten verfügbar
+UsesLabelProvider_NO_LABEL=Kein Label verfügbar
+UsesLabelProvider_USE=Nutzung: 
+UsesViewPart_VIEWER_NAME=Nutzung
+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
+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: 
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED=Erstellen der Bildergallerie fehlgeschlagen
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE=Nur eine Bildergalerie möglich.
+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
+DeleteDescriptionElementOperation_DESC_NOT_FOUND=Beschreibung konnte nicht gefunden werden!
+DeleteHandler_CONFIRM_DELETION=Löschen bestätigen
+DeleteHandler_CONFIRM_DELETION_MESSAGE=Wollen sie wirklich das Medienobjektlöschen?
+DeleteHandler_DELETE=Löschen
+DeleteHandler_INVALID_SELECTION=Auswahl ungültig für den DeleteHandler
+DeleteHandler_SKIP=Ãœberspringen
+DeleteMediaHandler_CONFIRM=Löschen bestätigen
+DeleteMediaHandler_CONFIRM_MESSAGE=Wollen sie wirklich das Medienobjektlöschen?
+DeleteMediaHandler_DELETE=Löschen
+DeleteMediaHandler_SKIP=Ãœberspringen
+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
+DerivateViewEditorInput_SPECIMEN_EDITOR=Specimen-Editor
index ce6ff028a2b353521620864c3af847638ff839c6..6154ad8483acd68d0c41c8f1b3e9645d8638f372 100644 (file)
@@ -58,6 +58,7 @@ import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup;
 import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
 import eu.etaxonomy.taxeditor.editor.name.container.AcceptedGroup;
@@ -91,7 +92,7 @@ public class TaxonNameEditor extends EditorPart implements
                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;
 
@@ -276,7 +277,7 @@ public class TaxonNameEditor extends EditorPart implements
            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();
 
@@ -468,13 +469,13 @@ public class TaxonNameEditor extends EditorPart implements
        @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();
 
@@ -505,13 +506,13 @@ public class TaxonNameEditor extends EditorPart implements
                        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);
index d9be7cb02a5c374ec53e69fbe3d05b685691e77d..f77eb24e50390005747557141ac17d47571925ef 100644 (file)
@@ -1,8 +1,8 @@
 /**
  * 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.
  */
@@ -28,7 +28,6 @@ import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.events.FocusAdapter;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.MouseAdapter;
@@ -48,6 +47,7 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.INonViralName;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
@@ -55,6 +55,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
 import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.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;
@@ -86,7 +87,7 @@ import eu.etaxonomy.taxeditor.preference.Resources;
  * The <code>IManagedForm</code> can also used for drawing borders by calling
  * the method <code>createBorderSupport()</code>.
  * </p>
- * 
+ *
  * @author p.ciardelli
  * @author n.hoffmann
  * @created 02.06.2008
@@ -123,7 +124,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Constructor for AbstractGroupedContainer.
         * </p>
-        * 
+        *
         * @param editor
         *            a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor}
         *            object.
@@ -170,13 +171,14 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        protected void createListener() {
                nameCompositeModifyListener = new ModifyListener() {
 
-                       public void modifyText(ModifyEvent e) {
+                       @Override
+            public void modifyText(ModifyEvent e) {
                                // mark the composite dirty
                                setDirty(true);
                                // parse the text
                                String text = nameViewer.getTextWidget().getText();
 
-                               NonViralName name = parseHandler.parse(text);
+                               TaxonNameBase<?,?> name = (TaxonNameBase<?,?>)parseHandler.parse(text);
                                getTaxonBase().setName(name);
                                getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
 
@@ -192,7 +194,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
                        /*
                         * (non-Javadoc)
-                        * 
+                        *
                         * @see
                         * org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt
                         * .events.FocusEvent)
@@ -231,7 +233,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * getEmptyTextPrompt
         * </p>
-        * 
+        *
         * @return a {@link java.lang.String} object.
         */
        protected String getEmptyTextPrompt() {
@@ -239,7 +241,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        }
 
        /**
-        * 
+        *
         */
        private void showNameRelations() {
                TaxonNameBase<?, ?> name = getName();
@@ -309,7 +311,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        }
 
        /**
-        * 
+        *
         */
        public void showAnnotations() {
 
@@ -322,19 +324,19 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                                        .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));
                }
 
        }
 
        /**
-        * 
+        *
         */
        private void showParsingProblems() {
                String text = getNameViewer().getTextWidget().getText();
@@ -374,7 +376,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * handleSplitText
         * </p>
-        * 
+        *
         * @param text
         *            a {@link java.lang.String} object.
         */
@@ -384,16 +386,17 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                                .parseReferencedName(text, null);
 
                EditorUtil.executeOperation(new CreateSynonymInNewGroupOperation(
-                               "New Heterotypic Synonym", getEditor().getUndoContext(),
+                               Messages.AbstractGroupedContainer_NEW_HETERO_SYNONYM, getEditor().getUndoContext(),
                                getEditor().getTaxon(), synonymName, getEditor()));
        }
 
        /**
         * Refreshes the display with latest data from the model.
-        * 
+        *
         * Note: Will not parse the text and not calculate errors!
         */
-       public void refresh() {
+       @Override
+    public void refresh() {
                // showNameRelations();
 
                String text = NameHelper.getDisplayNameWithRef(getTaxonBase());
@@ -421,7 +424,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        }
 
        /**
-        * 
+        *
         */
        protected abstract void updateIcon();
 
@@ -435,7 +438,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        protected abstract void updateNonEditableInfo();
 
        /**
-        * 
+        *
         */
        private void enableFreeText() {
                setEnabled(isFreetextEditingAllowed());
@@ -444,7 +447,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        /**
         * Checks whether the freetext should be editable based on specific empty
         * fields.
-        * 
+        *
         * @return
         */
        private boolean isFreetextEditingAllowed() {
@@ -459,19 +462,19 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
        }
 
        /**
-        * Checks whether there are more than one, non-orphaned taxon bases   
+        * Checks whether there are more than one, non-orphaned taxon bases
         * attached to the taxon name
-        * 
+        *
         * @return
         */
        private boolean isNameUsedMultipleTimes() {
-               
+
                Set<TaxonBase> taxonBases = getName().getTaxonBases();
                Iterator<TaxonBase> tbItr = taxonBases.iterator();
                int nonOrphanedTaxonBaseCount = taxonBases.size();
-               
+
                while(tbItr.hasNext()) {
-                       TaxonBase tb = tbItr.next(); 
+                       TaxonBase tb = tbItr.next();
                        if(tb.isOrphaned()) {
                                nonOrphanedTaxonBaseCount--;
                        }
@@ -512,7 +515,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * getTaxonBase
         * </p>
-        * 
+        *
         * @return the taxonBase
         */
        public T getTaxonBase() {
@@ -523,11 +526,11 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * getName
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
        public TaxonNameBase getName() {
-               return (TaxonNameBase) HibernateProxyHelper.deproxy(getTaxonBase()
+               return HibernateProxyHelper.deproxy(getTaxonBase()
                                .getName());
        }
 
@@ -546,7 +549,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                        // @Override
                        // protected IStatus run(IProgressMonitor monitor) {
                        //
-                       final NonViralName name = parseHandler
+                       final TaxonNameBase<?,?> name = (TaxonNameBase<?,?>)parseHandler
                                        .parseAndResolveDuplicates(unparsedNameString);
                        //
                        // Display.getDefault().asyncExec(new Runnable(){
@@ -573,14 +576,14 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Getter for the field <code>group</code>.
         * </p>
-        * 
+        *
         * @return a
         *         {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
         *         object.
         */
        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;
        }
@@ -628,7 +631,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Getter for the field <code>control</code>.
         * </p>
-        * 
+        *
         * @return a {@link org.eclipse.swt.widgets.Composite} object.
         */
        public Composite getControl() {
@@ -686,7 +689,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setIcon
         * </p>
-        * 
+        *
         * @param icon
         *            a {@link org.eclipse.swt.graphics.Image} object.
         */
@@ -698,7 +701,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setIndent
         * </p>
-        * 
+        *
         * @param indent
         *            a int.
         */
@@ -711,7 +714,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                        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$
                }
        }
 
@@ -728,7 +731,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * isSelected
         * </p>
-        * 
+        *
         * @return a boolean.
         */
        public boolean isSelected() {
@@ -739,7 +742,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * colorSelected
         * </p>
-        * 
+        *
         * @param mode
         *            a int.
         */
@@ -780,7 +783,8 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                Display display = Display.getCurrent();
                Runnable runnable = new Runnable() {
 
-                       public void run() {
+                       @Override
+            public void run() {
                                getEditor().getManagedForm().setInput(selection);
                        }
                };
@@ -792,7 +796,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setBackground
         * </p>
-        * 
+        *
         * @param color
         *            a {@link org.eclipse.swt.graphics.Color} object.
         */
@@ -808,7 +812,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)
         */
@@ -816,7 +820,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setFont
         * </p>
-        * 
+        *
         * @param font
         *            a {@link org.eclipse.swt.graphics.Font} object.
         */
@@ -828,14 +832,14 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Getter for the field <code>nameViewer</code>.
         * </p>
-        * 
+        *
         * @return a {@link eu.etaxonomy.taxeditor.editor.name.container.NameViewer}
         *         object.
         */
        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;
@@ -845,7 +849,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * If <code>textViewer</code> has already been set, it will show a
         * <code>prompt</code> along the lines of
         * "Click here to start entering data" when empty.
-        * 
+        *
         * @param prompt
         *            a {@link java.lang.String} object.
         */
@@ -858,14 +862,16 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
                setFocusListener(new FocusListener() {
 
-                       public void focusGained(FocusEvent e) {
+                       @Override
+            public void focusGained(FocusEvent e) {
                                if (document.get().equals(prompt)) {
                                        textControl.setFont(getViewerFont());
-                                       document.set("");
+                                       document.set(""); //$NON-NLS-1$
                                }
                        }
 
-                       public void focusLost(FocusEvent e) {
+                       @Override
+            public void focusLost(FocusEvent e) {
                                if (document.getLength() == 0) {
                                        initEmptyText();
                                }
@@ -885,7 +891,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * getViewerFont
         * </p>
-        * 
+        *
         * @return a {@link org.eclipse.swt.graphics.Font} object.
         */
        abstract protected Font getViewerFont();
@@ -907,7 +913,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Setter for the field <code>focusListener</code>.
         * </p>
-        * 
+        *
         * @param focusListener
         *            a {@link org.eclipse.swt.events.FocusListener} object.
         */
@@ -923,7 +929,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setDirty
         * </p>
-        * 
+        *
         * @param isDirty
         *            a boolean.
         */
@@ -938,10 +944,11 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * isDirty
         * </p>
-        * 
+        *
         * @return a boolean.
         */
-       public boolean isDirty() {
+       @Override
+    public boolean isDirty() {
                return isDirty;
        }
 
@@ -949,7 +956,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setMenu
         * </p>
-        * 
+        *
         * @param menu
         *            a {@link org.eclipse.swt.widgets.Menu} object.
         */
@@ -965,7 +972,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setDraggableControl
         * </p>
-        * 
+        *
         * @param controls
         *            an array of {@link org.eclipse.swt.widgets.Control} objects.
         */
@@ -977,7 +984,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * setIsDraggable
         * </p>
-        * 
+        *
         * @param draggable
         *            a boolean.
         */
@@ -987,7 +994,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
                        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() };
@@ -1036,7 +1043,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * nonEditableInfo is a label displayed underneath a GroupedComposite's
         * input field. For instance, NameComposites display things like name
         * relations, sec. references, etc. here.
-        * 
+        *
         * @param info
         *            the text to display in the label
         * @param append
@@ -1049,8 +1056,8 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                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;
@@ -1058,7 +1065,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
                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
@@ -1092,10 +1099,11 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Getter for the field <code>data</code>.
         * </p>
-        * 
+        *
         * @return a T object.
         */
-       public T getData() {
+       @Override
+    public T getData() {
                return data;
        }
 
@@ -1103,12 +1111,12 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Setter for the field <code>data</code>.
         * </p>
-        * 
+        *
         * @param data
         *            a T object.
         */
        public void setData(T data) {
-               this.data = (T) HibernateProxyHelper.deproxy(data);
+               this.data = HibernateProxyHelper.deproxy(data);
        }
 
        /**
@@ -1126,7 +1134,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                };
 
                getNameViewer().getTextWidget().addVerifyListener(lineBreakListener);
-               
+
        }
 
        abstract class LabelEllipsisListener extends ControlAdapter {
@@ -1177,7 +1185,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         * <p>
         * Setter for the field <code>group</code>.
         * </p>
-        * 
+        *
         * @param group
         *            a
         *            {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
@@ -1198,7 +1206,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm
         * )
@@ -1211,7 +1219,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.forms.IFormPart#dispose()
         */
        @Override
@@ -1224,7 +1232,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
         */
        @Override
@@ -1236,7 +1244,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
         */
        @Override
@@ -1246,7 +1254,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.forms.IFormPart#setFocus()
         */
        @Override
@@ -1256,28 +1264,28 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see org.eclipse.ui.forms.IFormPart#isStale()
         */
        @Override
        public boolean isStale() {
                return false;
        }
-       
+
        public void setDisabled(boolean disabled) {
                this.enabled = !disabled;
                setEnabled(enabled);
        }
-       
+
        public void setEnabled(boolean enabled) {
                this.enabled = enabled;
                Color color = enabled ? control.getForeground() : EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR);
-                               
+
                getNameViewer().getTextWidget().setEditable(enabled);
                getNameViewer().getTextWidget().setEnabled(enabled);
                getNameViewer().getTextWidget().setForeground(color);
        }
-       
+
        public boolean isEnabled(){
                return enabled;
        }
index 1e10a43085246be84f43fe3b8a93b890868b2777..e1fccf3e7c8342a8586a6061c4c999b10170f82a 100644 (file)
@@ -15,6 +15,7 @@ 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.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
@@ -72,9 +73,9 @@ public class ConceptContainer extends AbstractGroupedContainer<Taxon> {
                }
                
                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$
                }
        }
 
@@ -124,7 +125,7 @@ public class ConceptContainer extends AbstractGroupedContainer<Taxon> {
        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();
        }
index 362fa0b31315bf9eda9a3c52bf0e8b9e8bd521eb..3cfad1f75b5a3d93388662e23139b892ffed3b8d 100644 (file)
@@ -13,6 +13,7 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Canvas;
 
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 
 /**
@@ -137,10 +138,10 @@ public class EditorAnnotation extends Annotation implements IAnnotationPresentat
     @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();
     }
index 603c964fbf44b26669ef88cdb7ea91b0ebc8d365..567dfa71c3604cfeddacff942f0bc0da5869de74 100644 (file)
@@ -11,6 +11,7 @@ package eu.etaxonomy.taxeditor.editor.name.container;
 
 import org.eclipse.swt.graphics.Image;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 
 /**
@@ -32,15 +33,15 @@ public interface IContainerConstants {
         * ************ 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 ************
@@ -85,9 +86,9 @@ public interface IContainerConstants {
        /**
         * ************ 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;
 }
index adf17288ec2224cf21489c843e7c50bb264b02cb..969e7ae7b9482ea54618ac22055555198a6a03e5 100644 (file)
@@ -48,7 +48,7 @@ import org.eclipse.swt.events.VerifyListener;
 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$
        
        
        /**
@@ -80,7 +80,7 @@ public abstract class LineBreakListener implements VerifyListener{
                //  make a new, empty synonym
                if (widgetText.length() == cursorPosition &&
                                verifyText.equals(LINE_BREAK)) {
-                       handleSplitText("");
+                       handleSplitText(""); //$NON-NLS-1$
                        return;
                }
                
index a0a79ab13bf19c452e3a25583fa934b3bc919cbb..f71bce16f5ed534cb111d8192580fc0624e70382 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.Point;
 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;
 
index 5dcd2f01ec5efe6ee7f4f0728ddd9ff8cd61c1b9..ec83e5f59cc787ae378fac2f606f87cbc7957c51 100644 (file)
@@ -54,7 +54,7 @@ public class LineWrapSupport {
                
                if (viewer == null) {
                        throw new IllegalArgumentException(
-                                       "The provided TextViewer object is null.");
+                                       "The provided TextViewer object is null."); //$NON-NLS-1$
                }
                
 //             this.viewer = viewer;
@@ -65,7 +65,7 @@ public class LineWrapSupport {
                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$
        }
        
        /**
index d37adb99a22d7fbee1d7d1c31e005ea1affa676f..6c8e0d4719c27077bafa107f530ee55eafeecf39 100644 (file)
@@ -13,6 +13,7 @@ import org.eclipse.swt.graphics.Font;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
 /**
@@ -64,14 +65,14 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
                    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);
                }
@@ -99,7 +100,7 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        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();
        }
index 2149e5d75e2a6a0f5d1a43603816ecbdf441e9ff..d02ab0313ed66c30e51e83725f34a0a49298a379 100644 (file)
@@ -100,7 +100,7 @@ public class NameViewer extends SourceViewer {
                ruler.getControl().moveAbove(getTextWidget());
 
                annotationModel = new AnnotationModel();
-               this.setDocument(new Document(""), annotationModel);
+               this.setDocument(new Document(""), annotationModel); //$NON-NLS-1$
                
                createAnnotationPainter();
 
@@ -151,7 +151,7 @@ public class NameViewer extends SourceViewer {
                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$
                }
        }
        
@@ -269,7 +269,7 @@ public class NameViewer extends SourceViewer {
         */
        public void setText(String text) {
                if (text == null) {
-                       text = "";
+                       text = ""; //$NON-NLS-1$
                }
                try {
                        Assert.isNotNull(text);
index db441616093b6fbd10531d4797615ce3d97f46c2..c7f27a422a0cb5c25d9efe5341b7b9deb6448ac5 100644 (file)
@@ -255,7 +255,7 @@ public class RulerWithIcon implements IVerticalRuler, IVerticalRulerExtension {
                                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
index a267b0cb0ad804a857c20d24c904d707181aa294..6afab5410b668dd7c23028361559d8d29ba93424 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
@@ -62,7 +63,7 @@ public class SynonymContainer extends AbstractGroupedContainer<Synonym> {
                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();
index 661c0c7fbb6481e3750dd63b5cd58b62706b0169..926782adc5042efd0326bd2ae3e8fd6980842c0f 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.editor.name.dnd;
 
@@ -16,6 +16,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.IDropTargetable;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.name.container.AbstractHomotypicalGroupContainer;
 import eu.etaxonomy.taxeditor.editor.name.container.MisappliedGroup;
@@ -34,9 +35,9 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  * @version $Id: $
  */
 public class NameEditorDropTargetListener extends DropTargetAdapter {
-               
+
        private IDropTargetable target;
-       
+
 
        /**
         * <p>Constructor for NameEditorDropTargetListener.</p>
@@ -46,41 +47,43 @@ public class NameEditorDropTargetListener extends DropTargetAdapter {
        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);
@@ -89,56 +92,56 @@ public class NameEditorDropTargetListener extends DropTargetAdapter {
                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;
        }
 
@@ -148,29 +151,29 @@ public class NameEditorDropTargetListener extends DropTargetAdapter {
                // 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();
index ec76aee68c35cf98ac498fe18a6d8c56f07b2b6a..aedd5f43a2fdd615852c0e6321c0f41049010da4 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxonOperation;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
@@ -61,14 +62,14 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                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;
                }
 
@@ -87,7 +88,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                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){
@@ -97,7 +98,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                        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);
@@ -137,7 +138,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                                // 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;
index 80c79828bbf30a4dd15c7c39cf5fc4a06f38a9ad..f6621a346e1719dd70f879d93f95757e0fe05747 100644 (file)
@@ -67,7 +67,7 @@ public class ChangeToConceptRelationHandler extends AbstractHandler implements
                                EditorUtil.executeOperation(operation);
                        }
                } catch (NotDefinedException e) {
-                       logger.warn("Command name not set");
+                       logger.warn("Command name not set"); //$NON-NLS-1$
                }
                
                return null;
index c56e66e19c3c916dbab659688f95184c7aa86c2a..f0d38a66de22d2095f673f9a628a17b42cfbdc55 100644 (file)
@@ -71,7 +71,7 @@ public class ChangeToMisapplicationHandler extends AbstractHandler implements
                        EditorUtil.executeOperation(operation);
 
                } catch (NotDefinedException e) {
-                       logger.warn("Command name not set");
+                       logger.warn("Command name not set"); //$NON-NLS-1$
                }
 
                return null;
index cbba94a2894a01862c2ff8c6266744e4ce9aefdb..c2ab8c9967028138d9eeb747ba7281ddedf5db84 100644 (file)
@@ -52,7 +52,7 @@ public class ChangeToSynonymHandler extends AbstractHandler implements
                        
                        EditorUtil.executeOperation(operation);
                } catch (NotDefinedException e) {
-                       logger.warn("Command name not set");
+                       logger.warn("Command name not set"); //$NON-NLS-1$
                }
                
                return null;
index 992f83e1a50f22f338c448b523b46f49f6d8f0be..e43510e27b31d5489640388616447f1308473f39 100644 (file)
@@ -52,7 +52,7 @@ public class CreateHeterotypicSynonymHandler extends AbstractHandler implements
                                        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;
index 9047c2a137d4e65b3527d10cacd85cd1ffcd6218..619c94e8d6760fb1a58464262e5234f6f107194c 100644 (file)
@@ -16,7 +16,9 @@ import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
@@ -46,7 +48,7 @@ public class CreateHomotypicSynonymHandler extends AbstractHandler implements
                                Page.NAME);
                Taxon taxon = editor.getTaxon();
                HomotypicalGroup group = taxon.getHomotypicGroup();
-               NonViralName newSynonymName = ParseHandler.createEmptyName();
+               TaxonNameBase<?,?> newSynonymName = ParseHandler.createEmptyName();
 
                AbstractPostOperation operation;
                try {
index 145e9f324af7552dd7b39f9b6b4b0941195b89d2..c6a6a23faa6c852ab197071ee081d452f0d091a9 100644 (file)
@@ -56,7 +56,7 @@ public class CreateMisapplicationHandler extends AbstractHandler {
                                        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;
index 687df8cfbd5ae058182b6e3e32622a1e2aa5a47b..9e86a70444e4a7bfe4757a4bc9239fad4bea89f3 100644 (file)
@@ -20,7 +20,9 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+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.Page;
@@ -62,7 +64,7 @@ public class CreateSynonymInHomotypicalGroupHandler extends AbstractHandler
 
                HomotypicalGroup group = synonym.getHomotypicGroup();
 
-               NonViralName newSynonymName = ParseHandler.createEmptyName();
+               TaxonNameBase<?,?> newSynonymName = ParseHandler.createEmptyName();
 
                AbstractPostOperation operation;
 
@@ -71,7 +73,7 @@ public class CreateSynonymInHomotypicalGroupHandler extends AbstractHandler
                                                                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;
index 706b9deb8891e2207b9e6463dbd617566f84b450..2f487963b0dd38073d3fd6d3c5335a47a358729b 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -33,9 +33,10 @@ public class DeleteAllEmptyNamesHandler extends DeleteTaxonBaseHandler {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(Page.NAME);
 
                for(AbstractGroupedContainer<TaxonBase> containerWithEmptyName : editor.getEmptyContainers()){
+                   editor.removeGroup(containerWithEmptyName.getGroup());
                        doExecute(event, editor, containerWithEmptyName.getData());
                }
-               
+
                return null;
        }
 
index 6aec9f937e440fe763535f61795f6a262337ba5f..9dda2a9301936ced28572f11bb4bcd5d9b819d2f 100644 (file)
@@ -13,19 +13,21 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation;
 import eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation;
@@ -36,6 +38,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  * @author n.hoffmann
@@ -67,20 +70,38 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                        MessagingUtils.error(getClass(), e);
                }
                IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+               if (selectedElement instanceof TaxonBase){
+                   if (((TaxonBase)selectedElement).getId() == 0){
+                       if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()) {
+                    editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
+
+                } else if (selectedElement instanceof Synonym){
+                    editor.getTaxon().removeSynonym((Synonym)selectedElement);
+                }
+                       editor.redraw();
+                       return;
+
+               }
+
+               }
+
                // synonym
                if(selectedElement instanceof Synonym){
-                   if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
-                return ;
+                   SynonymDeletionConfigurator deleteConfig = new SynonymDeletionConfigurator();
+                   if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
+                          return ;
             }
-                       operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(),  new SynonymDeletionConfigurator(), activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+                       operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
 
                }
                // misapplication
                else if(selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()){
-                       operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(), editor
-                                       .getTaxon(), (Taxon) selectedElement, editor);
-               }
-               else {
+                   TaxonDeletionConfigurator deleteConfig = new TaxonDeletionConfigurator();
+                   if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION,  Messages.DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION)){
+                       return ;
+                   }
+                       operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(),  deleteConfig, activePage, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+               } else {
                        throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
                }
 
@@ -88,16 +109,16 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                DeleteResult result = ((DeleteTaxonBaseOperation)operation).getResult();
                if (result.isError()){
             DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteDerivateOperation_DELETE_FAILED, TaxeditorEditorPlugin.PLUGIN_ID);
-        } else if (selectedElement instanceof Synonym){
+        } else {
             this.editor.redraw();
                    if (!result.getUpdatedObjects().isEmpty()){
                 DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID);
             }
-               }else {
+               }
                    if (!result.getUpdatedObjects().isEmpty()){
                 DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID);
                    }
-               }
+
 
        }
 
index bb5fb10aceb55dc921bf38d1c598a8bd1517afcc..0a56c3cc8797a50cfb9749a387942b89a1171a6e 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -45,13 +46,13 @@ public class MoveSynonymToAnotherAcceptedTaxonHandler extends AbstractHandler im
                }
 
                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;
                }
 
@@ -61,10 +62,10 @@ public class MoveSynonymToAnotherAcceptedTaxonHandler extends AbstractHandler im
                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);
index ead46789c8c67cfcb38a084623a00473d276d5b7..3030a0db458c7244332b0b843312b4876496ed0f 100644 (file)
@@ -31,16 +31,16 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 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>
index 5c62c6156e5501095c6ac1da4110a38fa422decd..5820a1018a93e381c249e50a101aa4326673a260 100644 (file)
@@ -55,7 +55,7 @@ public class RemoveBasionymHandler extends AbstractHandler implements IHandler {
                                                                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;
index 745d2bd31c109b05feed014750a43ec2ff92f0f7..4d35fe907d39d690ca9107c1f9d2b7a7744c8181 100644 (file)
@@ -55,7 +55,7 @@ public class SetBasionymHandler extends AbstractHandler implements IHandler {
                                                                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;
index 76d8113ad4fb8f1fb9e5595bda4ccf64d5e914ab..17e4126127560524c23b4cf6713419a1b6aabba0 100644 (file)
@@ -24,6 +24,7 @@ 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.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -70,7 +71,7 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
                        EditorUtil.executeOperation(operation);
 
                } catch (NotDefinedException e) {
-                       logger.warn("Command name not set");
+                       logger.warn("Command name not set"); //$NON-NLS-1$
                }
 
                return null;
@@ -109,7 +110,7 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
                                        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());
                                }
 
                        }
index 0b6fb5125365ebe478767cc8c1390ef7ae1edf6a..cf39304e52ee545996477ed60b01189ac1662a2c 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IStatus;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -59,8 +60,7 @@ public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOpe
                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;
                }
 
@@ -108,7 +108,7 @@ public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOpe
        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;
        }
 }
index 0837e4b2130cfad470d5c0dedcc45d2cd6cac5d0..9f6cec4372a05167a617e963a00e053e781692a9 100644 (file)
@@ -25,6 +25,7 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -41,7 +42,10 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 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;
 
@@ -66,8 +70,7 @@ public class ChangeConceptToSynonymOperation extends
                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;
                }
 
index 3f9fd976a4b6a7c51ed14ba9dd828e91ec7f5570..3832b5c4b058a7bd4034e246d261f72b7d57c3c1 100644 (file)
@@ -62,7 +62,7 @@ public class ChangeHomotypicGroupOperation extends AbstractPostTaxonOperation {
                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();
index 3253f2a7b8081a05dbc5b2cb4c198f95495fefa1..165c1ca5414146b09db5c4f5189381722a14d8e4 100644 (file)
@@ -25,6 +25,7 @@ import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -89,7 +90,7 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
                                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);
@@ -124,7 +125,7 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
                        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);
        }
index b247d8cfe38febf5b6cd066fca6446f4786ce642..aef430fd5d307d2a5251628750c63e07994d38d3 100644 (file)
@@ -16,7 +16,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
@@ -32,7 +34,7 @@ public class CreateSynonymInExistingHomotypicalGroupOperation extends
                AbstractPostTaxonOperation {
 
        private final HomotypicalGroup group;
-       private final NonViralName newSynonymName;
+       private final TaxonNameBase<?,?> newSynonymName;
 
        private Synonym synonym;
 
@@ -47,7 +49,8 @@ public class CreateSynonymInExistingHomotypicalGroupOperation extends
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
        public CreateSynonymInExistingHomotypicalGroupOperation(String label,
-                       IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, NonViralName newSynonymName, IPostOperationEnabled postOperationEnabled) {
+                       IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, 
+                       TaxonNameBase<?,?> newSynonymName, IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, taxon, postOperationEnabled);
                this.group = group;
                this.newSynonymName = newSynonymName;
index caee71329e442155242346cad09b97ff8013e4fc..abf93ef2da43e95dad65d0a8e4aa871cc4ea1446 100644 (file)
@@ -14,16 +14,19 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.IWorkbenchPage;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -32,7 +35,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @author p.ciardelli
  * @created 16.01.2009
  */
-public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
+public class DeleteMisapplicationOperation extends DeleteTaxonBaseOperation {
 
        private final Taxon misapplication;
 
@@ -49,11 +52,12 @@ public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
         * @param misapplication a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
-       public DeleteMisapplicationOperation(String label, IUndoContext undoContext,
-                       Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled) {
-               super(label, undoContext, taxon, postOperationEnabled);
-
+       public DeleteMisapplicationOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,IWorkbenchPage activePage,
+            Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+               //super(label, undoContext, taxon, postOperationEnabled);
+           super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.misapplication = misapplication;
+               this.element = taxon;
        }
 
        /* (non-Javadoc)
@@ -77,7 +81,7 @@ public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
 
                // Remove misapplied name relation from taxon
                element.removeTaxon(misapplication, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
-               ICdmApplicationConfiguration controller;
+               ICdmRepository controller;
 
                controller = CdmStore.getCurrentApplicationConfiguration();
 
@@ -86,7 +90,7 @@ public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
                NameDeletionConfigurator nameConfig = new NameDeletionConfigurator();
                nameConfig.setRemoveAllNameRelationships(true);
                config.setNameDeletionConfig(nameConfig);
-               service.deleteTaxon(misapplication.getUuid(), config, null);
+               result = service.deleteTaxon(misapplication.getUuid(), config, null);
                monitor.worked(40);
 
                return postExecute(null);
@@ -106,6 +110,7 @@ public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
 
                element.addMisappliedName(misapplication, citation, microcitation);
 
+
                return postExecute(misapplication);
        }
 }
index 2ae7758a324c62141f84b0c702cc719786371e9d..13e5fc202bfdd4fddaafda2ca5a529bfc4d492c9 100644 (file)
@@ -16,10 +16,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.ui.IWorkbenchPage;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymType;
@@ -53,6 +54,7 @@ public class DeleteSynonymOperation extends DeleteTaxonBaseOperation {
                        Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
                super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
                this.synonym = synonym;
+               this.element = taxon;
        }
 
        /** {@inheritDoc} */
@@ -65,22 +67,16 @@ public class DeleteSynonymOperation extends DeleteTaxonBaseOperation {
                monitor.worked(20);
 
                // Remove synonym from taxon
-               ICdmApplicationConfiguration controller;
+               ICdmRepository controller;
 
                controller = CdmStore.getCurrentApplicationConfiguration();
 
                ITaxonService service = controller.getTaxonService();
-               if (synonym.getId() == 0){
-                       element.removeSynonym(synonym);
 
-               } else {
-                       //TODO: this should be moved to the handler, the operations should not contain ui code
-                       setResult(service.deleteSynonym(synonym.getUuid(), null));
 
-               }
-       //      taxon.removeSynonym(synonym);
-//                             CdmStore.getTaxonService().deleteSynonymRelationships(synonym);
-//                             CdmStore.getTaxonService().delete(synonym);
+               result = service.deleteSynonym(synonym.getUuid(), (SynonymDeletionConfigurator)configurator);
+
+
 
                monitor.worked(40);
 
index 856844db3fa644eb4f65d7396719f44167407d43..434cc5756ea6d984c3f9ab29dd8e8d42071ab994 100644 (file)
@@ -10,7 +10,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.ui.IWorkbenchPage;\r
 \r
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;\r
+import eu.etaxonomy.cdm.api.application.ICdmRepository;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;\r
@@ -63,7 +63,7 @@ public class DeleteTaxonOperation extends DeleteTaxonBaseOperation{
                                bind();\r
 \r
 \r
-                               ICdmApplicationConfiguration controller;\r
+                               ICdmRepository controller;\r
 \r
                                controller = CdmStore.getCurrentApplicationConfiguration();\r
 \r
index 19bee8a222bcfd71a48d4cef893afed26b5797fe..d5e92bac3dc1587194adff45774800a0fdb6b7a8 100644 (file)
@@ -48,13 +48,13 @@ public class MoveSynonymToAnotherAcceptedTaxonOperation extends
 \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
index 352d7bee1da4d41064113930e0f9641357076bef..e458e81109460fc78666c137295a0c3cbffefaa4 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.api.service.UpdateResult;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -50,7 +51,7 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
        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;
        }
@@ -81,7 +82,7 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation
        @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;
        }
 }
index 4a5f2cdf9c418562126660f3694008e4ef91db16..0eb220c49becf62c0f7266082e572b3042eb207e 100644 (file)
@@ -42,12 +42,12 @@ import eu.etaxonomy.cdm.model.validation.Severity;
  */\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
@@ -56,35 +56,35 @@ public class MarkerManager {
     /**\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
index 0d0a52a3d15647837a1888d68b71f3a4058b6058..2cf683edf3432aad3ca1243b2be4df9e7eeee6a2 100644 (file)
@@ -10,6 +10,7 @@ import org.eclipse.core.runtime.jobs.Job;
 \r
 import eu.etaxonomy.cdm.api.service.IEntityValidationService;\r
 import eu.etaxonomy.cdm.model.validation.EntityValidation;\r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
@@ -34,7 +35,7 @@ public class ValidationDaemon extends Job {
 \r
 \r
        public ValidationDaemon(){\r
-               super("Running validation daemon");\r
+               super(Messages.ValidationDaemon_RUNNING_DAEMON);\r
                entityValidationService = CdmStore.getService(IEntityValidationService.class);\r
        }\r
 \r
@@ -67,11 +68,11 @@ public class ValidationDaemon extends Job {
                                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
index 36becdcbd8f6e9e0369fcce35716aa1b32838ae8..aa6329c3efb39bfbd4a1f7b4dbbef180e5818da2 100644 (file)
@@ -63,6 +63,7 @@ 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.SimpleSelectionProvider;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.checklist.edit.DistributionEditingSupport;
 import eu.etaxonomy.taxeditor.editor.view.checklist.filter.ChecklistEditorFilter;
 import eu.etaxonomy.taxeditor.editor.view.checklist.listener.ChecklistDropdownSelectionListener;
@@ -87,15 +88,14 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @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 {
@@ -121,8 +121,8 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         @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>();
 
@@ -153,7 +153,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
      * 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;
 
@@ -227,11 +227,10 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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;
                }
@@ -287,11 +286,11 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
      */
     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;
     }
 
@@ -301,8 +300,8 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     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();
@@ -310,7 +309,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
        private void createToolbarItems() {
                dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
-               
+
         for (DefinedTermBase<DefinedTermBase> term : terms) {
             if(term!=null){
                 dropListener.add(term);
@@ -325,7 +324,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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);
     }
 
@@ -334,10 +333,10 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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);
         }
 
@@ -457,7 +456,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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
@@ -465,11 +464,11 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
             // 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);
         }
     }
 
@@ -478,10 +477,10 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     public void dispose() {
        this.checklistEditorInput.dispose();
        super.dispose();
-        
+
         conversation.unregisterForDataStoreChanges(this);
         conversation.unbind();
-       
+
         //conversation.close();
                conversation = null;
     }
@@ -505,7 +504,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         // 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);
@@ -558,7 +557,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
                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();
     }
@@ -624,7 +623,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
     @Override
     public void doSave(IProgressMonitor monitor) {
         try {
-            monitor.beginTask("Saving Editor", 1);
+            monitor.beginTask(Messages.ChecklistEditor_SAVE_EDITOR, 1);
             if (!conversation.isBound()) {
                 conversation.bind();
             }
@@ -649,7 +648,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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);
         }
@@ -748,11 +747,11 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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)
@@ -840,6 +839,6 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
         return conversation;
     }
-    
-    
+
+
 }
index b877872834f44235f4350e83958510e050352865..2a12b86995d8420e333d0a464aae087f82b01d67 100644 (file)
@@ -247,44 +247,44 @@ public class ChecklistEditorInput extends CdmEntitySessionInput implements IEdit
     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;
index 2bcd051ca76dd1109e9cffcde78126f41f9eb951..ac08013098266061e39964e46e9909f1b6bf545b 100644 (file)
@@ -50,7 +50,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 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;
@@ -168,16 +168,16 @@ public class ChecklistLabelProvider extends LabelProvider implements ITableLabel
 
     }
 
-    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>();
index 87e13f225992879839317ba4181a269d0dea84a4..3e2643c2c5ec1dc721524f843502d240ae90a18c 100644 (file)
@@ -107,8 +107,8 @@ public final class DistributionEditingSupport extends EditingSupport {
         }
     }
 
-    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$
 
     /**
      *
index 60a61384c6046f3a36e78e6e1af0563a3f2e601a..87d428f97210e52bb4eb8b5bbcd31fdc41c1c80d 100644 (file)
@@ -14,10 +14,10 @@ public class ChecklistEditorFilter extends ViewerFilter {
 
     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
index 3e8c2fff2a02d7961b80b0ae06ab540bc51e9b03..780f72cc13742a7af45e9c02b16c9138621df7fd 100644 (file)
@@ -76,10 +76,10 @@ public class CreateDescriptionElementHandler extends AbstractHandler {
                 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;
index 1547ca1ac3fdff1e7fc1b9f07952bd81b4cc6c0b..a772e2b3e31ebb714c7555b15219fcbf09fe344f 100644 (file)
@@ -62,7 +62,7 @@ public class CreateDescriptionHandler extends AbstractHandler {
                            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
@@ -73,7 +73,7 @@ public class CreateDescriptionHandler extends AbstractHandler {
                            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$
                        }
                    }
                }
index 9e58f2d1d297448eef315ca5b0d67cad6f0d4244..e0576c34da573f839169327ff9103098d3da9cdc 100644 (file)
@@ -54,9 +54,9 @@ public class OpenDistributionHandler extends AbstractHandler {
         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$
     });
 
 
index 59d78fb616c68262ae91301168b7c36f5f54b9f4..bbf7b848c6ee833ef813f35c0751e9bccfccbb1b 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.ToolItem;
 
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard;
@@ -69,7 +70,7 @@ public class ChecklistDropdownSelectionListener extends SelectionAdapter {
                        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;
@@ -97,7 +98,7 @@ public class ChecklistDropdownSelectionListener extends SelectionAdapter {
 
     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) {
index 6007fe57599a0f07cdcd3752fc2a6fdbdc5fa9b5..b37de5a03853fa44f3b81c22e880af8bce997691 100644 (file)
@@ -6,16 +6,14 @@ import org.eclipse.swt.events.ModifyListener;
 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;
@@ -24,20 +22,20 @@ public class ChecklistFocusListener implements FocusListener{
 
     @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);
         }
index ebcde34e1dd49ee2dd32755995123c55a3a97dd6..4bcecf9e3f25afe7467177f7e5e95f94cf92b217 100644 (file)
@@ -43,7 +43,7 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
                        return formatRelationship((Entry<TaxonRelationship, Taxon>) element);
                }
                
-               return "";
+               return ""; //$NON-NLS-1$
        }
        
        /**
@@ -57,7 +57,7 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
                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;
        }
index 1e10712f426430ed7cb1c015ee1d52cb58a70806..79e9985d356b972ce4ed64def10b0a6d36178bdd 100644 (file)
@@ -30,10 +30,10 @@ import org.eclipse.ui.IWorkbenchPart;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
-import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
index 97188ca14805014bd89416af872dcfaa181ff9cf..7512cc234c030712bd4d0b88da008fe987ff364a 100644 (file)
@@ -30,7 +30,7 @@ public class ConceptGraphLabelProvider extends LabelProvider implements
                } else if( element instanceof TaxonRelationship) {
                        return ((TaxonRelationship)element).getType().getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)).getAbbreviatedLabel();
                }
-               return "TODO";
+               return "TODO"; //$NON-NLS-1$
        }
 
        @Override
index 2866751df28103eeac8d160e390017bf1fad85b4..3ad4d3e844a54dcf226684af17d7ba8e3f4265cf 100644 (file)
@@ -19,8 +19,8 @@ import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
 
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 
 /**
index 228705c8648acc0bd2569ec1e6525861a402f6d4..0b1d801950aa30b4d3fff275d5decc8dfa3e4615 100644 (file)
@@ -70,7 +70,7 @@ public abstract class AbstractDynamicConceptRelationMenu extends ContributionIte
                                        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$
                                        }
                                }
                        });
index ee8f919b0ca6181158236774cd2fe9e7250eba54..d9d8d766161be2779142cb9a13653e4c2a5f6143 100644 (file)
@@ -55,7 +55,7 @@ public class ChangeConceptRelationshipTypeHandler extends AbstractHandler
                                                                                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;
index 5257fd3beed957f1a1516129afee974a77d4a25d..f1161d1e1457611fdcdcf170e2b5a04d10d28776 100644 (file)
@@ -21,7 +21,7 @@ package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 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()
index 66b6d8ee40bd1466aac21ade9951e8a445c188a0..96650239cbae2c8c69468fc354ba0325f58c789f 100644 (file)
@@ -21,7 +21,7 @@ package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 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()
index ee93a777ebe26a6b54eb5b7c1e8060fe5a336ab7..6e945a24fe6df20b09d72e767a55a38edb1a921e 100644 (file)
@@ -88,7 +88,7 @@ public class CreateConceptRelationHandler extends AbstractHandler {
                                        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;
index f0676db9516da78bbdc8beeea0cd66ff8a8a060b..880d1a336c6d48735a07952552df28267ff138dc 100644 (file)
@@ -21,7 +21,7 @@ package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 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()
index 534da87838212fbffdf1b3821ecbc7092bdb738e..179db9fa121c42281fb23c05a7e7f4abc9e539bb 100644 (file)
@@ -70,7 +70,7 @@ public class DeleteConceptRelationHandler extends AbstractHandler {
                                        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;
index 40cc9330745208257304a86d9409073b7da903de..186b25bf6d6a47aeb59c93b58ca7aa2c88fc1243 100644 (file)
@@ -1,28 +1,32 @@
 /**
 * 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.
 */
 
 package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 
-import java.util.Iterator;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.LineSelection;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
@@ -32,38 +36,55 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
  */
 public class OpenRelatedConceptHandler extends AbstractHandler {
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               MultiPageTaxonEditor editor = EditorUtil.getActiveMultiPageTaxonEditor();
-               
                ISelection selection = HandlerUtil.getCurrentSelection(event);
-               
-               if(selection instanceof IStructuredSelection){
-                       IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-                       Iterator iterator = structuredSelection.iterator();
-                       
-                       while (iterator.hasNext()){
-                               Object element = iterator.next();
-                               if(element instanceof TaxonRelationship){
-                                       Taxon relatedTaxon = getRelatedTaxon((TaxonRelationship) element, editor.getTaxon());
-                                       
-                                       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);
-                                       }
-                               }
-                       }
+        TaxonBase<?> relatedTaxon = null;
+
+        if(selection instanceof IStructuredSelection){
+            IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+            Object selectedElement = structuredSelection.getFirstElement();
+
+            if(selectedElement instanceof TaxonRelationship){
+                IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+                if(activeEditor instanceof MultiPageTaxonEditor){
+                    relatedTaxon = getRelatedTaxon((TaxonRelationship) selectedElement, ((MultiPageTaxonEditor) activeEditor).getTaxon());
+                }
+                else if(activeEditor instanceof BulkEditor){
+                    ISelection bulkSelection = ((BulkEditor)activeEditor).getSelectionProvider().getSelection();
+                    if(bulkSelection instanceof LineSelection){
+                        Object firstElement = ((LineSelection)bulkSelection).getFirstElement();
+                        if(firstElement instanceof Taxon){
+                            relatedTaxon = getRelatedTaxon((TaxonRelationship) selectedElement, (Taxon) firstElement);
+                        }
+                    }
+                }
+            }
+        }
+
+               if(relatedTaxon==null){
+                   MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+                           String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), null);
                }
-               
+               else{
+                   openConcept(relatedTaxon);
+               }
+
                return null;
        }
 
-       
+    /**
+     * @param relatedTaxon
+     */
+    protected void openConcept(TaxonBase<?> relatedTaxon) {
+        try {
+            EditorUtil.openTaxonBase(relatedTaxon.getUuid());
+        } catch (PartInitException e) {
+            MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+                    String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), e);
+        }
+    }
+
        private Taxon getRelatedTaxon(TaxonRelationship relationship, Taxon taxon){
                if (relationship.getFromTaxon().equals(taxon)){
                        return relationship.getToTaxon();
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/OpenRelatedConceptInBulkEditorHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/OpenRelatedConceptInBulkEditorHandler.java
new file mode 100644 (file)
index 0000000..1b3e6c1
--- /dev/null
@@ -0,0 +1,21 @@
+package eu.etaxonomy.taxeditor.editor.view.concept.handler;
+
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+
+public class OpenRelatedConceptInBulkEditorHandler extends OpenRelatedConceptHandler{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void openConcept(TaxonBase<?> relatedTaxon) {
+        try {
+            BulkEditorUtil.openEditor(relatedTaxon);
+        } catch (PartInitException e) {
+            MessagingUtils.error(this.getClass(), "Bulk Editor could not be opened for "+relatedTaxon, e);
+        }
+    }
+}
index 7b8664bad8500f150c77e315785af453cefbcdc1..a38272e989ddf02759ae1d873f7714cfd5da6451 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.TransferData;
 
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.operation.MoveDerivateOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
index c5bcfb75a8c4e0d2bdca90719b15eb0220a50bd3..605da7724008ef8065b623dcf69270f2fd54b33e 100644 (file)
@@ -52,8 +52,8 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 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.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.searchFilter.DerivateSearchCompositeController;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
@@ -76,25 +76,27 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
 public class DerivateView extends EditorPart implements IPartContentHasFactualData, IConversationEnabled,
         ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
         IContextListener, ISelectionListener {
+    private static final String SPECIMEN_EDITOR = Messages.DerivateView_SPECIMEN_EDITOR;
+
     public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"; //$NON-NLS-1$
 
     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;
 
     private static final List<String> SPECIMEN_INIT_STRATEGY = Arrays.asList(new String[] {
-            "descriptions",
-            "annotations",
-            "markers",
-            "credits",
-            "extensions",
-            "rights",
-            "sources",
-            "derivationEvents.derivatives.annotations",
-            "derivationEvents.derivatives.markers",
-            "derivationEvents.derivatives.credits",
-            "derivationEvents.derivatives.extensions",
-            "derivationEvents.derivatives.rights",
-            "derivationEvents.derivatives.sources"
+            "descriptions", //$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$
+            "derivationEvents.derivatives.annotations", //$NON-NLS-1$
+            "derivationEvents.derivatives.markers", //$NON-NLS-1$
+            "derivationEvents.derivatives.credits", //$NON-NLS-1$
+            "derivationEvents.derivatives.extensions", //$NON-NLS-1$
+            "derivationEvents.derivatives.rights", //$NON-NLS-1$
+            "derivationEvents.derivatives.sources" //$NON-NLS-1$
     });
 
        private static final int WARN_THRESHOLD = 200;
@@ -254,7 +256,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         //set taxon filter
         derivateSearchCompositeController.setTaxonFilter(((DerivateViewEditorInput) getEditorInput()).getTaxonUuid());
         //reset status bar
-        getEditorSite().getActionBars().getStatusLineManager().setMessage("");
+        getEditorSite().getActionBars().getStatusLineManager().setMessage(""); //$NON-NLS-1$
 
         //add drag'n'drop support
         Transfer[] transfers = new Transfer[] {LocalSelectionTransfer.getTransfer(),};
@@ -323,7 +325,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
             labelProvider.updateLabelCache(rootElements);
             viewer.setInput(rootElements);
 
-            getEditorSite().getActionBars().getStatusLineManager().setMessage(rootElements.size() +" derivative hierarchies found");
+            getEditorSite().getActionBars().getStatusLineManager().setMessage(String.format(Messages.DerivateView_CNT_DERIVATIVES_FOUND, rootElements.size()));
 
             //set selection to derivatives if the filter criteria
             //taxon assignment or derivative type are set
@@ -357,7 +359,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         conversation.commit(true);
 
         CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-        
+
         monitor.worked(1);
 
         this.setDirty(false);
@@ -429,14 +431,14 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
     @Override
     public Map<Object, List<String>> getPropertyPathsMap() {
         List<String> specimenPropertyPaths = Arrays.asList(new String[] {
-                "descriptions",
-                "derivationEvents.derivates",
-                "annotations",
-                "markers",
-                "credits",
-                "extensions",
-                "rights",
-                "sources"
+                "descriptions", //$NON-NLS-1$
+                "derivationEvents.derivates", //$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$
         });
         Map<Object, List<String>> specimenPropertyPathMap =
                 new HashMap<Object, List<String>>();
@@ -558,7 +560,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
                 }
                 checkWarnThreshold(uuids);
                 updateRootEntities(uuids);
-                setPartName("Derivative Editor: " + selectedTaxon.getName());
+                setPartName(SPECIMEN_EDITOR+": " + selectedTaxon.getName()); //$NON-NLS-1$
             }
         }
     }
@@ -579,10 +581,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
        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(Messages.DerivateView_PERF_WARNING, this.getClass(), String.format(Messages.DerivateView_PERF_WARNING_MESSAGE, uuids.size()));
                        uuids.clear();
                }
        }
@@ -604,10 +603,10 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         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+Messages.DerivateView_NO_TAXON_SELECTED);
         }
     }
 
index 5ee63a9833af8dd700c6b44becc92a6fdbb550fd..3a1510c8021b8db662a8c61dc1aa51b2b6ace587 100644 (file)
@@ -16,6 +16,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IPersistableElement;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
 /**
  * Editor input for the {@link DerivateView}
  *
@@ -87,7 +89,7 @@ public class DerivateViewEditorInput implements IEditorInput {
     }
 
     private String getEditorName() {
-        return "Derivative Editor";
+        return Messages.DerivateViewEditorInput_SPECIMEN_EDITOR;
     }
 
 }
index 74229d4109c5e57941a3365e7ecb591a99a7ab05..77e0069cb2c9308f9ee365e7c8691c920d6dedeb 100644 (file)
@@ -11,7 +11,7 @@ public class DerivativeEditorPropertyTester extends PropertyTester {
     @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;
index cbdd50c782dbedc1c2ef97249e53a95fc7503e2f..0d9d17e821a70e3c61581c59a0ef6db8830a6ff5 100644 (file)
@@ -28,7 +28,7 @@ import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
index 09a52a28831990c75919f588d8dc4b6a94d0229c..922450ac3d478b8045e831c853e3bf2f6ce0e71a 100644 (file)
@@ -20,7 +20,7 @@ import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
index 15fa005f198a9d33a78a4ba52b657ca0a4110706..068f249d27734be13e42e9fc17772ee19f219a1e 100644 (file)
@@ -12,6 +12,7 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.CompoundContributionItem;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 
@@ -33,10 +34,10 @@ public class ListenToSelectionChangeContextMenu extends CompoundContributionItem
                             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));
index 055cac1327d7032bf8c8facf560ba5a135bfff25..e7a0de1a218c090ff3ca6260a14457fc98f862c0 100644 (file)
@@ -27,6 +27,7 @@ import eu.etaxonomy.cdm.model.molecular.Sequence;
 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.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.operation.DeleteDerivateOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -73,12 +74,12 @@ public class DeleteDerivateHandler extends AbstractHandler {
                     }
                 }
                 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;
     }
index 1d1dbde7bb79a5f10e34f16830bc574fbdd24cfb..d5f71eea9bcbc9dcfaaf68b426e13768de07d92a 100644 (file)
@@ -12,6 +12,7 @@ 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.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -31,7 +32,7 @@ public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandle
     @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();
@@ -40,7 +41,7 @@ public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandle
             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);
             }
         }
 
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java
new file mode 100644 (file)
index 0000000..627fc9a
--- /dev/null
@@ -0,0 +1,42 @@
+package eu.etaxonomy.taxeditor.editor.view.derivate.handler;
+
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
+import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+public class OpenDerivativeEditorForSpecimenOrOBservationBase extends DefaultOpenHandlerBase<SpecimenOrObservationBase<?>>{
+
+    protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected SpecimenOrObservationBase<?> getEntity(UUID uuid) {
+        return CdmStore.getService(IOccurrenceService.class).load(uuid);
+    }
+
+    @Override
+    protected void open(ExecutionEvent event, SpecimenOrObservationBase<?> entity) {
+        try {
+            EditorUtil.open(new DerivateViewEditorInput(entity.getUuid()));
+        } catch (PartInitException e) {
+            MessagingUtils.error(OpenDerivateViewHandler.class, OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
+        }
+
+    }
+
+
+
+}
index fbaa4e8773e7699920a2d96a85ce2b6762f105c1..bfbe2333de2a463aa11ab73cabe118b81cfb713c 100644 (file)
@@ -15,6 +15,7 @@ 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.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -22,6 +23,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 
 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);
@@ -40,7 +43,7 @@ public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBase<Tax
         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);
         }
 
     }
index 3a02146cc23a6bdff1273bc0d921e3a526dfb51f..d60651bf3f0310e2cd1f1d73e7eae3d0446f45ad 100644 (file)
@@ -28,10 +28,10 @@ public class SingleReadHandler extends AbstractHandler {
         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;
@@ -50,7 +50,7 @@ public class SingleReadHandler extends AbstractHandler {
                     }
                 }
             }
-            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;
index f5956fa1bebf439a99de347d0b52c9efb07a8d8f..8a9d90226a15ea75c54fa77ed1dc72747678ad09 100644 (file)
@@ -25,13 +25,13 @@ import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  *
index 5a113cca63700b51f66eb6456bbf878a6c2d004f..fe4de88ffb8cc9ed70b74bf26cc91c26cde7fbf8 100644 (file)
@@ -29,8 +29,8 @@ import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
index fd2f4b45226558dcd2bba18be5c2255db918c175..32056502dde863bb2ac6e4dcb356845def7277c6 100644 (file)
@@ -20,6 +20,8 @@ import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.wb.swt.ResourceManager;
 
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
 /**
  * The widgets of the {@link DerivateSearchView}<br>
  *
@@ -54,28 +56,28 @@ public class DerivateSearchComposite extends Composite {
         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);
@@ -84,15 +86,15 @@ public class DerivateSearchComposite extends Composite {
 
         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));
@@ -100,7 +102,7 @@ public class DerivateSearchComposite extends Composite {
 
         buttonSearch = new Button(this, SWT.NONE);
         formToolkit.adapt(buttonSearch, true, true);
-        buttonSearch.setText("Search");
+        buttonSearch.setText(Messages.DerivateSearchComposite_SEARCH);
 
     }
 
index 3bf8a8f7460d07f3f38db0e88ec9c22974add882..bf84e9529d65a510d65b457c03dec54775ad0d1a 100644 (file)
@@ -115,7 +115,7 @@ public class DerivateSearchCompositeController implements Listener{
         }
         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);
@@ -156,7 +156,7 @@ public class DerivateSearchCompositeController implements Listener{
      */
     public void reset(){
         if(!derivateSearchComposite.isDisposed()){
-            derivateSearchComposite.getSearchField().setText("");
+            derivateSearchComposite.getSearchField().setText(""); //$NON-NLS-1$
             derivateSearchComposite.getComboDerivateType().deselectAll();
             comboSpecimenTypeController.setSelection(SpecimenOrObservationType.Unknown);
         }
index 7ab4c9b8f9481d5852b9b960d7986686d854615c..50072f040ff7630ee5356c5759fd50c7b8d6f926 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.swt.dnd.TransferData;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
@@ -31,7 +32,9 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  */
 public class DescriptionElementDropAdapter extends ViewerDropAdapter {
 
-       /**
+    private static final String OPERATION_NOT_SUPPORTED_YET = Messages.DescriptionElementDropAdapter_NOT_SUPPORTED;
+
+    /**
         * @param viewer
         */
        public DescriptionElementDropAdapter(Viewer viewer) {
@@ -54,7 +57,7 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
                if (droppedElements != null){
                        for (Object droppedElement : droppedElements) {
                                if (droppedElement == null){
-                                       MessagingUtils.warningDialog("Operation not supported yet", this, "We are currently unable to drag and drop a newly created element. Please save the editor to make this work.");
+                                       MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT);
                                        return false;
                                }
                                if(! (droppedElement instanceof DescriptionElementBase)){
@@ -70,12 +73,12 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
                                }
                        }
 
-                       AbstractPostOperation operation = new MoveDescriptionElementsOperation("Move Descriptions", EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
+                       AbstractPostOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
 
                        EditorUtil.executeOperation(operation);
                        return true;
                }
-               MessagingUtils.warningDialog("Operation not supported yet", this, "We are unable to drag and drop empty descriptions");
+               MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT);
 
                return false;
 
index 9f125ce6839ff8bc835fcc63be164c48403b4808..005f1199ff6435fa53fdd8887a226273b45975d1 100644 (file)
@@ -24,7 +24,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class DescriptionElementTransfer extends CdmObjectTransfer<DescriptionElementBase> {
 
        private static DescriptionElementTransfer instance = new DescriptionElementTransfer();
-       private static final String TYPE_NAME = "descriptionElement-transfer-format";
+       private static final String TYPE_NAME = "descriptionElement-transfer-format"; //$NON-NLS-1$
        private static final int TYPEID = registerType(TYPE_NAME);
        
        public static synchronized DescriptionElementTransfer getInstance(){
index b0aeb0f4d0b1727c19d85ae5d2cbf08d4eecbc1c..86657ea7d26641776fc597da6d13e1b17d4baa36 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.jface.viewers.Viewer;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.cdm.model.description.IDescribable;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
@@ -24,7 +23,6 @@ import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
 import eu.etaxonomy.taxeditor.store.UsageTermCollection;
 
 /**
@@ -94,13 +92,46 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
 
                     @Override
                     public int compare(IndividualsAssociation o1, IndividualsAssociation o2) {
-                        if(o1==null || o1.getAssociatedSpecimenOrObservation()==null){
-                            return -1;
+                        if(o1==null){
+                            if(o2==null){
+                                return 0;
+                            }
+                            else{
+                                return -1;
+                            }
                         }
-                        if(o2==null || o2.getAssociatedSpecimenOrObservation()==null){
+                        else if(o2==null){
                             return 1;
                         }
-                        return o1.getAssociatedSpecimenOrObservation().compareTo(o2.getAssociatedSpecimenOrObservation());
+
+                        if(o1.getAssociatedSpecimenOrObservation()==null){
+                            if(o2.getAssociatedSpecimenOrObservation()==null){
+                                return 0;
+                            }
+                            else{
+                                return -1;
+                            }
+                        }
+                        else if(o2.getAssociatedSpecimenOrObservation()==null){
+                            return 1;
+                        }
+
+                        String titleCache1 = o1.getAssociatedSpecimenOrObservation().getTitleCache();
+                        String titleCache2 = o2.getAssociatedSpecimenOrObservation().getTitleCache();
+
+                        if(titleCache1==null){
+                            if(titleCache2==null){
+                                return 0;
+                            }
+                            else{
+                                return -1;
+                            }
+                        }
+                        if(titleCache2==null){
+                            return 1;
+                        }
+
+                        return titleCache1.compareTo(titleCache2);
                     }
                 });
                                if(showOnlyIndividualAssociations){
index c5fd8e15c5cffa5bbdeb50ab377803820bc41e12..6e180d34baf38b4abc576216f5f0aab2ade09d17 100644 (file)
@@ -44,7 +44,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
index 87a8c470a09858d2c1fc68635e7292f3d1b97051..28a23aac871269c111572fca5a493cfae10bb941 100644 (file)
@@ -76,10 +76,10 @@ public class CreateDescriptionElementHandler extends AbstractHandler {
                 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;
index 46bd2d8e5db03737631009a402871612d97214a7..fa5ff0f9097f0d2a4d0ab0d3bdbd9b46c97aaf11 100644 (file)
@@ -64,7 +64,7 @@ public class CreateDescriptionHandler extends AbstractHandler {
                            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
@@ -75,7 +75,7 @@ public class CreateDescriptionHandler extends AbstractHandler {
                            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$
                        }
                    }
                    if(viewerInput instanceof TaxonBase){
@@ -83,7 +83,7 @@ public class CreateDescriptionHandler extends AbstractHandler {
                                operation = createTaxonOperation(event.getCommand().getName(), (Taxon) 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$
                             }
                        
                    }
index 49ce24e91c3677c9053895a13c4a88f8d108e7c4..19fc669d10874a2a91f9823fa603cc632558a468 100644 (file)
@@ -32,6 +32,7 @@ import eu.etaxonomy.cdm.model.description.SpecimenDescription;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteSpecimenDescriptionOperation;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteTaxonDescriptionOperation;
@@ -43,7 +44,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  * <p>DeleteDescriptionHandler class.</p>
@@ -105,7 +106,7 @@ public class DeleteHandler extends AbstractHandler {
                     MediaDeletionConfigurator config = new MediaDeletionConfigurator();
 
                     DeleteConfiguratorDialog dialog;
-                    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), Messages.DeleteHandler_CONFIRM_DELETION,  null,  Messages.DeleteHandler_CONFIRM_DELETION_MESSAGE, MessageDialog.WARNING, new String[] { Messages.DeleteHandler_DELETE, Messages.DeleteHandler_SKIP }, 0);
                     int result_dialog= dialog.open();
                     if (result_dialog != Status.OK){
                         return null;
@@ -123,7 +124,7 @@ public class DeleteHandler extends AbstractHandler {
 
                                }
                                else{
-                                       MessagingUtils.error(getClass(), "Selection is not valid for this delete handler", null);
+                                       MessagingUtils.error(getClass(), Messages.DeleteHandler_INVALID_SELECTION, null);
                                }
                        }
 
@@ -133,7 +134,7 @@ public class DeleteHandler extends AbstractHandler {
                        }
 
                } catch (NotDefinedException e) {
-                       MessagingUtils.warn(getClass(), "Command name not set.");
+                       MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
                }
 
 
index 3030ef4a3c1f33e295c00e5a8000bdb0a67c33f5..d47ff90060aebabf05a0c00d154ed211199b87e9 100644 (file)
@@ -25,16 +25,16 @@ import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
  */
 public class DescriptionsMenuPropertyTester extends PropertyTester {
 
-       private static final String MEDIA = "isMedia";
-       private static final String FEATURE_NODE_CONTAINER = "isFeatureNodeContainer";
-       private static final String DESCRIPTION = "isDescription";
-       private static final String INDIVIDUALS_ASSOCIATION = "isIndividualsAssociation";
-       private static final String DESCRIPTION_ELEMENT = "isDescriptionElement";
-       private static final String DELETABLE = "isDeletable";
-       private static final String IMAGE_GALLERY = "isImageGallery";
-       private static final String TAXON_EDITOR = "isTaxonEditor";
-       private static final String BULK_EDITOR = "isBulkEditor";
-       private static final String DERIVATE_EDITOR = "isDerivateEditor";
+       private static final String MEDIA = "isMedia"; //$NON-NLS-1$
+       private static final String FEATURE_NODE_CONTAINER = "isFeatureNodeContainer"; //$NON-NLS-1$
+       private static final String DESCRIPTION = "isDescription"; //$NON-NLS-1$
+       private static final String INDIVIDUALS_ASSOCIATION = "isIndividualsAssociation"; //$NON-NLS-1$
+       private static final String DESCRIPTION_ELEMENT = "isDescriptionElement"; //$NON-NLS-1$
+       private static final String DELETABLE = "isDeletable"; //$NON-NLS-1$
+       private static final String IMAGE_GALLERY = "isImageGallery"; //$NON-NLS-1$
+       private static final String TAXON_EDITOR = "isTaxonEditor"; //$NON-NLS-1$
+       private static final String BULK_EDITOR = "isBulkEditor"; //$NON-NLS-1$
+       private static final String DERIVATE_EDITOR = "isDerivateEditor"; //$NON-NLS-1$
 
        /* (non-Javadoc)
         * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
index e890373893486a88f7ae5bf1ffaf46d0f5df16d2..d601247edfb386c0f51ddf55acf8c8f81e88922d 100644 (file)
@@ -35,6 +35,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
@@ -103,7 +104,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                        }
                        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                                        editor.getConversationHolder(),
-                                       "Choose the accepted taxon",
+                                       Messages.MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON,
                                        excludeTaxa,
                                        null, classification
                                        );
@@ -116,7 +117,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                        }
                        newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();
 
-                       String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
+                       String moveMessage = String.format(Messages.MoveDescriptionElementsHandler_ELEMENTS_MOVED, EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
 
                        try {
                                AbstractPostOperation operation = new MoveDescriptionElementsOperation(
@@ -158,7 +159,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                                        MessagingUtils.error(this.getClass(), e);
                                        throw new RuntimeException(e);
                                } catch (Exception e) {
-                                       MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                                       MessagingUtils.warningDialog(Messages.MoveDescriptionElementsHandler_CREATE_FAILURE, this, e.getMessage());
                                }
                        }
 
index c51d0ee05057162159b7c88b79b87eb7e48262cb..f67ef5112ee9939f607975d14beb184c45105039 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionToOtherTaxonOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
@@ -65,7 +66,7 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                editor = EditorUtil.getActiveMultiPageTaxonEditor();
                if (this.editor.isDirty()){
                    boolean proceed = MessageDialog.openQuestion(null,
-                          "Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");
+                          Messages.MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES, Messages.MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE);
                if (proceed) {
                    editor.doSave(EditorUtil.getMonitor());
                } else {
@@ -113,7 +114,7 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
             }
                        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                                        editor.getConversationHolder(),
-                                       "Choose the accepted taxon",
+                                       Messages.MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON,
                                        excludeTaxa,
                                        node,
                                        classification);
@@ -137,7 +138,7 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                                }
 
                        } catch (NotDefinedException e) {
-                               logger.warn("Command name not set");
+                               logger.warn("Command name not set"); //$NON-NLS-1$
                        }
                }
 
@@ -167,7 +168,7 @@ public class MoveDescriptionToOtherTaxonHandler extends AbstractHandler
                                        MessagingUtils.error(this.getClass(), e);
                                        throw new RuntimeException(e);
                                } catch (Exception e) {
-                                       MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                                       MessagingUtils.warningDialog(Messages.MoveDescriptionToOtherTaxonHandler_CREATE_FAILED, this, e.getMessage());
                                }
                        }
 
index 40312990cb7feed9f8eb2aff84df829ea897707f..ef29bffed076698158c4892c3fdb9b3e9121ecf3 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -33,7 +34,9 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  */
 public class AddDerivedUnitFacadeMediaOperation extends AbstractPostTaxonOperation {
 
-       private final SpecimenOrObservationBase<?> specimen;
+    private static final String ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE = Messages.AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE;
+    private static final String IMAGE_GALLERY_CREATION_FAILED = Messages.AddDerivedUnitFacadeMediaOperation_CREATE_FAILED;
+    private final SpecimenOrObservationBase<?> specimen;
 
        /**
         * @param label
@@ -57,7 +60,7 @@ public class AddDerivedUnitFacadeMediaOperation extends AbstractPostTaxonOperati
                    if(specimen instanceof FieldUnit){
                        facade = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) specimen);
                        if(facade.hasFieldObjectImageGallery()){
-                           MessagingUtils.informationDialog("Image gallery creation failed", "Only one image gallery is possible.");
+                           MessagingUtils.informationDialog(IMAGE_GALLERY_CREATION_FAILED, ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE);
                            return Status.CANCEL_STATUS;
                        }
                        else{
@@ -67,7 +70,7 @@ public class AddDerivedUnitFacadeMediaOperation extends AbstractPostTaxonOperati
                    else if(specimen instanceof DerivedUnit){
                        facade = DerivedUnitFacade.NewInstance((DerivedUnit)specimen);
                        if(facade.hasDerivedUnitImageGallery()){
-                           MessagingUtils.informationDialog("Image gallery creation failed", "Only one image gallery is possible.");
+                           MessagingUtils.informationDialog(IMAGE_GALLERY_CREATION_FAILED, ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE);
                            return Status.CANCEL_STATUS;
                        }
                        else{
index a16125b363d537438780edb3807aeb6a6c9b0241..0f4ca8b202a4ab851c0759fe63c202f8c25a131f 100644 (file)
@@ -40,7 +40,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 public class CreateDescriptionElementOperation extends AbstractPostTaxonOperation {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.descripti"{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement"; //$NON-NLS-1$
 
        private final DescriptionBase<?> description;
        private final Feature feature;
@@ -94,7 +94,7 @@ public class CreateDescriptionElementOperation extends AbstractPostTaxonOperatio
                monitor.worked(20);
                if (element == null) {
                        if (feature.isSupportsCommonTaxonName()) {
-                               element = CommonTaxonName.NewInstance("", null);
+                               element = CommonTaxonName.NewInstance("", null); //$NON-NLS-1$
                        }
                        else if (feature.isSupportsDistribution()) {
                                element = Distribution.NewInstance();
index e68834fb0656d74b93fbd9c6e7ec9a3d00fc1517..cf8e10e2012e1f471e5d61a10218fa89310785be 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @date 04.12.2013
  *
  */
-public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase<?>, DescriptionBase> {
+public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase, DescriptionBase> {
 
     /**
      * @param label
index 54834bac6d64e36e4b180ffe62a6ce1595a2fb8d..9ee81413a730cb0377e2c2ca154e4f4f9e1c3389 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -64,7 +65,7 @@ public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperatio
 
                // Remove element from description
                if (description == null) {
-                       MessagingUtils.error(this.getClass(), "Couldn't find element's description!", null);
+                       MessagingUtils.error(this.getClass(), Messages.DeleteDescriptionElementOperation_DESC_NOT_FOUND, null);
                } else {
                        description.removeElement(element);
                }
index 5e22395994911bd4e22815af039833f0303b36dd..9e998fd1ebbdfeb3c9ece1ac983daa6523eda067 100644 (file)
@@ -20,7 +20,7 @@ public class EditInXper2Handler extends AbstractHandler {
         */\r
        @Override\r
        public Object execute(ExecutionEvent event) throws ExecutionException {\r
-               MessagingUtils.warningDialog("Operation not supported yet", getClass(), "This operation is not supported yet.");\r
+               MessagingUtils.warningDialog("Operation not supported yet", getClass(), "This operation is not supported yet."); //$NON-NLS-1$ //$NON-NLS-2$\r
                return null;\r
        }\r
 \r
index 2b430931c971d04b712fc88ed0ec2cd3394f83c2..d92ab454e4f1a6b436ce8a6e7743a2488c9736f7 100644 (file)
@@ -26,6 +26,7 @@ import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -78,11 +79,11 @@ public class MoveDescriptionToOtherTaxonOperation extends
                monitor.worked(20);
                bind();
 
-               String moveMessage = String.format("Description moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
+               String moveMessage = String.format(Messages.MoveDescriptionToOtherTaxonOperation_MOVED_FROM, EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
                if(description.isProtectedTitleCache()){
-                       String separator = "";
+                       String separator = ""; //$NON-NLS-1$
                        if(!StringUtils.isBlank(description.getTitleCache())){
-                               separator = " - ";
+                               separator = " - "; //$NON-NLS-1$
                        }
                        description.setTitleCache(description.getTitleCache() + separator + moveMessage, true);
                }
index cac33da66c8c76f82addf4fab8b5ebefa53dd1e4..4863ef25411702a7fcc83e8cdbe4bf228749805e 100644 (file)
@@ -58,7 +58,7 @@ public class MediaContentProvider implements ITreeContentProvider{
                        }
                         
                        if(taxon == null){
-                               MessagingUtils.error(getClass(), "Taxon is null", null);
+                               MessagingUtils.error(getClass(), "Taxon is null", null); //$NON-NLS-1$
                                return NO_CHILDREN;
                        }
                        HashSet<DescriptionBase> imageGalleries = new HashSet<DescriptionBase>();
@@ -90,7 +90,7 @@ public class MediaContentProvider implements ITreeContentProvider{
                                }
 
                        } catch (DerivedUnitFacadeNotSupportedException e) {
-                               MessagingUtils.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e);
+                               MessagingUtils.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e); //$NON-NLS-1$
                        }
                }
                else if (parentElement instanceof FieldUnit){
@@ -138,13 +138,13 @@ public class MediaContentProvider implements ITreeContentProvider{
     public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
 
        private List<Media> getImages(DescriptionBase description){
-               Assert.isTrue(description.isImageGallery(), "Description should have the imageGallery flag set.");
+               Assert.isTrue(description.isImageGallery(), "Description should have the imageGallery flag set."); //$NON-NLS-1$
 
                Set<DescriptionElementBase> elements = description.getElements();
                if (elements != null) {
                        // by definition, image galleries have only one description element
                        if(elements.size() > 1){
-                               MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null);
+                               MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null); //$NON-NLS-1$ //$NON-NLS-2$
                        }
                        if (!elements.isEmpty()){
                                DescriptionElementBase element = elements.iterator().next();
index 2cd347b2b48b0ed6b6fd3d588d2bda32a3090d88..ae339497d2ad13f3a5d5f8a0ee4ee1e5fc466e16 100644 (file)
@@ -28,6 +28,7 @@ import org.eclipse.ui.IWorkbenchPart;
 import eu.etaxonomy.cdm.model.description.IDescribable;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
@@ -44,7 +45,7 @@ import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
  */
 public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData {
 
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.media";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.media"; //$NON-NLS-1$
 
 
        private TreeViewer viewer;
@@ -153,6 +154,6 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
 
        @Override
        protected String getViewName() {
-               return "Media";
+               return Messages.MediaViewPart_MEDIA;
        }
 }
index 097849cf05a2f948fb1f11a7521a65abb12303d2..4367e25774947a917dc5a9cca9ff8def372515a7 100644 (file)
@@ -34,7 +34,7 @@ public class AddExistingMediaHandler extends CreateMediaHandler {
                 AbstractUtility.executeOperation(operation);
             }
         } catch (NotDefinedException e) {
-            MessagingUtils.warn(getClass(), "Command name not set.");
+            MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
         }
     }
 
index 4a2696a50147ea2f375cc8f4ec3ffb3d57b706ab..5f7a22a130202e67e5c0aeca3adaba2685fc72f6 100644 (file)
@@ -59,7 +59,7 @@ public class AddImageGalleryHandler extends AbstractHandler {
                        }
                    }
                } catch (NotDefinedException e) {
-                   MessagingUtils.warn(getClass(), "Command name not set.");
+                   MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
                }
            }
            return null;
index 0bd72b3f1fc6b732b46d0db00bf661e3d95d0bb5..5acff5c536ae366b4de18e14366d694235bc972a 100644 (file)
@@ -83,7 +83,7 @@ public class CreateMediaHandler extends AbstractHandler {
                                EditorUtil.getUndoContext(), 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$
         }
     }
 
index cfb1c3afc8ae4dffc18690cfeec739b7403b50dc..0043016654970ab9d24da623db01e769cc33dcbd 100644 (file)
@@ -23,9 +23,10 @@ import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  * <p>DeleteMediaHandler class.</p>
@@ -71,7 +72,7 @@ public class DeleteMediaHandler extends AbstractHandler {
                 MediaDeletionConfigurator config = new MediaDeletionConfigurator();
 
                 DeleteConfiguratorDialog dialog;
-                dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+                dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), Messages.DeleteMediaHandler_CONFIRM,  null,  Messages.DeleteMediaHandler_CONFIRM_MESSAGE, MessageDialog.WARNING, new String[] { Messages.DeleteMediaHandler_DELETE, Messages.DeleteMediaHandler_SKIP }, 0);
                 int result_dialog= dialog.open();
                 if (result_dialog != Status.OK){
                     return null;
index d822f9a9451d1054397ab94e4bea8ecd071fd3a0..a473d8debbe9b49a61cecbbf5e3de572a752bba2 100644 (file)
@@ -75,7 +75,7 @@ public class MoveImageDownInListHandler extends AbstractHandler {
                                                        EditorUtil.getUndoContext(), taxon, description, media, MoveMediaInListOperation.DOWN, postOperationEnabled);
                                        EditorUtil.executeOperation(operation);
                                } catch (NotDefinedException e) {
-                                       MessagingUtils.warn(getClass(), "Command name not set.");
+                                       MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
                                }
                        }
                } 
index 6fbd6be1d65f997b5cc5ca39a8e23f92f125bbb9..ea525d205f9ee5f2d9e943fc1fff544bad591763 100644 (file)
@@ -74,7 +74,7 @@ public class MoveImageUpInListHandler extends AbstractHandler {
                                                        EditorUtil.getUndoContext(), taxon, element, media, MoveMediaInListOperation.UP, postOperationEnabled);
                                        EditorUtil.executeOperation(operation);
                                } catch (NotDefinedException e) {
-                                       MessagingUtils.warn(getClass(), "Command name not set.");
+                                       MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
                                }
                        }
                } 
index 1b02b432cd60b3e2203021a805fd8630968203b4..d2dffa56d1428f32968e76f4c7f9019f7279465c 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -107,7 +108,7 @@ public class MoveMediaInListOperation extends AbstractPostTaxonOperation {
                Set<DescriptionElementBase> elements = description.getElements();
                
                if(elements.size() != 1){
-                       MessagingUtils.error(this.getClass(), "More than one description element in this image gallery", null);
+                       MessagingUtils.error(this.getClass(), Messages.MoveMediaInListOperation_MORE_DESC, null);
                }
                
                DescriptionElementBase element = elements.iterator().next();
index 795faa16ed88d4a0e92940f5b95068099e069dca..d0d1ccb85dbd89f1340312ba6794301cdd5220f5 100644 (file)
@@ -1,8 +1,8 @@
 /**\r
 * Copyright (C) 2011 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \r
+*\r
 * The contents of this file are subject to the Mozilla Public License Version 1.1\r
 * See LICENSE.TXT at the top of this package for the full license terms.\r
 */\r
@@ -22,30 +22,36 @@ import eu.etaxonomy.cdm.model.description.CategoricalData;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
 import eu.etaxonomy.cdm.model.description.StateData;\r
 import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 import eu.etaxonomy.taxeditor.store.UsageTermCollection;\r
 \r
 /**\r
  * UsesLabelProvider Class\r
- * @author a.theys     \r
+ * @author a.theys\r
  * @created mar 13, 2012\r
  * @version 1.0\r
  */\r
 public class UsesLabelProvider extends ColumnLabelProvider implements\r
                IStyledLabelProvider {\r
-       \r
-       /** {@inheritDoc} */\r
-       public String getText(Object element) {\r
-               String text = "";\r
+\r
+    private static final String USE = Messages.UsesLabelProvider_USE;\r
+    private static final String NO_DATA_PROVIDED = Messages.UsesLabelProvider_NO_DATA;\r
+    private static final String SEMICOLON = ";"; //$NON-NLS-1$\r
+\r
+    /** {@inheritDoc} */\r
+       @Override\r
+    public String getText(Object element) {\r
+               String text = ""; //$NON-NLS-1$\r
 \r
                if (element instanceof DescriptionBase) {\r
                        text = ((DescriptionBase) element).getTitleCache();\r
                        if (text == null || text.length() == 0) {\r
-                               text = "Use: No label provided";\r
+                               text = USE+Messages.UsesLabelProvider_NO_LABEL;\r
                        }\r
                        else {\r
-                               text = "Use: " + text;\r
+                               text = USE + text;\r
                        }\r
                }\r
                else if (element instanceof CategoricalData) {\r
@@ -53,104 +59,104 @@ public class UsesLabelProvider extends ColumnLabelProvider implements
                                boolean isUseCategoryAbsent = true;\r
                                for (StateData statedata : ((CategoricalData) element).getStateData()) {\r
                                        if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
-                                               text = text + statedata.getState().getTitleCache() + ";";\r
+                                               text = text + statedata.getState().getTitleCache() + SEMICOLON;\r
                                                isUseCategoryAbsent = false;\r
                                        }\r
                                }\r
                                if(isUseCategoryAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
-                               \r
+\r
                                boolean isUseSubCategoryAbsent = true;\r
                                for (StateData statedata : ((CategoricalData) element).getStateData()) {\r
                                        if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
-                                               text = text + statedata.getState().getTitleCache() + ";";\r
+                                               text = text + statedata.getState().getTitleCache() + SEMICOLON;\r
                                                isUseSubCategoryAbsent = false;\r
                                        }\r
                                }\r
                                if(isUseSubCategoryAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
                        }\r
                        else {\r
-                               text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+                               text = text + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                        }\r
                        if (!((CategoricalData) element).getModifiers().isEmpty()) {\r
                                for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
                                        modifier.getPartOf();\r
                                        modifier.getVocabulary();\r
                                }\r
-                               \r
+\r
                                boolean isPlantPartAbsent = true;\r
                                for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
                                        if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
-                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               text = text +  modifier.getTitleCache()+ SEMICOLON;\r
                                                isPlantPartAbsent = false;\r
                                        }\r
-                                       \r
+\r
                                }\r
                                if (isPlantPartAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
-                               \r
+\r
                                boolean isHumanGroupAbsent = true;\r
                                for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
                                        if(GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel)) {\r
-                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               text = text +  modifier.getTitleCache()+ SEMICOLON;\r
                                                isHumanGroupAbsent = false;\r
                                        }\r
                                }\r
                                if (isHumanGroupAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
-                               \r
+\r
                                boolean isEthnicGroupAbsent = true;\r
                                for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
                                        if(GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) {\r
-                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               text = text +  modifier.getTitleCache()+ SEMICOLON;\r
                                                isEthnicGroupAbsent = false;\r
                                        }\r
                                }\r
                                if (isEthnicGroupAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
-                               \r
+\r
                                boolean isCountryAbsent = true;\r
                                for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
                                        if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
-                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               text = text +  modifier.getTitleCache()+ SEMICOLON;\r
                                                isCountryAbsent = false;\r
                                        }\r
                                }\r
                                if (isCountryAbsent) {\r
-                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                                       text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                                }\r
                        }\r
                        else {\r
-                               text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+                               text = text + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
                        }\r
-               \r
+\r
                        if (text == null || text.length() == 0) {\r
-                               text = "No data provided";\r
+                               text = NO_DATA_PROVIDED;\r
                        }\r
                        else {\r
-                               String[] textElements = text.split(";");\r
-                               String dataportalString = textElements[0] + ";" + textElements[1] + ";" + textElements[5] + ";" + textElements[2] + ";" + textElements[3] + ";" + textElements[4] + ";" ;  \r
-                               \r
+                               String[] textElements = text.split(SEMICOLON);\r
+                               String dataportalString = textElements[0] + SEMICOLON + textElements[1] + SEMICOLON + textElements[5] + SEMICOLON + textElements[2] + SEMICOLON + textElements[3] + SEMICOLON + textElements[4] + SEMICOLON ;\r
+\r
                                ((CategoricalData)element).putModifyingText(CdmStore.getDefaultLanguage(), dataportalString);\r
                        }\r
                        return text;\r
                }\r
-               \r
+\r
                else if (element instanceof TextData) {\r
                        List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});\r
                        LanguageString languageString = ((TextData) element).getPreferredLanguageString(languages);\r
                        text = languageString != null ? languageString.getText() : null;\r
                        if (text == null || text.length() == 0) {\r
-                               text = "No data provided";\r
+                               text = NO_DATA_PROVIDED;\r
                        }\r
                }\r
-               \r
+\r
                else if (element instanceof FeatureNodeContainer){\r
                        text = ((FeatureNodeContainer)element).getFeature().getTitleCache();\r
                }\r
@@ -158,8 +164,8 @@ public class UsesLabelProvider extends ColumnLabelProvider implements
                return  text;\r
        }\r
 \r
-       /** Function dertmining which vocabulary is the term part of \r
-        *  \r
+       /** Function dertmining which vocabulary is the term part of\r
+        *\r
         * @param term\r
         * @param vocabularyExpected\r
         * @return\r
@@ -176,14 +182,14 @@ public class UsesLabelProvider extends ColumnLabelProvider implements
                }\r
        return false;\r
        }\r
-       \r
+\r
        /** {@inheritDoc} */\r
        @Override\r
        public StyledString getStyledText(Object element) {\r
                return new StyledString(this.getText(element),\r
                                StyledString.QUALIFIER_STYLER);\r
        }\r
-       \r
-       \r
+\r
+\r
 \r
 }\r
index 481a39e8b1607499fb9cd4f469083a6881d2ae6e..2e816f3de8369250e9c959e4f436a5dd668b04d4 100644 (file)
@@ -15,7 +15,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Tree;
 
 import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;
index b32d73f224fd0d42c4c576b01598caa172ecbee7..2fd4499540533e2bab0e1f547271486ea35add04 100644 (file)
@@ -26,7 +26,6 @@ import eu.etaxonomy.taxeditor.store.UseObjectStore;
  * CreateTaxonUseOperation Class\r
  * @author a.theys\r
  * @created mar 13, 2012\r
- * @version 1.0\r
  */\r
 public class CreateTaxonUseOperation extends CreateTaxonDescriptionOperation {\r
        private TaxonDescription description;\r
index 28b7b201156482214e34eba1ba6e649449e773a8..270eec97c747dd0110c6b5abca4d5dea3f3bdb7f 100644 (file)
@@ -34,7 +34,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 public class CreateUseRecordOperation extends AbstractPostOperation {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$
        private final DescriptionBase<?> description;
        private final Feature feature;
        private DescriptionElementBase element;
index 80c85db61ccca467cd2e22f646eca1d2a4550610..ac2d6e9d98c3c2fc9c55db57cc540a36be9c5d3c 100644 (file)
@@ -32,7 +32,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  */\r
 public class CreateUseSummaryOperation extends AbstractPostOperation {\r
 \r
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";\r
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$\r
 \r
        private final DescriptionBase<?> description;\r
        private final Feature feature;\r
index 6a13ceb7743fccff99e5fcfa34eff68045d6699f..07449a2e81367febddaba65fe2d320b27a5f56b9 100644 (file)
@@ -13,10 +13,10 @@ public class EntityClassMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_ENTITY_CLASS);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_CLASS);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_CLASS); //$NON-NLS-1$\r
                }\r
        }\r
 }\r
index 40ec33c6208da5b17917d21ac5b574c587710837..397b3948d8f4dfe7c013de9dadd8246e5a6fe8f7 100644 (file)
@@ -13,10 +13,10 @@ public class EntityIdMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_ENTITY_ID);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_ID);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_ID); //$NON-NLS-1$\r
                }\r
        }\r
 }\r
index b82324fe667d1c8b46b4ec1db0bccc1b7f1addcf..1d4f591c1f36a101c460b2046b274973d02f6c1f 100644 (file)
@@ -13,10 +13,10 @@ public class InvalidValueMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_INVALID_VALUE);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_INVALID_VALUE);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_INVALID_VALUE); //$NON-NLS-1$\r
                }\r
        }\r
 }\r
index 0744a066531e6af38a3a57ea24ae819506aefe34..649c66040bc047055b7551075c33c767c09ad8d5 100644 (file)
@@ -13,10 +13,10 @@ public class UserFriendlyDescriptionMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION); //$NON-NLS-1$\r
                }\r
        }\r
 \r
index 97d3db5245e885d45ca32903fc106ff321da44bf..7d25c861bcc316a7d35171c8925c3ce42136deb4 100644 (file)
@@ -13,10 +13,10 @@ public class UserFriendlyFieldNameMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME); //$NON-NLS-1$\r
                }\r
        }\r
 }\r
index 38419dccbbc3244e4bb30b13cae018dfb10e5912..66b664d91b48a6ec7d8c14c3ca4220649f044bc8 100644 (file)
@@ -13,10 +13,10 @@ public class UserFriendlyTypeNameMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME); //$NON-NLS-1$\r
                }\r
        }\r
 }\r
index d81f97bc574b430cce71098b63b9e3aabc0d13dd..2ef42daf06d2e44c42aed9f243b8a6414e5c74f0 100644 (file)
@@ -6,7 +6,7 @@ public class ValidationProblemsView extends MarkerSupportView {
 \r
        public ValidationProblemsView()\r
        {\r
-               super("eu.etaxonomy.taxeditor.editor.validation.ValidationProblemsMarkerGenerator");\r
+               super("eu.etaxonomy.taxeditor.editor.validation.ValidationProblemsMarkerGenerator"); //$NON-NLS-1$\r
        }\r
 \r
        \r
index 9b8aa1249a56a6f4d47d9ebd278bcb45ed9a1213..fbcf2f169e9c10a0da28105cab557e2c7affb0fd 100644 (file)
@@ -13,10 +13,10 @@ public class ValidatorClassMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_VALIDATOR_CLASS);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_CLASS);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_CLASS); //$NON-NLS-1$\r
                }\r
        }\r
 \r
index 970f337c6c18e2d5d700df0eec01860a5e9988c7..da28eb0ed38885915015fee59f594a018d20016e 100644 (file)
@@ -13,10 +13,10 @@ public class ValidatorMessageMarkerField extends MarkerField {
        {\r
                try {\r
                        Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_VALIDATOR_MESSAGE);\r
-                       return value == null ? "" : value.toString();\r
+                       return value == null ? "" : value.toString(); //$NON-NLS-1$\r
                }\r
                catch (CoreException e) {\r
-                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_MESSAGE);\r
+                       throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_MESSAGE); //$NON-NLS-1$\r
                }\r
        }\r
 \r
index 845801570e3e04bacbc7d83162697a1aec267fdb..54edfc2f5b63308009114e8ebb749d9b7028e2af 100644 (file)
@@ -19,6 +19,8 @@ import org.junit.Test;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
@@ -52,7 +54,7 @@ public class ChangeConceptToSynonymOperationTest extends AbstractTaxeditorOperat
        @BeforeClass
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
-               concept = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+               concept = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                homotypicalGroup = HomotypicalGroup.NewInstance();
                
                concept.addTaxonRelation(taxon, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), null, null);
index 60ea9941e06ac82cfa7d9f0d86cacc00a2ce91f0..4581d2db379b5735801fb857f3097c0ee510e19e 100644 (file)
@@ -19,6 +19,8 @@ import org.junit.Test;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation;
@@ -56,7 +58,7 @@ public class ChangeHomotypicGroupOperationTest extends AbstractTaxeditorOperatio
        public static void setUpBeforeClass() throws Exception {
                
                taxon = Taxon.NewInstance(null, null);
-               synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+               synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                
                oldHomotypicalGroup = HomotypicalGroup.NewInstance();
                oldHomotypicalGroup.addTypifiedName(synonym.getName());
index f8b44e7a9f6311233c7bcb30c05226139037cd59..73bfe8bbea4d6ad0357f8adcb977348b0a0dca83 100644 (file)
@@ -17,6 +17,8 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -46,7 +48,7 @@ public class ChangeSynonymToConceptOperationTest extends AbstractTaxeditorOperat
        public static void setUpBeforeClass() throws Exception {
                
                taxon = Taxon.NewInstance(null, null);
-               synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+               synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                taxonRelationshipType = TaxonRelationshipType.CONTRADICTION();
                
                taxon.addSynonym(synonym, SynonymType.SYNONYM_OF());
index bfa101d0086a7adc75584912c6a90a4556fa99a5..915307daa33a56efc09a17cf3d4abb9f781d0af7 100644 (file)
@@ -17,6 +17,8 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -46,7 +48,7 @@ public class ChangeSynonymToMisapplicationOperationTest extends AbstractTaxedito
        @BeforeClass
        public static void setUpBeforeClass() throws Exception {
                taxon = Taxon.NewInstance(null, null);
-               synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+               synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                synonymType = SynonymType.SYNONYM_OF();
                taxon.addSynonym(synonym, synonymType);
                
index 1af244e856f3ea152374ace8d51206ecf0312991..1ee35a3af80c0023ffe26874ef5b441b645dc48a 100644 (file)
@@ -16,6 +16,8 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
@@ -39,11 +41,11 @@ public class CreateSynonymInExisitingHomotypicalGroupOperationTest extends Abstr
        @Before
        public void setUp() throws Exception {
 
-               taxonName = NonViralName.NewInstance(null);
+               taxonName = TaxonNameFactory.NewNonViralInstance(null);
                taxon = Taxon.NewInstance(taxonName, null);
 
                homotypicalGroup = HomotypicalGroup.NewInstance();
-               newSynonymName = NonViralName.NewInstance(null);
+               newSynonymName = TaxonNameFactory.NewNonViralInstance(null);
 
                operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                                                        undoContext, taxon, homotypicalGroup, newSynonymName, postOperation);
index 023fe9dbcb437ba34dfec459f616d3d8e6388393..f08f60535dab7b0ce7bc51a6b1c1276085b0f3ae 100644 (file)
@@ -16,6 +16,7 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
@@ -36,7 +37,7 @@ public class CreateSynonymInNewGroupOperationTest extends AbstractTaxeditorOpera
        public static void setUpBeforeClass() throws Exception {
                
                taxon = Taxon.NewInstance(null, null);
-               newSynonymName = NonViralName.NewInstance(null);
+               newSynonymName = TaxonNameFactory.NewNonViralInstance(null);
                
                operation = new CreateSynonymInNewGroupOperation("Create Synonyma In New Group",  undoContext, taxon, newSynonymName, postOperation);
        }
index 1a39274dc3d99660c422bca9927b8bafdbd0a8e4..4f57c79b53899fa30439b3227479a2f266a0e1c7 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -17,7 +17,6 @@ import org.junit.Test;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation;
 import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
 
 /**
@@ -32,51 +31,52 @@ public class DeleteMisapplicationOperationTest extends AbstractTaxeditorOperatio
        private static Taxon taxon;
 
        private static Taxon misapplication;
-       
+
        /**
         * @throws java.lang.Exception
         */
        @BeforeClass
        public static void setUpBeforeClass() throws Exception {
-               
+
                taxon = Taxon.NewInstance(null, null);
                misapplication = Taxon.NewInstance(null, null);
-               
+
                taxon.addMisappliedName(misapplication, null, null);
-               
-               operation = new DeleteMisapplicationOperation("", undoContext, taxon, misapplication, postOperation);
+
+               operation = new DeleteMisapplicationOperation("", undoContext, null, null, taxon, misapplication, postOperation,  null, null);
+
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
                operation.execute(monitor, info);
-               
+
                Assert.assertTrue(taxon.getMisappliedNames().size() == 0);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.undo(monitor, info);
-               
+
                Assert.assertEquals(misapplication, taxon.getMisappliedNames().toArray(new Taxon[0])[0]);
        }
 
        /**
         * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
-        * @throws ExecutionException 
+        * @throws ExecutionException
         */
        @Test
        public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
                operation.redo(monitor, info);
-               
+
                Assert.assertTrue(taxon.getMisappliedNames().size() == 0);
        }
 
index 36a85811574fa0bdaf02dde2493827f68f323f2c..848fcf555f7ed3759f68124126f67cce77074616 100644 (file)
@@ -20,6 +20,8 @@ import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -71,26 +73,26 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                (new DefaultTermInitializer()).initialize();
 
                // Create the original accepted taxon
-               oldTaxonName = NonViralName.NewInstance(null);
+               oldTaxonName = TaxonNameFactory.NewNonViralInstance(null);
                taxon = Taxon.NewInstance(oldTaxonName, null);
 
 //             // Create its parent taxon
-//             parentTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+//             parentTaxon = Taxon.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
 //             parentTaxon.addTaxonomicChild(taxon, null, null);
 //
 //             // Give it a child taxon
-//             childTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+//             childTaxon = Taxon.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
 //             childTaxon.setTaxonomicParent(taxon, null, null);
 
                // Create a homotypic synonym for the accepted taxon
-               taxon.addHomotypicSynonymName(NonViralName.NewInstance(null));
-//             homotypicSynonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+               taxon.addHomotypicSynonymName(TaxonNameFactory.NewNonViralInstance(null));
+//             homotypicSynonym = Synonym.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
 //             HomotypicalGroup acceptedHomotypicalGroup = HomotypicalGroup.NewInstance();
 //             acceptedHomotypicalGroup.addTypifiedName(oldTaxon.getName());
 //             acceptedHomotypicalGroup.addTypifiedName(homotypicSynonym.getName());
 
                // Create a heterotypic synonym that will be used to create the new accepted taxon
-               oldSynonymName = NonViralName.NewInstance(null);
+               oldSynonymName = TaxonNameFactory.NewNonViralInstance(null);
                oldHeterotypicSynonym = Synonym.NewInstance(oldSynonymName, null);
 //             oldTaxon.addS .addHeterotypicSynonym(oldHeterotypicSynonym, null, null);
                heteroypicalGroup = HomotypicalGroup.NewInstance();
@@ -98,11 +100,11 @@ public class SwapSynonymAndAcceptedOperationTest extends AbstractTaxeditorOperat
                taxon.addSynonym(oldHeterotypicSynonym, SynonymType.HETEROTYPIC_SYNONYM_OF());
 
                // Create a misapplication
-               misapplication = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+               misapplication = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                taxon.addMisappliedName(misapplication, null, null);
 
                // Create a concept relation
-               concept = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+               concept = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
                conceptRelationshipType = TaxonRelationshipType.CONGRUENT_TO();
                concept.addTaxonRelation(taxon, conceptRelationshipType, null, null);
 
index b48681decc388a376250ea62775138db7a3b08c8..8059f630dce33859a37835a483aec6f394103039 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.jre.linux64"
       label="Taxonomic Editor JRE Linux64"
-      version="4.5.1"
+      version="4.6.0"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux"
index 5b4e2e44af6ec3d793139021c58fe3bfab6ad484..224b9dc6f959637e77ce89bf0cf50824f8406df6 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature.jre.linux64</artifactId>
index 1b9421d4e6f8714e0931eed1839bc3b9653b1645..d5d7dce92a67e0f32faf6d4e495bbae459dd7f6b 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.platform"
       label="Taxeditor Dependencies"
-      version="4.5.1"
+      version="4.6.0"
       os="linux,macosx,win32"
       ws="cocoa,gtk,win32"
       arch="x86,x86_64">
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.apache.commons.httpclient"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="com.ibm.icu"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.pb"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.lucene"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.lucene.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.lucene.analysis"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
index 3fffe0c2807406e13336609d3120a330adc3d629..d9f812cab47da1a187905fd48d02eed6c448beb2 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.5.1</version>
+               <version>4.6.0</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
index df074a58d5171fae06cc7a2408fd0b773d2911af..869a2b65897baef5a448ae1103583676161b9a43 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="4.5.1"
+      version="4.6.0"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
index e111a5490a8483a49635a77ece064f2819099730..6018dd44a8cb0773ece96bbc3745a1a9f4683ffb 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index bcb633e0f217f6f4d37080116c3e4137c43e7fcd..4e89763381e5cf2506eac3eaf0a120d367c56a60 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="output" path="target"/>
index a6c3addba9dbaaa3e6914436e3f214abcb167a7b..8b7ba11abb4ba7beea9ae6a660de4ad3b8c57f75 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Help
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
index ead08fddf3fcece0d53465955074e57c4e4d7f00..41625f5b937f20f96167dea17dd7346cb1a700cc 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.5.1</version>
+               <version>4.6.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 3e296041c7761c0aa3419dc3c7805e501757687a..537699369a4c0b822a1658eda5af28f47a6c9109 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry exported="true" kind="lib" path="lib/owlapi-xmlutils-4.1.4.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/commons-collections4-4.1.jar"/>
index 57bab91958af2e0b0b7d93da405e5e7b381b8ebb..301288fcd16c29d7006e3d41421f4fd9e89c87a3 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.molecular.lib
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular.lib;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-ClassPath: .,
  lib/owlapi-xmlutils-4.1.4.jar,
  lib/commons-collections4-4.1.jar,
index 55d10338a8eb012eece902a21acaa3723ab852db..6760040a0ed0a5929fedfea1778047f79a01d6b8 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
 
   <build>
index 6bca977bed3b6d2bc7f202c8a811de4878f0c42b..a9750fff5f29da3075d1f432c920829822e33475 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry kind="src" path="src/test/java"/>
index d9123c23d01343fab94ba0a500da6c3fa3b28b0e..e1ba5e7376e9fbdeaef642aae70888cfc1473a30 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Molecular Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
diff --git a/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages.properties
deleted file mode 100644 (file)
index 607567d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-exportSequenceToFileHandlerIOErrorMessage=An error occurred when trying to export a consensus sequence alignment to the file "%s".
-exportSequenceToFileHandlerIOErrorTitle=I/O error
-exportSequenceToFileHandlerOverwriteTitle=Overwrite file
-exportSequenceToFileHandlerOverwriteText=The file \"%s\" already exists.\n\nDo you want to overwrite it?
-wizardExportAlignmentAppendExtensionButton=Append default extension
-wizardExportAlignmentBrowseButton=Browse...
-wizardExportAlignmentDataLabel=Select the data to export:
-wizardExportAlignmentDescription=Define the output file and format.
-wizardExportAlignmentDestinationLabel=Select the export destination:
-wizardExportAlignmentErrorMissingFileName=The file name must not be empty.
-wizardExportAlignmentErrorMissingSeqLabel=The consensus sequence label must not be empty.
-wizardExportAlignmentErrorNothingToExport=Either single reads or the consensus sequence have to be selected for export.
-wizardExportAlignmentExportConsensusSeqLabel=Export consensus sequence
-wizardExportAlignmentExportFormatLabel=Select the export format:
-wizardExportAlignmentExportSingleReads=Export single reads
-wizardExportAlignmentFileDialogTitle=Export to
-wizardExportAlignmentFileLabel=Alignment file:
-wizardExportAlignmentTitle=Sequence export
-wizardExportAlignmentWarningFileNameStartsDot=File starting with '.' are not supported on all operating systems.
-wizardExportAlignmentwarningMissingExtension=The file name does have a valid extension for the selected format.
-wizardExportAlignmentWarningFileExists=The file already exists and will be overwritten.
-wizardExportAlignmentOptionsDescription=Specify additional export parameters.
-wizardExportAlignmentOptionsTitle=Export options
-wizardExportAlignmentExportedSeqHeading=Specify the sequences to be exported:
-wizardExportAlignmentAdditionalOptionsHeading=Specify additional export options:
-wizardExportAlignmentElongateSeqHeading=Elongate sequences to have equal length with:
-wizardExportAlignmentElongateSeqMissingData=Missing data ('?')"
-wizardExportAlignmentElongateSeqGap=Gap ('-')
diff --git a/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/messages_de.properties
deleted file mode 100644 (file)
index 5eab686..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-exportSequenceToFileHandlerIOErrorMessage=Beim Schreiben der Datei "%s" ist ein Fehler aufgetreten.
-exportSequenceToFileHandlerIOErrorTitle=E/A Fehler
-exportSequenceToFileHandlerOverwriteTitle=Datei Ã¼berschreiben
-exportSequenceToFileHandlerOverwriteText=Die Datei \"%s\" existiert bereits.\n\nSoll sie Ã¼berschrieben werden?
-wizardExportAlignmentAppendExtensionButton=Standarddateiendung anhängen
-wizardExportAlignmentBrowseButton=Durchsuchen...
-wizardExportAlignmentDataLabel=Zu exportierende Daten:
-wizardExportAlignmentDescription=Wählen Sie den Zielort und das Zielformat aus!
-wizardExportAlignmentDestinationLabel=Zieldatei:
-wizardExportAlignmentErrorMissingFileName=Der Dateiname darf nicht leer sein.
-wizardExportAlignmentErrorMissingSeqLabel=Der Name der Konsensussequenz darf nicht leer sein.
-wizardExportAlignmentErrorNothingToExport=Es müssen entweder die einzelnen Reads oder die Konsensussequenz zum Export ausgewählt werden.
-wizardExportAlignmentExportConsensusSeqLabel=Konsensussequenz exportieren
-wizardExportAlignmentExportFormatLabel=Zielformat:
-wizardExportAlignmentExportSingleReads=Einzelne Reads exportieren
-wizardExportAlignmentFileDialogTitle=Exportieren nach
-wizardExportAlignmentFileLabel=Alignment Datei:
-wizardExportAlignmentTitle=Sequenzexport
-wizardExportAlignmentWarningFileNameStartsDot=Dateinamen, die mit einem '.' beginnen, werden nicht auf allen Betriebssystemen unterstützt.
-wizardExportAlignmentwarningMissingExtension=Der momentane Dateiname hat keine zum aktuellen Format passende Endung.
-wizardExportAlignmentWarningFileExists=The existiert bereits und würde Ã¼berschrieben.
-wizardExportAlignmentOptionsDescription=Geben Sie weitere Exportparameter an!
-wizardExportAlignmentOptionsTitle=Exportoptionen
-wizardExportAlignmentExportedSeqHeading=Zu exportierende Sequenzen:
-wizardExportAlignmentAdditionalOptionsHeading=Erweiterte Exportoptionen:
-wizardExportAlignmentElongateSeqHeading=Sequenzen auf einheitliche Länge bringen mit:
-wizardExportAlignmentElongateSeqMissingData=Fehlende Daten ('?')"
-wizardExportAlignmentElongateSeqGap=Lücke ('-')
index 24c56950ef07854961e69b5ed82b84c25c163f40..b659618ffbbeb66a817a0514ff388654c587899a 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/Messages.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/Messages.java
deleted file mode 100644 (file)
index 3907483..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (C) 2016 EDIT
- * 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.
- */
-package eu.etaxonomy.taxeditor.molecular;
-
-
-import org.eclipse.osgi.util.NLS;
-
-
-
-/**
- * Provides messages and texts for classes of the molecular plugin.
- *
- * @author Ben Stöver
- * @date 17.11.2016
- */
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
-
-
-    public static String exportSequenceToFileHandlerIOErrorMessage;
-    public static String exportSequenceToFileHandlerIOErrorTitle;
-    public static String exportSequenceToFileHandlerOverwriteTitle;
-    public static String exportSequenceToFileHandlerOverwriteText;
-
-    public static String wizardExportAlignmentAppendExtensionButton;
-    public static String wizardExportAlignmentBrowseButton;
-    public static String wizardExportAlignmentDataLabel;
-    public static String wizardExportAlignmentDescription;
-    public static String wizardExportAlignmentDestinationLabel;
-    public static String wizardExportAlignmentErrorMissingFileName;
-    public static String wizardExportAlignmentErrorMissingSeqLabel;
-    public static String wizardExportAlignmentErrorNothingToExport;
-    public static String wizardExportAlignmentExportConsensusSeqLabel;
-    public static String wizardExportAlignmentExportFormatLabel;
-    public static String wizardExportAlignmentExportSingleReads;
-    public static String wizardExportAlignmentFileDialogTitle;
-    public static String wizardExportAlignmentFileLabel;
-    public static String wizardExportAlignmentOptionsDescription;
-    public static String wizardExportAlignmentOptionsTitle;
-    public static String wizardExportAlignmentTitle;
-    public static String wizardExportAlignmentWarningFileNameStartsDot;
-    public static String wizardExportAlignmentwarningMissingExtension;
-    public static String wizardExportAlignmentWarningFileExists;
-    public static String wizardExportAlignmentExportedSeqHeading;
-    public static String wizardExportAlignmentAdditionalOptionsHeading;
-    public static String wizardExportAlignmentElongateSeqHeading;
-    public static String wizardExportAlignmentElongateSeqMissingData;
-    public static String wizardExportAlignmentElongateSeqGap;
-
-
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {}
-}
index 41a6b82e139ab0fe2c06b9315a91c183520c8bcc..20c1ae1b2d2057e8d82e07cbf1991b71ae33ef7a 100644 (file)
@@ -9,34 +9,6 @@
 package eu.etaxonomy.taxeditor.molecular.editor;
 
 
-import info.bioinfweb.commons.swt.SWTUtils;
-import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
-import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
-import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
-import info.bioinfweb.libralign.dataarea.implementations.ConsensusSequenceArea;
-import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
-import info.bioinfweb.libralign.dataarea.implementations.sequenceindex.SequenceIndexArea;
-import info.bioinfweb.libralign.editsettings.EditSettingsChangeEvent;
-import info.bioinfweb.libralign.editsettings.EditSettingsListener;
-import info.bioinfweb.libralign.model.AlignmentModel;
-import info.bioinfweb.libralign.model.AlignmentModelChangeListener;
-import info.bioinfweb.libralign.model.adapters.StringAdapter;
-import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
-import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
-import info.bioinfweb.libralign.model.events.TokenChangeEvent;
-import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
-import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
-import info.bioinfweb.libralign.model.tokenset.TokenSet;
-import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
-import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
-import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
-import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel;
-import info.bioinfweb.libralign.pherogram.model.ShiftChange;
-import info.bioinfweb.libralign.pherogram.provider.BioJavaPherogramProvider;
-import info.bioinfweb.libralign.pherogram.provider.PherogramProvider;
-import info.bioinfweb.libralign.pherogram.provider.ReverseComplementPherogramProvider;
-import info.bioinfweb.tic.SWTComponentFactory;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -76,8 +48,36 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.handler.ToggleInsertOverwriteHandler;
 import eu.etaxonomy.taxeditor.molecular.handler.ToggleLeftRightInsertionHandler;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
+import info.bioinfweb.commons.swt.SWTUtils;
+import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
+import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
+import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
+import info.bioinfweb.libralign.dataarea.implementations.ConsensusSequenceArea;
+import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+import info.bioinfweb.libralign.dataarea.implementations.sequenceindex.SequenceIndexArea;
+import info.bioinfweb.libralign.editsettings.EditSettingsChangeEvent;
+import info.bioinfweb.libralign.editsettings.EditSettingsListener;
+import info.bioinfweb.libralign.model.AlignmentModel;
+import info.bioinfweb.libralign.model.AlignmentModelChangeListener;
+import info.bioinfweb.libralign.model.adapters.StringAdapter;
+import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
+import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
+import info.bioinfweb.libralign.model.events.TokenChangeEvent;
+import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
+import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
+import info.bioinfweb.libralign.model.tokenset.TokenSet;
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
+import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
+import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
+import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel;
+import info.bioinfweb.libralign.pherogram.model.ShiftChange;
+import info.bioinfweb.libralign.pherogram.provider.BioJavaPherogramProvider;
+import info.bioinfweb.libralign.pherogram.provider.PherogramProvider;
+import info.bioinfweb.libralign.pherogram.provider.ReverseComplementPherogramProvider;
+import info.bioinfweb.tic.SWTComponentFactory;
 
 
 
@@ -92,15 +92,15 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
  * @date 04.08.2014
  */
 public class AlignmentEditor extends EditorPart {
-    public static final String ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor";
+    public static final String ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor"; //$NON-NLS-1$
 
        public static final int READS_AREA_INDEX = 1;
     public static final int EDITABLE_CONSENSUS_AREA_INDEX = READS_AREA_INDEX + 1;
     public static final int CONSENSUS_HINT_AREA_INDEX = EDITABLE_CONSENSUS_AREA_INDEX + 1;
        public static final int PHEROGRAM_AREA_INDEX = 0;
        public static final int CONSENSUS_DATA_AREA_INDEX = 0;
-       public static final String DEFAULT_READ_NAME_PREFIX = "Read ";
-       public static final String CONSENSUS_NAME = "Consensus";
+       public static final String DEFAULT_READ_NAME_PREFIX = "Read "; //$NON-NLS-1$
+       public static final String CONSENSUS_NAME = "Consensus"; //$NON-NLS-1$
 
 
     private final ConversationHolder conversationHolder;
@@ -299,18 +299,18 @@ public class AlignmentEditor extends EditorPart {
     private void createTestContents() {
                // Just for testing:
                try {
-                       addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR430_JR-P01.ab1").toURI(), false);
+                       addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR430_JR-P01.ab1").toURI(), false); //$NON-NLS-1$
             //addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR444_JR-P05.ab1").toURI(), false);
-            addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/Test_qualityScore.scf").toURI(), false);
+            addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/Test_qualityScore.scf").toURI(), false); //$NON-NLS-1$
 
                        // Add test consensus sequence:
                        AlignmentModel consensusModel = getEditableConsensusArea().getAlignmentModel();
                        String id = consensusModel.addSequence(CONSENSUS_NAME);
                        Collection<Object> tokens = new ArrayList<Object>();  // First save tokens in a collection to avoid GUI updated for each token.
-                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A"));
-                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C"));
-                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("G"));
-                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("T"));
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A")); //$NON-NLS-1$
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C")); //$NON-NLS-1$
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("G")); //$NON-NLS-1$
+                       tokens.add(consensusModel.getTokenSet().tokenByRepresentation("T")); //$NON-NLS-1$
                        consensusModel.insertTokensAt(id, 0, tokens);
                }
                catch (Exception e) {
@@ -337,7 +337,7 @@ public class AlignmentEditor extends EditorPart {
                                cdmMap.put(id, singleReadAlignment);
                        }
                        catch (Exception e) {  // Usually due to an error while trying to read the pherogram (e.g. due to an unsupported format or an invalid URI).
-                MessagingUtils.errorDialog("Error", null, "A single read was skipped because of the following error:\n\n" +
+                MessagingUtils.errorDialog(Messages.AlignmentEditor_ERROR_SINGLE_READ, null, Messages.AlignmentEditor_ERROR_SINGLE_READ_MESSAGE +
                         e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID, e, false);
                        }
                }
@@ -372,8 +372,8 @@ public class AlignmentEditor extends EditorPart {
                        }
                }
                else {
-                       throw new IllegalArgumentException("The editor input must have the type " +
-                                       AlignmentEditorInput.class.getCanonicalName());  //TODO What should be done here?
+                       throw new IllegalArgumentException(String.format(Messages.AlignmentEditor_MUST_HAVE_TYPE,
+                                       AlignmentEditorInput.class.getCanonicalName()));  //TODO What should be done here?
                }
        }
 
@@ -390,10 +390,10 @@ public class AlignmentEditor extends EditorPart {
 
        private void updateStatusBar() {
         IActionBars bars = getEditorSite().getActionBars();
-        bars.getStatusLineManager().setMessage("Edit mode: " +
-                       (getReadsArea().getEditSettings().isInsert() ? "Insert" : "Overwrite") + "  " +
-                       "Insertion in pherogram: " +
-                       (getReadsArea().getEditSettings().isInsertLeftInDataArea() ? "Left" : "Right"));  //TODO multi language
+        bars.getStatusLineManager().setMessage(
+                Messages.AlignmentEditor_EDIT_MODE + (getReadsArea().getEditSettings().isInsert() ? Messages.AlignmentEditor_INSERT : Messages.AlignmentEditor_OVERWRITE) + "  " + //$NON-NLS-1$
+                       Messages.AlignmentEditor_INSERTION_PHEROGRAM +
+                       (getReadsArea().getEditSettings().isInsertLeftInDataArea() ? Messages.AlignmentEditor_LEFT : Messages.AlignmentEditor_RIGHT));  //TODO multi language
     }
 
 
@@ -411,7 +411,7 @@ public class AlignmentEditor extends EditorPart {
     @Override
     public void doSave(IProgressMonitor monitor) {
        if (getEditorInput() instanceof AlignmentEditorInput) {
-               String taskName = "Saving alignment";  //TODO multi language
+               String taskName = Messages.AlignmentEditor_SAVING_ALIGNMENT;  //TODO multi language
             monitor.beginTask(taskName, 3);
 
             //re-loading sequence to avoid session conflicts
@@ -438,7 +438,7 @@ public class AlignmentEditor extends EditorPart {
                        String id = iterator.next();
                        SingleReadAlignment singleRead = cdmMap.get(id);
                        if (singleRead == null) {
-                           throw new InternalError("Creating new reads from AlignmentEditor not implemented.");  //TODO multi language
+                           throw new InternalError(Messages.AlignmentEditor_NEW_READ_FAILURE);  //TODO multi language
                                //TODO Create new read object. => Shall it be allowed to add reads in the alignment editor which are not represented in the CDM tree before the alignment editor is saved?
                                //singleRead = SingleReadAlignment.NewInstance(consensusSequence, singleRead, shifts, editedSequence);
                        }
@@ -537,13 +537,13 @@ public class AlignmentEditor extends EditorPart {
     private String cutPherogram(boolean left) {
         SelectionModel selection = getReadsArea().getSelection();
         if (selection.getCursorHeight() != 1) {
-            return "Cutting pherograms is only possible if exactly one row is selected.";  //TODO multi language
+            return Messages.AlignmentEditor_CUTTING_FAILURE;  //TODO multi language
         }
         else {
             PherogramArea pherogramArea =
                     getPherogramArea(getReadsArea().getSequenceOrder().idByIndex(selection.getCursorRow()));
             if (pherogramArea == null) {
-                return "There is no pherogram attached to the current sequence.";  //TODO multi language
+                return Messages.AlignmentEditor_NO_ATTACHED_PHEROGRAM;  //TODO multi language
             }
             else {
                 if (left) {
@@ -551,7 +551,7 @@ public class AlignmentEditor extends EditorPart {
                         return null;
                     }
                     else {
-                        return "The left end of the selection lies outside the pherogram attached to this sequence.";  //TODO multi language
+                        return Messages.AlignmentEditor_LEFT_END_OUTSIDE;  //TODO multi language
                     }
                 }
                 else {
@@ -559,7 +559,7 @@ public class AlignmentEditor extends EditorPart {
                         return null;
                     }
                     else {
-                        return "The right end of the selection lies outside the pherogram attached to this sequence.";  //TODO multi language
+                        return Messages.AlignmentEditor_RIGHT_END_OUTSIDE;  //TODO multi language
                     }
                 }
             }
index 308e8d6587a35f85afc3c2a18fdc19bd37b94d20..94095996f632606ceb5bda32e746897cafc44c57 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.ui.IPersistableElement;
 import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
@@ -30,7 +31,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @date 04.08.2014
  */
 public class AlignmentEditorInput extends CdmEntitySessionInput implements IEditorInput {
-    private static final String name = "AlignmentEditor";
+    private static final String name = Messages.AlignmentEditorInput_EDITOR_NAME;
 
 
     private final UUID sequenceNodeUuid;
index 71e2c9acdb538683e76dd620b896a90bd35f8568..592b922386c9edf272a01cebb27ff26005b43144 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.ui.PartInitException;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.handler.ShowPherogramHandler;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -44,7 +45,7 @@ public class PherogramMouseListener extends TICMouseAdapter {
                            ShowPherogramHandler.showPherogram(area.getModel());
                        }
                        catch (PartInitException e) {
-                MessagingUtils.errorDialog("Unable to create pherogram view", null, e.getLocalizedMessage(),
+                MessagingUtils.errorDialog(Messages.PherogramMouseListener_UNABLE_TO_CREATE_VIEW, null, e.getLocalizedMessage(),
                         TaxeditorMolecularPlugin.PLUGIN_ID,  e, false);  //TODO set pluginID
                        }
             return true;
index 40c04705f127813e7e9830989a866bfa29b85dc7..3a00a11095e7f03f4749f3132474248342bc3768 100644 (file)
@@ -30,7 +30,7 @@ import org.eclipse.ui.part.ViewPart;
  * @date Nov 20, 2014
  */
 public class PherogramViewPart extends ViewPart {
-    public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView";
+    public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView"; //$NON-NLS-1$
 
     private PherogramView pherogramView = null;
 
index 98205803035aa38a307005ee86efc049a0a21c9d..53d3d7fc804766c5daa1924a947e6af821098d2d 100644 (file)
@@ -1,12 +1,6 @@
 package eu.etaxonomy.taxeditor.molecular.handler;\r
 \r
 \r
-import info.bioinfweb.libralign.alignmentarea.AlignmentArea;\r
-import info.bioinfweb.libralign.alignmentarea.order.SequenceOrder;\r
-import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;\r
-import info.bioinfweb.libralign.model.AlignmentModel;\r
-import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;\r
-\r
 import java.util.ArrayList;\r
 import java.util.List;\r
 import java.util.Map;\r
@@ -20,6 +14,12 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.menus.UIElement;\r
 \r
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+import info.bioinfweb.libralign.alignmentarea.AlignmentArea;\r
+import info.bioinfweb.libralign.alignmentarea.order.SequenceOrder;\r
+import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;\r
+import info.bioinfweb.libralign.model.AlignmentModel;\r
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;\r
 \r
 \r
 \r
@@ -53,7 +53,7 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                                while (scanner.hasNext()) {\r
                                        lines.add(scanner.nextLine());\r
                                }\r
-                               if (lines.get(lines.size() - 1).equals("")) {\r
+                               if (lines.get(lines.size() - 1).equals("")) { //$NON-NLS-1$\r
                                        lines.remove(lines.size() - 1);\r
                                }\r
                        }\r
@@ -69,12 +69,11 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                                        }\r
                                        else {\r
                                                MessageDialog dialog = new MessageDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),  //TODO Can the window be null?\r
-                                                               "Pasting multiple lines", null,\r
-                                                               "The text to be pasted contains mutlitple lines (" + lines.size() +\r
-                                                               ") although the current cursor height is one. What do you want to do?",\r
+                                                               Messages.AlignmentEditorPasteHandler_PASTING_LINES, null,\r
+                                                               String.format(Messages.AlignmentEditorPasteHandler_PASTING_LINES_QUESTION, lines.size()),\r
                                                                MessageDialog.QUESTION,\r
-                                                               new String[]{"Ingnore line breaks and paste as one sequence",\r
-                                                                               "Only paste the first line from the clipboard", "Cancel"},\r
+                                                               new String[]{Messages.AlignmentEditorPasteHandler_PASTING_LINES_IGNORE,\r
+                                                                               Messages.AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE, Messages.AlignmentEditorPasteHandler_CANCEL},\r
                                                                0);\r
                                                //TODO Does the dialog have to be disposed in some way?\r
 \r
@@ -97,12 +96,8 @@ public class AlignmentEditorPasteHandler extends AbstractFocusedAlignmentAreaHan
                                        }\r
                                        else {\r
                                                MessageDialog.openError(HandlerUtil.getActiveWorkbenchWindow(event).getShell(),  //TODO Can the window be null?\r
-                                                               "Unable to paste multiple lines",\r
-                                                               "The current cursor height (" + selection.getCursorHeight() +\r
-                                                               ") does not match the number of lines to be pasted (" + lines.size() + ")." +\r
-                                                               System.getProperty("line.separator") + System.getProperty("line.separator") +\r
-                                                               "You can either change the cursor height accordingly or set the cursor height to one "\r
-                                                               + "allowing you to paste all lines from the clipboad into one sequence.");\r
+                                                               Messages.AlignmentEditorPasteHandler_PASTE_FAILURE,\r
+                                                               String.format(Messages.AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE, selection.getCursorHeight(), lines.size(), System.getProperty("line.separator"))); //$NON-NLS-1$\r
                                        }\r
                                }\r
                        }\r
index 76364366f3ed3b01a523ae37df4385bebf6811b1..34ee74833e75be38acd1758cb292b8fbcdf148f3 100644 (file)
@@ -15,6 +15,7 @@ import org.eclipse.core.commands.ExecutionException;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -30,7 +31,7 @@ public class CutPherogramLeftHandler extends AbstractAlignmentEditorHandler {
     public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
         String errorMessage = editor.cutPherogramLeft();
         if (errorMessage != null) {
-            MessagingUtils.errorDialog("Unable to cut base call sequence", this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
+            MessagingUtils.errorDialog(Messages.CutPherogramLeftHandler_CUT_FAILURE, this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
         }
     }
 }
index 1713af1324001d6cedd7d8e52033fcd5dca48e37..2c7896d9651f4632758ecbcb7928033bd6c79454 100644 (file)
@@ -15,6 +15,7 @@ import org.eclipse.core.commands.ExecutionException;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -30,7 +31,7 @@ public class CutPherogramRightHandler extends AbstractAlignmentEditorHandler {
     public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
         String errorMessage = editor.cutPherogramRight();
         if (errorMessage != null) {
-            MessagingUtils.errorDialog("Unable to cut base call sequence", this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
+            MessagingUtils.errorDialog(Messages.CutPherogramRightHandler_CUT_FAILURE, this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
         }
     }
 }
index 5c26e4a224f9d512724dc357fd0ceb9dbdef3865..c0d646d401042d98c53b7f70935a806c645787a3 100644 (file)
@@ -14,6 +14,7 @@ import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditorInput;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -38,7 +39,7 @@ public class EditSequenceHandler extends AbstractHandler {
                 .getActiveWorkbenchWindow().getActivePage().openEditor(input, AlignmentEditor.ID);
             }
             catch (PartInitException e) {
-                logger.error("Could not open AlignmentEditor", e);
+                logger.error(Messages.EditSequenceHandler_COULD_NOT_OPEN, e);
             }
         }
         return null;
index 928cf8e43aab462626de8dab83d3cf2ae4801149..59d466b0b1a11d65ab1b06d9216cee9f0e120f62 100644 (file)
@@ -32,12 +32,12 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import eu.etaxonomy.cdm.model.molecular.Sequence;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
-import eu.etaxonomy.taxeditor.molecular.Messages;\r
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;\r
 import eu.etaxonomy.taxeditor.molecular.io.CDMPherogramAlignmentObjectTranslator;\r
 import eu.etaxonomy.taxeditor.molecular.io.CDMSequenceMatrixAdapter;\r
 import eu.etaxonomy.taxeditor.molecular.io.SingleReadAlignmentRDFXMLConstants;\r
 import eu.etaxonomy.taxeditor.molecular.io.wizard.ExportSingleReadAlignmentWizard;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
 import eu.etaxonomy.taxeditor.util.ApplicationUtil;\r
 \r
 \r
@@ -67,7 +67,7 @@ public class ExportSequenceToFileHandler extends AbstractHandler {
                 ReadWriteParameterMap parameters = new ReadWriteParameterMap();\r
                 parameters.put(ReadWriteParameterNames.KEY_APPLICATION_NAME, ApplicationUtil.getTitle());\r
                 //parameters.put(ReadWriteParameterNames.KEY_APPLICATION_VERSION, ApplicationUtil.getVersion());  // Setting the version unnecessary, since its already contained in the title.\r
-                parameters.put(ReadWriteParameterNames.KEY_APPLICATION_URL, "http://cybertaxonomy.eu/taxeditor/");  //TODO Specify URL obtained from a central class?\r
+                parameters.put(ReadWriteParameterNames.KEY_APPLICATION_URL, "http://cybertaxonomy.eu/taxeditor/");  //TODO Specify URL obtained from a central class? //$NON-NLS-1$\r
                 parameters.put(ReadWriteParameterNames.KEY_SEQUENCE_EXTENSION_TOKEN, wizard.getModel().getElongationToken());\r
 \r
                 // Create and register object translator for writing pherogram alignment shifts:\r
index b5de48ce3eb818f84dfc7b1cd8d35c114216758c..77792d62f869e46e1809a6390bfed8e7ce0774bb 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -28,12 +29,12 @@ import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 public class HandlerTools {  //TODO Move this class or method somewhere else?
     public static ImageDescriptor createImageDescriptor(String iconName) {
         URL url = FileLocator.find(TaxeditorMolecularPlugin.getDefault().getBundle(),
-                new Path("icons/" + iconName), null);
+                new Path("icons/" + iconName), null); //$NON-NLS-1$
         if (url != null) {
             return ImageDescriptor.createFromURL(url);
         }
         else {
-            throw new InternalError("Icon \"" + iconName + "\" could not be loaded.");  //TODO Throw other type of exception?
+            throw new InternalError(String.format(Messages.HandlerTools_COULD_NOT_LOAD_ICON, iconName));  //TODO Throw other type of exception?
         }
     }
 }
index 97e1b972ee66a282d0f61058f64600e03e770d83..f89d68c3c59247da263e66f543b21fd271e2e904 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -45,9 +46,9 @@ public class LoadPherogramHandler extends AbstractHandler {
             AlignmentEditor alignmentEditor = (AlignmentEditor)activeEditor;
 
             FileDialog fileDialog = new FileDialog(alignmentEditor.getSite().getShell());
-            fileDialog.setText("Import pherogram into contig alignment");
-            fileDialog.setFilterNames(new String[]{"All supported formats", "AB1 pherogram files", "SCF pherogram files", "All files"});
-            fileDialog.setFilterExtensions(new String[]{"*.ab1;*.scf", "*.ab1", "*.scf", "*.*"});
+            fileDialog.setText(Messages.LoadPherogramHandler_IMPORT_PHEROGRAM);
+            fileDialog.setFilterNames(new String[]{Messages.LoadPherogramHandler_ALL_FORMATS, Messages.LoadPherogramHandler_AB1, Messages.LoadPherogramHandler_SCF, Messages.LoadPherogramHandler_ALL});
+            fileDialog.setFilterExtensions(new String[]{"*.ab1;*.scf", "*.ab1", "*.scf", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
             String path = fileDialog.open();
             if (path != null) {
@@ -55,12 +56,12 @@ public class LoadPherogramHandler extends AbstractHandler {
                        alignmentEditor.addRead(new File(path).toURI(), false);
                }
                catch (UnsupportedChromatogramFormatException e) {
-                    MessagingUtils.errorDialog("Unsupported format", this, "The format of the pherogram file \"" + path +
-                               "\" is not supported. (Only AB1 and SCF are supported.)", TaxeditorMolecularPlugin.PLUGIN_ID, e, false);  //TODO set pluginID
+                    MessagingUtils.errorDialog(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT, this,
+                            String.format(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE, path), TaxeditorMolecularPlugin.PLUGIN_ID, e, false);  //TODO set pluginID
                }
                catch (IOException e) {
-                    MessagingUtils.errorDialog("Unsupported format", this,
-                               "An IO error occurred while trying to read the file \"" + path + "\".",
+                    MessagingUtils.errorDialog(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE, this,
+                               Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE + path,
                                TaxeditorMolecularPlugin.PLUGIN_ID, e, false);  //TODO set pluginID
                }
             }
index c4eb1c33c2f578d55eb063bee13e1080a465ce62..1d468b4414a2f12234ee5476553878b6fa09af88 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
 import eu.etaxonomy.taxeditor.molecular.editor.PherogramViewPart;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -48,15 +49,15 @@ public class ShowPherogramHandler extends AbstractHandler {
                            }
 
                            if (uri == null) {
-                       MessagingUtils.messageDialog("No pherogram available", this,
-                               "The selected read does not have an associated pherogram.");
+                       MessagingUtils.messageDialog(Messages.ShowPherogramHandler_NO_PHEROGRAM, this,
+                               Messages.ShowPherogramHandler_NO_PHEROGRAM_MESSAGE);
                            }
                            else {
                      showPherogram(new PherogramComponentModel(AlignmentEditor.readPherogram(uri)));
                            }
                        }
                catch (Exception e) {
-                   MessagingUtils.errorDialog("Error", null, e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID,
+                   MessagingUtils.errorDialog(Messages.ShowPherogramHandler_ERROR, null, e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID,
                            e, false);
                }
         }
index e94a290c29c97e82298bfb39f17d7f1742c4de38..cff86d73431a7e993c8e2f4d9573cd971148c3e5 100644 (file)
@@ -23,6 +23,7 @@ import org.eclipse.ui.menus.UIElement;
 
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -34,11 +35,11 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
  */
 public class ToggleInsertOverwriteHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
        public static final String COMMAND_ID =
-                       "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite";
+                       "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"; //$NON-NLS-1$
 
 
-    private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png");
-    private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png");
+    private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png"); //$NON-NLS-1$
+    private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png"); //$NON-NLS-1$
 
 
     @Override
@@ -53,13 +54,13 @@ public class ToggleInsertOverwriteHandler extends AbstractAlignmentEditorHandler
                if (activeEditor instanceof AlignmentEditor) {
                        if (((AlignmentEditor)activeEditor).isInsertMode()) {
                            element.setIcon(INSERT_DESCRIPTOR);
-                               element.setText("INS");
-                               element.setTooltip("Click to switch to overwrite mode");
+                               element.setText("INS"); //$NON-NLS-1$
+                               element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_OVERWRITE);
                        }
                        else {
                 element.setIcon(OVERWRITE_DESCRIPTOR);
-                               element.setText("OVR");
-                               element.setTooltip("Click to switch to insertion mode");
+                               element.setText("OVR"); //$NON-NLS-1$
+                               element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_INSERTION);
                        }
             ((ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class)).refreshElements(
                     ToggleLeftRightInsertionHandler.COMMAND_ID, null);
index 291e72c7ecbca2201517ce1cd93f39ec09682912..9dbf660e507d9479f4f854a2d674988e974d05dc 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.ui.menus.UIElement;
 
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -31,17 +32,17 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
  * @date 04.12.2014
  */
 public class ToggleLeftRightInsertionHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
-    public static final String COMMAND_ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion";
+    public static final String COMMAND_ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion"; //$NON-NLS-1$
 
 
     private final ImageDescriptor INSERT_LEFT_DESCRIPTOR =
-            HandlerTools.createImageDescriptor("pherogram-insert-left-16x16.png");
+            HandlerTools.createImageDescriptor("pherogram-insert-left-16x16.png"); //$NON-NLS-1$
     private final ImageDescriptor INSERT_RIGHT_DESCRIPTOR =
-            HandlerTools.createImageDescriptor("pherogram-insert-right-16x16.png");
+            HandlerTools.createImageDescriptor("pherogram-insert-right-16x16.png"); //$NON-NLS-1$
     private final ImageDescriptor INSERT_LEFT_DISABLED_DESCRIPTOR =
-            HandlerTools.createImageDescriptor("pherogram-insert-left-disabled-16x16.png");
+            HandlerTools.createImageDescriptor("pherogram-insert-left-disabled-16x16.png"); //$NON-NLS-1$
     private final ImageDescriptor INSERT_RIGHT_DISABLED_DESCRIPTOR =
-            HandlerTools.createImageDescriptor("pherogram-insert-right-disabled-16x16.png");
+            HandlerTools.createImageDescriptor("pherogram-insert-right-disabled-16x16.png"); //$NON-NLS-1$
 
 
     @Override
@@ -58,14 +59,14 @@ public class ToggleLeftRightInsertionHandler extends AbstractAlignmentEditorHand
             if (((AlignmentEditor)activeEditor).isInsertLeftInPherogram()) {
                 element.setIcon(INSERT_LEFT_DESCRIPTOR);
                 element.setDisabledIcon(INSERT_LEFT_DISABLED_DESCRIPTOR);
-                element.setText("Left");
-                element.setTooltip("Switch to insert pherogram distorsions right of future edits.");
+                element.setText(Messages.ToggleLeftRightInsertionHandler_LEFT);
+                element.setTooltip(Messages.ToggleLeftRightInsertionHandler_SWITCH_RIGHT);
             }
             else {
                 element.setIcon(INSERT_RIGHT_DESCRIPTOR);
                 element.setDisabledIcon(INSERT_RIGHT_DISABLED_DESCRIPTOR);
-                element.setText("Right");
-                element.setTooltip("Switch to insert pherogram distorsions left of future edits.");
+                element.setText(Messages.ToggleLeftRightInsertionHandler_RIGHT);
+                element.setTooltip(Messages.ToggleLeftRightInsertionHandler_SWITCH_LEFT);
             }
         }
     }
index 31457fc2904c7018ed3d81c1e86fc272fdfb16d7..e3ea35a7505756ce40398753a592c13bb80432e8 100644 (file)
@@ -23,6 +23,7 @@ import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
 import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
@@ -47,7 +48,7 @@ public class CDMPherogramAlignmentObjectTranslator extends AbstractXMLObjectTran
             throws IOException, XMLStreamException, InvalidObjectSourceDataException {
 
         // TODO implement
-        throw new InternalError("Not implemented.");
+        throw new InternalError(Messages.CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED);
     }
 
 
index 68d6ac13e14417b990896ffbd711a194e5b5286d..8f40acaad4b69167a455edd16c3ca65e0ea11b06 100644 (file)
 package eu.etaxonomy.taxeditor.molecular.io;\r
 \r
 \r
+import java.io.IOException;\r
+import java.net.URI;\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+\r
+import javax.xml.namespace.QName;\r
+\r
+import eu.etaxonomy.cdm.model.molecular.Sequence;\r
+import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;\r
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
 import info.bioinfweb.commons.bio.CharacterStateSetType;\r
 import info.bioinfweb.commons.io.W3CXSConstants;\r
 import info.bioinfweb.commons.text.StringUtils;\r
@@ -27,19 +40,6 @@ import info.bioinfweb.jphyloio.events.TokenSetDefinitionEvent;
 import info.bioinfweb.jphyloio.events.type.EventContentType;\r
 import info.bioinfweb.jphyloio.utils.JPhyloIOWritingUtils;\r
 \r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-\r
-import javax.xml.namespace.QName;\r
-\r
-import eu.etaxonomy.cdm.model.molecular.Sequence;\r
-import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;\r
-import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
-\r
 \r
 \r
 /**\r
@@ -52,9 +52,11 @@ import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
  * @date 29.04.2016\r
  */\r
 public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter implements ReadWriteConstants, SingleReadAlignmentRDFXMLConstants {\r
-    public static final String MATRIX_ID = DEFAULT_MATRIX_ID_PREFIX + "ContigAlignment";\r
-    public static final String SINGLE_READ_SEQUENCE_ID_PREFIX = DEFAULT_SEQUENCE_ID_PREFIX + "SingleRead";\r
-    public static final String CONSENSUS_SEQUENCE_ID= DEFAULT_SEQUENCE_ID_PREFIX + "Consensus";\r
+\r
+    private static final String NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND = Messages.CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND;\r
+    public static final String MATRIX_ID = DEFAULT_MATRIX_ID_PREFIX + "ContigAlignment"; //$NON-NLS-1$\r
+    public static final String SINGLE_READ_SEQUENCE_ID_PREFIX = DEFAULT_SEQUENCE_ID_PREFIX + "SingleRead"; //$NON-NLS-1$\r
+    public static final String CONSENSUS_SEQUENCE_ID= DEFAULT_SEQUENCE_ID_PREFIX + "Consensus"; //$NON-NLS-1$\r
 \r
 \r
     private Sequence sequence;\r
@@ -79,8 +81,7 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
     public CDMSequenceMatrixAdapter(Sequence sequence, String consensusSequenceLabel, boolean exportConsensus, boolean exportSingleReads) {\r
         super();\r
         if (!exportConsensus && !exportSingleReads) {\r
-            throw new IllegalArgumentException("Either exportConsensus or exportSingleReads must be true. "\r
-                    + "Otherwise no sequences would be contained in this matrix.");\r
+            throw new IllegalArgumentException(Messages.CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE);\r
         }\r
         else {\r
             this.sequence = sequence;\r
@@ -131,7 +132,7 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
 \r
     @Override\r
     public LinkedLabeledIDEvent getStartEvent(ReadWriteParameterMap parameters) {\r
-        return new LinkedLabeledIDEvent(EventContentType.ALIGNMENT, MATRIX_ID, "Contig alignment", null);\r
+        return new LinkedLabeledIDEvent(EventContentType.ALIGNMENT, MATRIX_ID, "Contig alignment", null); //$NON-NLS-1$\r
                 //TODO Use label according to derivate and markers.\r
     }\r
 \r
@@ -180,7 +181,7 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
             return getCDMSequence().getSequenceString().length();\r
         }\r
         else {\r
-            throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+            throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
         }\r
     }\r
 \r
@@ -189,14 +190,14 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
     public LinkedLabeledIDEvent getSequenceStartEvent(ReadWriteParameterMap parameters, String sequenceID) {\r
         int singleReadIndex = extractSingleReadIndexFromID(sequenceID);\r
         if (singleReadIndex >= 0) {\r
-            return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, "Single read " + singleReadIndex, null);\r
+            return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, "Single read " + singleReadIndex, null); //$NON-NLS-1$\r
                     //TODO Use name displayed in derivate hierarchy or specified name as label instead?\r
         }\r
         else if (exportConsensus && CONSENSUS_SEQUENCE_ID.equals(sequenceID)) {\r
             return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, consensusSequenceLabel, null);\r
         }\r
         else {\r
-            throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+            throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
         }\r
     }\r
 \r
@@ -210,7 +211,7 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
 \r
 \r
     private String createMetadataID(String sequenceID, QName predicate) {\r
-        return sequenceID + "META" + predicate.getLocalPart();\r
+        return sequenceID + "META" + predicate.getLocalPart(); //$NON-NLS-1$\r
     }\r
 \r
 \r
@@ -256,7 +257,7 @@ public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter
             writeStringPart(receiver, getCDMSequence().getSequenceString(), startColumn, endColumn);\r
         }\r
         else {\r
-            throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+            throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
         }\r
     }\r
 \r
index 4f573f4866e573e4c85dc9ca0f25c38f1a6bbb2e..82ceebf7d054f9ac72c6f8cad77e472982bf8728 100644 (file)
@@ -12,6 +12,8 @@ package eu.etaxonomy.taxeditor.molecular.io;
 import java.util.Iterator;\r
 import java.util.NoSuchElementException;\r
 \r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+\r
 \r
 \r
 /**\r
@@ -55,13 +57,13 @@ class SequenceIDIterator implements Iterator<String> {
             return CDMSequenceMatrixAdapter.CONSENSUS_SEQUENCE_ID;\r
         }\r
         else {\r
-            throw new NoSuchElementException("There are no more sequence IDs availble from this iterator.");\r
+            throw new NoSuchElementException(Messages.SequenceIDIterator_NO_MORE_SEQUENCES);\r
         }\r
     }\r
 \r
 \r
     @Override\r
     public void remove() {\r
-        throw new UnsupportedOperationException("This iterator does not support removing elements.");\r
+        throw new UnsupportedOperationException(Messages.SequenceIDIterator_REMOVE_NOT_SUPPORTED);\r
     }\r
 }\r
index 2eaa3de41ffdf415adc7f5b4a7c50fd1cb30f238..01a555ee3fa5fe99d4d4b29e4d76c714bbe1a6a8 100644 (file)
@@ -21,26 +21,26 @@ import javax.xml.namespace.QName;
  * @date 27.10.2016
  */
 public interface SingleReadAlignmentRDFXMLConstants {
-    public static final String NAMESPACE_URI_PREFIX = "http://bioinfweb.info/xmlns/PhyDE/ReadAlignment/";  //TODO Possibly change this namespace, when according decision is made.
-    public static final String PREDICATE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "Predicates/";
-    public static final String PREDICATE_NAMESPACE_PREFIX = "ra";
-    public static final String DATA_TYPE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "DataTypes/";
-    public static final String DATA_TYPE_NAMESPACE_PREFIX = "radt";
-    public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "PherogramAlignment/";
-    public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX = "pha";
-
-    public static final QName PREDICATE_IS_SINGLE_READ = new QName(PREDICATE_NAMESPACE_URI, "isSingleRead", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_IS_CONSENSUS_SEQUENCE = new QName(PREDICATE_NAMESPACE_URI, "isConsensus", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_IS_REVERSE_COMPLEMENTED = new QName(PREDICATE_NAMESPACE_URI, "isRCed", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_HAS_PHEROGRAM = new QName(PREDICATE_NAMESPACE_URI, "hasPherogram", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_HAS_PHEROGRAM_ALIGNMENT = new QName(PREDICATE_NAMESPACE_URI, "hasPherogramAlignment", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_HAS_LEFT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasLeftCutPosition", PREDICATE_NAMESPACE_PREFIX);
-    public static final QName PREDICATE_HAS_RIGHT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasRightCutPosition", PREDICATE_NAMESPACE_PREFIX);
-
-    public static final QName DATA_TYPE_PHERORAGM_ALIGNMENT = new QName(DATA_TYPE_NAMESPACE_URI, "pherogramAlignment", DATA_TYPE_NAMESPACE_PREFIX);
-
-    public static final QName TAG_SHIFTS = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shifts", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
-    public static final QName TAG_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
-    public static final QName ATTR_POSITION = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "pos", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
-    public static final QName ATTR_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
+    public static final String NAMESPACE_URI_PREFIX = "http://bioinfweb.info/xmlns/PhyDE/ReadAlignment/";  //TODO Possibly change this namespace, when according decision is made. //$NON-NLS-1$
+    public static final String PREDICATE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "Predicates/"; //$NON-NLS-1$
+    public static final String PREDICATE_NAMESPACE_PREFIX = "ra"; //$NON-NLS-1$
+    public static final String DATA_TYPE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "DataTypes/"; //$NON-NLS-1$
+    public static final String DATA_TYPE_NAMESPACE_PREFIX = "radt"; //$NON-NLS-1$
+    public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "PherogramAlignment/"; //$NON-NLS-1$
+    public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX = "pha"; //$NON-NLS-1$
+
+    public static final QName PREDICATE_IS_SINGLE_READ = new QName(PREDICATE_NAMESPACE_URI, "isSingleRead", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_IS_CONSENSUS_SEQUENCE = new QName(PREDICATE_NAMESPACE_URI, "isConsensus", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_IS_REVERSE_COMPLEMENTED = new QName(PREDICATE_NAMESPACE_URI, "isRCed", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_HAS_PHEROGRAM = new QName(PREDICATE_NAMESPACE_URI, "hasPherogram", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_HAS_PHEROGRAM_ALIGNMENT = new QName(PREDICATE_NAMESPACE_URI, "hasPherogramAlignment", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_HAS_LEFT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasLeftCutPosition", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName PREDICATE_HAS_RIGHT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasRightCutPosition", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+
+    public static final QName DATA_TYPE_PHERORAGM_ALIGNMENT = new QName(DATA_TYPE_NAMESPACE_URI, "pherogramAlignment", DATA_TYPE_NAMESPACE_PREFIX); //$NON-NLS-1$
+
+    public static final QName TAG_SHIFTS = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shifts", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName TAG_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName ATTR_POSITION = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "pos", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+    public static final QName ATTR_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
 }
index 357e31e9bd4c795cdafcfeea4fcd1d585310be90..0c1a4d62f7ff7b8b1b8ae3ba609beeab62455660 100644 (file)
@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
-import eu.etaxonomy.taxeditor.molecular.Messages;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
index 704ac9ce7c0d2416bc77dd8ced3f303589330b51..d93b9521c42c60453f3f4f658aea79c3af7b1ca9 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 
-import eu.etaxonomy.taxeditor.molecular.Messages;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
 
 
 
index 4c8667aa347e282a02efb3bcfd27c08b311d5728..9aebe4dd90e61c6e97f5dbfbafb685c25b9c1e5b 100644 (file)
@@ -12,6 +12,8 @@ package eu.etaxonomy.taxeditor.molecular.io.wizard;
 \r
 import org.eclipse.jface.wizard.Wizard;\r
 \r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+\r
 \r
 \r
 /**\r
@@ -28,7 +30,7 @@ public class ExportSingleReadAlignmentWizard extends Wizard {
 \r
 \r
     public ExportSingleReadAlignmentWizard() {\r
-        setWindowTitle("Export single read alignment");  //TODO Use multi language message\r
+        setWindowTitle(Messages.ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ);  //TODO Use multi language message\r
     }\r
 \r
 \r
index 21f5b48bd41da1f44fc9cd2a16a95d824a98364c..e1534d3eb4bb4e807709138e49bc8d0ea8de0a95 100644 (file)
@@ -38,7 +38,7 @@ public class ExportSingleReadAlignmentWizardModel {
     private IObservableValue fileName = new WritableValue(null, String.class);
     private IObservableValue exportSingleReads = new WritableValue(true, Boolean.class);
     private IObservableValue exportConsensusSequence = new WritableValue(true, Boolean.class);
-    private IObservableValue consensusSequenceLabel = new WritableValue("Consensus", String.class);
+    private IObservableValue consensusSequenceLabel = new WritableValue("Consensus", String.class); //$NON-NLS-1$
     private IObservableValue elongateSequences = new WritableValue(false, Boolean.class);
     private IObservableValue useGapToken = new WritableValue(true, Boolean.class);
 
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/Messages.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/Messages.java
new file mode 100644 (file)
index 0000000..626c237
--- /dev/null
@@ -0,0 +1,219 @@
+/**
+ * Copyright (C) 2016 EDIT
+ * 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.
+ */
+package eu.etaxonomy.taxeditor.molecular.l10n;
+
+
+import org.eclipse.osgi.util.NLS;
+
+
+
+/**
+ * Provides messages and texts for classes of the molecular plugin.
+ *
+ * @author Ben Stöver
+ * @date 17.11.2016
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.molecular.l10n.messages"; //$NON-NLS-1$
+
+
+    public static String AlignmentEditor_CUTTING_FAILURE;
+
+
+    public static String AlignmentEditor_EDIT_MODE;
+
+
+    public static String AlignmentEditor_ERROR_SINGLE_READ;
+
+
+    public static String AlignmentEditor_ERROR_SINGLE_READ_MESSAGE;
+
+
+    public static String AlignmentEditor_INSERT;
+
+
+    public static String AlignmentEditor_INSERTION_PHEROGRAM;
+
+
+    public static String AlignmentEditor_LEFT;
+
+
+    public static String AlignmentEditor_LEFT_END_OUTSIDE;
+
+
+    public static String AlignmentEditor_MUST_HAVE_TYPE;
+
+
+    public static String AlignmentEditor_NEW_READ_FAILURE;
+
+
+    public static String AlignmentEditor_NO_ATTACHED_PHEROGRAM;
+
+
+    public static String AlignmentEditor_OVERWRITE;
+
+
+    public static String AlignmentEditor_RIGHT;
+
+
+    public static String AlignmentEditor_RIGHT_END_OUTSIDE;
+
+
+    public static String AlignmentEditor_SAVING_ALIGNMENT;
+
+
+    public static String AlignmentEditorInput_EDITOR_NAME;
+
+
+    public static String AlignmentEditorPasteHandler_CANCEL;
+
+
+    public static String AlignmentEditorPasteHandler_PASTE_FAILURE;
+
+
+    public static String AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE;
+
+
+    public static String AlignmentEditorPasteHandler_PASTING_LINES;
+
+
+    public static String AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE;
+
+
+    public static String AlignmentEditorPasteHandler_PASTING_LINES_IGNORE;
+
+
+    public static String AlignmentEditorPasteHandler_PASTING_LINES_QUESTION;
+
+
+    public static String CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED;
+
+
+    public static String CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE;
+
+
+    public static String CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND;
+
+
+    public static String CutPherogramLeftHandler_CUT_FAILURE;
+
+
+    public static String CutPherogramRightHandler_CUT_FAILURE;
+
+
+    public static String EditSequenceHandler_COULD_NOT_OPEN;
+
+
+    public static String ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ;
+
+
+    public static String exportSequenceToFileHandlerIOErrorMessage;
+    public static String exportSequenceToFileHandlerIOErrorTitle;
+    public static String exportSequenceToFileHandlerOverwriteTitle;
+    public static String exportSequenceToFileHandlerOverwriteText;
+
+
+    public static String HandlerTools_COULD_NOT_LOAD_ICON;
+
+
+    public static String LoadPherogramHandler_AB1;
+
+
+    public static String LoadPherogramHandler_ALL;
+
+
+    public static String LoadPherogramHandler_ALL_FORMATS;
+
+
+    public static String LoadPherogramHandler_IMPORT_PHEROGRAM;
+
+
+    public static String LoadPherogramHandler_SCF;
+
+
+    public static String LoadPherogramHandler_UNSUPPORTED_FORMAT;
+
+
+    public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE;
+
+
+    public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE;
+
+
+    public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE;
+
+
+    public static String PherogramMouseListener_UNABLE_TO_CREATE_VIEW;
+
+    public static String SequenceIDIterator_NO_MORE_SEQUENCES;
+
+
+    public static String SequenceIDIterator_REMOVE_NOT_SUPPORTED;
+
+
+    public static String ShowPherogramHandler_ERROR;
+
+
+    public static String ShowPherogramHandler_NO_PHEROGRAM;
+
+
+    public static String ShowPherogramHandler_NO_PHEROGRAM_MESSAGE;
+
+
+    public static String ToggleInsertOverwriteHandler_SWITCH_INSERTION;
+
+
+    public static String ToggleInsertOverwriteHandler_SWITCH_OVERWRITE;
+
+
+    public static String ToggleLeftRightInsertionHandler_LEFT;
+
+
+    public static String ToggleLeftRightInsertionHandler_RIGHT;
+
+
+    public static String ToggleLeftRightInsertionHandler_SWITCH_LEFT;
+
+
+    public static String ToggleLeftRightInsertionHandler_SWITCH_RIGHT;
+
+
+    public static String wizardExportAlignmentAppendExtensionButton;
+    public static String wizardExportAlignmentBrowseButton;
+    public static String wizardExportAlignmentDataLabel;
+    public static String wizardExportAlignmentDescription;
+    public static String wizardExportAlignmentDestinationLabel;
+    public static String wizardExportAlignmentErrorMissingFileName;
+    public static String wizardExportAlignmentErrorMissingSeqLabel;
+    public static String wizardExportAlignmentErrorNothingToExport;
+    public static String wizardExportAlignmentExportConsensusSeqLabel;
+    public static String wizardExportAlignmentExportFormatLabel;
+    public static String wizardExportAlignmentExportSingleReads;
+    public static String wizardExportAlignmentFileDialogTitle;
+    public static String wizardExportAlignmentFileLabel;
+    public static String wizardExportAlignmentOptionsDescription;
+    public static String wizardExportAlignmentOptionsTitle;
+    public static String wizardExportAlignmentTitle;
+    public static String wizardExportAlignmentWarningFileNameStartsDot;
+    public static String wizardExportAlignmentwarningMissingExtension;
+    public static String wizardExportAlignmentWarningFileExists;
+    public static String wizardExportAlignmentExportedSeqHeading;
+    public static String wizardExportAlignmentAdditionalOptionsHeading;
+    public static String wizardExportAlignmentElongateSeqHeading;
+    public static String wizardExportAlignmentElongateSeqMissingData;
+    public static String wizardExportAlignmentElongateSeqGap;
+
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {}
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages.properties b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages.properties
new file mode 100644 (file)
index 0000000..0bd463a
--- /dev/null
@@ -0,0 +1,85 @@
+exportSequenceToFileHandlerIOErrorMessage=An error occurred when trying to export a consensus sequence alignment to the file "%s".
+exportSequenceToFileHandlerIOErrorTitle=I/O error
+exportSequenceToFileHandlerOverwriteTitle=Overwrite file
+exportSequenceToFileHandlerOverwriteText=The file \"%s\" already exists.\n\nDo you want to overwrite it?
+wizardExportAlignmentAppendExtensionButton=Append default extension
+wizardExportAlignmentBrowseButton=Browse...
+wizardExportAlignmentDataLabel=Select the data to export:
+wizardExportAlignmentDescription=Define the output file and format.
+wizardExportAlignmentDestinationLabel=Select the export destination:
+wizardExportAlignmentErrorMissingFileName=The file name must not be empty.
+wizardExportAlignmentErrorMissingSeqLabel=The consensus sequence label must not be empty.
+wizardExportAlignmentErrorNothingToExport=Either single reads or the consensus sequence have to be selected for export.
+wizardExportAlignmentExportConsensusSeqLabel=Export consensus sequence
+wizardExportAlignmentExportFormatLabel=Select the export format:
+wizardExportAlignmentExportSingleReads=Export single reads
+wizardExportAlignmentFileDialogTitle=Export to
+wizardExportAlignmentFileLabel=Alignment file:
+wizardExportAlignmentTitle=Sequence export
+wizardExportAlignmentWarningFileNameStartsDot=File starting with '.' are not supported on all operating systems.
+wizardExportAlignmentwarningMissingExtension=The file name does have a valid extension for the selected format.
+wizardExportAlignmentWarningFileExists=The file already exists and will be overwritten.
+wizardExportAlignmentOptionsDescription=Specify additional export parameters.
+wizardExportAlignmentOptionsTitle=Export options
+wizardExportAlignmentExportedSeqHeading=Specify the sequences to be exported:
+wizardExportAlignmentAdditionalOptionsHeading=Specify additional export options:
+wizardExportAlignmentElongateSeqHeading=Elongate sequences to have equal length with:
+wizardExportAlignmentElongateSeqMissingData=Missing data ('?')"
+wizardExportAlignmentElongateSeqGap=Gap ('-')
+
+AlignmentEditor_CUTTING_FAILURE=Cutting pherograms is only possible if exactly one row is selected.
+AlignmentEditor_EDIT_MODE=Edit mode: 
+AlignmentEditor_ERROR_SINGLE_READ=Error
+AlignmentEditor_ERROR_SINGLE_READ_MESSAGE=A single read was skipped because of the following error:\n\n
+AlignmentEditor_INSERT=Insert
+AlignmentEditor_INSERTION_PHEROGRAM=Insertion in pherogram: 
+AlignmentEditor_LEFT=Left
+AlignmentEditor_LEFT_END_OUTSIDE=The left end of the selection lies outside the pherogram attached to this sequence.
+AlignmentEditor_MUST_HAVE_TYPE=The editor input must have the type %s
+AlignmentEditor_NEW_READ_FAILURE=Creating new reads from AlignmentEditor not implemented.
+AlignmentEditor_NO_ATTACHED_PHEROGRAM=There is no pherogram attached to the current sequence.
+AlignmentEditor_OVERWRITE=Overwrite
+AlignmentEditor_RIGHT=Right
+AlignmentEditor_RIGHT_END_OUTSIDE=The right end of the selection lies outside the pherogram attached to this sequence.
+AlignmentEditor_SAVING_ALIGNMENT=Saving alignment
+AlignmentEditorInput_EDITOR_NAME=AlignmentEditor
+PherogramMouseListener_UNABLE_TO_CREATE_VIEW=Unable to create pherogram view
+
+CutPherogramLeftHandler_CUT_FAILURE=Unable to cut base call sequence
+CutPherogramRightHandler_CUT_FAILURE=Unable to cut base call sequence
+EditSequenceHandler_COULD_NOT_OPEN=Could not open AlignmentEditor
+HandlerTools_COULD_NOT_LOAD_ICON=Icon "%s" could not be loaded.
+LoadPherogramHandler_AB1=AB1 pherogram files
+LoadPherogramHandler_ALL=All files
+LoadPherogramHandler_ALL_FORMATS=All supported formats
+LoadPherogramHandler_IMPORT_PHEROGRAM=Import pherogram into contig alignment
+LoadPherogramHandler_SCF=SCF pherogram files
+LoadPherogramHandler_UNSUPPORTED_FORMAT=Unsupported format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE=Unsupported format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE=An IO error occurred while trying to read the file 
+LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE=The format of the pherogram file "%s" is not supported. (Only AB1 and SCF are supported.)
+ShowPherogramHandler_ERROR=Error
+ShowPherogramHandler_NO_PHEROGRAM=No pherogram available
+ShowPherogramHandler_NO_PHEROGRAM_MESSAGE=The selected read does not have an associated pherogram.
+ToggleInsertOverwriteHandler_SWITCH_INSERTION=Click to switch to insertion mode
+ToggleInsertOverwriteHandler_SWITCH_OVERWRITE=Click to switch to overwrite mode
+ToggleLeftRightInsertionHandler_LEFT=Left
+ToggleLeftRightInsertionHandler_RIGHT=Right
+ToggleLeftRightInsertionHandler_SWITCH_LEFT=Switch to insert pherogram distorsions left of future edits.
+ToggleLeftRightInsertionHandler_SWITCH_RIGHT=Switch to insert pherogram distorsions right of future edits.
+
+AlignmentEditorPasteHandler_CANCEL=Cancel
+AlignmentEditorPasteHandler_PASTE_FAILURE=Unable to paste multiple lines
+AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE=The current cursor height (%1$d) does not match the number of lines to be pasted (%2$d).%3$s%3$sYou can either change the cursor height accordingly or set the cursor height to one allowing you to paste all lines from the clipboard into one sequence.
+AlignmentEditorPasteHandler_PASTING_LINES=Pasting multiple lines
+AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE=Only paste the first line from the clipboard
+AlignmentEditorPasteHandler_PASTING_LINES_IGNORE=Ignore line breaks and paste as one sequence
+AlignmentEditorPasteHandler_PASTING_LINES_QUESTION=The text to be pasted contains mutlitple lines (%d) although the current cursor height is 1. What do you want to do?
+
+CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED=Not implemented.
+CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE=Either exportConsensus or exportSingleReads must be true. Otherwise no sequences would be contained in this matrix.
+CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND=No sequence with the ID "%d" could be found.
+SequenceIDIterator_NO_MORE_SEQUENCES=There are no more sequence IDs availble from this iterator.
+SequenceIDIterator_REMOVE_NOT_SUPPORTED=This iterator does not support removing elements.
+
+ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ=Export single read alignment
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/l10n/messages_de.properties
new file mode 100644 (file)
index 0000000..3b22e99
--- /dev/null
@@ -0,0 +1,85 @@
+exportSequenceToFileHandlerIOErrorMessage=Beim Schreiben der Datei "%s" ist ein Fehler aufgetreten.
+exportSequenceToFileHandlerIOErrorTitle=E/A Fehler
+exportSequenceToFileHandlerOverwriteTitle=Datei Ã¼berschreiben
+exportSequenceToFileHandlerOverwriteText=Die Datei \"%s\" existiert bereits.\n\nSoll sie Ã¼berschrieben werden?
+wizardExportAlignmentAppendExtensionButton=Standarddateiendung anhängen
+wizardExportAlignmentBrowseButton=Durchsuchen...
+wizardExportAlignmentDataLabel=Zu exportierende Daten:
+wizardExportAlignmentDescription=Wählen Sie den Zielort und das Zielformat aus!
+wizardExportAlignmentDestinationLabel=Zieldatei:
+wizardExportAlignmentErrorMissingFileName=Der Dateiname darf nicht leer sein.
+wizardExportAlignmentErrorMissingSeqLabel=Der Name der Konsensussequenz darf nicht leer sein.
+wizardExportAlignmentErrorNothingToExport=Es müssen entweder die einzelnen Reads oder die Konsensussequenz zum Export ausgewählt werden.
+wizardExportAlignmentExportConsensusSeqLabel=Konsensussequenz exportieren
+wizardExportAlignmentExportFormatLabel=Zielformat:
+wizardExportAlignmentExportSingleReads=Einzelne Reads exportieren
+wizardExportAlignmentFileDialogTitle=Exportieren nach
+wizardExportAlignmentFileLabel=Alignment Datei:
+wizardExportAlignmentTitle=Sequenzexport
+wizardExportAlignmentWarningFileNameStartsDot=Dateinamen, die mit einem '.' beginnen, werden nicht auf allen Betriebssystemen unterstützt.
+wizardExportAlignmentwarningMissingExtension=Der momentane Dateiname hat keine zum aktuellen Format passende Endung.
+wizardExportAlignmentWarningFileExists=The existiert bereits und würde Ã¼berschrieben.
+wizardExportAlignmentOptionsDescription=Geben Sie weitere Exportparameter an!
+wizardExportAlignmentOptionsTitle=Exportoptionen
+wizardExportAlignmentExportedSeqHeading=Zu exportierende Sequenzen:
+wizardExportAlignmentAdditionalOptionsHeading=Erweiterte Exportoptionen:
+wizardExportAlignmentElongateSeqHeading=Sequenzen auf einheitliche Länge bringen mit:
+wizardExportAlignmentElongateSeqMissingData=Fehlende Daten ('?')"
+wizardExportAlignmentElongateSeqGap=Lücke ('-')
+
+AlignmentEditor_CUTTING_FAILURE=Beschneiden des Pherogramms ist nur möglich, wenn exakt eine Reihe ausgewählt ist.
+AlignmentEditor_EDIT_MODE=Editier-Modus: 
+AlignmentEditor_ERROR_SINGLE_READ=Error
+AlignmentEditor_ERROR_SINGLE_READ_MESSAGE=Ein Single-Read wurde Ã¼bersprungen wegen folgendem Fehler:\n\n
+AlignmentEditor_INSERT=Einfügen
+AlignmentEditor_INSERTION_PHEROGRAM=Einfügen in Pherogrammm: 
+AlignmentEditor_LEFT=Links
+AlignmentEditor_LEFT_END_OUTSIDE=Das linke Ende der Auswahl liegt außerhalb des Pherogramms dieser Sequenz.
+AlignmentEditor_MUST_HAVE_TYPE=Der Editor-Input muss vom Typ %s sein
+AlignmentEditor_NEW_READ_FAILURE=Das Erzeugen neuer Reads im Alignment-Editor ist nicht implementiert.
+AlignmentEditor_NO_ATTACHED_PHEROGRAM=Die ausgewählte Sequenz hat kein angehangenes Pherogramm.
+AlignmentEditor_OVERWRITE=Ãœberschreiben
+AlignmentEditor_RIGHT=REchts
+AlignmentEditor_RIGHT_END_OUTSIDE=Das rechte Ende der Auswahl liegt außerhalb des Pherogramms dieser Sequenz.
+AlignmentEditor_SAVING_ALIGNMENT=Alignment speichern
+AlignmentEditorInput_EDITOR_NAME=Alignment-Editor
+PherogramMouseListener_UNABLE_TO_CREATE_VIEW=Pherogram-View konnte nicht erstellt werden
+
+CutPherogramLeftHandler_CUT_FAILURE=Base-Call-Sequenz konnte nicht beschnitten werden
+CutPherogramRightHandler_CUT_FAILURE=Base-Call-Sequenz konnte nicht beschnitten werden
+EditSequenceHandler_COULD_NOT_OPEN=Alignment-Editor konnte nicht geöffnet werden
+HandlerTools_COULD_NOT_LOAD_ICON=Icon "%s" konnte nicht geladen werden.
+LoadPherogramHandler_AB1=AB1 Pherogramm-Dateien
+LoadPherogramHandler_ALL=Alle Dateien
+LoadPherogramHandler_ALL_FORMATS=Alle unterstützten Formate
+LoadPherogramHandler_IMPORT_PHEROGRAM=Pherogramm in Contig-Alignment importieren
+LoadPherogramHandler_SCF=SCF Pherogramm-Dateien
+LoadPherogramHandler_UNSUPPORTED_FORMAT=Nicht unterstütztes Format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE=Nicht unterstütztes Format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE=IO-Fehler beim Lesen der Datei 
+LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE=Das Format der Pherogramm-Datei "%s" wird nicht unterstützt. (Nur AB1 und SCF werden unterstützt.)
+ShowPherogramHandler_ERROR=Error
+ShowPherogramHandler_NO_PHEROGRAM=Kein Pherogramm verfügbar
+ShowPherogramHandler_NO_PHEROGRAM_MESSAGE=Der ausgewählte Read hat kein Pherogramm
+ToggleInsertOverwriteHandler_SWITCH_INSERTION=Klicken, um zum Einfügen-Modus zu wechseln
+ToggleInsertOverwriteHandler_SWITCH_OVERWRITE=Klicken, um zum Ãœberschreiben-Modus zu wechseln
+ToggleLeftRightInsertionHandler_LEFT=Links
+ToggleLeftRightInsertionHandler_RIGHT=Rechts
+ToggleLeftRightInsertionHandler_SWITCH_LEFT=Wechseln, um Pherogramm-Verzerrungen linksseitig einzufügen.
+ToggleLeftRightInsertionHandler_SWITCH_RIGHT=Wechseln, um Pherogramm-Verzerrungen rechtsseitig einzufügen.
+
+AlignmentEditorPasteHandler_CANCEL=Abbrechen
+AlignmentEditorPasteHandler_PASTE_FAILURE=Konnte mehrere Zeilen nicht einfügen
+AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE=Die aktuelle Cursor-Auswahl (%1$d) stimmt nicht mit der Anzahl der einzufügenden Zeilen (%2$d) Ã¼berein.%3$s%3$sSie können die Cursor-Auswahl entsprechend anpassen oder die Auswahl auf eine Zeile einschränken, um alle Zeilen aus dem Clipboard in die Sequenz einzufügen.
+AlignmentEditorPasteHandler_PASTING_LINES=Füge mehrere Zeilen ein
+AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE=Füge nur die erste Zeile aus dem Clipboard ein
+AlignmentEditorPasteHandler_PASTING_LINES_IGNORE=Zeilenumbrüche ignorieren und als eine Sequenz einfügen
+AlignmentEditorPasteHandler_PASTING_LINES_QUESTION=Der einzufügende Text enthält mehrere Zeilen (%d), obwohl die aktuelle Cursor-Auswahl 1 ist. Was wollen Sie tun?
+
+CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED=Nicht implementiert.
+CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE=Entweder exportConsensus oder exportSingleReads muss angewählt sein. Ansonsten sind keine Sequenzen in der Matrix enthalten.
+CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND=Sequenz mit der ID "%d" konnte nicht gefunden werden.
+SequenceIDIterator_NO_MORE_SEQUENCES=Dieser Iterator hat keine weiteren Sequenz-IDs.
+SequenceIDIterator_REMOVE_NOT_SUPPORTED=Dieser Iterator unterstützt das Entfernen von Elementen nicht.
+
+ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ=Exportiere Single-Read-Alignment
index 3a227f05814acad9472fa21d561c804ffb4de221..9f6b855586a6cefd4d284e0d9cc3baf0959b6796 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
index 03b6c6c067c0bed6b89f3f341768f6abb9fda283..2a5308b144d49ca2f026603a72f25c2f43b41acc 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Navigation Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
index 1bb4af14f507c23070787c7567a957cb1d5548b1..f305d3233a34d592585443a9ac48d49ad9254227 100644 (file)
@@ -43,4 +43,6 @@ navigatorContent.name = Classification
 navigatorContent.name.0 = TaxonNode\r
 navigatorContent.name.1 = Synonyms (experimental)\r
 command.label.moveFactualData = Move factual data to another taxon\r
-command.name.moveFactualData = Move factual data
\ No newline at end of file
+command.name.moveFactualData = Move factual data\r
+command.label.setSecForSubtree = Set secundum for subtree\r
+command.name.setSecForSubtree = set secundum for subtree\r
index f78b7e12dbfb6e9dd219446903087a95693bc874..4f1b16ca978fd2a8dc0fa4663f12e7bd45ce6c1f 100644 (file)
@@ -44,4 +44,6 @@ navigatorContent.name = Klassifikation
 navigatorContent.name.0 = Taxonknoten\r
 navigatorContent.name.1 = Synonyme (experimentell)\r
 command.label.moveFactualData = Verschiebe Faktendaten zu Taxon\r
-command.name.moveFactualData = Verschiebe Faktendaten
\ No newline at end of file
+command.name.moveFactualData = Verschiebe Faktendaten\r
+command.label.setSecForSubtree = Setze Secundum für Teilbaum\r
+command.name.setSecForSubtree = Setze Secundum für Teilbaum
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
deleted file mode 100644 (file)
index 2fb82b9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-SearchBar_0=Use "*" for wildcard searching\r
-SearchBar_1=Search\r
-SearchBar_2=Could not execute search\r
-SearchBar_3=Please type at least one character\r
-SearchBar_4=Error opening search result.\r
-SearchBar_6=Taxa\r
-SearchBar_7=Synonyms\r
-SearchBar_8=Names (without taxa)\r
-SearchBar_9=Common Names\r
diff --git a/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
deleted file mode 100644 (file)
index 0546737..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche\r
-SearchBar_1=Suche\r
-SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden\r
-SearchBar_3=Bitte geben Sie mindestens einen Buchstaben ein\r
-SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses\r
-SearchBar_6=Taxa\r
-SearchBar_7=Synonyme\r
-SearchBar_8=Namen (ohne Taxa)\r
-SearchBar_9=Umgangsprachliche Namen\r
index 5a3a94bb31ea6e1ac134d59066789711c30fd861..69ef8f5075faababb7f90300b2b33522fc25fb88 100644 (file)
@@ -9,8 +9,8 @@ bin.includes = META-INF/,\
                p2.inf,\
                OSGI-INF/l10n/bundle.properties,\
                OSGI-INF/l10n/bundle_de.properties,\
-               OSGI-INF/l10n/messages.properties,\
-               OSGI-INF/l10n/messages_de.properties
+               src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties,\
+               src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties
                
                
 
index 4b6e4e62117585791021a05d366a69ef57303bfc..57af053ac9c5fef2437b8dbd046907b17a72272f 100644 (file)
                      </reference>
                   </and>
             </visibleWhen>
+         </command>
+          <command
+               commandId="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree"
+               label="%command.label.setSecForSubtree"
+               style="push">
+               <visibleWhen
+                  checkEnabled="true">
+                  <and>
+                     <reference
+                           definitionId="isCdmStoreConnected">
+                     </reference>
+                     <reference
+                           definitionId="isTaxonNode">
+                     </reference>
+                  </and>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.navigation.command.update.moveTaxon"
             defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.ChangeAcceptedTaxonToSynonymHandler"
             id="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym"
             name="%command.name.5">
+      </command>
+       <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.SetSecReferenceForSubtreeHandler"
+            id="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree"
+            name="%command.name.setSecForSubtree">
       </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewClassificationHandler"
                   definitionId="isRemoting">
             </reference>
          </activeWhen>
+      </handler>
+       <handler
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.SetSecReferenceForSubtreeHandler"
+            commandId="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree">
+         <activeWhen>
+            <reference
+                  definitionId="isRemoting">
+            </reference>
+         </activeWhen>
       </handler>
       <handler
             class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveFactualDataHandler"
index b84288be007e22322a699087e429c77e70541568..23fb47350694bcaf542bef1e392b2edc7fb40d70 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>4.5.1</version>
+               <version>4.6.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index c4d361d0fc03430b67a80f5ab04ee8d8a5abcc74..626af92f5755215aaf0811a237630f7993826c3a 100644 (file)
@@ -52,6 +52,7 @@ import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -65,7 +66,10 @@ import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
  * @version 1.0
  */
 public class NavigationUtil extends AbstractUtility{
-       private static IUndoContext defaultUndoContext;
+
+    private static final String NOT_IMPLEMENTED_YET = Messages.NavigationUtil_NOT_IMPLEMENTED;
+    private static final String ERROR_OPENING_THE_EDITOR = Messages.NavigationUtil_OPEN_ERROR;
+    private static IUndoContext defaultUndoContext;
 
        /**
         * <p>openEditor</p>
@@ -88,13 +92,13 @@ public class NavigationUtil extends AbstractUtility{
                cdmBase = CdmStore.getService(INameService.class).load(uuidAndTitleCache.getUuid());
            }
            else{
-               MessagingUtils.warningDialog("Unknown type", NavigationUtil.class, "There is no editor available to open this object.");
+               MessagingUtils.warningDialog(Messages.NavigationUtil_UNKNOWN_TYPE, NavigationUtil.class, Messages.NavigationUtil_UNKNOWN_TYPE_MESSAGE);
            }
            if(cdmBase!=null){
                openEditor(cdmBase);
            }
            else{
-               MessagingUtils.warningDialog("Cdm entity not found", NavigationUtil.class, "CDM entity could not be found in the database.");
+               MessagingUtils.warningDialog(Messages.NavigationUtil_NOT_FOUND, NavigationUtil.class, Messages.NavigationUtil_NOT_FOUND_MESSAGE);
            }
        }
 
@@ -123,12 +127,12 @@ public class NavigationUtil extends AbstractUtility{
                        }else if(selectedObject instanceof PolytomousKey){
                                EditorUtil.openPolytomousKey(entityUuid);
                        }else{
-                               MessagingUtils.warningDialog("Unsupported Type", NavigationUtil.class, "No editor exists for the current selection: " + selectedObject);
+                               MessagingUtils.warningDialog(Messages.NavigationUtil_UNSUPPORTED_TYPE, NavigationUtil.class, Messages.NavigationUtil_UNSUPPORTED_TYPE_MESSAGE + selectedObject);
                        }
                } catch (PartInitException e) {
-                       MessagingUtils.error(NavigationUtil.class, "Error opening the editor", e);
+                       MessagingUtils.error(NavigationUtil.class, ERROR_OPENING_THE_EDITOR, e);
                } catch (Exception e) {
-                   MessagingUtils.errorDialog("Could not create Taxon",
+                   MessagingUtils.errorDialog(Messages.NavigationUtil_CREATE_FAILED,
                            NavigationUtil.class,
                            e.getMessage(), TaxeditorStorePlugin.PLUGIN_ID,
                            e,
@@ -140,11 +144,11 @@ public class NavigationUtil extends AbstractUtility{
        private static void openInBulkEditor(ICdmBase selectedObject) {
                ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
                IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
-               String openInBulkEditorCommand = "eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity";
+               String openInBulkEditorCommand = "eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"; //$NON-NLS-1$
                Command command = commandService.getCommand(openInBulkEditorCommand);
                if(command.isDefined()){
                        Map<String, UUID> params = new HashMap<String, UUID>();
-                       params.put(openInBulkEditorCommand+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
+                       params.put(openInBulkEditorCommand+".uuid", selectedObject.getUuid()); //$NON-NLS-1$
                        ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, params);
                        try {
                                if(parameterizedCommand!=null){
@@ -172,7 +176,7 @@ public class NavigationUtil extends AbstractUtility{
                try {
                        EditorUtil.openEmpty(parentNodeUuid);
                } catch (PartInitException e) {
-                       MessagingUtils.error(NavigationUtil.class, "Error opening the editor", e);
+                       MessagingUtils.error(NavigationUtil.class, ERROR_OPENING_THE_EDITOR, e);
                }
        }
 
@@ -297,7 +301,7 @@ public class NavigationUtil extends AbstractUtility{
                        handleOpeningOfMultipleTaxa(accTaxa);
 
                }else{
-                       MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.");
+                       MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_ORPHAN_NAME_MESSAGE);
                }
 
        }
@@ -307,11 +311,10 @@ public class NavigationUtil extends AbstractUtility{
                        openEditor(acceptedTaxa.iterator().next());
                }else if(acceptedTaxa.size() > 1){
                        // FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
-                       MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open." +
-                                       " This case is not handled yet by the software.");
+                       MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_MULTI_TREE);
                }else if(acceptedTaxa.size() == 0){
                        // this is an undesired state
-                       MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.");
+                       MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_ORPHAN_TAXON);
                }
        }
 
@@ -325,11 +328,10 @@ public class NavigationUtil extends AbstractUtility{
                        openEditor(taxonNodes.iterator().next());
                }else if(taxonNodes.size() > 1){
                        // FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
-                       MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open." +
-                                       " This case is not handled yet by the software.");
+                       MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.");
                }else if(taxonNodes.size() == 0){
                        // this is an undesired state
-                       MessagingUtils.warningDialog("Incorrect state", NavigationUtil.class, "The accepted taxon is not in a taxonomic view. This should not have happened.");
+                       MessagingUtils.warningDialog(Messages.NavigationUtil_INCORRECT_STATE, NavigationUtil.class, Messages.NavigationUtil_INCORRECT_STATE_MESSAGE);
                }
        }
 
index 68383d04a07165ac2178e0255d339ebb57f2e0e6..faed12997483a307bd4f6b5194924c660216e11b 100644 (file)
@@ -17,7 +17,7 @@ public class TaxeditorNavigationPlugin extends AbstractUIPlugin {
 
        // The plug-in ID
        /** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.navigator"</code> */
-       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.navigator";
+       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.navigator"; //$NON-NLS-1$
 
        // The shared instance
        private static TaxeditorNavigationPlugin plugin;
index db0a628dcc6b495cb3669bcc32542388dab6cb98..e4c71b443273d580edc3e877d168c2e5e565c0fe 100644 (file)
@@ -8,6 +8,8 @@
 */
 package eu.etaxonomy.taxeditor.navigation.key.polytomous;
 
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+
 /**
  * @author cmathew
  * @date 25 Jun 2015
@@ -15,10 +17,10 @@ package eu.etaxonomy.taxeditor.navigation.key.polytomous;
  */
 public interface PolytomousKeyViewLabels {
 
-    public static final String DELETE_POLYTOMOUS_KEY_LABEL = "Delete Polytomous Key";
-    public static final String UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL = "Update All Polytomous Key Nodes";
+    public static final String DELETE_POLYTOMOUS_KEY_LABEL = Messages.PolytomousKeyViewLabels_DELETE;
+    public static final String UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL = Messages.PolytomousKeyViewLabels_UPDATE;
 
-    public static final String ERROR_OPENING_KEY_EDITOR_MESSAGE = "Error opening Polytomous Key Editor";
+    public static final String ERROR_OPENING_KEY_EDITOR_MESSAGE = Messages.PolytomousKeyViewLabels_OPEN_ERROR;
 
 
 }
index 9e5cacf4a679509ba0acf41292679691d40e4fd9..c0a0ff645fe5d1dcb661d11e43d3348e50b95feb 100644 (file)
@@ -50,6 +50,7 @@ import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -90,9 +91,9 @@ public class PolytomousKeyViewPart extends ViewPart implements
        }
 
 
-       public static final String ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart";
+       public static final String ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart"; //$NON-NLS-1$
 
-       public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes";
+       public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes"; //$NON-NLS-1$
 
        private class ContextListener extends ContextListenerAdapter{
                /* (non-Javadoc)
@@ -100,7 +101,7 @@ public class PolytomousKeyViewPart extends ViewPart implements
                 */
                @Override
                public void contextStop(IMemento memento, IProgressMonitor monitor) {
-                       monitor.subTask("Shutting down Polytomous Key Viewer");
+                       monitor.subTask(Messages.PolytomousKeyViewPart_SHUTDOWN);
                        if(!viewer.getControl().isDisposed()){
                            viewer.setInput(null);
                        }
@@ -111,7 +112,7 @@ public class PolytomousKeyViewPart extends ViewPart implements
                 */
                @Override
                public void contextStart(IMemento memento, IProgressMonitor monitor) {
-                       monitor.subTask("Initiating Polytomous Key Viewer");
+                       monitor.subTask(Messages.PolytomousKeyViewPart_INIT);
                        setInput();
                }
        }
@@ -141,7 +142,7 @@ public class PolytomousKeyViewPart extends ViewPart implements
                contextListener = new ContextListener();
                CdmStore.getContextManager().addContextListener(contextListener);
 
-               text_filter = formFactory.createText(container, "");
+               text_filter = formFactory.createText(container, ""); //$NON-NLS-1$
                text_filter.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
                text_filter.addModifyListener(new FilterModifyListener());
 
@@ -178,9 +179,9 @@ public class PolytomousKeyViewPart extends ViewPart implements
             try {
                 handlerService.executeCommand(OPEN_COMMAND_ID, null);
             } catch (NotDefinedException e) {
-                throw new RuntimeException("Could not find open command: " + OPEN_COMMAND_ID);
+                throw new RuntimeException("Could not find open command: " + OPEN_COMMAND_ID); //$NON-NLS-1$
             } catch (Exception e) {
-                MessagingUtils.error(getClass(), "An exception occured while trying to open a selection", e);
+                MessagingUtils.error(getClass(), Messages.PolytomousKeyViewPart_EXCEPTION, e);
             }
         }
        }
index 3edf00c03cb8f8bab12ac6f933e417c2456ed6c9..b668ac2098f92729a204f26000cae2682756e5c3 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -21,6 +21,7 @@ import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 
 /**
  * @author n.hoffmann
@@ -30,7 +31,8 @@ import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
 public class PolytomousKeyViewPartDataChangeBehavior extends
                AbstractDataChangeBehaviour {
 
-       private final PolytomousKeyViewPart source;
+    private static final String UPDATING_POLYTOMOUS_KEY_VIEWER = Messages.PolytomousKeyViewPartDataChangeBehavior_UPDATE;
+    private final PolytomousKeyViewPart source;
 
        /**
         * @param polytomousKeyViewPart
@@ -47,21 +49,22 @@ public class PolytomousKeyViewPartDataChangeBehavior extends
        public void reactOnDataChange(CdmDataChangeMap changeEvents) {
                if(isRelevant(changeEvents)){
                        final Display display = Display.getCurrent();
-                       Job job = new Job("Updating Polytomous Key Viewer") {
-                               
+                       Job job = new Job(UPDATING_POLYTOMOUS_KEY_VIEWER) {
+
                                @Override
                                protected IStatus run(IProgressMonitor monitor) {
-                                       monitor.beginTask("Updating Polytomous Key Viewer", 3);
+                                       monitor.beginTask(UPDATING_POLYTOMOUS_KEY_VIEWER, 3);
                                        monitor.worked(1);
-                                       
+
                                        // clear the session completely
-                                       monitor.subTask("Clearing Polytomous Key Viewer session");
+                                       monitor.subTask(Messages.PolytomousKeyViewPartDataChangeBehavior_CLEAR);
                                        display.asyncExec(new Runnable() {
-                                                public void run() {
+                                                @Override
+                        public void run() {
                                                         source.getConversationHolder().clear();
                                                 }
-                                       });                                     
-                                       // FIXME completely clearing the session is a brute force approach. 
+                                       });
+                                       // FIXME completely clearing the session is a brute force approach.
                                        // It would be much more elegant to clear only those elements that have been changed.
                                        // I could not get that to work but we should consider workin on this because we might
                                        // run into serious performance issues, especially when it comes to large trees
@@ -69,29 +72,30 @@ public class PolytomousKeyViewPartDataChangeBehavior extends
                                        // at least, we moved this to a job so it can run in a background thred
                                        // seems to improve the situation but not sure if final solution
                                        monitor.worked(1);
-                                       
-                                       monitor.subTask("Refreshing viewer");
-                                       
+
+                                       monitor.subTask(Messages.PolytomousKeyViewPartDataChangeBehavior_REFRESH);
+
                                        display.asyncExec(new Runnable() {
-                                           public void run() {
+                                           @Override
+                        public void run() {
                                                source.refresh();
                                            }
                                        });
-                                       
-                                       
-                                       
+
+
+
                                        monitor.worked(1);
                                        monitor.done();
                                        return Status.OK_STATUS;
                                }
                        };
-                       
+
                        job.setPriority(Job.SHORT);
                        job.schedule();
-                       
+
                }
        }
-       
+
        /**
         * @return
         */
@@ -99,9 +103,9 @@ public class PolytomousKeyViewPartDataChangeBehavior extends
                for(CdmDataChangeEvent event : changeEvents.getAllEvents()){
                        EventType eventType = event.getEventType();
                        CdmBase eventEntity = event.getEntity();
-                       
+
                        // all poyltomous key changes are relevant
-                       if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE) 
+                       if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE)
                                        && eventEntity instanceof PolytomousKey){
                                return true;
                        }
index 74c808451cdf50a714e3c7c2f5fe069c61e37fa2..ad614b249221e8ead42d0cad6090c6469f001b76 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.DeleteOperation;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 
 /**
@@ -32,7 +33,10 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  */
 public class DeleteHandler extends AbstractHandler {
 
-       /* (non-Javadoc)
+    protected static final String CONFIRM_MESSAGE = Messages.DeleteHandler_CONFIRM_MESSAGE;
+    protected static final String CONFIRM = Messages.DeleteHandler_CONFIRM;
+
+    /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        @Override
@@ -45,7 +49,7 @@ public class DeleteHandler extends AbstractHandler {
                        return null;
                }
 
-               boolean confirmation = MessagingUtils.confirmDialog("Confirm deletion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
+               boolean confirmation = MessagingUtils.confirmDialog(CONFIRM, CONFIRM_MESSAGE);
 
                if(confirmation){
 
index 5a4831fd739725f46653354da4d841a345b3efb6..b539552d1e9fb8b1d4ee06b70736f44944f9c3a0 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -23,6 +23,7 @@ import org.eclipse.swt.widgets.Display;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 
 /**
  * @author n.hoffmann
@@ -31,34 +32,36 @@ import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
  */
 public class EditPolytomousKeyNodesHandler extends AbstractHandler {
 
-       /* (non-Javadoc)
+    protected static final String OPENING_POLYTOMOUS_KEYS = Messages.EditPolytomousKeyNodesHandler_OPEN_KEYS;
+
+    /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
                PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
-               
-               ISelection selection = view.getSite().getSelectionProvider().getSelection(); 
+
+               ISelection selection = view.getSite().getSelectionProvider().getSelection();
                if(selection instanceof StructuredSelection){
-                  
+
                        final StructuredSelection structuredSelection = (StructuredSelection) selection;
-                       
-                       Job job = new Job("Opening Polytomous Keys"){
+
+                       Job job = new Job(OPENING_POLYTOMOUS_KEYS){
 
                                @Override
                                protected IStatus run(IProgressMonitor monitor) {
-                                       monitor.beginTask("Opening Polytomous Keys", structuredSelection.size());
-                                       
+                                       monitor.beginTask(OPENING_POLYTOMOUS_KEYS, structuredSelection.size());
+
                                        for(final Object selectedObject : structuredSelection.toArray()){
                                                if(selectedObject instanceof PolytomousKey){
-                                                       
+
                                                        Display.getDefault().asyncExec(new Runnable(){
 
                                                                @Override
-                                                               public void run() {                                                                 
+                                                               public void run() {
                                                                        NavigationUtil.openEditor((PolytomousKey) selectedObject);
                                                                }
-                                                               
+
                                                        });
                                                        monitor.worked(1);
                                                }
@@ -66,12 +69,12 @@ public class EditPolytomousKeyNodesHandler extends AbstractHandler {
                                        monitor.done();
                                        return Status.OK_STATUS;
                                }
-                               
+
                        };
-                       
+
                        job.setPriority(Job.SHORT);
-                       job.schedule();                 
-                       
+                       job.schedule();
+
                }
                return null;
        }
index 5591e5433ce7184b4c04b247a00ade9f87b4b6e3..cb1a2d05c8163f166c2fb3e78da9dbe4a36b8516 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -20,14 +20,13 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-
 import org.eclipse.swt.widgets.Display;
 
-
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RefreshNodesOperation;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 
 
@@ -40,29 +39,31 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  */
 public class RefreshPolytomousKeyNodesHandler extends AbstractHandler implements IHandler {
 
-       @Override
+    private static final String REFRESHING_POLYTOMOUS_KEY_NODES = Messages.RefreshPolytomousKeyNodesHandler_REFRESHING;
+
+    @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
                final PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
                final List<PolytomousKey> keys = view.getKeys();
-               
-               final String label = "Refresh Polytomous Key Nodes";
-               
+
+               final String label = Messages.RefreshPolytomousKeyNodesHandler_REFRESH;
+
                final IUndoContext undoContext = NavigationUtil.getUndoContext();
                if (keys.size() > 0) {
-                       Job job = new Job("Refreshing Polytomous Key Nodes"){
-                                                                                                       
+                       Job job = new Job(REFRESHING_POLYTOMOUS_KEY_NODES){
+
                                        @Override
                                        protected IStatus run(IProgressMonitor monitor) {
-                                               monitor.beginTask("Refreshing Polytomous Key Nodes", keys.size());
-                                               
-                                               
-                                                       for (final PolytomousKey key : keys) {                                  
+                                               monitor.beginTask(REFRESHING_POLYTOMOUS_KEY_NODES, keys.size());
+
+
+                                                       for (final PolytomousKey key : keys) {
                                                                if(key.getRoot() != null) {
 
                                                                        Display.getDefault().asyncExec(new Runnable(){
 
                                                                                @Override
-                                                                               public void run() {                                                                 
+                                                                               public void run() {
                                                                                        AbstractPostOperation operation = new RefreshNodesOperation(label, undoContext, key, view);
                                                                                        NavigationUtil.executeOperation(operation);
                                                                                }
index 30313aa4741e7909ac70f41d83ad254048829abb..9adb3879f967cc81bb808e2afdc2a2e05c9b26af 100644 (file)
@@ -57,7 +57,7 @@ public class RemotingDeletePolytomousKeyHandler extends RemotingCdmHandler {
            return Status.CANCEL_STATUS;
         }
 
-        boolean confirmation = MessagingUtils.confirmDialog("Confirm deletaion", "Do you want to delete the selected key" + (keysToDelete.size() == 1 ? "" : "s") + "?");
+        boolean confirmation = MessagingUtils.confirmDialog(DeleteHandler.CONFIRM, DeleteHandler.CONFIRM_MESSAGE);
 
         if(!confirmation) {
             return Status.CANCEL_STATUS;
index 5c0f38a0c39312cebc76da1db34623358499029d..2e5d3487b0aa9bfb473f026203fa75e62e7ec6bf 100644 (file)
@@ -45,11 +45,11 @@ public class RemotingEditPolytomousKeyNodesHandler extends AbstractHandler {
 
             final StructuredSelection structuredSelection = (StructuredSelection) selection;
 
-            Job job = new Job("Opening Polytomous Keys"){
+            Job job = new Job(EditPolytomousKeyNodesHandler.OPENING_POLYTOMOUS_KEYS){
 
                 @Override
                 protected IStatus run(IProgressMonitor monitor) {
-                    monitor.beginTask("Opening Polytomous Keys", structuredSelection.size());
+                    monitor.beginTask(EditPolytomousKeyNodesHandler.OPENING_POLYTOMOUS_KEYS, structuredSelection.size());
 
                     for(final Object selectedObject : structuredSelection.toArray()){
                         if(selectedObject instanceof PolytomousKey){
index 7223166e0160b694f0d4079789c23dabbda7fbbb..7df83b76449801d93e8cb8613febc614707e0fe0 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -59,10 +60,10 @@ public class DeleteOperation extends AbstractPersistentPostOperation {
                DeleteResult result = CdmStore.getService(IPolytomousKeyService.class).delete(key);
 
                if (result.isError() && !result.getExceptions().isEmpty()){
-                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                       MessageDialog.openError(null, Messages.DeleteOperation_FAILED, result.getExceptions().iterator().next().getMessage());
 
                }else if(result.isAbort()){
-                       MessageDialog.openWarning(null, "Delete abort", "The object could not be deleted, maybe there was no object selected.");
+                       MessageDialog.openWarning(null, Messages.DeleteOperation_ABORT, Messages.DeleteOperation_ABORT_MESSAGE);
                }
 
                return postExecute(null);
index 0493ca05ee099b5ec098d52e74f80502d307a5d3..5e38d52470c48678eef2f39cdf0d94d695a3da8d 100644 (file)
@@ -18,6 +18,7 @@ import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -28,7 +29,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class RemotingDeletePolytomousKeyOperation extends RemotingCdmUpdateOperation {
 
-    private final static String LABEL = "Delete Polytomous Key operation";
+    private final static String LABEL = Messages.RemotingDeletePolytomousKeyOperation_DELETE_OP;
 
     private final List<UUID> keysToDelete;
     /**
index 240fa03700d48eea3f38fdccd3ee48fecca1325d..30c01f1f3195258364c4d9b9bfb92542edc3c054 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -48,7 +49,7 @@ public class RemotingUpdatePolytomousKeyAllNodesOperation extends RemotingCdmUpd
         this.polytomousKeyUuid = null;
     }
 
-    private final static String LABEL = "Update All Polytomous Key Nodes operation";
+    private final static String LABEL = Messages.RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP;
 
     /* (non-Javadoc)
      * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/Messages.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/Messages.java
new file mode 100644 (file)
index 0000000..a1db9fe
--- /dev/null
@@ -0,0 +1,185 @@
+/**
+ * Copyright (C) 2014 EDIT
+ * 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.
+ */
+package eu.etaxonomy.taxeditor.navigation.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author d.schild
+ * @date 18.06.2014
+ *
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.navigation.l10n.messages"; //$NON-NLS-1$
+    public static String ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON;
+    public static String ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED;
+    public static String ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY;
+    public static String ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE;
+    public static String ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE;
+    public static String ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE;
+    public static String ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL;
+    public static String ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS;
+    public static String ChangeAcceptedTaxonToSynonymOperation_OP_FAIL;
+    public static String ClassificationLabelProvider_UNNAMED_TREE;
+    public static String CloneClassificationHandler_CLONE_CLASSIFICATION;
+    public static String CreateClassificationHierarchyHandler_CREATE_HIERARCHY;
+    public static String CreateClassificationHierarchyHandler_FAILED;
+    public static String CreateClassificationHierarchyHandler_FAILED_MESSAGE;
+    public static String CreateNewTaxonHierarchyOperation_ADD_HIERARCHY;
+    public static String CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE;
+    public static String CreateTaxonNode_CREATE_FAILED;
+    public static String DeleteHandler_9;
+    public static String DeleteHandler_CONFIRM;
+    public static String DeleteHandler_CONFIRM_DELETE;
+    public static String DeleteHandler_CONFIRM_MESSAGE;
+    public static String DeleteHandler_DELETE_ALL;
+    public static String DeleteHandler_DELETE_CLASSIFICATION;
+    public static String DeleteHandler_DELETE_NODE;
+    public static String DeleteHandler_MOVE_TO_PARENT;
+    public static String DeleteHandler_SKIP;
+    public static String DeleteHandler_THERE_ARE_CHILDNODES;
+    public static String DeleteHandler_THERE_ARE_CHILDREN;
+    public static String DeleteOperation_ABORT;
+    public static String DeleteOperation_ABORT_MESSAGE;
+    public static String DeleteOperation_DELETE_FAIL;
+    public static String DeleteOperation_DELETE_SUCCESS;
+    public static String DeleteOperation_FAILED;
+    public static String EditPolytomousKeyNodesHandler_OPEN_KEYS;
+    public static String MoveFactualDataHandler_CHOOSE_TAXON;
+    public static String MoveFactualDataHandler_CREATE_FAILED;
+    public static String MoveFactualDataHandler_UNSAVED_SOURCE;
+    public static String MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE;
+    public static String MoveFactualDataHandler_UNSAVED_TARGET;
+    public static String MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE;
+    public static String MoveTaxonHandler_CHOOSE_ABOVE;
+    public static String MoveTaxonHandler_CHOOSE_PARENT;
+    public static String MoveTaxonHandler_MOVE_TO_PARENT;
+    public static String MoveTaxonHandler_TARGET_NODE;
+    public static String MoveTaxonHandler_TARGET_NODE_MESSAGE;
+    public static String MoveTaxonHandler_UNSAVED_PARENT;
+    public static String MoveTaxonHandler_UNSAVED_PARENT_MESSAGE;
+    public static String MoveTaxonOperation_NOT_IMPLEMENTED;
+    public static String NavigationUtil_CREATE_FAILED;
+    public static String NavigationUtil_INCORRECT_STATE;
+    public static String NavigationUtil_INCORRECT_STATE_MESSAGE;
+    public static String NavigationUtil_MULTI_TREE;
+    public static String NavigationUtil_NOT_FOUND;
+    public static String NavigationUtil_NOT_FOUND_MESSAGE;
+    public static String NavigationUtil_NOT_IMPLEMENTED;
+    public static String NavigationUtil_OPEN_ERROR;
+    public static String NavigationUtil_ORPHAN_NAME_MESSAGE;
+    public static String NavigationUtil_ORPHAN_TAXON;
+    public static String NavigationUtil_UNKNOWN_TYPE;
+    public static String NavigationUtil_UNKNOWN_TYPE_MESSAGE;
+    public static String NavigationUtil_UNSUPPORTED_TYPE;
+    public static String NavigationUtil_UNSUPPORTED_TYPE_MESSAGE;
+    public static String PolytomousKeyViewLabels_DELETE;
+    public static String PolytomousKeyViewLabels_OPEN_ERROR;
+    public static String PolytomousKeyViewLabels_UPDATE;
+    public static String PolytomousKeyViewPart_EXCEPTION;
+    public static String PolytomousKeyViewPart_INIT;
+    public static String PolytomousKeyViewPart_SHUTDOWN;
+    public static String PolytomousKeyViewPartDataChangeBehavior_CLEAR;
+    public static String PolytomousKeyViewPartDataChangeBehavior_REFRESH;
+    public static String PolytomousKeyViewPartDataChangeBehavior_UPDATE;
+    public static String RefreshPolytomousKeyNodesHandler_REFRESH;
+    public static String RefreshPolytomousKeyNodesHandler_REFRESHING;
+    public static String RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON;
+    public static String RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP;
+    public static String RemotingDeletePolytomousKeyOperation_DELETE_OP;
+    public static String RemotingDeleteTaxonNodeHandler_NODE_DELETED;
+    public static String RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE;
+    public static String RemotingDeleteTaxonNodeOperation_DELETE_OP;
+    public static String RemotingMoveFactualDataHandler_CHOOSE_TAXA;
+    public static String RemotingMoveFactualDataHandler_CREATE_FAILED;
+    public static String RemotingMoveFactualDataOperation_MOVE_OP;
+    public static String RemotingMoveTaxonNodeHandler_BEHIND;
+    public static String RemotingMoveTaxonNodeHandler_CANCEL;
+    public static String RemotingMoveTaxonNodeHandler_CHILD;
+    public static String RemotingMoveTaxonNodeHandler_CHOOSE_PARENT;
+    public static String RemotingMoveTaxonNodeHandler_CHOOSE_TAXON;
+    public static String RemotingMoveTaxonNodeHandler_TARGET_NODE;
+    public static String RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE;
+    public static String RemotingMoveTaxonNodeHandler_UNSAVED_PARENT;
+    public static String RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE;
+    public static String RemotingMoveTaxonOperation_MOVE_OP;
+    public static String RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP;
+    public static String Root_CREATE_CLASSIFICATION;
+    public static String Root_MY_CLASSIFICATION;
+    public static String SearchBar_0;
+    public static String SearchBar_1;
+    public static String SearchBar_2;
+    public static String SearchBar_3;
+    public static String SearchBar_4;
+    public static String SearchBar_6;
+    public static String SearchBar_7;
+    public static String SearchBar_8;
+    public static String SearchBar_9;
+    public static String SearchResultLabelProvider_NAME;
+    public static String SearchResultLabelProvider_SYNONYM;
+    public static String SearchResultLabelProvider_TAXON;
+    public static String SearchResultView_CANCELLED;
+    public static String SearchResultView_CNT_ENTITIES_FOUND;
+    public static String SearchResultView_NO_RESULTS;
+    public static String SearchResultView_PERFORMING_SEARCH;
+    public static String SearchResultView_REMOVE_SEARCH_RESULTS;
+    public static String SearchResultView_SEARCH;
+    public static String SearchResultView_SEARCH_FOR;
+    public static String SearchResultView_SEARCH_STRING;
+    public static String SearchResultView_SEARCHING;
+    public static String SearchResultView_STATUS;
+    public static String SetSecundumForSubtreeOperation_CHANGE_SEC_OP;
+    public static String SetSecundumForSubtreeOperation_SET_SEC_TASK;
+    public static String TaxonLinkHelper_CREATE_FAIL;
+
+    public static String TaxonNavigator_LOAD_DATASOURCE;
+    public static String TaxonNavigator_RESTORE;
+    public static String TaxonNavigator_SAVE_TASK;
+    public static String TaxonNavigator_TAXON_TREE;
+
+    public static String TaxonNavigatorDataChangeBehavior_CLEAR_SESSION;
+    public static String TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER;
+    public static String TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR;
+    public static String TaxonNavigatorLabels_CHANGE_ACC_TAXON;
+    public static String TaxonNavigatorLabels_CLOSE_IMPOSSIBLE;
+    public static String TaxonNavigatorLabels_DELETE_TAXON;
+
+    public static String TaxonNavigatorLabels_MOVE_FACTUAL_DATA;
+    public static String TaxonNavigatorLabels_MOVE_TAXON;
+    public static String TaxonNavigatorLabels_NO_CHILDREN_ALLOWED;
+    public static String TaxonNavigatorLabels_NOT_A_NODE;
+    public static String TaxonNavigatorLabels_NOT_TAXON_SELECTED;
+    public static String TaxonNavigatorLabels_ONLY_SINGLE_TAXON;
+    public static String TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN;
+    public static String TaxonNavigatorLabels_UNSAVED_CHANGES;
+
+    public static String TaxonNodeLabelProvider_NO_TAXON;
+    public static String TaxonNodeLabelProvider_NODE_WITH_NO_TAXON;
+    public static String TaxonNodeLabelProvider_TAXON;
+
+    public static String TreeNodeDropAdapter_10;
+    public static String TreeNodeDropAdapter_BEHIND;
+    public static String TreeNodeDropAdapter_CANCEL;
+    public static String TreeNodeDropAdapter_CHILD;
+    public static String TreeNodeDropAdapter_MOVE_BEHIND;
+    public static String TreeNodeDropAdapter_MOVE_TAXON;
+    public static String TreeNodeDropAdapter_MOVING;
+    public static String TreeNodeDropAdapter_MOVING_MESSAGE;
+    public static String TreeNodeDropAdapter_TARGET_NODE;
+    public static String TreeNodeDropAdapter_UNSAVED_PARENT;
+    public static String TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties
new file mode 100644 (file)
index 0000000..8fe81b9
--- /dev/null
@@ -0,0 +1,152 @@
+ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED=Could not create Taxon
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY=Moving to synonymy
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE=The operation move accepted taxon to synonymy is available only for a single taxon.
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE=Prerequisite not met
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE=The accepted taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL=Synonym creation not possible
+ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS=Synonym created but taxon deletion not possible.
+ChangeAcceptedTaxonToSynonymOperation_OP_FAIL=Operation failed
+ClassificationLabelProvider_UNNAMED_TREE=Unnamed Taxonomic Tree
+CloneClassificationHandler_CLONE_CLASSIFICATION=Clone classification
+CreateClassificationHierarchyHandler_CREATE_HIERARCHY=Create Taxon Hierarchy
+CreateClassificationHierarchyHandler_FAILED=Failed to open Editor
+CreateClassificationHierarchyHandler_FAILED_MESSAGE=Could not open distribution view. The hierarchy is corrupted\!
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY=Add Hierarchy successful
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE=New classification is %s\nCreated Genus: %d\nCreated Subspecies: %d
+CreateTaxonNode_CREATE_FAILED=Could not create taxon node
+DeleteHandler_9=Command name not set
+DeleteHandler_CONFIRM=Confirm deletion
+DeleteHandler_CONFIRM_DELETE=Confirm Deletion
+DeleteHandler_CONFIRM_MESSAGE=Do you want to delete the selected key(s)?
+DeleteHandler_DELETE_ALL=Delete all children
+DeleteHandler_DELETE_CLASSIFICATION=Do you really want to delete the classification?
+DeleteHandler_DELETE_NODE=Do you really want to delete the selected node(s)?
+DeleteHandler_MOVE_TO_PARENT=Move children to parent node
+DeleteHandler_SKIP=Skip
+DeleteHandler_THERE_ARE_CHILDNODES=\ There are childnodes, which will be deleted, too.
+DeleteHandler_THERE_ARE_CHILDREN=\ The tree has children, they will be deleted, too.
+DeleteOperation_ABORT=Delete abort
+DeleteOperation_ABORT_MESSAGE=The object could not be deleted, maybe there was no object selected.
+DeleteOperation_DELETE_FAIL=TaxonNode could not be deleted.
+DeleteOperation_DELETE_SUCCESS=TaxonNode was successfully deleted, but related object(s) could not be deleted
+DeleteOperation_FAILED=Delete failed
+EditPolytomousKeyNodesHandler_OPEN_KEYS=Opening Polytomous Keys
+MoveFactualDataHandler_CHOOSE_TAXON=Choose the accepted taxon
+MoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE=Unsaved Source Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE=There are unsaved changes in the source taxon. Please save first.
+MoveFactualDataHandler_UNSAVED_TARGET=Unsaved Target Taxon
+MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE=There are unsaved changes in the target taxon. Please save first.
+MoveTaxonHandler_CHOOSE_ABOVE=Choose the taxon above the moved taxon.
+MoveTaxonHandler_CHOOSE_PARENT=Choose new parent
+MoveTaxonHandler_MOVE_TO_PARENT=Move taxon to new parent
+MoveTaxonHandler_TARGET_NODE=Target node
+MoveTaxonHandler_TARGET_NODE_MESSAGE=The choosen target node should be the parent?
+MoveTaxonHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+MoveTaxonHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+MoveTaxonOperation_NOT_IMPLEMENTED=Not implemented yet.
+NavigationUtil_CREATE_FAILED=Could not create Taxon
+NavigationUtil_INCORRECT_STATE=Incorrect state
+NavigationUtil_INCORRECT_STATE_MESSAGE=The accepted taxon is not in a taxonomic view. This should not have happened.
+NavigationUtil_MULTI_TREE=The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.
+NavigationUtil_NOT_FOUND=Cdm entity not found
+NavigationUtil_NOT_FOUND_MESSAGE=CDM entity could not be found in the database.
+NavigationUtil_NOT_IMPLEMENTED=Not implemented yet
+NavigationUtil_OPEN_ERROR=Error opening the editor
+NavigationUtil_ORPHAN_NAME_MESSAGE=You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.
+NavigationUtil_ORPHAN_TAXON=This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.
+NavigationUtil_UNKNOWN_TYPE=Unknown type
+NavigationUtil_UNKNOWN_TYPE_MESSAGE=There is no editor available to open this object.
+NavigationUtil_UNSUPPORTED_TYPE=Unsupported Type
+NavigationUtil_UNSUPPORTED_TYPE_MESSAGE=No editor exists for the current selection: 
+PolytomousKeyViewLabels_DELETE=Delete Polytomous Key
+PolytomousKeyViewLabels_OPEN_ERROR=Error opening Polytomous Key Editor
+PolytomousKeyViewLabels_UPDATE=Update All Polytomous Key Nodes
+PolytomousKeyViewPart_EXCEPTION=An exception occured while trying to open a selection
+PolytomousKeyViewPart_INIT=Initiating Polytomous Key Viewer
+PolytomousKeyViewPart_SHUTDOWN=Shutting down Polytomous Key Viewer
+PolytomousKeyViewPartDataChangeBehavior_CLEAR=Clearing Polytomous Key Viewer session
+PolytomousKeyViewPartDataChangeBehavior_REFRESH=Refreshing viewer
+PolytomousKeyViewPartDataChangeBehavior_UPDATE=Updating Polytomous Key Viewer
+RefreshPolytomousKeyNodesHandler_REFRESH=Refresh Polytomous Key Nodes
+RefreshPolytomousKeyNodesHandler_REFRESHING=Refreshing Polytomous Key Nodes
+RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP=Change Accepted Taxon to Synonym operation
+RemotingDeletePolytomousKeyOperation_DELETE_OP=Delete Polytomous Key operation
+RemotingDeleteTaxonNodeHandler_NODE_DELETED=Node already deleted
+RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE=The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.
+RemotingDeleteTaxonNodeOperation_DELETE_OP=Delete Taxon Node operation
+RemotingMoveFactualDataHandler_CHOOSE_TAXA=Choose the accepted taxon
+RemotingMoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+RemotingMoveFactualDataOperation_MOVE_OP=Move Factual Data operation
+RemotingMoveTaxonNodeHandler_BEHIND=Behind
+RemotingMoveTaxonNodeHandler_CANCEL=Cancel
+RemotingMoveTaxonNodeHandler_CHILD=Child
+RemotingMoveTaxonNodeHandler_CHOOSE_PARENT=Choose new parent
+RemotingMoveTaxonNodeHandler_CHOOSE_TAXON=Choose the taxon above the moved taxon.
+RemotingMoveTaxonNodeHandler_TARGET_NODE=Target node
+RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE=Do you want to move the Taxonnode as child or behind the target node.
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+RemotingMoveTaxonOperation_MOVE_OP=Move Taxon operation
+RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP=Update All Polytomous Key Nodes operation
+Root_CREATE_CLASSIFICATION=Creating initial classification
+Root_MY_CLASSIFICATION=My Classification
+SearchBar_0=Use "*" for wildcard searching
+SearchBar_1=Search
+SearchBar_2=Could not execute search
+SearchBar_3=Please type at least one character
+SearchBar_4=Error opening search result.
+SearchBar_6=Taxa
+SearchBar_7=Synonyms
+SearchBar_8=Names (without taxa)
+SearchBar_9=Common Names
+SearchResultLabelProvider_NAME=Name: 
+SearchResultLabelProvider_SYNONYM=Synonym: 
+SearchResultLabelProvider_TAXON=Taxon: 
+SearchResultView_CANCELLED=Cancelled
+SearchResultView_CNT_ENTITIES_FOUND=%d entities found
+SearchResultView_NO_RESULTS=Search returned no results
+SearchResultView_PERFORMING_SEARCH=Performing Search
+SearchResultView_REMOVE_SEARCH_RESULTS=Getting rid of search results
+SearchResultView_SEARCH=Search: '%s'
+SearchResultView_SEARCH_FOR=Search for:
+SearchResultView_SEARCH_STRING=Search String:
+SearchResultView_SEARCHING=Searching...
+SearchResultView_STATUS=Status:
+SetSecundumForSubtreeOperation_CHANGE_SEC_OP=Change secundum reference for all children
+SetSecundumForSubtreeOperation_SET_SEC_TASK=Set secundum reference for subtree
+TaxonLinkHelper_CREATE_FAIL=Could not create Taxon
+TaxonNavigator_LOAD_DATASOURCE=Loading datasources
+TaxonNavigator_RESTORE=Restoring Taxon Navigator
+TaxonNavigator_SAVE_TASK=Saving Taxon Navigator State
+TaxonNavigator_TAXON_TREE=Taxonomic Tree
+TaxonNavigatorDataChangeBehavior_CLEAR_SESSION=Clearing Taxon Navigators session
+TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER=Refreshing viewer
+TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR=Updating Taxon Navigator
+TaxonNavigatorLabels_CHANGE_ACC_TAXON=Change Accepted Taxon to Synonym
+TaxonNavigatorLabels_CLOSE_IMPOSSIBLE=Could not close related taxon name editor. Please close it manually and try again.
+TaxonNavigatorLabels_DELETE_TAXON=Delete Taxon Node
+TaxonNavigatorLabels_MOVE_FACTUAL_DATA=Move Factual Data
+TaxonNavigatorLabels_MOVE_TAXON=Move Taxon
+TaxonNavigatorLabels_NO_CHILDREN_ALLOWED=The chosen taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+TaxonNavigatorLabels_NOT_A_NODE=Selected object is not a taxon tree node
+TaxonNavigatorLabels_NOT_TAXON_SELECTED=No taxon tree node selected for operation.
+TaxonNavigatorLabels_ONLY_SINGLE_TAXON=The chosen operation is available only for a single taxon.
+TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN=Set new Secundum Reference for all children.
+TaxonNavigatorLabels_UNSAVED_CHANGES=There are unsaved changes in the source taxon. Please save first.
+TaxonNodeLabelProvider_NO_TAXON=>NO TAXON<
+TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: %s
+TaxonNodeLabelProvider_TAXON=Taxon: 
+TreeNodeDropAdapter_10=\ 
+TreeNodeDropAdapter_BEHIND=Behind
+TreeNodeDropAdapter_CANCEL=Cancel
+TreeNodeDropAdapter_CHILD=Child
+TreeNodeDropAdapter_MOVE_BEHIND=Do you want to move the Taxonnode as child or behind the target node.
+TreeNodeDropAdapter_MOVE_TAXON=Move Taxon
+TreeNodeDropAdapter_MOVING=Moving taxon
+TreeNodeDropAdapter_MOVING_MESSAGE=The operation move accepted taxon to other parent is available only for a single taxon.
+TreeNodeDropAdapter_TARGET_NODE=Target node
+TreeNodeDropAdapter_UNSAVED_PARENT=Unsaved Parent Taxon
+TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Pleas save first.
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties
new file mode 100644 (file)
index 0000000..b94050f
--- /dev/null
@@ -0,0 +1,153 @@
+ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED=Could not create Taxon
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY=Moving to synonymy
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE=The operation move accepted taxon to synonymy is available only for a single taxon.
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE=Prerequisite not met
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE=The accepted taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL=Synonym creation not possible
+ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS=Synonym created but taxon deletion not possible.
+ChangeAcceptedTaxonToSynonymOperation_OP_FAIL=Operation failed
+ClassificationLabelProvider_UNNAMED_TREE=Unnamed Taxonomic Tree
+CloneClassificationHandler_CLONE_CLASSIFICATION=Clone classification
+CreateClassificationHierarchyHandler_CREATE_HIERARCHY=Create Taxon Hierarchy
+CreateClassificationHierarchyHandler_FAILED=Failed to open Editor
+CreateClassificationHierarchyHandler_FAILED_MESSAGE=Could not open distribution view. The hierarchy is corrupted\!
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY=Add Hierarchy successful
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE=New classification is %s\nCreated Genus: %d\nCreated Subspecies: %d
+CreateTaxonNode_CREATE_FAILED=Could not create taxon node
+DeleteHandler_9=Command name not set
+DeleteHandler_CONFIRM=Confirm deletion
+DeleteHandler_CONFIRM_DELETE=Confirm Deletion
+DeleteHandler_CONFIRM_MESSAGE=Do you want to delete the selected key(s)?
+DeleteHandler_DELETE_ALL=Delete all children
+DeleteHandler_DELETE_CLASSIFICATION=Do you really want to delete the classification?
+DeleteHandler_DELETE_NODE=Do you really want to delete the selected node(s)?
+DeleteHandler_MOVE_TO_PARENT=Move children to parent node
+DeleteHandler_SKIP=Skip
+DeleteHandler_THERE_ARE_CHILDNODES=\ There are childnodes, which will be deleted, too.
+DeleteHandler_THERE_ARE_CHILDREN=\ The tree has children, they will be deleted, too.
+DeleteOperation_ABORT=Delete abort
+DeleteOperation_ABORT_MESSAGE=The object could not be deleted, maybe there was no object selected.
+DeleteOperation_DELETE_FAIL=TaxonNode could not be deleted.
+DeleteOperation_DELETE_SUCCESS=TaxonNode was successfully deleted, but related object(s) could not be deleted
+DeleteOperation_FAILED=Delete failed
+EditPolytomousKeyNodesHandler_OPEN_KEYS=Opening Polytomous Keys
+MoveFactualDataHandler_CHOOSE_TAXON=Choose the accepted taxon
+MoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE=Unsaved Source Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE=There are unsaved changes in the source taxon. Please save first.
+MoveFactualDataHandler_UNSAVED_TARGET=Unsaved Target Taxon
+MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE=There are unsaved changes in the target taxon. Please save first.
+MoveTaxonHandler_CHOOSE_ABOVE=Choose the taxon above the moved taxon.
+MoveTaxonHandler_CHOOSE_PARENT=Choose new parent
+MoveTaxonHandler_MOVE_TO_PARENT=Move taxon to new parent
+MoveTaxonHandler_TARGET_NODE=Target node
+MoveTaxonHandler_TARGET_NODE_MESSAGE=The choosen target node should be the parent?
+MoveTaxonHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+MoveTaxonHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+MoveTaxonOperation_NOT_IMPLEMENTED=Not implemented yet.
+NavigationUtil_CREATE_FAILED=Could not create Taxon
+NavigationUtil_INCORRECT_STATE=Incorrect state
+NavigationUtil_INCORRECT_STATE_MESSAGE=The accepted taxon is not in a taxonomic view. This should not have happened.
+NavigationUtil_MULTI_TREE=The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.
+NavigationUtil_NOT_FOUND=Cdm entity not found
+NavigationUtil_NOT_FOUND_MESSAGE=CDM entity could not be found in the database.
+NavigationUtil_NOT_IMPLEMENTED=Not implemented yet
+NavigationUtil_OPEN_ERROR=Error opening the editor
+NavigationUtil_ORPHAN_NAME_MESSAGE=You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.
+NavigationUtil_ORPHAN_TAXON=This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.
+NavigationUtil_UNKNOWN_TYPE=Unknown type
+NavigationUtil_UNKNOWN_TYPE_MESSAGE=There is no editor available to open this object.
+NavigationUtil_UNSUPPORTED_TYPE=Unsupported Type
+NavigationUtil_UNSUPPORTED_TYPE_MESSAGE=No editor exists for the current selection: 
+PolytomousKeyViewLabels_DELETE=Delete Polytomous Key
+PolytomousKeyViewLabels_OPEN_ERROR=Error opening Polytomous Key Editor
+PolytomousKeyViewLabels_UPDATE=Update All Polytomous Key Nodes
+PolytomousKeyViewPart_EXCEPTION=An exception occured while trying to open a selection
+PolytomousKeyViewPart_INIT=Initiating Polytomous Key Viewer
+PolytomousKeyViewPart_SHUTDOWN=Shutting down Polytomous Key Viewer
+PolytomousKeyViewPartDataChangeBehavior_CLEAR=Clearing Polytomous Key Viewer session
+PolytomousKeyViewPartDataChangeBehavior_REFRESH=Refreshing viewer
+PolytomousKeyViewPartDataChangeBehavior_UPDATE=Updating Polytomous Key Viewer
+RefreshPolytomousKeyNodesHandler_REFRESH=Refresh Polytomous Key Nodes
+RefreshPolytomousKeyNodesHandler_REFRESHING=Refreshing Polytomous Key Nodes
+RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP=Change Accepted Taxon to Synonym operation
+RemotingDeletePolytomousKeyOperation_DELETE_OP=Delete Polytomous Key operation
+RemotingDeleteTaxonNodeHandler_NODE_DELETED=Node already deleted
+RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE=The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.
+RemotingDeleteTaxonNodeOperation_DELETE_OP=Delete Taxon Node operation
+RemotingMoveFactualDataHandler_CHOOSE_TAXA=Choose the accepted taxon
+RemotingMoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+RemotingMoveFactualDataOperation_MOVE_OP=Move Factual Data operation
+RemotingMoveTaxonNodeHandler_BEHIND=Behind
+RemotingMoveTaxonNodeHandler_CANCEL=Cancel
+RemotingMoveTaxonNodeHandler_CHILD=Child
+RemotingMoveTaxonNodeHandler_CHOOSE_PARENT=Choose new parent
+RemotingMoveTaxonNodeHandler_CHOOSE_TAXON=Choose the taxon above the moved taxon.
+RemotingMoveTaxonNodeHandler_TARGET_NODE=Target node
+RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE=Do you want to move the Taxonnode as child or behind the target node.
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+RemotingMoveTaxonOperation_MOVE_OP=Move Taxon operation
+RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP=Update All Polytomous Key Nodes operation
+Root_CREATE_CLASSIFICATION=Creating initial classification
+Root_MY_CLASSIFICATION=My Classification
+SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche
+SearchBar_1=Suche
+SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden
+SearchBar_3=Bitte geben Sie mindestens einen Buchstaben ein
+SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses
+SearchBar_6=Taxa
+SearchBar_7=Synonyme
+SearchBar_8=Namen (ohne Taxa)
+SearchBar_9=Umgangsprachliche Namen
+SearchResultLabelProvider_NAME=Name: 
+SearchResultLabelProvider_SYNONYM=Synonym: 
+SearchResultLabelProvider_TAXON=Taxon: 
+SearchResultView_CANCELLED=Cancelled
+SearchResultView_CNT_ENTITIES_FOUND=%d entities found
+SearchResultView_NO_RESULTS=Search returned no results
+SearchResultView_PERFORMING_SEARCH=Performing Search
+SearchResultView_REMOVE_SEARCH_RESULTS=Getting rid of search results
+SearchResultView_SEARCH=Search: '%s'
+SearchResultView_SEARCH_FOR=Search for:
+SearchResultView_SEARCH_STRING=Search String:
+SearchResultView_SEARCHING=Searching...
+SearchResultView_STATUS=Status:
+SetSecundumForSubtreeOperation_CHANGE_SEC_OP=Change secundum reference for all children
+SetSecundumForSubtreeOperation_SET_SEC_TASK=Set secundum reference for subtree
+TaxonLinkHelper_CREATE_FAIL=Could not create Taxon
+TaxonNavigator_LOAD_DATASOURCE=Loading datasources
+TaxonNavigator_RESTORE=Restoring Taxon Navigator
+TaxonNavigator_SAVE_TASK=Saving Taxon Navigator State
+TaxonNavigator_TAXON_TREE=Taxonomic Tree
+TaxonNavigatorDataChangeBehavior_CLEAR_SESSION=Clearing Taxon Navigators session
+TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER=Refreshing viewer
+TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR=Updating Taxon Navigator
+TaxonNavigatorLabels_CHANGE_ACC_TAXON=Change Accepted Taxon to Synonym
+TaxonNavigatorLabels_CLOSE_IMPOSSIBLE=Could not close related taxon name editor. Please close it manually and try again.
+TaxonNavigatorLabels_DELETE_TAXON=Delete Taxon Node
+TaxonNavigatorLabels_MOVE_FACTUAL_DATA=Move Factual Data
+TaxonNavigatorLabels_MOVE_TAXON=Move Taxon
+TaxonNavigatorLabels_NO_CHILDREN_ALLOWED=The chosen taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+TaxonNavigatorLabels_NOT_A_NODE=Selected object is not a taxon tree node
+TaxonNavigatorLabels_NOT_TAXON_SELECTED=No taxon tree node selected for operation.
+TaxonNavigatorLabels_ONLY_SINGLE_TAXON=The chosen operation is available only for a single taxon.
+TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN=Set new Secundum Reference for all children.
+TaxonNavigatorLabels_UNSAVED_CHANGES=There are unsaved changes in the source taxon. Please save first.
+TaxonNodeLabelProvider_NO_TAXON=>NO TAXON<
+TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: %s
+TaxonNodeLabelProvider_TAXON=Taxon: 
+TreeNodeDropAdapter_10=\ 
+TreeNodeDropAdapter_BEHIND=Behind
+TreeNodeDropAdapter_CANCEL=Cancel
+TreeNodeDropAdapter_CHILD=Child
+TreeNodeDropAdapter_MOVE_BEHIND=Do you want to move the Taxonnode as child or behind the target node.
+TreeNodeDropAdapter_MOVE_TAXON=Move Taxon
+TreeNodeDropAdapter_MOVING=Moving taxon
+TreeNodeDropAdapter_MOVING_MESSAGE=The operation move accepted taxon to other parent is available only for a single taxon.
+TreeNodeDropAdapter_TARGET_NODE=Target node
+TreeNodeDropAdapter_UNSAVED_PARENT=Unsaved Parent Taxon
+TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Pleas save first.
+
index 69d60b34725f94aad4160ed6f6bc739abe287566..81f007d34fe5aab06c36d5b459084d29e4c33202 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.navigator.IDescriptionProvider;
 
 import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 
 /**
  * <p>ClassificationLabelProvider class.</p>
@@ -48,7 +49,7 @@ implements ILabelProvider, IDescriptionProvider, IStyledLabelProvider {
        public String getText(Object element) {
                if(element instanceof Classification){
                        String text = ((Classification) element).getName().getText();
-                       return text != null ? text : "Unnamed Taxonomic Tree";
+                       return text != null ? text : Messages.ClassificationLabelProvider_UNNAMED_TREE;
                }
                return new String();
        }
index 89f77b53084be0217c7585aed8f25596e9d8c193..e0befd28b2a4849162ff05ac97f78fa418aaff52 100644 (file)
@@ -24,6 +24,7 @@ import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.operation.CreateClassification;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -55,14 +56,14 @@ public class Root extends PlatformObject implements IAdaptable, IPersistableElem
         */
        public List<Classification> getParentBeans() {
                List<String> propertyPaths = Arrays.asList(new String[]{
-                       "name",
-                       "rootNode.childNodes"});
+                       "name", //$NON-NLS-1$
+                       "rootNode.childNodes"}); //$NON-NLS-1$
 
                List<Classification> classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
 
                if(classifications.size() == 0){
-                       Classification classification = Classification.NewInstance("My Classification");
-                       AbstractPostOperation operation = new CreateClassification("Creating initial classification", NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
+                       Classification classification = Classification.NewInstance(Messages.Root_MY_CLASSIFICATION);
+                       AbstractPostOperation operation = new CreateClassification(Messages.Root_CREATE_CLASSIFICATION, NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
                        NavigationUtil.executeOperation(operation);
 
                        classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
index ae6bc1a065ef4cd2d1df0a2b187989100a7aeb6b..95de96f28f92ffc4c37af225aec4797652062581 100644 (file)
@@ -46,7 +46,7 @@ public class SynonymLabelProvider extends ColumnLabelProvider
                if (element instanceof Synonym &&
                                ((Synonym) element).getName() != null) {
                        
-                       return "= " + ((Synonym) element).getName().getTitleCache();
+                       return "= " + ((Synonym) element).getName().getTitleCache(); //$NON-NLS-1$
                }
                return new String();
        }       
index a57b25197aef27843bc415f3a5a1fb1884c7b437..e3b95583f28cbb2928d9235abba3b2fd1e2e3b68 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.ui.navigator.ILinkHelper;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 
 /**
  * When a taxon is open in an editor and this editor has focus, its entry in the
@@ -55,7 +56,7 @@ public class TaxonLinkHelper implements ILinkHelper {
 //                             }
 //                     }
                } catch (Exception e) {
-                       MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                       MessagingUtils.warningDialog(Messages.TaxonLinkHelper_CREATE_FAIL, this, e.getMessage());
                }
        }
 
index bd3bc0375113dd620191cae0e3c749ab72638bfa..e9d9e4ff086b97ef7b7b6344a6d60800b20b5099 100644 (file)
@@ -51,6 +51,7 @@ import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
@@ -64,21 +65,23 @@ import eu.etaxonomy.taxeditor.store.LoginManager;
  * @author p.ciardelli
  * @author n.hoffmann
  * @created 02.06.2009
- * @version 1.0
+ * @version 1.0+-
  */
 public class TaxonNavigator extends CommonNavigator implements
                IPostOperationEnabled, IConversationEnabled, Observer,
                ICdmEntitySessionEnabled, ICdmChangeListener {
 
-       /**
+    private static final String RESTORING_TAXON_NAVIGATOR = Messages.TaxonNavigator_RESTORE;
+
+    /**
         * Constant
         * <code>ID="eu.etaxonomy.taxeditor.navigation.navig"{trunked}</code>
         */
        public static final String ID = "eu.etaxonomy.taxeditor.navigation.navigator"; //$NON-NLS-1$
 
-       private static final String TREE_PATH = "treepath";
+       private static final String TREE_PATH = "treepath"; //$NON-NLS-1$
 
-       private static final String TREE_PATHS = "treepaths";
+       private static final String TREE_PATHS = "treepaths"; //$NON-NLS-1$
 
        private ConversationHolder conversation;
 
@@ -226,9 +229,9 @@ public class TaxonNavigator extends CommonNavigator implements
                IProgressMonitor subProgressMonitor = NavigationUtil
                                .getSubProgressMonitor(monitor, 1);
 
-               subProgressMonitor.beginTask("Restoring Taxon Navigator",
+               subProgressMonitor.beginTask(RESTORING_TAXON_NAVIGATOR,
                                1 + mementoWork + 5);
-               subProgressMonitor.subTask("Restoring Taxon Navigator");
+               subProgressMonitor.subTask(RESTORING_TAXON_NAVIGATOR);
                subProgressMonitor.worked(1);
 
                conversation = CdmStore.createConversation();
@@ -270,7 +273,7 @@ public class TaxonNavigator extends CommonNavigator implements
             return null;
         }
 
-               for (String uuid : string.split(" ")) {
+               for (String uuid : string.split(" ")) { //$NON-NLS-1$
                        CdmBase cdmBaseObject = CdmStore.getService(
                                        IClassificationService.class).getTaxonNodeByUuid(
                                        UUID.fromString(uuid));
@@ -317,19 +320,19 @@ public class TaxonNavigator extends CommonNavigator implements
                memento = memento.createChild(TREE_PATHS);
                TreePath[] treePaths = this.getCommonViewer().getExpandedTreePaths();
 
-               monitor.beginTask("Saving Taxon Navigator State", treePaths.length);
+               monitor.beginTask(Messages.TaxonNavigator_SAVE_TASK, treePaths.length);
 
                for (TreePath treePath : treePaths) {
                        int pathLength = treePath.getSegmentCount();
-                       String path = "";
+                       String path = ""; //$NON-NLS-1$
                        for (int i = 0; i < pathLength; i++) {
                                Object segment = treePath.getSegment(i);
                                if (segment instanceof CdmBase) {
-                                       path += ((CdmBase) segment).getUuid().toString() + " ";
+                                       path += ((CdmBase) segment).getUuid().toString() + " "; //$NON-NLS-1$
                                        monitor.worked(1);
                                } else {
                                        MessagingUtils.warn(getClass(),
-                                                       "Non-taxon tree path segment " + segment);
+                                                       "Non-taxon tree path segment " + segment); //$NON-NLS-1$
                                }
                        }
                        memento.createChild(TREE_PATH, path.trim());
@@ -378,7 +381,7 @@ public class TaxonNavigator extends CommonNavigator implements
        @Override
        public String getFrameToolTipText(Object element) {
                if (element instanceof Root) {
-                       return "Taxonomic Tree";
+                       return Messages.TaxonNavigator_TAXON_TREE;
                }
                return super.getFrameToolTipText(element);
        }
@@ -494,7 +497,7 @@ public class TaxonNavigator extends CommonNavigator implements
                getCommonViewer().getControl().setEnabled(!busy);
                if (busy) {
                        partNameCache = getPartName();
-                       setPartName("Loading datasources");
+                       setPartName(Messages.TaxonNavigator_LOAD_DATASOURCE);
                } else {
                        if (partNameCache != null) {
                                setPartName(partNameCache);
@@ -564,9 +567,9 @@ public class TaxonNavigator extends CommonNavigator implements
     public Map<Object, List<String>> getPropertyPathsMap() {
         Map<Object, List<String>> propertyPathsMap = new HashMap<Object, List<String>>();
         List<String> taxonNodePropertyPaths = Arrays.asList(new String[] {
-                "taxon.name"
+                "taxon.name" //$NON-NLS-1$
         });
-         propertyPathsMap.put("childNodes", taxonNodePropertyPaths);
+         propertyPathsMap.put("childNodes", taxonNodePropertyPaths); //$NON-NLS-1$
         return propertyPathsMap;
     }
 }
index b1a636182f437497435f86860f87cc197b8712d8..48409c764ebb9eda259ca44aeb39a18252a7e391 100644 (file)
@@ -30,6 +30,7 @@ import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
 import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 
 /**
  * <p>TaxonNavigatorDataChangeBehavior class.</p>
@@ -41,7 +42,9 @@ import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviour implements
                IDataChangeBehavior {
 
-       private final TaxonNavigator source;
+    private static final String UPDATING_TAXON_NAVIGATOR = Messages.TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR;
+
+    private final TaxonNavigator source;
 
        private Set<CdmBase> staleObjects;
 
@@ -77,7 +80,7 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                        Set<CdmBase> affectedObjects = event.getAffectedObjects();
                        if(affectedObjects != null) {
                            for(CdmBase cb : affectedObjects) {
-                               staleObjects.add((CdmBase)HibernateProxyHelper.deproxy(cb));
+                               staleObjects.add(HibernateProxyHelper.deproxy(cb));
                            }
                        }
 
@@ -164,15 +167,15 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                if(isRelevant(events)){
 
                        final Display display = Display.getCurrent();
-                       Job job = new Job("Updating Taxon Navigator") {
+                       Job job = new Job(UPDATING_TAXON_NAVIGATOR) {
 
                                @Override
                                protected IStatus run(IProgressMonitor monitor) {
-                                       monitor.beginTask("Updating Taxon Navigator", 3);
+                                       monitor.beginTask(UPDATING_TAXON_NAVIGATOR, 3);
                                        monitor.worked(1);
 
                                        // clear the session completely
-                                       monitor.subTask("Clearing Taxon Navigators session");
+                                       monitor.subTask(Messages.TaxonNavigatorDataChangeBehavior_CLEAR_SESSION);
                                        display.asyncExec(new Runnable() {
                                                 @Override
                                                 public void run() {
@@ -188,7 +191,7 @@ public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviou
                                        // seems to improve the situation but not sure if final solution
                                        monitor.worked(1);
 
-                                       monitor.subTask("Refreshing viewer");
+                                       monitor.subTask(Messages.TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER);
 
                                        display.asyncExec(new Runnable() {
                                            @Override
index dc5398c41f9993c67954f1d450ba893f29fc5803..f1ea7696aaef61d1930518832a05fadc098db5b8 100644 (file)
@@ -8,6 +8,8 @@
 */
 package eu.etaxonomy.taxeditor.navigation.navigator;
 
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+
 /**
  * @author cmathew
  * @date 19 Jun 2015
@@ -15,20 +17,18 @@ package eu.etaxonomy.taxeditor.navigation.navigator;
  */
 public interface TaxonNavigatorLabels {
 
-    public static final String CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL = "Change Accepted Taxon to Synonym";
-    public static final String MOVE_TAXON_LABEL = "Move Taxon";
-    public static final String MOVE_FACTUAL_DATA_LABEL = "Move Factual Data";
-    public static final String DELETE_TAXON_NODE_LABEL = "Delete Taxon Node";
+    public static final String CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL = Messages.TaxonNavigatorLabels_CHANGE_ACC_TAXON;
+    public static final String MOVE_TAXON_LABEL = Messages.TaxonNavigatorLabels_MOVE_TAXON;
+    public static final String MOVE_FACTUAL_DATA_LABEL = Messages.TaxonNavigatorLabels_MOVE_FACTUAL_DATA;
+    public static final String DELETE_TAXON_NODE_LABEL = Messages.TaxonNavigatorLabels_DELETE_TAXON;
 
-    public static final String NO_TAXON_SELECTION_MESSAGE = "No taxon tree node selected for operation.";
-    public static final String SINGLE_TAXON_SELECTION_MESSAGE = "The chosen operation is available only for a single taxon.";
-    public static final String SOURCE_TAXON_HAS_CHILDREN_MESSAGE = "The chosen taxon must not have any childen. You need to move all childen to " +
-            "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
-            "taxon into a synonym.";
-    public static final String RELATED_EDITOR_NOT_CLOSED_MESSAGE = "Could not close related taxon name editor. " +
-            "Please close it manually and try again.";
-    public static final String SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE = "Selected object is not a taxon tree node";
-    public static final String UNSAVED_CHANGES_MESSAGE = "There are unsaved changes in the source taxon. Please save first.";
+    public static final String NO_TAXON_SELECTION_MESSAGE = Messages.TaxonNavigatorLabels_NOT_TAXON_SELECTED;
+    public static final String SINGLE_TAXON_SELECTION_MESSAGE = Messages.TaxonNavigatorLabels_ONLY_SINGLE_TAXON;
+    public static final String SOURCE_TAXON_HAS_CHILDREN_MESSAGE = Messages.TaxonNavigatorLabels_NO_CHILDREN_ALLOWED;
+    public static final String RELATED_EDITOR_NOT_CLOSED_MESSAGE = Messages.TaxonNavigatorLabels_CLOSE_IMPOSSIBLE;
+    public static final String SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE = Messages.TaxonNavigatorLabels_NOT_A_NODE;
+    public static final String UNSAVED_CHANGES_MESSAGE = Messages.TaxonNavigatorLabels_UNSAVED_CHANGES;
+    public static final String CHANGE_SECUNDUM_FOR_SUBTREE = Messages.TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN;
 
 
 
index 3d35b7e23dde50a1de77af76c3b02303e358e674..492f0e45fa11f02ffa2d7a530b861c21805394f8 100644 (file)
@@ -25,6 +25,7 @@ import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.security.RequiredPermissions;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -55,9 +56,9 @@ public class TaxonNodeLabelProvider extends ColumnLabelProvider
                        TaxonNode taxonNode = (TaxonNode) HibernateProxyHelper.deproxy(element);
 
                        try{
-                               Taxon taxon = (Taxon) HibernateProxyHelper.deproxy(taxonNode.getTaxon());
+                               Taxon taxon = HibernateProxyHelper.deproxy(taxonNode.getTaxon());
                                if(taxon == null){
-                                       MessagingUtils.error(getClass(), "The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: " + element, null);
+                                       MessagingUtils.error(getClass(), String.format(Messages.TaxonNodeLabelProvider_NODE_WITH_NO_TAXON, element), null);
 //                                     throw new RuntimeException("The data your are trying to view is corrupt. Please check your import.");
                                }else{
                                        try{
@@ -79,7 +80,7 @@ public class TaxonNodeLabelProvider extends ColumnLabelProvider
     public String getDescription(Object anElement) {
                if (anElement instanceof TaxonNode) {
                        Taxon data = ((TaxonNode) anElement).getTaxon();
-                       return "Taxon: " + (data != null ? data.getTitleCache() : ">NO TAXON<");
+                       return Messages.TaxonNodeLabelProvider_TAXON + (data != null ? data.getTitleCache() : Messages.TaxonNodeLabelProvider_NO_TAXON);
                }
                return null;
        }
index ee6ecbc03c8dfab5e81fbae3fa36a4409fcfcf66..5e6ef66baef75a3be39ed3afe23cecc8579d0435 100644 (file)
@@ -11,9 +11,11 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 
 public class TaxonNodeNavigatorComparator extends ViewerComparator{
 
+       Comparator<TaxonNode> comparator;
        
        public TaxonNodeNavigatorComparator(Comparator<TaxonNode> comparator){
-               super(comparator);
+               super();
+               this.comparator = comparator;
        }
 
        
@@ -23,11 +25,8 @@ public class TaxonNodeNavigatorComparator extends ViewerComparator{
                if (e1 instanceof Classification && e2 instanceof Classification){
                        return ((Classification)e1).getTitleCache().compareTo(((Classification)e2).getTitleCache());
                } else{
-                       if (this.getComparator() instanceof TaxonNaturalComparator){
-                               return this.getComparator().compare((TaxonNode)e1, (TaxonNode)e2);
-                       }else{
-                               return this.getComparator().compare(e1,e2);
-                       }
+                       return comparator.compare((TaxonNode)e1, (TaxonNode)e2);
+                       
                }
        }
 }
index a2199b417893fcf32fa9bea53d71d40734c03ec5..d479315cc5140069f24f6f9d5651e6c4d49cde07 100644 (file)
@@ -14,8 +14,8 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 public class TaxonNodePropertyTester extends PropertyTester {
        
-       private static final Object HAS_SYNONYMS = "hasSynonyms";
-       private static final Object HAS_TAXA = "hasTaxa";
+       private static final Object HAS_SYNONYMS = "hasSynonyms"; //$NON-NLS-1$
+       private static final Object HAS_TAXA = "hasTaxa"; //$NON-NLS-1$
        
        /** {@inheritDoc} */
        public boolean test(Object receiver, String property, Object[] args,
index 8649638161d7d5a49a10033b7dd01f06579add28..1ac31924b6c402c46d4fd91ce0b54d68b844661e 100644 (file)
@@ -33,6 +33,7 @@ import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -47,10 +48,19 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOperationEnabled {
 
-       private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
+    protected static final String TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE = Messages.TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE;
+    protected static final String TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT = Messages.TreeNodeDropAdapter_UNSAVED_PARENT;
+    protected static final String TREE_NODE_DROP_ADAPTER_MOVE_TAXON = Messages.TreeNodeDropAdapter_MOVE_TAXON;
+    protected static final String TREE_NODE_DROP_ADAPTER_CANCEL = Messages.TreeNodeDropAdapter_CANCEL;
+    protected static final String TREE_NODE_DROP_ADAPTER_BEHIND = Messages.TreeNodeDropAdapter_BEHIND;
+    protected static final String TREE_NODE_DROP_ADAPTER_CHILD = Messages.TreeNodeDropAdapter_CHILD;
+    protected static final String DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE = Messages.TreeNodeDropAdapter_MOVE_BEHIND;
+    protected static final String TARGET_NODE = Messages.TreeNodeDropAdapter_TARGET_NODE;
+
+    private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
 
        private final TaxonNavigatorViewer navigatorViewer;
-       
+
        /**
         * @param viewer
         */
@@ -86,7 +96,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                                if (taxonNodes.size() == 1){
                                        return moveTaxon(taxonNodes, targetTreeNode);
                                } else{
-                                       if( MessageDialog.openConfirm(null, "Moving taxon", "The operation move accepted taxon to other parent is available only for a single taxon.")){
+                                       if( MessageDialog.openConfirm(null, Messages.TreeNodeDropAdapter_MOVING, Messages.TreeNodeDropAdapter_MOVING_MESSAGE)){
                                                return true;
                                        }
                                }
@@ -129,12 +139,12 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                 Boolean hasTargetTaxonPermission = CdmStore.currentAuthentiationHasPermission(targetNode.getTaxon(), UPDATE);
 
                 if(logger.isDebugEnabled()){
-                    logger.debug("target: " + targetNode.getTaxon().getTitleCache());
+                    logger.debug("target: " + targetNode.getTaxon().getTitleCache()); //$NON-NLS-1$
                 }
 
                        if(!hasTargetNodePermission || ! hasTargetNodePermission){
                            if(logger.isDebugEnabled()){
-                               logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " ");
+                               logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                            }
                            return false;
                        }
@@ -143,7 +153,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                    // do not allow to drop onto itself and
                    // check users permissions with all selected taxon nodes and taxa
                    for(TaxonNode taxonNode : getSelectedTaxa()){
-                           logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache());
+                           logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache()); //$NON-NLS-1$
                                Boolean isSameTaxonNode = taxonNode.equals(target);
                                Boolean hasTaxonNodePermission = CdmStore.currentAuthentiationHasPermission(taxonNode, UPDATE);
                                Boolean hasTaxonPermission = CdmStore.currentAuthentiationHasPermission(taxonNode.getTaxon(), UPDATE);
@@ -153,15 +163,15 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                    || !hasTaxonPermission
                        ) {
                     if(logger.isDebugEnabled()){
-                        logger.debug("CANCEL_STATUS for selected  " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " ");
+                        logger.debug("CANCEL_STATUS for selected  " + isSameTaxonNode.toString() + Messages.TreeNodeDropAdapter_10 + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                     }
                                        return false;
                                }
                        }
-                       logger.debug("OK_STATUS");
+                       logger.debug("OK_STATUS"); //$NON-NLS-1$
                        return true;
                }
-               logger.debug("CANCEL_STATUS");
+               logger.debug("CANCEL_STATUS"); //$NON-NLS-1$
                return false;
        }
 
@@ -181,8 +191,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                        TaxonNode targetTaxonNode = (TaxonNode) targetITaxonTreeNode;
                // Make sure parent taxon does not have unsaved changes
                        if (NavigationUtil.isDirty(targetTaxonNode)){
-                               MessageDialog.openWarning(NavigationUtil.getShell(), "Unsaved Parent Taxon", "There are unsaved " +
-                               "changes in the parent taxon. Pleas save first.");
+                               MessageDialog.openWarning(NavigationUtil.getShell(), TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT, TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE);
                                return false;
                        }
 
@@ -197,47 +206,47 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
                if (!PreferencesUtil.getSortNodesNaturally()){
                        IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                        if (workspaceUndoContext == null) {
-                               logger.error("Workspace undo context is null. DND operation cancelled");
+                               logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                return false;
                        }
 
                        AbstractPostOperation<?> operation = new MoveTaxonOperation
-                                       ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
+                                       (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
                        NavigationUtil.executeOperation(operation);
 
-                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                        return true;
                }else{
-                       String[] buttonLables = {"Child", "Behind","Cancel"};
-                       MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the Taxonnode as child or behind the target node.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+                       String[] buttonLables = {TREE_NODE_DROP_ADAPTER_CHILD, TREE_NODE_DROP_ADAPTER_BEHIND,TREE_NODE_DROP_ADAPTER_CANCEL};
+                       MessageDialog dialog = new MessageDialog(null, TARGET_NODE, null, DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
                        dialog.open();
                        int returnCode = dialog.getReturnCode();
                        if (returnCode == 0){
                                IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                                if (workspaceUndoContext == null) {
-                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                        return false;
                                }
 
                                AbstractPostOperation<?> operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
+                                               (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
                                NavigationUtil.executeOperation(operation);
 
-                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                                return true;
                        }else if (returnCode == 1){
                                IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                                if (workspaceUndoContext == null) {
-                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                        return false;
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
                                AbstractPostOperation<?> operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.PREVIOUS);
+                                               (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.PREVIOUS);
                                NavigationUtil.executeOperation(operation);
 
-                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                                return true;
                        }
 //                     } else if (returnCode == 2){
index 0ba48c50d016bf3bd573dba3cf2ce544166b65c5..375c9ad82b5c8bc0569c653a9c0858f777169120 100644 (file)
@@ -37,9 +37,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
-import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
-import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -125,12 +123,12 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                 Boolean hasTargetTaxonPermission = CdmStore.currentAuthentiationHasPermission(targetNode.getTaxon(), UPDATE);
 
                 if(logger.isDebugEnabled()){
-                    logger.debug("target: " + targetNode.getTaxon().getTitleCache());
+                    logger.debug("target: " + targetNode.getTaxon().getTitleCache()); //$NON-NLS-1$
                 }
 
                        if(!hasTargetNodePermission || ! hasTargetNodePermission){
                            if(logger.isDebugEnabled()){
-                               logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " ");
+                               logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                            }
                            return Status.CANCEL_STATUS;
                        }
@@ -139,7 +137,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                    // do not allow to drop onto itself and
                    // check users permissions with all selected taxon nodes and taxa
                    for(TaxonNode taxonNode : getSelectedTaxa()){
-                           logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache());
+                           logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache()); //$NON-NLS-1$
                                Boolean isSameTaxonNode = taxonNode.equals(target);
                                Boolean hasTaxonNodePermission = CdmStore.currentAuthentiationHasPermission(taxonNode, UPDATE);
                                Boolean hasTaxonPermission = CdmStore.currentAuthentiationHasPermission(taxonNode.getTaxon(), UPDATE);
@@ -149,15 +147,15 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                    || !hasTaxonPermission
                        ) {
                     if(logger.isDebugEnabled()){
-                        logger.debug("CANCEL_STATUS for selected  " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " ");
+                        logger.debug("CANCEL_STATUS for selected  " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                     }
                                        return Status.CANCEL_STATUS;
                                }
                        }
-                       logger.debug("OK_STATUS");
+                       logger.debug("OK_STATUS"); //$NON-NLS-1$
                        return Status.OK_STATUS;
                }
-               logger.debug("CANCEL_STATUS");
+               logger.debug("CANCEL_STATUS"); //$NON-NLS-1$
                return Status.CANCEL_STATUS;
        }
 
@@ -177,8 +175,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                        TaxonNode targetTaxonNode = (TaxonNode) targetITaxonTreeNode;
                // Make sure parent taxon does not have unsaved changes
                        if (NavigationUtil.isDirty(targetTaxonNode)){
-                               MessageDialog.openWarning(NavigationUtil.getShell(), "Unsaved Parent Taxon", "There are unsaved " +
-                               "changes in the parent taxon. Pleas save first.");
+                               MessageDialog.openWarning(NavigationUtil.getShell(), TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE);
                                return Status.CANCEL_STATUS;
                        }
 
@@ -193,46 +190,46 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                if (!PreferencesUtil.getSortNodesNaturally()){
                        IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                        if (workspaceUndoContext == null) {
-                               logger.error("Workspace undo context is null. DND operation cancelled");
+                               logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                return Status.CANCEL_STATUS;
                        }
 
                        AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
                        NavigationUtil.executeOperation(operation, null);
-                       
 
-                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                        return Status.OK_STATUS;
                }else{
-                       String[] buttonLables = {"Child", "Behind", "Cancel"};
-                       MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the taxon as child, before or behind the target.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+                       String[] buttonLables = {TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_CHILD, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_BEHIND, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_CANCEL};
+                       MessageDialog dialog = new MessageDialog(null, TreeNodeDropAdapter.TARGET_NODE, null, TreeNodeDropAdapter.DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
                        dialog.open();
                        int returnCode = dialog.getReturnCode();
                        if (returnCode == 0){
                                IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                                if (workspaceUndoContext == null) {
-                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                        return Status.CANCEL_STATUS;
                                }
 
                                AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
                                NavigationUtil.executeOperation(operation, null);
-                               
 
-                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                                return Status.OK_STATUS;
                        }else if (returnCode == 1){
                                IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                                if (workspaceUndoContext == null) {
-                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
                                        return Status.CANCEL_STATUS;
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
                                AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
                                NavigationUtil.executeOperation(operation, null);
-                               
-                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
                                return Status.OK_STATUS;
 //                     }else if (returnCode == 2){
 //                IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
index a60bd2e321a302423561dbccd02174752214d513..3cff9d8fc60df63460462eefabc099d1871aa5ef 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.ChangeAcceptedTaxonToSynonymOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -64,7 +65,6 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
 
                TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
 
-               String plural = selection.size() > 1 ? "s" : "";
                // Prompt user for confirmation
 
 
@@ -93,10 +93,8 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
 
                                // check if taxon has no children
                                if(((TaxonNode)oldAcceptedTaxonNode).getCountChildren() > 0) {
-                                       MessagingUtils.warningDialog("Prerequisite not met", this,
-                                                       "The accepted taxon must not have any childen. You need to move all childen to " +
-                                                       "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
-                                                       "taxon into a synonym.");
+                                       MessagingUtils.warningDialog(Messages.ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE, this,
+                                                       Messages.ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE);
                                        return null;
                                }
                                /*if(((TaxonNode)oldAcceptedTaxonNode).getTaxon().hasSynonyms()) {
@@ -111,7 +109,7 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
                                excludeTaxa.add(((TaxonNode)oldAcceptedTaxonNode).getTaxon().getUuid());
                                TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                                                taxonNavigator.getConversationHolder(),
-                                               "Choose the accepted taxon",
+                                               Messages.ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
                                                excludeTaxa,
                                                null,
                                                ((TaxonNode)oldAcceptedTaxonNode).getClassification());
@@ -137,10 +135,10 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
 
 
                        } catch (NotDefinedException e) {
-                               MessagingUtils.warn(getClass(), "Command name not set");
+                               MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
                        }
                } else{
-                       if( MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Moving to synonymy", "The operation move accepted taxon to synonymy is available only for a single taxon.")){
+                       if( MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY, Messages.ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE)){
                                return null;
                        }
                }
@@ -172,7 +170,7 @@ public class ChangeAcceptedTaxonToSynonymHandler extends DeleteHandler
                                        MessagingUtils.error(this.getClass(), e);
                                        throw new RuntimeException(e);
                                } catch (Exception e) {
-                                       MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                                       MessagingUtils.warningDialog(Messages.ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED, this, e.getMessage());
                                }
                        }
 
index 8152bae9e770afb83b01f26dab9094cb95ecb71d..825db1af3ae1faf53024e2a710a13ee529211099 100644 (file)
@@ -15,6 +15,7 @@ import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.operation.CloneClassificationOperation;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
@@ -41,7 +42,7 @@ public class CloneClassificationHandler extends AbstractHandler {
                 TaxonRelationshipType relationType = wizard.getRelationType();
                 Reference reference = wizard.getReference();
 
-                CloneClassificationOperation operation = new CloneClassificationOperation("Clone classification",
+                CloneClassificationOperation operation = new CloneClassificationOperation(Messages.CloneClassificationHandler_CLONE_CLASSIFICATION,
                         StoreUtil.getUndoContext(), classification, classificationName, reference, relationType,
                         NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
 
index 354b6864bd353c1b37138f7ea7728dec6dea2739..9faca1242d842a7e3bda1d8cfa3f1b289bf74cd7 100644 (file)
@@ -59,7 +59,7 @@ public class CopyHandler extends AbstractHandler implements IHandler {
                                        IStatus status = NavigationUtil.executeOperation(operation);\r
                                        \r
                                } catch (NotDefinedException e) {\r
-                                       MessagingUtils.warn(getClass(), "Command name not set");\r
+                                       MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$\r
                                }\r
                        }\r
                }\r
index aebb25af9e84aa9ffc9dec55798d1f9f3107218f..a890daf1744ffe3c1cf8f434f877daec8b5ed64c 100644 (file)
@@ -12,6 +12,7 @@ import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.operation.CreateNewTaxonHierarchyOperation;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
@@ -44,7 +45,7 @@ public class CreateClassificationHierarchyHandler extends AbstractHandler {
                     // service.getSortedGenusList(classification.getAllNodes());
 
 
-                    CreateNewTaxonHierarchyOperation operation = new CreateNewTaxonHierarchyOperation("Create Taxon Hierarchy", StoreUtil.getUndoContext(),classification,NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false) );
+                    CreateNewTaxonHierarchyOperation operation = new CreateNewTaxonHierarchyOperation(Messages.CreateClassificationHierarchyHandler_CREATE_HIERARCHY, StoreUtil.getUndoContext(),classification,NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false) );
 
                     AbstractUtility.executeOperation(operation);
 //                    UpdateResult result = service.createHierarchyInClassification(classification, null);
@@ -61,8 +62,8 @@ public class CreateClassificationHierarchyHandler extends AbstractHandler {
                     //Success
                     taxonNavigator.refresh();
                 } catch (Exception e) {
-                    MessagingUtils.messageDialog("Failed to open Editor", CreateClassificationHierarchyHandler.class,
-                            "Could not open distribution view. The hierarchy is corrupted!", e);
+                    MessagingUtils.messageDialog(Messages.CreateClassificationHierarchyHandler_FAILED, CreateClassificationHierarchyHandler.class,
+                            Messages.CreateClassificationHierarchyHandler_FAILED_MESSAGE, e);
                 }
             }
         }
index 65c381d391f06897aebf3565ed92a86583fc6f94..bafa4430c5b5ce39fd0e4e38ba4bcee950a9dfeb 100644 (file)
@@ -25,9 +25,9 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
 import eu.etaxonomy.cdm.model.common.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
@@ -35,10 +35,11 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.DeleteOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  * <p>DeleteTreeNodeHandler class.</p>
@@ -49,7 +50,16 @@ import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDia
  */
 public class DeleteHandler extends AbstractHandler{
 
-       protected IWorkbenchPage activePage;
+    protected static final String SKIP = Messages.DeleteHandler_SKIP;
+    protected static final String MOVE_CHILDREN_TO_PARENT_NODE = Messages.DeleteHandler_MOVE_TO_PARENT;
+    protected static final String DELETE_ALL_CHILDREN = Messages.DeleteHandler_DELETE_ALL;
+    protected static final String THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO = Messages.DeleteHandler_THERE_ARE_CHILDNODES;
+    protected static final String THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO = Messages.DeleteHandler_THERE_ARE_CHILDREN;
+    protected static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S = Messages.DeleteHandler_DELETE_NODE;
+    protected static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION = Messages.DeleteHandler_DELETE_CLASSIFICATION;
+    protected static final String CONFIRM_DELETION = Messages.DeleteHandler_CONFIRM_DELETE;
+
+    protected IWorkbenchPage activePage;
        protected TaxonNavigator taxonNavigator;
 
        /** {@inheritDoc} */
@@ -63,7 +73,6 @@ public class DeleteHandler extends AbstractHandler{
                TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
 
 
-               String plural = selection.size() > 1 ? "s" : "";
                // Prompt user for confirmation
 
 
@@ -96,11 +105,11 @@ public class DeleteHandler extends AbstractHandler{
 
                                //configNodes.setDeleteTaxon(false);
                                if (taxonNode instanceof Classification && taxonNode.hasChildNodes()){
-                                       if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification? The tree has children, they will be deleted, too.")){
+                                       if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION+THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO)){
                                                return null;
                                        }
                                } else if (taxonNode instanceof Classification && !taxonNode.hasChildNodes()){
-                                       if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification?")){
+                                       if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION)){
                                                return null;
                                        }
                                } else {
@@ -109,11 +118,11 @@ public class DeleteHandler extends AbstractHandler{
                         DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(
                                 config,
                                 HandlerUtil.getActiveShell(event),
-                                "Confirm Deletion",
+                                CONFIRM_DELETION,
                                 null,
-                                "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
-                                MessageDialog.WARNING, new String[] { "Delete all children",
-                                        "Move children to parent node", "Skip" }, 0);
+                                DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S+THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO,
+                                MessageDialog.WARNING, new String[] { DELETE_ALL_CHILDREN,
+                                        MOVE_CHILDREN_TO_PARENT_NODE, SKIP }, 0);
                                                int dialog_result = dialog.open();
 
                                                if (dialog_result == 0){
@@ -130,7 +139,7 @@ public class DeleteHandler extends AbstractHandler{
 
                                                }
                                        }else{
-                                               if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+                                               if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
                                                        return null;
                                                }
                                                config.setTaxonNodeConfig(configNodes);
@@ -158,13 +167,13 @@ public class DeleteHandler extends AbstractHandler{
 
 
                        } catch (NotDefinedException e) {
-                               MessagingUtils.warn(getClass(), "Command name not set");
+                               MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
                        } catch (Exception e){
                            MessagingUtils.error(getClass(), e);
                        }
                } else{
                        try{
-                               if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected nodes?")){
+                               if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
                                        return null;
                                }
                                if (allEditorsClosed){
@@ -181,7 +190,7 @@ public class DeleteHandler extends AbstractHandler{
 
                                }
                        }catch (NotDefinedException e) {
-                               MessagingUtils.warn(getClass(), "Command name not set");
+                               MessagingUtils.warn(getClass(), Messages.DeleteHandler_9);
                        } catch (Exception e){
                 MessagingUtils.error(getClass(), e);
             }
index 9810418ca26bf8fbf9f4d0346f609b2398665922..9f2283c9829b2a92c422e70affef2eae21c8d22c 100644 (file)
@@ -27,6 +27,7 @@ import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
@@ -50,8 +51,7 @@ public class MoveFactualDataHandler extends AbstractHandler {
                 TaxonNode taxonNode = HibernateProxyHelper.deproxy(object, TaxonNode.class);
                 final TaxonNode sourceTaxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid());
                 if(NavigationUtil.isDirty(sourceTaxonNode)){
-                    MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Source Taxon", "There are unsaved " +
-                            "changes in the source taxon. Please save first.");
+                    MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveFactualDataHandler_UNSAVED_SOURCE, Messages.MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE);
                     return null;
                 }
                 //reload to avoid session conflicts
@@ -62,7 +62,7 @@ public class MoveFactualDataHandler extends AbstractHandler {
                     excludeTaxa.add(taxon.getUuid());
                     TaxonNode dialogTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                             navigator.getConversationHolder(),
-                            "Choose the accepted taxon",
+                            Messages.MoveFactualDataHandler_CHOOSE_TAXON,
                             excludeTaxa,
                             sourceTaxonNode,
                             sourceTaxonNode.getClassification());
@@ -72,8 +72,7 @@ public class MoveFactualDataHandler extends AbstractHandler {
                     //reload to avoid session conflicts
                     final TaxonNode targetTaxonNode = CdmStore.getService(ITaxonNodeService.class).load(dialogTaxonNode.getUuid());
                     if(NavigationUtil.isDirty(targetTaxonNode)){
-                        MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Target Taxon", "There are unsaved " +
-                                "changes in the target taxon. Please save first.");
+                        MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveFactualDataHandler_UNSAVED_TARGET, Messages.MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE);
                         return null;
                     }
                     CdmStore.getService(IDescriptionService.class).moveTaxonDescriptions(taxon.getUuid(),targetTaxonNode.getTaxon().getUuid());
@@ -99,7 +98,7 @@ public class MoveFactualDataHandler extends AbstractHandler {
                                 MessagingUtils.error(this.getClass(), e);
                                 throw new RuntimeException(e);
                             } catch (Exception e) {
-                                MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                                MessagingUtils.warningDialog(Messages.MoveFactualDataHandler_CREATE_FAILED, this, e.getMessage());
                             }
                         }
 
index 09557cccde7ead14e9a46c6511284bcc8c75ad80..d1309bf7ed265deebedc5fdcc0d918c21d0defad 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
@@ -87,23 +88,22 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
                    Classification classification = taxonNodes.iterator().next().getClassification();
                        MovingType moveToNewParent = MovingType.CHILD;
                        if (PreferencesUtil.getSortNodesNaturally()){
-                               if(!MessageDialog.openQuestion(null, "Target node", "The choosen target node should be the parent?")){
+                               if(!MessageDialog.openQuestion(null, Messages.MoveTaxonHandler_TARGET_NODE, Messages.MoveTaxonHandler_TARGET_NODE_MESSAGE)){
                                        moveToNewParent = MovingType.BEHIND;
                                }
-                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose the taxon above the moved taxon.", excludeTaxa, null, classification);
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_ABOVE, excludeTaxa, null, classification);
                        }else{
-                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, classification);
+                               parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_PARENT, excludeTaxa, null, classification);
                        }
                        if(parentTaxonNode != null){
                                if(NavigationUtil.isDirty(parentTaxonNode)){
-                                       MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Parent Taxon", "There are unsaved " +
-                                                       "changes in the parent taxon. Please save first.");
+                                       MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveTaxonHandler_UNSAVED_PARENT, Messages.MoveTaxonHandler_UNSAVED_PARENT_MESSAGE);
                                        return null;
                                }
 
 
                                AbstractPostOperation<?> operation = new MoveTaxonOperation
-                                               ("Move taxon to new parent", NavigationUtil.getUndoContext(),
+                                               (Messages.MoveTaxonHandler_MOVE_TO_PARENT, NavigationUtil.getUndoContext(),
                                                                taxonNodeUUIDs, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$
                                NavigationUtil.executeOperation(operation);
                                taxonNavigator.refresh();
index c4f6df32c9b70e35c86839f607bfbf87c21a834e..b480b103f1564128015411c35ea9ed1a8cbc9811 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
@@ -53,14 +54,14 @@ public class RemotingChangeAcceptedTaxonToSynonymHandler extends RemotingCdmHand
         // check that only a single taxon tree node has been selected
         if(selection.size() > 1) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
         }
 
         // check for no taxon tree node selected
         if(selection.size() == 0) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
         }
 
@@ -70,13 +71,13 @@ public class RemotingChangeAcceptedTaxonToSynonymHandler extends RemotingCdmHand
             oldTaxonNode = (ITaxonTreeNode)obj;
         } else {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
         }
         // check that the source taxon node does not have children
         if(((TaxonNode)oldTaxonNode).getCountChildren() > 0) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SOURCE_TAXON_HAS_CHILDREN_MESSAGE);
 
         }
@@ -85,7 +86,7 @@ public class RemotingChangeAcceptedTaxonToSynonymHandler extends RemotingCdmHand
         boolean editorClosed = NavigatorHandlerUtils.closeObsoleteEditor(event, (TaxonNode) oldTaxonNode);
         if(editorClosed != true) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
         }
 
@@ -100,7 +101,7 @@ public class RemotingChangeAcceptedTaxonToSynonymHandler extends RemotingCdmHand
         excludeTaxa.add(((TaxonNode)oldTaxonNode).getTaxon().getUuid());
         TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                 new ConversationHolderMock(),
-                "Choose the accepted taxon",
+                Messages.RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
                 excludeTaxa,
                 null,
                 ((TaxonNode)oldTaxonNode).getClassification());
index 892739e3cb96cd80a9f4921b71ca2389fc0e85c4..95b5bc5f6b83d505de51d9387aa2d1cb343d2be6 100644 (file)
@@ -30,10 +30,11 @@ import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  * @author cmathew
@@ -71,7 +72,7 @@ public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
         }
         if(!allEditorsClosed) {
             return new Status(IStatus.WARNING,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
         }
 
@@ -86,7 +87,7 @@ public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
                 taxonNode = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(taxonNode.getUuid());
             }
             if (taxonNode == null){
-               MessagingUtils.informationDialog("Node already deleted", "The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.");
+               MessagingUtils.informationDialog(Messages.RemotingDeleteTaxonNodeHandler_NODE_DELETED, Messages.RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE);
                return Status.CANCEL_STATUS;
 
             }
@@ -94,12 +95,12 @@ public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
                        if (taxonNode instanceof Classification) {
                                String message;
                                if (taxonNode.hasChildNodes()) {
-                                       message = "Do you really want to delete the classification? The tree has children, they will be deleted, too.";
+                                       message = DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION+DeleteHandler.THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO;
                                } else {
-                                       message = "Do you really want to delete the classification?";
+                                       message = DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION;
                                }
                                if (!DeleteConfiguratorDialog.openConfirm(
-                                               HandlerUtil.getActiveShell(event), "Confirm Deletion",
+                                               HandlerUtil.getActiveShell(event), DeleteHandler.CONFIRM_DELETION,
                                                message)) {
                                        return Status.CANCEL_STATUS;
                                }
@@ -110,11 +111,11 @@ public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
                     DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(
                             config,
                             HandlerUtil.getActiveShell(event),
-                            "Confirm Deletion",
+                            DeleteHandler.CONFIRM_DELETION,
                             null,
-                            "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
-                            MessageDialog.WARNING, new String[] { "Delete all children",
-                                "Move children to parent node", "Skip" }, 0);
+                            DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S+DeleteHandler.THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO,
+                            MessageDialog.WARNING, new String[] { DeleteHandler.DELETE_ALL_CHILDREN,
+                                DeleteHandler.MOVE_CHILDREN_TO_PARENT_NODE, DeleteHandler.SKIP }, 0);
                     int result = dialog.open();
 
                     if (result == 0){
@@ -129,7 +130,7 @@ public class RemotingDeleteTaxonNodeHandler extends RemotingCdmHandler {
                         return Status.CANCEL_STATUS;
                     }
                 } else{
-                    if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+                    if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), DeleteHandler.CONFIRM_DELETION, DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
                         return Status.CANCEL_STATUS;
                     }
                     config.setTaxonNodeConfig(configNodes);
index 882293bf22c180519863119f876a46d246cb88ee..c77c20dc19b06bab43c124af21db768b0419dfe8 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveFactualDataOperation;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
@@ -60,14 +61,14 @@ public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
         // check that only a single taxon tree node has been selected
         if(selection.size() > 1) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
         }
 
         // check for no taxon tree node selected
         if(selection.size() == 0) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
         }
 
@@ -77,13 +78,13 @@ public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
             sourceTaxonNode = (TaxonNode)obj;
         } else {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
         }
 
         if(NavigationUtil.isDirty(sourceTaxonNode)) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
         }
 
@@ -92,19 +93,19 @@ public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
 
         targetTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                 new ConversationHolderMock(),
-                "Choose the accepted taxon",
+                Messages.RemotingMoveFactualDataHandler_CHOOSE_TAXA,
                 excludeTaxa,
                 null,
                 sourceTaxonNode.getClassification());
 
         if(targetTaxonNode == null) {
             return new Status(IStatus.CANCEL,
-                    "unknown",
-                    "");
+                    "unknown", //$NON-NLS-1$
+                    ""); //$NON-NLS-1$
         }
         if(NavigationUtil.isDirty(targetTaxonNode)){
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
         }
         return Status.OK_STATUS;
@@ -143,7 +144,7 @@ public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
                     MessagingUtils.error(this.getClass(), e);
                     throw new RuntimeException(e);
                 } catch (Exception e) {
-                    MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+                    MessagingUtils.warningDialog(Messages.RemotingMoveFactualDataHandler_CREATE_FAILED, this, e.getMessage());
                 }
             }
 
index 5d88551411b33d54ddcb5cadc15c8ca346e4d016..bbedbc1242fdf6aabee0372c3e3bff1be3e7b8d5 100644 (file)
@@ -24,6 +24,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
 import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
@@ -53,14 +54,14 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
         // check that only a single taxon tree node has been selected
         if(selection.size() > 1) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
         }
 
         // check for no taxon tree node selected
         if(selection.size() == 0) {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
         }
         // check that selected object is a taxon node
@@ -69,7 +70,7 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
             oldTaxonNode = (TaxonNode)obj;
         } else {
             return new Status(IStatus.ERROR,
-                    "unknown",
+                    "unknown", //$NON-NLS-1$
                     TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
         }
         return Status.OK_STATUS;
@@ -94,12 +95,12 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
 
             parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
                     new ConversationHolderMock(),
-                    "Choose the taxon above the moved taxon.",
+                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_TAXON,
                     excludeTaxa,
                     null,
                     oldTaxonNode.getClassification());
-            String[] buttonLables = {"Child", "Behind","Cancel"};
-            MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the Taxonnode as child or behind the target node.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+            String[] buttonLables = {Messages.RemotingMoveTaxonNodeHandler_CHILD, Messages.RemotingMoveTaxonNodeHandler_BEHIND,Messages.RemotingMoveTaxonNodeHandler_CANCEL};
+            MessageDialog dialog = new MessageDialog(null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE, null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
             dialog.open();
             int returnCode = dialog.getReturnCode();
             if (returnCode == 0){
@@ -110,7 +111,7 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
         } else {
             parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
                     new ConversationHolderMock(),
-                    "Choose new parent",
+                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_PARENT,
                     excludeTaxa,
                     null,
                     oldTaxonNode.getClassification());
@@ -120,8 +121,8 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
         if(parentTaxonNode != null){
             if(NavigationUtil.isDirty(parentTaxonNode)){
                 MessageDialog.openWarning(activeShell,
-                        "Unsaved Parent Taxon",
-                        "There are unsaved changes in the parent taxon. Please save first.");
+                        Messages.RemotingMoveTaxonNodeHandler_UNSAVED_PARENT,
+                        Messages.RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE);
                 return null;
             }
 
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/SetSecReferenceForSubtreeHandler.java
new file mode 100755 (executable)
index 0000000..6627094
--- /dev/null
@@ -0,0 +1,142 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.navigation.navigator.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetSecundumForSubtreeOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.SetSecundumForSubtreeConfigurationWizard;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecReferenceForSubtreeHandler extends RemotingCdmHandler {
+
+       private static final Logger logger = Logger
+               .getLogger(SetSecReferenceForSubtreeHandler.class);
+
+
+       private ITaxonTreeNode taxonNode;
+       private SetSecundumForSubtreeConfigurator configurator;
+
+       /**
+        * @param label
+        */
+       public SetSecReferenceForSubtreeHandler() {
+           super(TaxonNavigatorLabels.CHANGE_SECUNDUM_FOR_SUBTREE);
+       }
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+        */
+       @Override
+       public IStatus allowOperations(ExecutionEvent event) {
+           TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+           // check that only a single taxon tree node has been selected
+           if(selection.size() > 1) {  }
+
+           // check for no taxon tree node selected
+           if(selection.size() == 0) {
+               return new Status(IStatus.ERROR,
+                       "unknown", //$NON-NLS-1$
+                       TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+           }
+
+           // check that selected object is a taxon node
+           Object obj = selection.iterator().next();
+           if(obj instanceof ITaxonTreeNode) {
+               taxonNode = (ITaxonTreeNode)obj;
+           } else {
+               return new Status(IStatus.ERROR,
+                       "unknown", //$NON-NLS-1$
+                       TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+           }
+
+
+           // check if corresponding name editor is closed
+           boolean editorClosed = NavigatorHandlerUtils.closeObsoleteEditor(event, (TaxonNode) taxonNode);
+           if(editorClosed != true) {
+               return new Status(IStatus.ERROR,
+                       "unknown", //$NON-NLS-1$
+                       TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
+           }
+
+           configurator = new SetSecundumForSubtreeConfigurator(taxonNode.getUuid());
+           SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
+
+           WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+
+           if (dialog.open() == Window.OK) {
+              return Status.OK_STATUS;
+           }else{
+               return Status.CANCEL_STATUS;
+           }
+
+//           if(!SetSecundumForSubtreeConfigurationWizard.openConfirmWithConfigurator(configurator)){
+//
+//               return Status.CANCEL_STATUS;
+//           }
+//
+//
+//           return Status.OK_STATUS;
+       }
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#doOperations(org.eclipse.core.commands.ExecutionEvent)
+        */
+       @Override
+       public AbstractOperation prepareOperation(ExecutionEvent event) {
+           List<UUID> excludeTaxa = new ArrayList<UUID>();
+           excludeTaxa.add(((TaxonNode)taxonNode).getTaxon().getUuid());
+
+
+
+
+           SetSecundumForSubtreeOperation operation =
+                   new SetSecundumForSubtreeOperation(event.getTrigger(),
+                           false,
+                           taxonNode.getUuid(),
+                           configurator);
+
+           return operation;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete(org.eclipse.core.commands.ExecutionEvent)
+        */
+       @Override
+       public void onComplete() {
+           // TODO Auto-generated method stub
+
+       }
+
+
+
+
+
+
+}
index 96141de43fe0bca81c936a29f2f0db5fb6eadda5..adc2d45ac6f440d95b511b3b105d4e3819058b72 100644 (file)
@@ -26,6 +26,7 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -88,8 +89,8 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
 
 
                    if (!result.getExceptions().isEmpty() && result.isOk()){
-                       String separator = ", ";
-                           String exceptionString = "";
+                       String separator = ", "; //$NON-NLS-1$
+                           String exceptionString = ""; //$NON-NLS-1$
                            int count = result.getExceptions().size();
                            int n = 0;
                            for (Exception exception : result.getExceptions()) {
@@ -100,12 +101,12 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
                            }
                        }
 
-                       MessagingUtils.informationDialog("Synonym created but taxon deletion not possible.", exceptionString);
+                       MessagingUtils.informationDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS, exceptionString);
                    } else if (result.isAbort() || result.isError()){
-                       MessagingUtils.errorDialog("Synonym creation not possible", null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
+                       MessagingUtils.errorDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL, null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
                    }
                } catch (IllegalArgumentException e) {
-            MessagingUtils.errorDialog("Operation failed", this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
+            MessagingUtils.errorDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_OP_FAIL, this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
             return Status.CANCEL_STATUS;
         }
 
index 08f323a8e41ea8219252df38567eaeab414b8b35..cfe9d15346ca3c989ea129371a56819844e113d9 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
@@ -31,6 +31,7 @@ import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -45,6 +46,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class DeleteOperation extends AbstractPersistentPostOperation{
 
+    private static final String TAXON_NODE_COULD_NOT_BE_DELETED = Messages.DeleteOperation_DELETE_FAIL;
     private Set<ITaxonTreeNode> treeNodes;
     protected final TaxonDeletionConfigurator config;
     private final ICdmEntitySessionEnabled cdmEntitySessionEnabled;
@@ -102,7 +104,7 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
 
                bind();
                monitor.worked(20);
-               ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+               ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
                ITaxonNodeService service = controller.getTaxonNodeService();
                if(taxonNode != null && taxonNode instanceof TaxonNode){
                        //((TaxonNode) treeNode).delete();
@@ -112,14 +114,14 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                        DeleteResult result = service.deleteTaxonNode((TaxonNode)taxonNode, config);
                        if (result.isError() && !result.getExceptions().isEmpty()){
 
-                               DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+                               DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
                        } else if (!result.getExceptions().isEmpty()){
-                               String separator = ", ";
-                           String exceptionString = "";
+                               String separator = ", "; //$NON-NLS-1$
+                           String exceptionString = ""; //$NON-NLS-1$
                            for (Exception exception : result.getExceptions()) {
                            exceptionString += exception.getLocalizedMessage()+separator;
                        }
-                           DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode was successfully deleted, but related object(s) could not be deleted", TaxeditorNavigationPlugin.PLUGIN_ID);
+                           DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteOperation_DELETE_SUCCESS, TaxeditorNavigationPlugin.PLUGIN_ID);
                        }
 
 
@@ -129,7 +131,7 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                        DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree.getUuid());
             if (result.isError() && !result.getExceptions().isEmpty()){
                 //TODO:Error message!
-                DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+                DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
             }
         } else {
             Set<UUID> treeNodeUuids = new HashSet<UUID>();
@@ -144,7 +146,7 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
             DeleteResult result = service.deleteTaxonNodes(treeNodeUuids, config);
             if (result.isError() && !result.getExceptions().isEmpty()){
                                //TODO:Error message!
-                DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+                DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
                        }
 
         }
index 1513977f321c8c8ce87564a9ee9f08d52606a06d..eca7b851c16d1a19233def9b1986d2f8f59274a0 100644 (file)
@@ -24,6 +24,7 @@ import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -120,7 +121,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
        @Override
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               MessagingUtils.warn(this.getClass(), "Not implemented yet.");
+               MessagingUtils.warn(this.getClass(), Messages.MoveTaxonOperation_NOT_IMPLEMENTED);
 
                // iterate over oldParentTreeNodes, delete each TaxonNode from its actual parent and add to its former parent
 
index 1b6096a8d379a24af9c2fd8c9fd2247c7bd9bf19..2020b2952ae627198d53e9ab6ac50ca3fb6f8dba 100644 (file)
@@ -17,6 +17,7 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 
 
@@ -31,7 +32,7 @@ public class RemotingChangeAcceptedTaxonToSynonymOperation extends RemotingCdmUp
     private final UUID newAcceptedTaxonNodeUuid;
 
 
-    private final static String LABEL = "Change Accepted Taxon to Synonym operation";
+    private final static String LABEL = Messages.RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP;
 
     /**
      * @param label
index 8cd883626332322c6d132248b159ca7fef267af8..7e3562b5be4bab649ac44bd8b2d7f68abf69df2e 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 
 /**
@@ -31,7 +32,7 @@ import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
  */
 public class RemotingDeleteTaxonNodeOperation extends RemotingCdmUpdateOperation {
 
-    private final static String LABEL = "Delete Taxon Node operation";
+    private final static String LABEL = Messages.RemotingDeleteTaxonNodeOperation_DELETE_OP;
 
     private final Set<ITaxonTreeNode> treeNodes;
     private final TaxonDeletionConfigurator config;
index f27d2bc46430dfd55c313f3d075fb3e14075c968..f863bdd153e2c7c56400c9eca5700e2ab647ee26 100644 (file)
@@ -17,6 +17,7 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 
 /**
@@ -26,7 +27,7 @@ import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
  */
 public class RemotingMoveFactualDataOperation extends RemotingCdmUpdateOperation {
 
-    private final static String LABEL = "Move Factual Data operation";
+    private final static String LABEL = Messages.RemotingMoveFactualDataOperation_MOVE_OP;
 
     private final UUID sourceTaxonUuid;
     private final UUID targetParentTaxonUuid;
index 9c4c646d908422c88d9cb8a5d5d69147dd48b79d..cbaf288dbec3ac4081a54b5a12e179fb489d35dd 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
 import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 
@@ -30,7 +31,7 @@ import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
  */
 public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
 
-    private final static String LABEL = "Move Taxon operation";
+    private final static String LABEL = Messages.RemotingMoveTaxonOperation_MOVE_OP;
 
     private final Set<UUID> taxonNodesToMoveUuid;
     private final UUID newParentTreeNodeUuid;
@@ -86,7 +87,7 @@ public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
              default:
                     UpdateResult result = new UpdateResult();
                     result.setAbort();
-                    result.addException(new Exception("The moving type is invalid."));
+                    result.addException(new Exception("The moving type is invalid.")); //$NON-NLS-1$
                     return result;
         }
     }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetSecundumForSubtreeOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetSecundumForSubtreeOperation.java
new file mode 100755 (executable)
index 0000000..77bcde7
--- /dev/null
@@ -0,0 +1,62 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.navigation.navigator.operation;
+
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumForSubtreeOperation extends RemotingCdmUpdateOperation{
+
+    private final static String LABEL = Messages.SetSecundumForSubtreeOperation_CHANGE_SEC_OP;
+
+    UUID parentUuid;
+    SetSecundumForSubtreeConfigurator config;
+
+    /**
+     * @param label
+     * @param action
+     * @param source
+     * @param async
+     */
+    public SetSecundumForSubtreeOperation(Object source,
+            boolean async,
+            UUID taxonNodeUuid,
+            SetSecundumForSubtreeConfigurator config) {
+        super(LABEL, Action.Update, source, async);
+        parentUuid = taxonNodeUuid;
+        this.config = config;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+        monitor.beginTask(Messages.SetSecundumForSubtreeOperation_SET_SEC_TASK, 10);
+        UpdateResult result =  CdmApplicationState.getService(ITaxonNodeService.class).setSecundumForSubtree(config, null);
+        monitor.done();
+        return result;
+    }
+
+}
index ee5763353773bb43ce41f0392aec4d737ae59195..5d736690339ebaf98b82f16947f2bfc1498eea23 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -61,9 +62,9 @@ public class CreateNewTaxonHierarchyOperation extends AbstractPersistentPostOper
         Set<CdmBase> unchangedObjects = result.getUnchangedObjects();
         Classification classification2 = CdmBase.deproxy(result.getCdmEntity(), Classification.class);
 
-        MessagingUtils.informationDialog("Add Hierarchy successful", "New classification is "
-      + classification2.getTitleCache() + "\nCreated Genus: " + updatedObjects.size()
-      +"\nCreated Subspecies: " + unchangedObjects.size());
+        MessagingUtils.informationDialog(Messages.CreateNewTaxonHierarchyOperation_ADD_HIERARCHY,
+                String.format(Messages.CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE,
+                        classification2.getTitleCache(), updatedObjects.size(), unchangedObjects.size()));
 
         return postExecute(result.getCdmEntity());
     }
index 7d213a104906b918bfb7e3432c716bf6924bef0b..3fb4b28715ab14759fef4e0e7809829e53d185ea 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -106,7 +107,7 @@ public class CreateTaxonNode extends AbstractPersistentPostOperation {
 
                        return postExecute(childTaxonNode);
                }catch(Exception e){
-                       MessagingUtils.messageDialog("Could not create taxon node", getClass(), e.getLocalizedMessage(), e);
+                       MessagingUtils.messageDialog(Messages.CreateTaxonNode_CREATE_FAILED, getClass(), e.getLocalizedMessage(), e);
                        return Status.CANCEL_STATUS;
                }
        }
@@ -129,7 +130,7 @@ public class CreateTaxonNode extends AbstractPersistentPostOperation {
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
 
-               MessagingUtils.warn(this.getClass(), "Not yet implemented.");
+               MessagingUtils.warn(this.getClass(), "Not yet implemented."); //$NON-NLS-1$
                return null;
        }
 }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/Messages.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/Messages.java
deleted file mode 100644 (file)
index cabc544..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/**\r
- * Copyright (C) 2014 EDIT\r
- * European Distributed Institute of Taxonomy\r
- * http://www.e-taxonomy.eu\r
- *\r
- * The contents of this file are subject to the Mozilla Public License Version 1.1\r
- * See LICENSE.TXT at the top of this package for the full license terms.\r
- */\r
-package eu.etaxonomy.taxeditor.navigation.search;\r
-\r
-import org.eclipse.osgi.util.NLS;\r
-\r
-/**\r
- * @author d.schild\r
- * @date 18.06.2014\r
- *\r
- */\r
-public class Messages extends NLS {\r
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$\r
-    public static String SearchBar_0;\r
-    public static String SearchBar_1;\r
-    public static String SearchBar_2;\r
-    public static String SearchBar_3;\r
-    public static String SearchBar_4;\r
-    public static String SearchBar_6;\r
-    public static String SearchBar_7;\r
-    public static String SearchBar_8;\r
-    public static String SearchBar_9;\r
-    static {\r
-        // initialize resource bundle\r
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
-    }\r
-\r
-    private Messages() {\r
-    }\r
-}\r
index 0b984e132fe8e16412025816d0aea8a7197edd4f..9d4c93f61939cd00424478085050685fd494c4de 100644 (file)
@@ -40,6 +40,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
index ade78cbb707dcb79f0b7b555dd53db2b6955216f..fc619781a1ac71c6d6b0340b13d78cee70c58f32 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
 /**
@@ -74,12 +75,12 @@ public class SearchResultLabelProvider extends ColumnLabelProvider implements IL
                if(element instanceof UuidAndTitleCache){
                        Class type = ((UuidAndTitleCache) element).getType();
                        if(type == Taxon.class){
-                               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorAccepted");
+                               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorAccepted"); //$NON-NLS-1$
                        }else if(type == Synonym.class){
-                               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorSynonym");
+                               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorSynonym"); //$NON-NLS-1$
                        }
                }
-               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorDefault");
+               return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorDefault"); //$NON-NLS-1$
        }
 
        /* (non-Javadoc)
@@ -116,12 +117,12 @@ public class SearchResultLabelProvider extends ColumnLabelProvider implements IL
        public String getToolTipText(Object element) {
                if(element instanceof TaxonBase){
                        if(element instanceof Synonym){
-                               return "Synonym: " + ((TaxonBase<?>) element).getName().getTitleCache();
+                               return Messages.SearchResultLabelProvider_SYNONYM + ((TaxonBase<?>) element).getName().getTitleCache();
                        }else{
-                               return "Taxon: " + ((TaxonBase<?>) element).getName().getTitleCache();
+                               return Messages.SearchResultLabelProvider_TAXON + ((TaxonBase<?>) element).getName().getTitleCache();
                        }
                }
-               return "Name: " + element.toString();
+               return Messages.SearchResultLabelProvider_NAME + element.toString();
        }
        
        
index 18760f5c0c227ac33c33ddcfe034e6ef77d86ddd..f440f6edca16f26a62098436a7f63523b431c6a3 100644 (file)
@@ -48,6 +48,7 @@ import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
 import eu.etaxonomy.taxeditor.navigation.search.SearchBar.SearchOption;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -69,7 +70,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                 */
                @Override
                public void contextStop(IMemento memento, IProgressMonitor monitor) {
-                       monitor.subTask("Getting rid of search results");
+                       monitor.subTask(Messages.SearchResultView_REMOVE_SEARCH_RESULTS);
                        AbstractUtility.hideView(SearchResultView.this);
                }
        }
@@ -148,7 +149,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                composite.setLayout(new GridLayout(2, false));
 
                Label searchStringLabel = new Label(composite, SWT.NULL);
-               searchStringLabel.setText("Search String:");
+               searchStringLabel.setText(Messages.SearchResultView_SEARCH_STRING);
 
                searchString = new Text(composite, SWT.NULL);
                searchString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
@@ -156,14 +157,14 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
 //             searchString.setText("                                               ");
 
                Label configurationDescriptionLabel = new Label(composite, SWT.NULL);
-               configurationDescriptionLabel.setText("Search for:");
+               configurationDescriptionLabel.setText(Messages.SearchResultView_SEARCH_FOR);
 
                configurationLabel = new Text(composite, SWT.WRAP);
                configurationLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
                configurationLabel.setEditable(false);
 
                Label statusLabel = new Label(composite, SWT.NULL);
-               statusLabel.setText("Status:");
+               statusLabel.setText(Messages.SearchResultView_STATUS);
 
                status = new Text(composite, SWT.NULL);
                status.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
@@ -178,7 +179,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
         * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator} object.
         */
        public void performSearch(IFindTaxaAndNamesConfigurator configurator){
-               setPartName("Search: '" + configurator.getTitleSearchString() + "'");
+               setPartName(String.format(Messages.SearchResultView_SEARCH, configurator.getTitleSearchString()));
 
                searchString.setText(configurator.getTitleSearchString());
 
@@ -197,17 +198,17 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                }
                configurator.setMatchMode(MatchMode.LIKE);
 
-               String includedEntitiesString = "";
+               String includedEntitiesString = ""; //$NON-NLS-1$
                for (int i = 0; i < includedEntities.size(); i++){
                        includedEntitiesString += includedEntities.get(i);
                        if(i < includedEntities.size() -1){
-                               includedEntitiesString += ", ";
+                               includedEntitiesString += ", "; //$NON-NLS-1$
                        }
                }
 
                configurationLabel.setText(includedEntitiesString);
 
-               status.setText("Searching...");
+               status.setText(Messages.SearchResultView_SEARCHING);
 
                searchJob = new SearchJob(Display.getCurrent(), configurator);
                searchJob.schedule();
@@ -222,10 +223,10 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
        protected void displaySearchResult(List<UuidAndTitleCache<IdentifiableEntity>> result) {
                if(result.size() > 0){
                        resultViewer.setInput(result);
-                       status.setText(result.size() + " entities found");
+                       status.setText(String.format(Messages.SearchResultView_CNT_ENTITIES_FOUND, result.size()));
                }else{
                        resultViewer.setInput(EMPTY);
-                       status.setText("Search returned no results");
+                       status.setText(Messages.SearchResultView_NO_RESULTS);
                }
        }
 
@@ -294,7 +295,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                 * @param name
                 */
                public SearchJob(Display display, IFindTaxaAndNamesConfigurator configurator) {
-                       super("Performing Search");
+                       super(Messages.SearchResultView_PERFORMING_SEARCH);
                        this.display = display;
                        this.configurator = configurator;
                }
@@ -304,7 +305,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                 */
                @Override
                protected IStatus run(IProgressMonitor monitor) {
-                       monitor.beginTask("", 100);
+                       monitor.beginTask("", 100); //$NON-NLS-1$
                        monitor.worked(20);
 
                        final List<UuidAndTitleCache<IdentifiableEntity>> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
@@ -321,7 +322,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                                display.asyncExec(new Runnable() {
                                        @Override
                     public void run() {
-                                               status.setText("Cancelled");
+                                               status.setText(Messages.SearchResultView_CANCELLED);
                                        }
                                });
                        }
index 60dea2f68d1f381ff10da83942a19d76d08ab4e8..73bc41dc2d63479057a6f245c0b294cd6d42091c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry kind="output" path="target/classes"/>
index 0a300156793123442c4c667a6be45a7f0f7e8999..f7744fbe96487145860ab3d4248e8fa3627aa3fc 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Printpublisher Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.printpublisher;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib,
index e4b725bce52d31d6bbf43f9b0f8ccb44ba0a79d3..e2c98274c4a702305a4f2554a466cb0505f86511 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <artifactId>taxeditor-parent</artifactId>
                <groupId>eu.etaxonomy</groupId>
-               <version>4.5.1</version>
+               <version>4.6.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index a9750e13a1d2f9ea25715759404af0f1017d7d99..8cde7d596fe055b7b27ef304d6e8d9bc3ef8c203 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.jdom.Element;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.print.IXMLEntityFactory;
 import eu.etaxonomy.cdm.print.PublishConfigurator;
 import eu.etaxonomy.cdm.print.out.pdf.PdfOutputModule;
@@ -55,7 +55,7 @@ public class GeneratePdfHandler extends AbstractHandler {
                        return null;
                }
                
-               configurator = PublishConfigurator.NewLocalInstance((ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration());
+               configurator = PublishConfigurator.NewLocalInstance((ICdmRepository) CdmStore.getCurrentApplicationConfiguration());
                
                Element taxonNodeElement = getTaxonNodeElement((TaxonEditorInput) input);
                configurator.addSelectedTaxonNodeElements(taxonNodeElement);
index 62da29cc6b0be111b645a34ed96388399bb2ef1c..043f7eb2c59e071bab02e715e54b724c54b6d721 100644 (file)
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Text;
 import org.jdom.Element;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.print.IXMLEntityFactory;
 import eu.etaxonomy.cdm.print.PublishConfigurator;
 import eu.etaxonomy.cdm.print.XMLHelper;
@@ -179,7 +179,7 @@ public class SelectServiceWizardPage extends AbstractPublishWizardPage {
                
                text_serviceUrl.setEnabled(false);
                
-               setConfigurator(PublishConfigurator.NewLocalInstance((ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration()));
+               setConfigurator(PublishConfigurator.NewLocalInstance((ICdmRepository) CdmStore.getCurrentApplicationConfiguration()));
                getConfigurator().addOutputModule(getOutputModule());
                refresh();
        }
index db46751e9dcd8c5406379f4e094bc1d00328f50f..6d865ded72c069a546e20b4b7031f21828439ca1 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
index 3c018f39191a4447e3f85c6ee2143e0ef85f687d..12115ea9c36eff51f485656c6d6cefb00865f0e2 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: DataStore Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
@@ -34,7 +34,8 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.ui.bar,
  eu.etaxonomy.taxeditor.ui.combo,
  eu.etaxonomy.taxeditor.ui.dialog,
- eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator,
+ eu.etaxonomy.taxeditor.ui.dialog.configurator,
+ eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator,
  eu.etaxonomy.taxeditor.ui.dialog.selection,
  eu.etaxonomy.taxeditor.ui.element,
  eu.etaxonomy.taxeditor.ui.group.grantedauthority,
index d805fefc59b2d1121fcea19bc4a0a872461f7a4b..d3038a6fedb22a26b84092b76348c3a2ebff4d05 100644 (file)
@@ -10,6 +10,6 @@ bin.includes = META-INF/,\
                OSGI-INF/,\
                OSGI-INF/l10n/bundle.properties,\
                OSGI-INF/l10n/bundle_de.properties,\
-               OSGI-INF/l10n/messages.properties,\
-               OSGI-INF/l10n/messages_de.properties,\
+               src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties,\
+               src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
 
index 78c18fd13f021dd05d1a3610888b05450a90995a..dba3174e308361f2f06b836f16b33946dcdf1ac5 100755 (executable)
             id="eu.etaxonomy.taxeditor.preferences.typeDesignation"
             name="%page.name.25">
       </page>
-      <page
+     <!-- <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
             id="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
             name="%page.name.26">
-      </page>
+      </page>-->
       <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.MediaPreferences"
             id="eu.etaxonomy.taxeditor.preference.ChecklistEditorGeneralPreferencePage"
             name="%page.name.28">
       </page>
-      <page
+   <!--   <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.TemplatePreferencePage"
             id="eu.etaxonomy.taxeditor.preference.TemplatePreferencePage"
             name="%page.name.29">
-      </page>
+      </page>-->
       <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.LanguageEditorPreferencePage"
index e9237e4dc6452733cf3af6e3d1a5c65c4b4ec16f..fb676eb2d974a73c4fa4c1d79f79c93a1709a431 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-       <version>4.5.1</version>
+       <version>4.6.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 677d5f8c3a780ab58e0004ea457a8810b75039e0..e6b52b30e8a2d4dc25470a4c4119ed063c5a9fc9 100644 (file)
@@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.TabItem;
 
 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
@@ -40,21 +41,27 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
  */
 public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
-
-
     CdmPreference preferedNomenclaturalCode;
     NameDetailsConfigurator config ;
+    CdmPreference isRedListPreference;
+    CdmPreference determinationOnlyForFieldUnitsPreference;
+    CdmPreference showCollectingAreaInGeneralSectionPreference;
+    CdmPreference showTaxonAssociationsPreference;
+
+
     TabFolder tabFolder;
-   // private int maxNumOfColumns;
+
     IPreferenceStore preferenceStore;
     Composite composite;
     boolean isSimpleDetailsViewActivated;
     Composite child ;
 
     private Combo nomenclaturalCodeCombo;
-
     private Label nomenclaturalCodeLabel;
 
+//    private UriWithLabelElement nomenclaturalCodeCombo;
+//    private Label nomenclaturalCodeLabel;
+
     String[][] labelAndValues;
 
     /*
@@ -72,56 +79,8 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
         this.preferenceStore = store;
     }
 
-//    @Override
-//    protected void createFieldEditors() {
-//        setMessage("Choose the preferences for the whole cdm store.");
-//        tabFolder = new TabFolder(getFieldEditorParent(), SWT.NONE);
-//
-//        createNomenclaturalCodeTab();
-//        createNameDetailsConfiguration();
-//
-//
-//    }
-
-
-
-//
-//    /***
-//    * Adjust the layout of the field editors so that they are properly aligned.
-//    */
-//    @Override
-//    protected void adjustGridLayout() {
-//        if (tabFolder != null){
-//            TabItem[] items = tabFolder.getItems();
-//            for (int j = 0; j < items.length; j++){
-//                GridLayout layout = ((GridLayout) ((Composite) items[j].getControl()).getLayout());
-//                layout.numColumns = this.maxNumOfColumns;
-//                layout.marginHeight = 5;
-//                layout.marginWidth = 5;
-//            }
-//        }
-//        // need to call super.adjustGridLayout() since fieldEditor.adjustForNumColumns() is protected
-//        super.adjustGridLayout();
-//
-//        // reset the main container to a single column
-//        ((GridLayout) super.getFieldEditorParent().getLayout()).numColumns = 1;
-//    }
-
-//    /***
-//    * Returns a parent composite for a field editor.
-//    * <p>
-//    * This value must not be cached since a new parent may be created each time this method called. Thus this method
-//    * must be called each time a field editor is constructed.
-//    * </p>
-//    * @return a parent
-//    */
-//    @Override
-//    protected Composite getEditorParent(){
-//        if (tabFolder == null || tabFolder.getItemCount() == 0){
-//            return super.getWizard();
-//        }
-//        return (Composite) tabFolder.getItem(tabFolder.getItemCount() - 1).getControl();
-//    }
+
+
 
     /***
     * Adds a tab to the page.
@@ -157,7 +116,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
         if (composite == null){
             composite = parent;
         }
-       composite = addTab("Name Details View Configuration");
+       composite = addTab(Messages.DatabasePreferencesPage_details_view_configuration);
 //        TabItem tbtmNameDetailsConfiguration = new TabItem(tabFolder, SWT.NONE);
 //        Composite c2 = new Composite(tabFolder, SWT.BORDER);
 //        c2.setLayout(new GridLayout(1, true));
@@ -170,7 +129,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        isSimpleDetailsViewActivated= PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
        final Button activateCheckButton = new Button(composite, SWT.CHECK);
-       activateCheckButton.setText("Show only a simple name details view");
+       activateCheckButton.setText(Messages.DatabasePreferencesPage_show_only_simple_details_view);
        activateCheckButton.setSelection(isSimpleDetailsViewActivated);
        activateCheckButton.addSelectionListener(new SelectionAdapter(){
        @Override
@@ -193,7 +152,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showTaxon = new Button(child, SWT.CHECK);
        boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
-       showTaxon.setText("Show taxon of the name");
+       showTaxon.setText(Messages.DatabasePreferencesPage_show_taxon);
        showTaxon.setSelection(isShowTaxon);
        showTaxon.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -205,7 +164,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showLsid = new Button(child, SWT.CHECK);
        boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
-       showLsid.setText("Show Lsid of the name");
+       showLsid.setText(Messages.DatabasePreferencesPage_show_lsid);
        showLsid.setSelection(isShowLSID);
        showLsid.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -217,7 +176,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
        boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
-       showNomenclaturalCode.setText("Show the nomenclatural code");
+       showNomenclaturalCode.setText(Messages.DatabasePreferencesPage_show_nomenclatural_code);
        showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
        showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -229,7 +188,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showNameCache = new Button(child, SWT.CHECK);
        boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
-       showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
+       showNameCache.setText(Messages.DatabasePreferencesPage_show_namecache);
        showNameCache.setSelection(isShowNomenclaturalCode);
        showNameCache.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -240,7 +199,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
         });
        final Button showAppendedPhrase = new Button(child, SWT.CHECK);
        boolean isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
-       showAppendedPhrase.setText("Show appended phrase");
+       showAppendedPhrase.setText(Messages.DatabasePreferencesPage_show_appended_phrase);
        showAppendedPhrase.setSelection(isShowAppendedPhrase);
        showAppendedPhrase.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -252,7 +211,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showRank = new Button(child, SWT.CHECK);
        boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
-       showRank.setText("Show rank of the name");
+       showRank.setText(Messages.DatabasePreferencesPage_show_rank);
        showRank.setSelection(isShowRank);
        showRank.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -263,7 +222,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
         });
        final Button showEpithets = new Button(child, SWT.CHECK);
        boolean isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
-       showEpithets.setText("Show atomised epithets");
+       showEpithets.setText(Messages.DatabasePreferencesPage_show_atomised_epithets);
        showEpithets.setSelection(isShowEpithets);
        showEpithets.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -272,9 +231,21 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
              }
         });
+       final Button showAuthorshipCache = new Button(child, SWT.CHECK);
+       boolean isShowAuthorshipCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
+       showAuthorshipCache.setText(Messages.DatabasePreferencesPage_show_authorship_cache);
+       showAuthorshipCache.setSelection(isShowAuthorshipCache);
+       showAuthorshipCache.addSelectionListener(new SelectionAdapter(){
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                boolean isShowAuthorshipCache = showAuthorshipCache.getSelection();
+                PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorshipCache);
+             }
+        });
+
        final Button showAuthorship = new Button(child, SWT.CHECK);
        boolean isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
-       showAuthorship.setText("Show authorship section");
+       showAuthorship.setText(Messages.DatabasePreferencesPage_show_author_section);
        showAuthorship.setSelection(isShowAuthorship);
        showAuthorship.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -286,7 +257,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
        boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
-       showNomenclaturalRef.setText("Show nomenclatural reference section");
+       showNomenclaturalRef.setText(Messages.DatabasePreferencesPage_Show_nomenclatural_Ref);
        showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
        showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -298,7 +269,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
        boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
-       showNomenclaturalStatus.setText("Show nomenclatural status section");
+       showNomenclaturalStatus.setText(Messages.DatabasePreferencesPage_Show_nomenclaturalStatus);
        showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
        showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -310,7 +281,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showProtologue = new Button(child, SWT.CHECK);
        boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
-       showProtologue.setText("Show protologue section");
+       showProtologue.setText(Messages.DatabasePreferencesPage_Show_Protologue);
        showProtologue.setSelection(isShowProtologue);
        showProtologue.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -322,7 +293,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showTypeDesignation = new Button(child, SWT.CHECK);
        boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
-       showTypeDesignation.setText("Show name type designation section");
+       showTypeDesignation.setText(Messages.DatabasePreferencesPage_Show_Type_designation);
        showTypeDesignation.setSelection(isShowTypeDesignation);
        showTypeDesignation.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -335,7 +306,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        final Button showNameRelationship = new Button(child, SWT.CHECK);
        boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
-       showNameRelationship.setText("Show name relationship section");
+       showNameRelationship.setText(Messages.DatabasePreferencesPage_Show_NameRelations);
        showNameRelationship.setSelection(isShowNameRelationship);
        showNameRelationship.addSelectionListener(new SelectionAdapter(){
             @Override
@@ -355,77 +326,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        // Label emptyLabel = new Label(getFieldEditorParent(), 0);
 
-//       addField(new BooleanFieldEditor(
-//               IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, "show simple (configurable) details", getFieldEditorParent()));
-//       addField(new SpacerFieldEditor(getFieldEditorParent()));
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON,
-//                "show taxon section",
-//                getFieldEditorParent()));
-//
-//       addField(new BooleanFieldEditor(
-//               IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE,
-//               "show name cache",
-//               getFieldEditorParent()));
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID,
-//                "show LSID of the name",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE,
-//                "show nomenclatural code of the name",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE,
-//                "show appended phrase",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK,
-//                "show rank of the name",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS,
-//                "show atomised epithets of the name",
-//                getFieldEditorParent()));
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP,
-//                "show authorship section",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE,
-//                "show nomenclatural reference section",
-//                getFieldEditorParent()));
-//
-//
-//       addField( new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS,
-//                "show nomenclatural status section",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE,
-//                "show protologue section",
-//                getFieldEditorParent()));
-//
-//
-//       addField(new BooleanFieldEditor(
-//                IPreferenceKeys.ALLOW_OVERRIDE_NAMEDETAILS,
-//                "allow to use local preference",
-//                getFieldEditorParent()));
+
 
 
     }
@@ -451,32 +352,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
         }
         return labelAndValues;
     }
-//    @Override
-//    public boolean performOk() {
-//       if (doGetPreferenceStore()== null){
-//           setPreferenceStore(PreferencesUtil.getPreferenceStore());
-//       }
-//
-//
-//           String value =doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
-//           boolean allowOverride =  doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
-//           CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
-//           pref.setAllowOverride(allowOverride);
-//           ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
-//           if (controller == null){
-//               return false;
-//           }
-//           IPreferenceService service = controller.getPreferenceService();
-//           service.set(pref);
-//           createNameDetailsViewConfig();
-//           value =config.toString();
-//           allowOverride = doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAMEDETAILS);
-//           pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NameDetailsView, value);
-//           pref.setAllowOverride(allowOverride);
-//           service.set(pref);
-//
-//       return true;
-//   }
+
 
 /**
      *
@@ -500,7 +376,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
     }
 
     public void createNomenclaturalCodeTab(Composite parent){
-       composite = addTab("Nomenclatural Code");
+       composite = addTab(Messages.DatabasePreferencesPage_Define_Default_NomenclaturalCode);
        nomenclaturalCodeCombo = new Combo(composite, SWT.READ_ONLY);
       List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
               .getSupportedCodes();
@@ -510,6 +386,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
        }
        getLabelAndValues();
+       //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
        nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
            @Override
         public void widgetSelected(SelectionEvent evt) {
@@ -532,7 +409,7 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
 
         final Button useLocalPreference = new Button(composite, SWT.CHECK);
         boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
-        useLocalPreference.setText("allow to use local preference");
+        useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
         useLocalPreference.setSelection(isUseLocalPreference);
         useLocalPreference.addSelectionListener(new SelectionAdapter(){
              @Override
@@ -543,23 +420,102 @@ public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
          });
 
 
-   // Label emptyLabel = new Label(getFieldEditorParent(), 0);
 
- //   addField(new ComboFieldEditor(
-//            IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY,
-//            "Choose which nomenclatural code you would like to use for scientific names unless otherwise specified.", getLabelAndValues(),
-//            getFieldEditorParent()));
-//
-//
-//    addField(new BooleanFieldEditor(
-//            IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY,
-//            "allow to use local preference",
-//            getFieldEditorParent()));
-//    adjustGridLayout();
 
 }
 
+    public void createBiocaseProviderTab(Composite parent){
+        composite = addTab(Messages.DatabasePreferencesPage_Biocase_Provider);
+        nomenclaturalCodeCombo = new Combo(composite, SWT.READ_ONLY);
+       List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
+               .getSupportedCodes();
+        for (NomenclaturalCode code: supportedCodes) {
+            nomenclaturalCodeCombo.add(NomenclaturalCodeHelper
+                    .getDescription(code));
+
+        }
+        getLabelAndValues();
+        //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
+        nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+         public void widgetSelected(SelectionEvent evt) {
+
+                String name = nomenclaturalCodeCombo.getText();
+                String selectedPreferenceKey = null;
+                for (String[] labelAndValue: labelAndValues){
+                    if (labelAndValue[0].equals(name)){
+                        selectedPreferenceKey = labelAndValue[1];
+                    }
+                }
+
+
+                PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY, selectedPreferenceKey);
+
+            }
+        });
+        nomenclaturalCodeLabel = new Label(composite, SWT.READ_ONLY);
+
+
+         final Button useLocalPreference = new Button(composite, SWT.CHECK);
+         boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
+         useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
+         useLocalPreference.setSelection(isUseLocalPreference);
+         useLocalPreference.addSelectionListener(new SelectionAdapter(){
+              @Override
+              public void widgetSelected(SelectionEvent e) {
+                  boolean isUseLocalPreference = useLocalPreference.getSelection();
+                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, isUseLocalPreference);
+               }
+          });
+
+
+
 
+ }
+
+
+    public void createSpecimenOrObservationTab(Composite parent){
+        composite = addTab(Messages.DatabasePreferencesPage_Specimen_Or_Observation);
+
+        final Button showCollectingAreaInGeneralSectionButton = new Button(composite, SWT.CHECK);
+        boolean isShowCollectingAreaInGeneralSection = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION);
+        showCollectingAreaInGeneralSectionButton.setText(Messages.DatabasePreferncesPage_Show_Collecting_Areas_in_general_section);
+        showCollectingAreaInGeneralSectionButton.setSelection(isShowCollectingAreaInGeneralSection);
+        showCollectingAreaInGeneralSectionButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isShowCollectingAreaInGeneralSection = showCollectingAreaInGeneralSectionButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION, isShowCollectingAreaInGeneralSection);
+              }
+         });
+
+        final Button determinationOnlyForFieldUnitsButton = new Button(composite, SWT.CHECK);
+        boolean isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS);
+        determinationOnlyForFieldUnitsButton.setText(Messages.DatabasePreferncesPage_Determination_only_for_field_unnits);
+        determinationOnlyForFieldUnitsButton.setSelection(isDeterminationOnlyForFieldUnits);
+        determinationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isDeterminationOnlyForFieldUnits = determinationOnlyForFieldUnitsButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS, isDeterminationOnlyForFieldUnits);
+              }
+         });
+
+        final Button showTaxonAssociationButton = new Button(composite, SWT.CHECK);
+        boolean isShowTaxonAssociation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
+        showTaxonAssociationButton.setText(Messages.DatabasePreferncesPage_Taxon_Associations);
+        showTaxonAssociationButton.setSelection(isShowTaxonAssociation);
+        showTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 boolean isShowTaxonAssociation = showTaxonAssociationButton.getSelection();
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS, isShowTaxonAssociation);
+              }
+         });
+
+
+
+ }
 
 /**
  * {@inheritDoc}
@@ -654,6 +610,8 @@ public void setWizard(IWizard newWizard) {
 public void createControl(Composite parent) {
     createNameDetailsConfiguration(parent);
     createNomenclaturalCodeTab(parent);
+
+    createSpecimenOrObservationTab(parent);
     setControl(parent);
 }
 
index e7b27038cfe413ebfada47010266c498ad1ac43c..54544acf4d37d3180eb4aef55e8acffb4da05f66 100644 (file)
@@ -10,7 +10,7 @@ package eu.etaxonomy.taxeditor.databaseAdmin.wizard;
 
 import org.eclipse.jface.wizard.Wizard;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.service.IPreferenceService;
 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
@@ -25,19 +25,25 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class DatabasePreferencesWizard extends Wizard {
 
 
-    private final DatabasePreferencesPage preferencePage;
+    public DatabasePreferencesPage preferencePage;
 
 
     public DatabasePreferencesWizard() {
         setWindowTitle("Database Preferences Wizard");
 
-        preferencePage = new DatabasePreferencesPage("Nomenclatural Code");
+        preferencePage = new DatabasePreferencesPage("Database Preferences");
        // preferencePage.setDescription("Choose which nomenclatural code you would like to use for scientific names unless otherwise specified.");
        // preferencePage.init(PlatformUI.getWorkbench());
     }
 
 
 
+    /**
+     * @return the preferencePage
+     */
+    public DatabasePreferencesPage getPreferencePage() {
+        return preferencePage;
+    }
     /**
      * {@inheritDoc}
      */
@@ -51,7 +57,7 @@ public class DatabasePreferencesWizard extends Wizard {
         CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
         pref.setAllowOverride(allowOverride);
 
-        ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+        ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
         if (controller == null){
             return false;
         }
@@ -65,15 +71,26 @@ public class DatabasePreferencesWizard extends Wizard {
         pref.setAllowOverride(allowOverride);
         service.set(pref);
 
+
+        boolean isDeterminationOnlyForFieldUnit= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS );
+        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.DeterminationOnlyForFieldUnits, String.valueOf(isDeterminationOnlyForFieldUnit));
+        pref.setAllowOverride(false);
+        service.set(pref);
+
+        boolean isShowCollectingAreasInGeneralsecion= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION );
+        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowCollectingAreasInGeneralSection, String.valueOf(isShowCollectingAreasInGeneralsecion));
+        pref.setAllowOverride(false);
+        service.set(pref);
+
+        boolean isShowTaxonAssociations= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
+        pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowTaxonAssociations, String.valueOf(isShowTaxonAssociations));
+        pref.setAllowOverride(false);
+        service.set(pref);
+
         return true;
     }
 
-    /**
-     * @return the preferencePage
-     */
-    public DatabasePreferencesPage getPreferencePage() {
-        return preferencePage;
-    }
+
 
     @Override
     public void addPages() {
index 95fcf0682c81f9fd0b836d435392efe134aa42a9..fe49f84ba189467ed93845c2d901198d2343615b 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 
 import eu.etaxonomy.cdm.io.common.SortIndexUpdaterConfigurator;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 /**
  * @author k.luther
index c98df8f7efefee7bb14ab3f3561280be45f03809..0f20d61e902249916b7383ddec25bfeddfea65eb 100644 (file)
@@ -22,7 +22,7 @@ import eu.etaxonomy.cdm.io.common.CacheUpdaterConfigurator;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 /**
  * @author k.luther
index db196d64f5fd16ab1375bcbc91c7f724e4faf3a4..06682b269d6b70071c11845a00d42a2edb39135c 100644 (file)
@@ -27,7 +27,7 @@ import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 /**
  * @author k.luther
index 9197d55aa9a77575c6acd45fc823580aec7e7005..11220ce090c24bc87e1915964e1d5de94cdb8291 100644 (file)
@@ -88,8 +88,14 @@ public class CdmDataSourceRepository{
         * @return a {@link java.util.List} object.
         */
        public static List<ICdmSource> getAll() {
-               List<ICdmSource> remoteSources = new ArrayList<ICdmSource>();
+               List<ICdmSource> remoteSources = new ArrayList<>();
 
+               if (CdmPersistentDataSource.getAllDataSources() == null){
+                       MessagingUtils.errorDialog("Could not read root element", CdmPersistentDataSource.class,
+                                       "Could not read element in datasources.xml in .cdmLibrary folder. Maybe your datasources.xml file is broken.", 
+                                       TaxeditorStorePlugin.PLUGIN_ID, null, true);
+                       return remoteSources;
+               }
                for(ICdmDataSource dataSource : CdmPersistentDataSource.getAllDataSources()){
                        try {
                                remoteSources.add(CdmPersistentDataSource.NewInstance(dataSource.getName()));
index cbf4bb085dcfbcb33d877d63510153aaa3367a31..da41ff5e26a4b3052bca30781027b0c899eeaf5a 100644 (file)
@@ -29,6 +29,7 @@ import org.eclipse.ui.menus.CommandContributionItem;
 import org.eclipse.ui.menus.CommandContributionItemParameter;
 
 import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
 /**
  * Menu used in the store plugin xml to dynamically generate menu (sub-menu) contribution items
@@ -54,6 +55,7 @@ public class DefinedTermMenu extends CompoundContributionItem {
            //add Feature and NamedArea to top level
            dtMenuManager.add(addChildTermsToMenuManager(TermType.Feature));
            dtMenuManager.add(addChildTermsToMenuManager(TermType.NamedArea));
+           dtMenuManager.add(new Separator());
 
            MenuManager otherMenuManager =
                 new MenuManager("Others","eu.etaxonomy.taxeditor.store.term.other.menu");
@@ -91,7 +93,7 @@ public class DefinedTermMenu extends CompoundContributionItem {
                        }
                        // term type has children, so create sub menu
                        MenuManager dtMenuManager =
-                                       new MenuManager(termType.getMessage(),"eu.etaxonomy.taxeditor.store." + termType.getKey() + "Menu");
+                                       new MenuManager(termType.getMessage(PreferencesUtil.getGlobalLanguage()),"eu.etaxonomy.taxeditor.store." + termType.getKey() + "Menu");
                        dtMenuManager.setVisible(true);
                        dtMenuManager.add(createDefaultMenuItem(termType));
 
@@ -168,7 +170,14 @@ public class DefinedTermMenu extends CompoundContributionItem {
        private class SortByTermTypeMessage implements Comparator<TermType> {
            @Override
         public int compare(TermType t1, TermType t2) {
-               return t1.getMessage().compareTo(t2.getMessage());
+               if (t1.equals(t2)){
+                   return 0;
+               }
+               int result = t1.getMessage().compareTo(t2.getMessage());
+               if (result == 0){
+                   return t1.compareTo(t2);
+               }
+               return result;
            }
        }
 
index eaf383e2254ed4c2086e9aa22957e66b52f2a1fc..4be9f81b52323b69000586fdadfd1c44bf82bcf0 100644 (file)
@@ -12,7 +12,7 @@ package eu.etaxonomy.taxeditor.io;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.ui.progress.IProgressConstants;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.io.common.IIoConfigurator;
 
 /**
@@ -26,7 +26,7 @@ import eu.etaxonomy.cdm.io.common.IIoConfigurator;
  */
 public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
 
-       protected ICdmApplicationConfiguration applicationConfiguration;
+       protected ICdmRepository applicationConfiguration;
 
        public static enum TYPE {
                Jaxb, Tcs, Excel_Taxa, Endnote, Sdd, Abcd, SpecimenCdmExcel, Excel_Name, SpecimenSearch, Gbif
@@ -45,7 +45,7 @@ public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
         *            a CONFIGURATOR object.
         */
        protected AbstractIOManager(
-                       ICdmApplicationConfiguration applicationConfiguration) {
+                       ICdmRepository applicationConfiguration) {
                this.applicationConfiguration = applicationConfiguration;
        }
 
index 904943a5e97bcb11ae9e6baf5eebfba8feb53d61..0aa3ed1730f0882a1955e57e144788b48a329bac 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IWorkbenchPart;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.io.common.CdmDefaultExport;
 import eu.etaxonomy.cdm.io.common.ExportResult;
@@ -51,7 +51,7 @@ public class ExportManager extends AbstractIOManager<IExportConfigurator> {
         *
         * @param applicationConfiguration
         */
-       private ExportManager(ICdmApplicationConfiguration applicationConfiguration) {
+       private ExportManager(ICdmRepository applicationConfiguration) {
                super(applicationConfiguration);
        }
 
@@ -67,7 +67,7 @@ public class ExportManager extends AbstractIOManager<IExportConfigurator> {
         * @return a {@link eu.etaxonomy.taxeditor.io.ExportManager} object.
         */
        public static ExportManager NewInstance(
-                       ICdmApplicationConfiguration applicationConfiguration) {
+                       ICdmRepository applicationConfiguration) {
                return new ExportManager(applicationConfiguration);
        }
 
index 21558db910397b2cc78dc57c3678fd2dad15e8d2..76e956eb3930b0d861a0c380f4104dec95f6bc08 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PlatformUI;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
 import eu.etaxonomy.cdm.io.common.CacheUpdaterConfigurator;
 import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
@@ -70,7 +70,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
        /**
         * @param applicationConfiguration
         */
-       private ImportManager(ICdmApplicationConfiguration applicationConfiguration) {
+       private ImportManager(ICdmRepository applicationConfiguration) {
                super(applicationConfiguration);
        }
 
@@ -86,7 +86,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
         * @return a {@link eu.etaxonomy.taxeditor.io.ImportManager} object.
         */
        public static ImportManager NewInstance(
-                       ICdmApplicationConfiguration applicationConfiguration) {
+                       ICdmRepository applicationConfiguration) {
                return new ImportManager(applicationConfiguration);
        }
 
@@ -428,13 +428,13 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
                        ImportResult result = ioService.importDataFromStream(configurator);
                        monitor.done();
 
-                       display.asyncExec(new Runnable() {
-
-                           @Override
-                           public void run() {
-                               CdmStore.getContextManager().notifyContextRefresh();
-                           }
-                       });
+//                     display.asyncExec(new Runnable() {
+//
+//                         @Override
+//                         public void run() {
+//                             CdmStore.getContextManager().notifyContextRefresh();
+//                         }
+//                     });
 
                        return Status.OK_STATUS;
                    }
index cb463a512c66373f9d0a543cdb0e780eda5a6ba3..a0eab6142a2dd2bf08dedb6f5844d60e78f22437 100644 (file)
@@ -12,9 +12,11 @@ package eu.etaxonomy.taxeditor.io.wizard;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.net.URI;
-import org.apache.log4j.Logger;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.log4j.Logger;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.TreeSelection;
@@ -24,7 +26,6 @@ import eu.etaxonomy.cdm.database.DbSchemaValidation;
 import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
 import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
@@ -68,10 +69,15 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
                } catch (FileNotFoundException e) {
                        logger.error("Error while reading file" + source.toString());
                }
-                       
+               try {
+            configurator.setStream(IOUtils.toByteArray(fis));
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
            Job job = CdmStore.getImportManager().createIOServiceJob(configurator,file , SOURCE_TYPE.INPUTSTREAM);
            CdmStore.getImportManager().run(job);
-               
+
                return true;
        }
 
index 91a5edd78373d7be438482058ebece6ff8288be7..461336da77e38697e48d78ad218a277ef2138d70 100644 (file)
@@ -68,13 +68,13 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
        public static final String XML = "xml";
 
        public static final String CSV = "csv";
-       
-       
+
+
 
        public static final String ZIP = "zip";
 
     private static boolean csvExport = false;
-    
+
     private static boolean csvNameExport = false;
 
        private static String CSV_PRINT_EXPORT ="CSV_PRINT_EXPORT";
@@ -91,9 +91,9 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
        private final String extension;
 
     private Combo classificationSelectionCombo;
-    
+
     private List<Classification> classifications;
-    
+
     private Classification selectedClassification;
 
        /**
@@ -190,7 +190,7 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
                 "Export the contents of the currently selected database into Comma Separated Value format.",
                 CSV);
     }
-    
+
     /**
      * @return
      */
@@ -203,7 +203,7 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
                 "Export the names of the currently selected database into Semicolon Separated Value format.",
                 CSV);
     }
-    
+
     /**
      * @return
      */
@@ -240,10 +240,17 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
 
                 @Override
                 public int compare(Classification o1, Classification o2) {
-                    return o1.getTitleCache().compareTo(o2.getTitleCache());
+                    if (o1.equals(o2)){
+                        return 0;
+                    }
+                    int result = o1.getTitleCache().compareTo(o2.getTitleCache());
+                    if (result == 0){
+                        return o1.getUuid().compareTo(o2.getUuid());
+                    }
+                    return result;
                 }
             });
-                       
+
                        selectedClassification = classifications.iterator().next();
                }
 
@@ -251,13 +258,13 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
                if(csvExport || csvPrintExport){
                    Label comboBoxLabel = new Label(composite, SWT.NONE);
                    comboBoxLabel.setText("Classification");
-                  
+
                    createClassificationSelectionCombo(composite);
                    classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
                                true, false, 2, 1));
                }
-               
-               
+
+
 
 
                Label fileLabel = new Label(composite, SWT.NONE);
@@ -385,17 +392,17 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
        @Override
        public void widgetSelected(SelectionEvent e) {
                selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex());
-               
+
        }
 
        @Override
        public void widgetDefaultSelected(SelectionEvent e) {
                //not needed here
-               
+
        }
 
        public UUID getSelectedClassificationUUID() {
-               
+
                return selectedClassification.getUuid();
        }
 
index eb144745940015ab1d36321de5bf2d186dc4828b..f70d341487dc44cbd29b09a8f28679d9c96a7244 100644 (file)
@@ -137,6 +137,9 @@ public class GenericConfiguratorWizardPage extends WizardPage {
              */
             @Override
             public int compare(Method o1, Method o2) {
+                if (o1.equals(o2)){
+                    return 0;
+                }
                 if(o1.getName()==null && o2.getName()!=null){
                     return -1;
                 }
@@ -144,9 +147,13 @@ public class GenericConfiguratorWizardPage extends WizardPage {
                     return 1;
                 }
                 if(o1.getName()==null && o2.getName()==null){
-                    return 0;
+                    return o1.toString().compareTo(o1.toString());
+                }
+                int result = o1.getName().compareTo(o2.getName());
+                if (result == 0){
+                    return o1.toString().compareTo(o1.toString());
                 }
-                return o1.getName().compareTo(o2.getName());
+                return result;
             }
         });
 
similarity index 77%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
index d92c1d2bc265d9179d37d030699fdb0fc862d637..d98368fe5f8f6e574b94f21dbfb1e32e68fb65cf 100644 (file)
@@ -6,7 +6,7 @@
  * 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.
  */
-package eu.etaxonomy.taxeditor;
+package eu.etaxonomy.taxeditor.l10n;
 
 import org.eclipse.osgi.util.NLS;
 
@@ -16,7 +16,7 @@ import org.eclipse.osgi.util.NLS;
  *
  */
 public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
+    private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
 
 
     public static String AuthenticatedUserBar_LOGGED_IN_AS;
@@ -149,7 +149,44 @@ public class Messages extends NLS {
        public static String DeleteConfiguration_media_deleteIfUsedInTaxonDescription;
        public static String DeleteConfiguration_media_deleteIfUsedInSpecimenDescription;
        public static String DeleteConfiguration_media_delete;
-       static {
+       public static String NewGrantedAuthority_AlreadyInDb;
+
+    public static String SetSecundumConfiguration_IncludeAcceptedTaxa;
+    public static String SetSecundumConfiguration_IncludeSynonyms;
+    public static String SetSecundumConfiguration_OverwriteExistingAccepted;
+    public static String SetSecundumConfiguration_OverwriteExistingSynonyms;
+    public static String SetSecundumConfiguration_EmptySecundumDetail;
+    public static String SetSecundumConfiguration_IncludeSharedtaxa;
+    public static String SetSecundumConfiguration_NewSecundum_Label;
+    public static String SetSecundumConfiguration_Description;
+
+    public static String DatabasePreferncesPage_Is_redList;
+    public static String DatabasePreferncesPage_Determination_only_for_field_unnits;
+    public static String DatabasePreferncesPage_Show_Collecting_Areas_in_general_section;
+    public static String DatabasePreferncesPage_Taxon_Associations;
+
+    public static String DatabasePreferencesPage_Biocase_Provider;
+    public static String DatabasePreferencesPage_details_view_configuration;
+    public static String DatabasePreferencesPage_show_only_simple_details_view;
+    public static String DatabasePreferencesPage_show_taxon;
+    public static String DatabasePreferencesPage_show_lsid;
+    public static String DatabasePreferencesPage_show_nomenclatural_code;
+    public static String DatabasePreferencesPage_show_namecache;
+    public static String DatabasePreferencesPage_show_appended_phrase;
+    public static String DatabasePreferencesPage_show_rank;
+    public static String DatabasePreferencesPage_show_atomised_epithets;
+    public static String DatabasePreferencesPage_show_authorship_cache;
+    public static String DatabasePreferencesPage_show_author_section;
+    public static String DatabasePreferencesPage_Show_nomenclatural_Ref;
+    public static String DatabasePreferencesPage_Show_nomenclaturalStatus;
+    public static String DatabasePreferencesPage_Show_Protologue;
+    public static String DatabasePreferencesPage_Show_Type_designation;
+    public static String DatabasePreferencesPage_Show_NameRelations;
+    public static String DatabasePreferencesPage_Define_Default_NomenclaturalCode;
+    public static String DatabasePreferencesPage_UseLocalPreferences;
+    public static String DatabasePreferencesPage_Specimen_Or_Observation;
+
+    static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
     }
similarity index 79%
rename from eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
index fadec7c1d88dc3fc10acd70ee970195cadc92724..eae60e91db33c21e65840f5d6db62027521f22fb 100644 (file)
@@ -140,4 +140,43 @@ PresenceAbsenceTermDetailElement_LABEL_COLOR=Color
 DeleteConfiguration_media_removeFromGallery=Remove the media from the image gallery but leave it in database
 DeleteConfiguration_media_deleteIfUsedInTaxonDescription=Delete also if media is used in taxon description
 DeleteConfiguration_media_deleteIfUsedInSpecimenDescription=Delete also if media is used in specimen description        
-DeleteConfiguration_media_delete=Delete the media completely
\ No newline at end of file
+DeleteConfiguration_media_delete=Delete the media completely
+
+NewGrantedAuthority_AlreadyInDb=The granted authority already exists.
+
+SetSecundumConfiguration_IncludeAcceptedTaxa=include accepted taxa
+SetSecundumConfiguration_IncludeSynonyms=include synonyms
+SetSecundumConfiguration_OverwriteExistingAccepted=overwrite existing references for accepted taxa
+SetSecundumConfiguration_OverwriteExistingSynonyms=overwrite existing references for synonyms
+SetSecundumConfiguration_EmptySecundumDetail=empty existing details
+SetSecundumConfiguration_IncludeSharedtaxa=include shared taxa
+SetSecundumConfiguration_NewSecundum_Label=new secundum reference
+SetSecundumConfiguration_Description=If no reference is chosen existing secundum references are deleted
+
+DatabasePreferncesPage_Is_redList=Red List 2020
+DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations only for field units
+DatabasePreferncesPage_Show_Collecting_Areas_in_general_section=Show collecting areas in general section
+DatabasePreferncesPage_Taxon_Associations=Show taxon associations of a specimen in details view
+
+DatabasePreferencesPage_Biocase_Provider=Biocase provider selection
+DatabasePreferencesPage_details_view_configuration=Details view configuration
+DatabasePreferencesPage_show_only_simple_details_view=Show only simple details view
+DatabasePreferencesPage_show_taxon=Show taxon
+DatabasePreferencesPage_show_lsid=Show LSID
+DatabasePreferencesPage_show_nomenclatural_code=Show nomenclatural code
+DatabasePreferencesPage_show_namecache=Show name cache
+DatabasePreferencesPage_show_appended_phrase=Show appended phrase
+DatabasePreferencesPage_show_rank=Show rank
+DatabasePreferencesPage_show_atomised_epithets=Show atomised epithets
+DatabasePreferencesPage_show_authorship_cache=Show authorship cache
+DatabasePreferencesPage_show_author_section=Show author section
+DatabasePreferencesPage_Show_nomenclatural_Ref=Show nomenclatural reference
+DatabasePreferencesPage_Show_nomenclaturalStatus=Show nomenclatural status
+DatabasePreferencesPage_Show_Protologue=Show protologue
+DatabasePreferencesPage_Show_Type_designation=Show type designation
+DatabasePreferencesPage_Show_NameRelations=Show name relations
+DatabasePreferencesPage_Define_Default_NomenclaturalCode=Define default nomenclatural code
+DatabasePreferencesPage_UseLocalPreferences=Allow to use local preference
+DatabasePreferencesPage_Specimen_Or_Observation=Specimen or observation configuration
+
+
similarity index 79%
rename from eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
index 3000cd5ddb203171e6814b2879eb6ba78ea70ab6..5362e37eb861e8634d68e953e87566b745b9c140 100644 (file)
@@ -139,3 +139,40 @@ DeleteConfiguration_media_removeFromGallery=Entferne Medienobjekt aus der Galler
 DeleteConfiguration_media_deleteIfUsedInTaxonDescription=Lösche das Medienobjekt, auch wenn es von einem Taxon verwendet wird
 DeleteConfiguration_media_deleteIfUsedInSpecimenDescription=Lösche das Medienobjekt, auch wenn es von einem Specimen verwendet wird
 DeleteConfiguration_media_delete=Lösche das Medienobjekt
+
+NewGrantedAuthority_AlreadyInDb=Die GrantedAuthority ist bereits in der DB enthalten.
+
+SetSecundumConfiguration_IncludeAcceptedTaxa=anwenden auf akzeptierte Taxa
+SetSecundumConfiguration_IncludeSynonyms=anwenden auf Synonyme
+SetSecundumConfiguration_OverwriteExistingAccepted=bestehende Secundum Referenzen bei akzeptierten Taxa Ã¼berschreiben
+SetSecundumConfiguration_OverwriteExistingSynonyms=bestehende Secundum Referenzen bei Synonymen Ã¼berschreiben
+SetSecundumConfiguration_EmptySecundumDetail=bestehende Details von Secundum Referenzen löschen
+SetSecundumConfiguration_IncludeSharedtaxa=auch mehrfach verwendete Taxa mit einbeziehen
+SetSecundumConfiguration_NewSecundum_Label=neue Secundum Referenz
+SetSecundumConfiguration_Description=Wenn keine Referenz ausgewählt wird, werden die bestehenden Secundum Referenzen gelöscht
+
+DatabasePreferncesPage_Is_redList=Rote Liste 2020
+DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations nur für Field Units
+DatabasePreferncesPage_Show_Collecting_Areas_in_general_section=Zeige Sammelgebiete im allgemeinen Teil
+DatabasePreferncesPage_Taxon_Associations=Zeige Taxon Assoziationen eines Specimen im Details View
+
+DatabasePreferencesPage_Biocase_Provider=Biocase Provider Auswahl
+DatabasePreferencesPage_details_view_configuration=Details view Konfiguration
+DatabasePreferencesPage_show_only_simple_details_view=Zeige nur einen einfachen (konfigurierbaren) Details View
+DatabasePreferencesPage_show_taxon=Zeige Taxon
+DatabasePreferencesPage_show_lsid=Zeige LSID
+DatabasePreferencesPage_show_nomenclatural_code=Zeige Nomenklatorischen Code
+DatabasePreferencesPage_show_namecache=Zeige Namecache
+DatabasePreferencesPage_show_appended_phrase=Zeige appended phrase
+DatabasePreferencesPage_show_rank=Zeige Rang
+DatabasePreferencesPage_show_atomised_epithets=Zeige atomisierte Epithete
+DatabasePreferencesPage_show_authorship_cache=Zeige Autoren Cache
+DatabasePreferencesPage_show_author_section=Zeige den Autoren Bereich
+DatabasePreferencesPage_Show_nomenclatural_Ref=Zeige nomenklatorische Referenz
+DatabasePreferencesPage_Show_nomenclaturalStatus=Zeige nomenklatorischen Status
+DatabasePreferencesPage_Show_Protologue=Zeige den Protologue
+DatabasePreferencesPage_Show_Type_designation=Zeige Type Designations
+DatabasePreferencesPage_Show_NameRelations=Zeige Namensrelationen
+DatabasePreferencesPage_Define_Default_NomenclaturalCode=Festlegen des default Nomenklatorischen Codes
+DatabasePreferencesPage_UseLocalPreferences=Erlaube das lokale Ãœberschreiben
+DatabasePreferencesPage_Specimen_Or_Observation=Konfiguration von Specimen und Observationen
index ef08badd681d50a8f587c84acd00912de6e17f77..9abcbb67d8c649259f56e52d9856625842f12f67 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2009 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.
 */
@@ -17,7 +17,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * Implements a {@link Comparator} for {@link DefinedTermBase} objects based on the term's label.
  * The compare algorithm compares a term's label. Example: If used on an unsorted list of terms, the
  * list will be alphabetically  sorted by label afterwards.
- * 
+ *
  * @author n.hoffmann
  * @date Jan 18, 2012
  *
@@ -36,6 +36,10 @@ public class DefaultTermComparator<T extends DefinedTermBase> implements Compara
                }
                String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
                String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
-               return label1.compareTo(label2);
+               int result = label1.compareTo(label2);
+               if (result == 0){
+                   return o1.getUuid().compareTo(o2.getUuid());
+               }
+               return result;
        }
 };
index 4a7133574d9d9ddbb11cf7feab11458bed5b68ef..b1f806cb4cc81b6e9be7b27dd584ef7db89405b6 100644 (file)
@@ -43,6 +43,7 @@ import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
+import eu.etaxonomy.cdm.model.description.KeyStatement;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
 import eu.etaxonomy.cdm.model.description.SpecimenDescription;
@@ -88,9 +89,11 @@ public class DescriptionHelper {
         */
        public static String getCache(DescriptionElementBase element,
                        Language language) {
-               
+
                String mainElementLabel= null;
                DescriptionBase<?> descr = element.getInDescription();
+               descr = CdmBase.deproxy(descr, DescriptionBase.class);
+
                if (descr != null){
                        if (descr.isInstanceOf(TaxonDescription.class)){
                                Taxon taxon = CdmBase.deproxy(descr, TaxonDescription.class).getTaxon();
@@ -109,10 +112,12 @@ public class DescriptionHelper {
                                }
                        }
                }
-               
+
+
                String cache = null;
                if (element instanceof TextData) {
-                       cache = ((TextData) element).getText(language);
+                       //cache = ((TextData) element).getText(language);
+                   cache = "Text Data";
                }
                if (element instanceof CommonTaxonName) {
                        cache = ((CommonTaxonName) element).getName();
@@ -205,19 +210,20 @@ public class DescriptionHelper {
         * @return a {@link java.lang.String} object.
         */
        public static String getObjectDescription(Object element) {
+           String resultString = null;
                if (element instanceof IdentifiableEntity) {
                        try{
-                               return ((IdentifiableEntity) element).getTitleCache();
+                           resultString = ((IdentifiableEntity) element).getTitleCache();
                        }catch(LazyInitializationException e){
                                String result = "No Session to initialize title cache for IdentifiableEntity";
                                MessagingUtils.error(DescriptionHelper.class, result, e);
-                               return "TODO: " + result;
+                               resultString = "TODO: " + result;
                        }
                }else if (element instanceof OriginalSourceBase) {
                        try{
                                OriginalSourceBase<?> originalSource = (OriginalSourceBase<?>) element;
 //                             ISourceable sourcedObject = originalSource.getSourcedObj();
-                               //due to #5743 the bidirectionality for sourced object had to be removed 
+                               //due to #5743 the bidirectionality for sourced object had to be removed
                                String sourceObjectTitle = "sourced object data not available (#5743)";
 //                             if(sourcedObject instanceof IIdentifiableEntity){
 //                                     sourceObjectTitle = ((IdentifiableEntity) sourcedObject).getTitleCache();
@@ -227,40 +233,48 @@ public class DescriptionHelper {
 //                                     throw new IllegalStateException("Unknown ISourceable object for given OriginalSourceBase");
 //                             }
 
-                               return CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
+                               resultString = CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
                        }catch(LazyInitializationException e){
                                String result = "Error initializing title cache for ISourceable of an OriginalSourceBase";
                                MessagingUtils.error(DescriptionHelper.class, result, e);
-                               return "TODO: " + result;
+                               resultString = "TODO: " + result;
                        }
                }else if (element instanceof LanguageStringBase) {
-                       return ((LanguageStringBase) element).getText();
+                   resultString = ((LanguageStringBase) element).getText();
                }else if (element instanceof DescriptionElementBase) {
-                       return getCache((DescriptionElementBase) element);
+                   resultString = getCache((DescriptionElementBase) element);
                }else if (element instanceof RelationshipBase<?, ?, ?>) {
-                       return getCache((RelationshipBase<?, ?, ?>) element);
+                   resultString = getCache((RelationshipBase<?, ?, ?>) element);
                }else if (element instanceof TypeDesignationBase<?>) {
-                       return getCache((TypeDesignationBase<?>) element);
+                   resultString = getCache((TypeDesignationBase<?>) element);
                }else if (element instanceof HomotypicalGroup) {
-                       return getCache((HomotypicalGroup) element);
+                   resultString = getCache((HomotypicalGroup) element);
                }else if (element instanceof TaxonNode) {
-                       return getCache((TaxonNode) element);
+                   resultString = getCache((TaxonNode) element);
                }else if (element instanceof DeterminationEvent) {
-                       return getCache((DeterminationEvent) element);
+                   resultString = getCache((DeterminationEvent) element);
                }else if (element instanceof Marker) {
                        Marker marker = (Marker) element;
                        MarkerType type = marker.getMarkerType();
-                       return (type == null ? "- no marker type -" : marker.getMarkerType().getLabel()) + " (" + marker.getFlag() + ")";
+                       resultString = (type == null ? "- no marker type -" : marker.getMarkerType().getLabel()) + " (" + marker.getFlag() + ")";
                }else if (element instanceof User) {
                        User user = (User) element;
-                       return user.getUsername();
+                       resultString = user.getUsername();
                }else if (element instanceof Group) {
                        Group group = (Group) element;
-                       return group.getName();
-               }else{
+                       resultString = group.getName();
+               }else if (element instanceof KeyStatement) {
+            KeyStatement keyStatement = (KeyStatement) element;
+            resultString = getCache(keyStatement);
+        }else{
                        // TODO write return texts for HomotypicalGroup, etc.
-                       return element.toString();
+            resultString = element.toString();
+               }
+
+               if (resultString == null){
+                   resultString = element.toString();
                }
+               return resultString;
        }
 
 
@@ -278,8 +292,8 @@ public class DescriptionHelper {
                if (StringUtils.isBlank(taxonStr)){
                        taxonStr = "no or unlabled taxon";
                }
-                       
-                       
+
+
                //unit
                SpecimenOrObservationBase<?> unit = detEvent.getIdentifiedUnit();
                String unitStr;
@@ -291,7 +305,7 @@ public class DescriptionHelper {
                }else{
                        unitStr = "no unit";
                }
-               
+
                String result = CdmUtils.concat(" determined as ", unitStr, taxonStr);
 
                return result;
@@ -325,7 +339,7 @@ public class DescriptionHelper {
                        }
                }
                result = CdmUtils.concat(": ", result, parentStr);
-               
+
                return result;
        }
 
@@ -338,7 +352,7 @@ public class DescriptionHelper {
                if (designation.isInstanceOf(SpecimenTypeDesignation.class)){
                        to = ((SpecimenTypeDesignation)designation).getTypeSpecimen();
                }else if (designation.isInstanceOf(NameTypeDesignation.class)){
-                       to = ((NameTypeDesignation)designation).getTypeName();  
+                       to = ((NameTypeDesignation)designation).getTypeName();
                }else{
                        throw new RuntimeException("Type Designation class not supported: " +  designation.getClass().getName());
                }
@@ -365,7 +379,7 @@ public class DescriptionHelper {
                for (TaxonNameBase<?,?> name : from){
                        CdmUtils.concat(",", fromString, name.getTitleCache());
                }
-               String result = CdmUtils.concat(" ", new String[]{from == null ? null : fromString, 
+               String result = CdmUtils.concat(" ", new String[]{from == null ? null : fromString,
                                typeLabel, to == null? null : to.getTitleCache()});
                return result;
        }
@@ -416,11 +430,11 @@ public class DescriptionHelper {
                if (StringUtils.isBlank(typeLabel)){
                        typeLabel = "->";
                }
-               String result = CdmUtils.concat(" ", new String[]{from == null ? null : from.getTitleCache(), 
+               String result = CdmUtils.concat(" ", new String[]{from == null ? null : from.getTitleCache(),
                                typeLabel, to == null? null : to.getTitleCache()});
                return result;
        }
-       
+
 
        private static String getCache(HomotypicalGroup hg) {
                String result = "";
@@ -433,6 +447,14 @@ public class DescriptionHelper {
                return result;
        }
 
+       private static String getCache(KeyStatement ks) {
+        String result = "";
+
+        result = "KeyStatement";
+
+        return result;
+    }
+
        /**
         * <p>getObjectClassname</p>
         *
index 55bf93082f58db1c48704d7f93d10dec583481da..c337da240874145b48b0f44445a47ff28d4c69de 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -37,25 +37,32 @@ public class FeatureNodeContainerTree {
 
                @Override
                public int compare(DescriptionElementBase o1, DescriptionElementBase o2) {
-                       return DescriptionHelper.getLabel(o1).compareTo(DescriptionHelper.getLabel(o2));
+                   if (o1.equals(o2)){
+                       return 0;
+                   }
+                       int result = DescriptionHelper.getLabel(o1).compareTo(DescriptionHelper.getLabel(o2));
+                       if (result == 0){
+                           return o1.getUuid().compareTo(o2.getUuid());
+                       }
+                       return result;
                }
        };
-       
+
        private Set<FeatureNodeContainer> featureNodeContainers = new HashSet<FeatureNodeContainer>();
-       
+
        private FeatureNodeContainer root;
        private DescriptionBase description;
        private FeatureTree featureTree;
-       
+
        public FeatureNodeContainerTree(DescriptionBase description, FeatureTree featureTree){
                this.description = description;
                this.featureTree = featureTree;
-               
+
                root = new FeatureNodeContainer(this);
-               
+
                buildTree();
        }
-       
+
        /**
         * Traverses the given {@link FeatureNode} and computes a FeatureNodeContainer branch if the
         * given {@link TaxonDescription} has elements for the given feature node or any of its children
@@ -63,16 +70,16 @@ public class FeatureNodeContainerTree {
         */
        public void buildTree(){
                List<FeatureNode> children = featureTree.getRootChildren();
-               
+
 //             if(description.getElements().isEmpty()){
 //                     return;
 //             }
-               
+
                for(FeatureNode featureNode : children){
                        root.findLeaves(featureNode);
                }
        }
-       
+
        /**
         * <p>getFeatureNodeContainerForDescriptionElement</p>
         *
@@ -81,7 +88,7 @@ public class FeatureNodeContainerTree {
         */
        public FeatureNodeContainer getFeatureNodeContainerForDescriptionElement (DescriptionElementBase descriptionElement) {
                List<FeatureNodeContainer> leafs = root.getLeafs();
-               
+
                for(FeatureNodeContainer container : leafs){
                        if(container.getDescriptionElements().contains(descriptionElement)){
                                return container;
@@ -89,40 +96,40 @@ public class FeatureNodeContainerTree {
                }
                return null;
        }
-       
+
        /**
         * Returns all elements contained in the given {@link DescriptionBase description} that have the given {@link Feature feature}.
-        * 
+        *
         * @param description
         * @param feature
         * @return a list of description elements with the given feature alphabetically sorted by {@link DescriptionHelper#getLabel(Object)}
         */
        public List<DescriptionElementBase> getDescriptionsElementsForFeature(Feature feature) {
                List<DescriptionElementBase> featureElements = new ArrayList<DescriptionElementBase>();
-               
+
                Set<DescriptionElementBase> elements = description.getElements();
-               
+
                if (elements != null) {
                        for (DescriptionElementBase element : elements) {
-                               Feature elementFeature = (Feature) HibernateProxyHelper.deproxy(element.getFeature());
-                               
+                               Feature elementFeature = HibernateProxyHelper.deproxy(element.getFeature());
+
                                if (feature.equals(elementFeature)) {
                                        featureElements.add(element);
                                }
                        }
                }
-               
+
                if(featureElements.size() != 0){
                        Collections.sort(featureElements, comparator);
                }
-               
+
                return featureElements;
        }
-       
-       
-       public FeatureNodeContainer getFeatureNodeContainer(Feature feature) {          
+
+
+       public FeatureNodeContainer getFeatureNodeContainer(Feature feature) {
                List<FeatureNodeContainer> leafs = root.getLeafs();
-               
+
                for(FeatureNodeContainer container : leafs){
                        if(container.getFeature().equals(feature)){
                                return container;
@@ -130,10 +137,10 @@ public class FeatureNodeContainerTree {
                }
                return null;
        }
-       
+
        public FeatureNodeContainer getFeatureNodeContainer(FeatureNode featureNode){
                List<FeatureNodeContainer> leafs = root.getLeafs();
-               
+
                for(FeatureNodeContainer container : leafs){
                        if(container.getFeatureNode().equals(featureNode)){
                                return container;
@@ -141,18 +148,18 @@ public class FeatureNodeContainerTree {
                }
                return null;
        }
-       
+
        public void addContainer(FeatureNodeContainer container){
                featureNodeContainers.add(container);
        }
 
        /**
-        * 
+        *
         */
        public void removeContainer(FeatureNodeContainer container) {
                featureNodeContainers.remove(container);
        }
-       
+
        public FeatureNodeContainer getRoot() {
                return root;
        }
@@ -164,5 +171,5 @@ public class FeatureNodeContainerTree {
        public FeatureTree getFeatureTree() {
                return featureTree;
        }
-       
+
 }
index d11e3c6b4878951aeb8a06ed5940c0c7c29e5150..0718bb4ded574fb2376ad9a4820203a421dedfcf 100644 (file)
@@ -26,8 +26,7 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.ext.ipni.IIpniService;
 import eu.etaxonomy.cdm.ext.ipni.IpniService;
@@ -72,9 +71,6 @@ public class ExternalReferenceServiceWizardPage extends WizardPage implements Se
                setDescription("Query IPNI service for references");
        }
        
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControl(Composite parent) {
@@ -131,7 +127,7 @@ public class ExternalReferenceServiceWizardPage extends WizardPage implements Se
        @Override
        public void widgetSelected(SelectionEvent e) {
                String query = text_query.getText();
-               List<Reference> publications = ipniService.getPublications(query, null, (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration(), null);
+               List<Reference> publications = ipniService.getPublications(query, null, (ICdmRepository) CdmStore.getCurrentApplicationConfiguration(), null);
                viewer.setInput(publications);
        }
 
index 1629b49999cddc9ffb07e3bcb1450e98f966f185..513f38bd031982cc98171c5cd126548bafb42312 100644 (file)
@@ -37,7 +37,6 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
 
     public NewDerivedUnitBaseWizard() {
         super();
-        CdmStore.getCurrentSessionManager().bindNullSession();
     }
 
     public NewDerivedUnitBaseWizard(SpecimenOrObservationType specOrObsType) {
@@ -93,7 +92,7 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
        @Override
        protected void saveEntity() {
            setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
-           
+
        }
 
 
index ee27d3245c52d31abcb920ddcf19a7b134237e39..de203e282332a271447f2b985d0ab185c7216011 100644 (file)
@@ -11,6 +11,8 @@ package eu.etaxonomy.taxeditor.newWizard;
 
 import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailWizardPage;
 
@@ -37,8 +39,12 @@ public class NewGrantedAuthorityWizard extends AbstractNewEntityWizard<GrantedAu
         */
        @Override
        protected void saveEntity() {
-           CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
-          
+           try{
+               CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
+           }catch (Exception e){
+               MessagingUtils.info(Messages.NewGrantedAuthority_AlreadyInDb);
+           }
+
        }
 
        /* (non-Javadoc)
index 82c31994ef04ff988caf5c9b4a5402d2ab1f6aa6..3674afa8762cc81f9ec9d608e6ef9017a2d015f2 100644 (file)
@@ -13,6 +13,8 @@ import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.name.ZoologicalName;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -38,9 +40,9 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        protected NonViralName createNewEntity() {
                NomenclaturalCode code = PreferencesUtil.getPreferredNomenclaturalCode();
                if(code.equals(NomenclaturalCode.ICNAFP )){
-                       return BotanicalName.NewInstance(null);
+                       return TaxonNameFactory.NewBotanicalInstance(null);
                }else if(code.equals(NomenclaturalCode.ICZN)){
-                       return ZoologicalName.NewInstance(null);
+                       return TaxonNameFactory.NewZoologicalInstance(null);
                }
                return null;
        }
index acefcf1374835a0daaeca7b18f43b1b8d096751b..a558f0c406967fac2b1653252407c02f1c4f293a 100644 (file)
@@ -11,6 +11,8 @@ package eu.etaxonomy.taxeditor.newWizard;
 
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameWizardPage;
@@ -34,7 +36,7 @@ public class NewTaxonWizard extends AbstractNewEntityWizard<Taxon> {
        /** {@inheritDoc} */
        @Override
        protected Taxon createNewEntity() {
-               return Taxon.NewInstance(NonViralName.NewInstance(null), null);
+               return Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
        }
 
        /** {@inheritDoc} */
index dc1329a56814e83cdba225fb318c6ebb267b517f..e156a433ede679f44d11b1d302649dfbf23ddce6 100644 (file)
@@ -25,7 +25,7 @@ import eu.etaxonomy.cdm.model.media.Media;
  * @date 04.12.2013
  *
  */
-public abstract class AbstractDescriptionPostOperation<T extends IDescribable<D>, D extends DescriptionBase<?>> extends AbstractPostOperation<T> {
+public abstract class AbstractDescriptionPostOperation<T extends IDescribable, D extends DescriptionBase> extends AbstractPostOperation<T> {
 
     protected D description;
 
@@ -48,9 +48,6 @@ public abstract class AbstractDescriptionPostOperation<T extends IDescribable<D>
         this.isImageGallery = isImageGallery;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     /** {@inheritDoc} */
     @Override
     public IStatus execute(IProgressMonitor monitor, IAdaptable info)
index 31eda3f375d09ec1285c94ec48fab148e1bcc516..5292aef1da791b8e90aacff83f92477b5679f782 100644 (file)
@@ -8,6 +8,8 @@ import java.util.List;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.model.name.INonViralName;
+import eu.etaxonomy.cdm.model.name.ITaxonNameBase;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
@@ -47,7 +49,7 @@ public class ParseHandler{
        /**
         * The name that should get parsed
         */
-       private NonViralName name;
+       private INonViralName name;
 
        private boolean doResolveInReferences;
 
@@ -99,11 +101,11 @@ public class ParseHandler{
                return name;
        }
 
-       public static NonViralName parseName(String unparsedNameString, Rank rank){
-               NonViralName name = nonViralNameParser.parseFullName(unparsedNameString,
+       public static TaxonNameBase<?,?> parseName(String unparsedNameString, Rank rank){
+               INonViralName name = nonViralNameParser.parseFullName(unparsedNameString,
                                PreferencesUtil.getPreferredNomenclaturalCode(), rank);
-
-               return name;
+               
+               return (TaxonNameBase<?,?>)name;
        }
 
        /**
@@ -112,8 +114,8 @@ public class ParseHandler{
         *
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
-       public static NonViralName createEmptyName(){
-               return nonViralNameParser.getNonViralNameInstance("", PreferencesUtil.getPreferredNomenclaturalCode());
+       public static TaxonNameBase<?,?> createEmptyName(){
+               return (TaxonNameBase<?,?>)nonViralNameParser.getNonViralNameInstance("", PreferencesUtil.getPreferredNomenclaturalCode());
        }
 
        /**
@@ -122,7 +124,7 @@ public class ParseHandler{
         *
         * @return      The parsed NonViralName object
         */
-       public NonViralName parse(String unparsedNameString){
+       public INonViralName parse(String unparsedNameString){
 
 //             String unparsedNameString = "";
 //             try {
@@ -156,9 +158,9 @@ public class ParseHandler{
         *
         * @return      The parsed NonViralName object
         */
-       public NonViralName parseAndResolveDuplicates(String unparsedNameString){
+       public INonViralName parseAndResolveDuplicates(String unparsedNameString){
 
-               NonViralName parsedName = parse(unparsedNameString);
+               INonViralName parsedName = parse(unparsedNameString);
 
                MatchMatrix matchMatrix = findMatches(parsedName);
 
@@ -173,7 +175,7 @@ public class ParseHandler{
        /**
         * @param name The name to resolve duplicates for.
         */
-       private void resolveDuplicates(NonViralName name, MatchMatrix matchMatrix) {
+       private void resolveDuplicates(INonViralName name, MatchMatrix matchMatrix) {
                resolveDuplicateNames(name, matchMatrix);
 
                resolveAllDuplicateAuthors(name, matchMatrix);
@@ -189,20 +191,20 @@ public class ParseHandler{
        /**
         * @param name The name to resolve duplicates for.
         */
-       private void resolveDuplicateNames(NonViralName name, MatchMatrix matchMatrix) {
+       private void resolveDuplicateNames(INonViralName name, MatchMatrix matchMatrix) {
 
                if (matchMatrix.duplicateNames.size() == 1){
-                       name = (NonViralName) matchMatrix.duplicateNames.iterator().next();
+                       name = matchMatrix.duplicateNames.iterator().next();
                }else if(matchMatrix.duplicateNames.size() > 1){
                        // FIXME TODO resolve multiple duplications. Use first match for a start
-                       name = (NonViralName) matchMatrix.duplicateNames.iterator().next();
+                       name = matchMatrix.duplicateNames.iterator().next();
                }
        }
 
        /**
         * @param name The name to resolve duplicates for.
         */
-       private void resolveDuplicateReferences(NonViralName name, MatchMatrix matchMatrix) {
+       private void resolveDuplicateReferences(INonViralName name, MatchMatrix matchMatrix) {
                if(matchMatrix.duplicateReferences.size() == 1){
                        // exactly one match. We assume that the user wants this reference
                        INomenclaturalReference duplicate = matchMatrix.duplicateReferences.iterator().next();
@@ -217,7 +219,7 @@ public class ParseHandler{
        /**
         * @param name The name to resolve duplicates for.
         */
-       private void resolveDuplicateInReferences(NonViralName name, MatchMatrix matchMatrix) {
+       private void resolveDuplicateInReferences(INonViralName name, MatchMatrix matchMatrix) {
                Reference reference = (Reference) HibernateProxyHelper.deproxy(name.getNomenclaturalReference());
 
                if(matchMatrix.duplicateInReferences.size() > 0){
@@ -233,7 +235,7 @@ public class ParseHandler{
        /**
         * @param name The name to resolve duplicates for.
         */
-       private void resolveAllDuplicateAuthors(NonViralName name, MatchMatrix matchMatrix) {
+       private void resolveAllDuplicateAuthors(INonViralName name, MatchMatrix matchMatrix) {
 
                if(matchMatrix.duplicateCombinationAuthorships.size() > 0){
                        name.setCombinationAuthorship(matchMatrix.duplicateCombinationAuthorships.iterator().next());
@@ -266,7 +268,7 @@ public class ParseHandler{
         *
         * @param name  The NonViralName to find matches for.
         */
-       private MatchMatrix findMatches(NonViralName name){
+       private MatchMatrix findMatches(INonViralName name){
 
                MatchMatrix matchMatrix = new MatchMatrix();
 
@@ -335,11 +337,11 @@ public class ParseHandler{
         * @param taxonNameBase The TaxonNameBase to find matches for.
         * @return      A <code>List</code> of possibly matching TaxonNameBase's.
         */
-       private List<TaxonNameBase> findMatchingLatinNames(TaxonNameBase taxonNameBase) {
+       private List<TaxonNameBase> findMatchingLatinNames(ITaxonNameBase taxonNameBase) {
 
                try {
 
-                       return CdmStore.getCommonService().findMatching(taxonNameBase, MatchStrategy.NonViralName);
+                       return CdmStore.getCommonService().findMatching(TaxonNameBase.castAndDeproxy(taxonNameBase), MatchStrategy.NonViralName);
 
 
                } catch (MatchException e) {
index 4da42b217584213386512dd02d9f15e5e51666a6..05c886aaa34bd671a765b39c3c69c67c0b4702f2 100644 (file)
@@ -176,7 +176,7 @@ public interface IPreferenceKeys {
     public static final String PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor";
 
     // TODO RL
-    public static final String IS_RL = "eu.etaxonomy.taxeditor.isRL";
+
 
     public static final String DEFAULT_LANGUAGE_EDITOR = "eu.etaxonomy.taxeditor.default.language";
 
@@ -187,6 +187,7 @@ public interface IPreferenceKeys {
      */
     public static final String P2_REPOSITORY_LIST = "eu.etaxonomy.taxeditor.p2.repositories";
     public static final String ALLOW_OVERRIDE_NAMEDETAILS = "eu.etaxonomy.taxeditor.details.allow_override";
+    public static final String ALLOW_OVERRIDE_RL = "eu.etaxonomy.taxeditor.isRL.allow_override";
 
 
 
index 059c1698b339ce8fcce2835200d114e56b7d9c04..aae9b342a8ef80e76d4287977fbb00d9c54f77fb 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
index 854a7aab85895578d1be7d66a4995eb914a134c3..f100783019f8989d33b6ebd8761fdc09d3ef0a06 100644 (file)
@@ -25,6 +25,7 @@ public class NameDetailsConfigurator {
     private boolean isRankActivated = true;
     private boolean isAtomisedEpithetsActivated = true;
     private boolean isAuthorshipSectionActivated = true;
+    private boolean isAuthorCacheActivated = true;
     private boolean isNomenclaturalReferenceSectionActivated = true;
     private boolean isNomenclaturalStatusSectionActivated = true;
     private boolean isTypeDesignationSectionActivated = true;
@@ -158,6 +159,11 @@ public class NameDetailsConfigurator {
         StringBuffer result = new StringBuffer();
       //the preference value is build like this:
         //<section1>:true;<section2>:false....
+        result.append("simpleViewActivated");
+        result.append(":");
+        result.append(this.isSimpleDetailsViewActivated);
+        result.append(";");
+
         result.append("taxon");
         result.append(":");
         result.append(this.isTaxonSectionActivated);
@@ -210,5 +216,19 @@ public class NameDetailsConfigurator {
       return result.toString();
     }
 
+    /**
+     * @return the isAuthorCacheActivated
+     */
+    public boolean isAuthorCacheActivated() {
+        return isAuthorCacheActivated;
+    }
+
+    /**
+     * @param isAuthorCacheActivated the isAuthorCacheActivated to set
+     */
+    public void setAuthorCacheActivated(boolean isAuthorCacheActivated) {
+        this.isAuthorCacheActivated = isAuthorCacheActivated;
+    }
+
 
 }
index a24eac024c10522d7a90b09758e68f88e836283c..1646d455851312f372d12b6475ca7df6160df0e0 100644 (file)
@@ -1,6 +1,7 @@
 package eu.etaxonomy.taxeditor.preference;
 
 
+import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -8,10 +9,8 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.jface.preference.PreferencePage;
 
 
 public class NameDetailsViewConfiguration extends PreferencePage implements IWorkbenchPreferencePage {
@@ -19,7 +18,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
     Composite child ;
        @Override
        public void init(IWorkbench workbench) {
-               
+
        }
 
        /*
@@ -31,9 +30,11 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
      */
     @Override
     protected Control createContents(Composite parent) {
-       
+
        Composite composite = new Composite(parent, SWT.NULL);
         composite.setLayout(new GridLayout());
+
+        //boolean isAllowOverride = PreferencesUtil
         isSimpleDetailsViewActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
         final Button activateCheckButton = new Button(composite, SWT.CHECK);
         activateCheckButton.setText("Show only a simple name details view");
@@ -52,11 +53,11 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
             }
          }
          });
-         
+
         child  = new Composite(composite, SWT.NULL);
         child.setLayout(new GridLayout());
         child.setVisible(isSimpleDetailsViewActivated);
-               
+
         final Button showTaxon = new Button(child, SWT.CHECK);
         boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
         showTaxon.setText("Show taxon of the name");
@@ -68,7 +69,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
               }
          });
-         
+
         final Button showLsid = new Button(child, SWT.CHECK);
         boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
         showLsid.setText("Show Lsid of the name");
@@ -80,7 +81,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
               }
          });
-        
+
         final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
         boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
         showNomenclaturalCode.setText("Show the nomenclatural code");
@@ -92,7 +93,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
               }
          });
-        
+
         final Button showNameCache = new Button(child, SWT.CHECK);
         boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
         showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
@@ -112,10 +113,10 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
              @Override
              public void widgetSelected(SelectionEvent e) {
                  boolean isShowAppendedPhrase = showAppendedPhrase.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowAppendedPhrase);
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
               }
          });
-       
+
         final Button showRank = new Button(child, SWT.CHECK);
         boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
         showRank.setText("Show rank of the name");
@@ -149,7 +150,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
               }
          });
-               
+
         final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
         boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
         showNomenclaturalRef.setText("Show nomenclatural reference section");
@@ -161,7 +162,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
               }
          });
-               
+
         final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
         boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
         showNomenclaturalStatus.setText("Show nomenclatural status section");
@@ -173,7 +174,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
               }
          });
-               
+
         final Button showProtologue = new Button(child, SWT.CHECK);
         boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
         showProtologue.setText("Show protologue section");
@@ -185,7 +186,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
               }
          });
-        
+
         final Button showTypeDesignation = new Button(child, SWT.CHECK);
         boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
         showTypeDesignation.setText("Show name type designation section");
@@ -197,8 +198,8 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
                  PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
               }
          });
-               
-               
+
+
         final Button showNameRelationship = new Button(child, SWT.CHECK);
         boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
         showNameRelationship.setText("Show name relationship section");
@@ -207,10 +208,10 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
              @Override
              public void widgetSelected(SelectionEvent e) {
                  boolean isShowNameRelationship = showNameRelationship.getSelection();
-                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowNameRelationship);
+                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
               }
          });
-                               
+
         if(isSimpleDetailsViewActivated){
             child.setEnabled(true);
         }else{
@@ -219,7 +220,7 @@ public class NameDetailsViewConfiguration extends PreferencePage implements IWor
 
         return composite;
 
-   
+
 
        }
 
index 756cfbc7fb774e98e8e03c07aa097cd6bd6f452a..b1060046e078e4706843488bcadbc68aed4eb7ae 100644 (file)
@@ -13,7 +13,7 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IWorkbench;\r
 import org.eclipse.ui.IWorkbenchPreferencePage;\r
 \r
-import eu.etaxonomy.taxeditor.Messages;\r
+import eu.etaxonomy.taxeditor.l10n.Messages;\r
 \r
 public class OrderPreferences extends PreferencePage implements IWorkbenchPreferencePage {\r
 \r
@@ -57,6 +57,10 @@ public class OrderPreferences extends PreferencePage implements IWorkbenchPrefer
             Composite composite = new Composite(parent, SWT.NULL);\r
                composite.setLayout(new GridLayout());\r
 \r
+               Label label = new Label(composite, SWT.NONE);\r
+               label.setText("Sorting");\r
+\r
+\r
                isNaturalOrderActivated = PreferencesUtil.getSortNodesNaturally();\r
                final Button activateNaturalOrderCheckButton = new Button(composite, SWT.RADIO);\r
                activateNaturalOrderCheckButton.setText("Enable Natural Order");\r
@@ -64,7 +68,7 @@ public class OrderPreferences extends PreferencePage implements IWorkbenchPrefer
 \r
                isRankAndNameOrderActivated = !PreferencesUtil.getSortNodesStrictlyAlphabetically() && !PreferencesUtil.getSortNodesNaturally();\r
                final Button activateRankAndNameOrderActivatedCheckButton = new Button(composite, SWT.RADIO);\r
-               activateRankAndNameOrderActivatedCheckButton.setText("Enable Rank and Aplhabetical Order");\r
+               activateRankAndNameOrderActivatedCheckButton.setText("Enable Rank and Alphabetical Order");\r
                activateRankAndNameOrderActivatedCheckButton.setSelection(isRankAndNameOrderActivated);\r
 \r
                isAlphabeticalOrderActivated = PreferencesUtil.getSortNodesStrictlyAlphabetically();\r
index 0bffd58a48c2c0e4e07e8f43dbfcbee4d3bf7b17..3ef53365ab7ac0abf02fb2351ab1750fa93379b5 100644 (file)
@@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator;
 import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
 import eu.etaxonomy.cdm.api.service.ITermService;
@@ -114,7 +114,7 @@ public class PreferencesUtil implements IPreferenceKeys {
                     getPreferenceKey(preferredCode));
            }
            else{
-               ICdmApplicationConfiguration controller;
+               ICdmRepository controller;
                controller = CdmStore.getCurrentApplicationConfiguration();
                PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
                CdmPreference preference = null;
@@ -163,16 +163,10 @@ public class PreferencesUtil implements IPreferenceKeys {
         * @return a {@link eu.etaxonomy.cdm.model.name.NomenclaturalCode} object.
         */
        public static NomenclaturalCode getPreferredNomenclaturalCode(boolean useLocal) {
-               ICdmApplicationConfiguration controller;
+
                CdmPreference pref = null;
                if (!useLocal){
-                       try{
-                               controller = CdmStore.getCurrentApplicationConfiguration();
-                               PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
-                           pref = controller.getPreferenceService().find(key);
-                       }catch(Exception e){
-                               e.printStackTrace();
-                       }
+                   pref = getPreferenceFromDB(PreferencePredicate.NomenclaturalCode);
                }
 
            String preferredCode;
@@ -192,6 +186,24 @@ public class PreferencesUtil implements IPreferenceKeys {
                return null;
        }
 
+
+    private static CdmPreference getPreferenceFromDB(PreferencePredicate predicate){
+        ICdmRepository controller;
+        CdmPreference pref = null;
+
+        try{
+            controller = CdmStore.getCurrentApplicationConfiguration();
+            PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), predicate);
+            pref = controller.getPreferenceService().find(key);
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+
+        return pref;
+
+    }
+
+
        public static String getPreferredDefaultLangugae(){
            String preferredLanguage = getPreferenceStore().getString(DEFAULT_LANGUAGE_EDITOR);
            if(StringUtils.isNotEmpty(preferredLanguage) && StringUtils.isNotBlank(preferredLanguage)){
@@ -466,6 +478,7 @@ public class PreferencesUtil implements IPreferenceKeys {
                getPreferenceStore().setDefault(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE, false);
                getPreferenceStore().setDefault(CHECKLIST_ID_IN_VOCABULARY, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, true);
+               getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_HYBRID, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_LSID, true);
@@ -477,6 +490,9 @@ public class PreferencesUtil implements IPreferenceKeys {
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_RANK, true);
                getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, true);
+               getPreferenceStore().setDefault(SORT_NODES_NATURALLY, false);
+               getPreferenceStore().setDefault(SORT_NODES_ALPHABETICALLY, false);
+
        }
 
        /**
@@ -496,7 +512,7 @@ public class PreferencesUtil implements IPreferenceKeys {
 
        }
        public static void setNomenclaturalCodePreferences(){
-       ICdmApplicationConfiguration controller;
+           ICdmRepository controller;
         controller = CdmStore.getCurrentApplicationConfiguration();
         PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
         CdmPreference preference = null;
@@ -845,8 +861,8 @@ public class PreferencesUtil implements IPreferenceKeys {
         * <p>
         * getSortRanksNaturally
         * </p>
-        *
-        * @return a boolean.
+        *
+        * @return a boolean.
         */
        public static boolean getSortNodesNaturally() {
                return getPreferenceStore().getBoolean(SORT_NODES_NATURALLY);
@@ -951,17 +967,16 @@ public class PreferencesUtil implements IPreferenceKeys {
      */
     public static NameDetailsConfigurator setPreferredNameDetailsConfiguration( boolean local) {
         NameDetailsConfigurator config = new NameDetailsConfigurator(true);
-        ICdmApplicationConfiguration controller;
-        controller = CdmStore.getCurrentApplicationConfiguration();
-        PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NameDetailsView);
+
         CdmPreference preference = null;
-        if (controller == null){
-            return null;
+
+        if (!local) {
+            preference = getPreferenceFromDB(PreferencePredicate.NameDetailsView);
         }
-        preference = controller.getPreferenceService().find(key);
         if (preference == null){
             return null;
         }
+
         getPreferenceStore().setValue(ALLOW_OVERRIDE_NAMEDETAILS, preference.isAllowOverride());
 
         //the preference value is build like this:
@@ -1031,4 +1046,43 @@ public class PreferencesUtil implements IPreferenceKeys {
         return config;
     }
 
+    public static boolean getIsDeterminiationOnlyForFieldUnit(boolean local){
+        CdmPreference preference = null;
+
+        if (!local) {
+            preference = getPreferenceFromDB(PreferencePredicate.DeterminationOnlyForFieldUnits);
+        }
+        if (preference == null){
+            return getPreferenceStore().getBoolean(DETERMINATION_ONLY_FOR_FIELD_UNITS);
+        }
+        return Boolean.valueOf(preference.getValue());
+    }
+
+    public static boolean getIsShowCollectingAreasInGeneralSection(boolean local){
+        CdmPreference preference = null;
+
+        if (!local) {
+            preference = getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
+        }
+        if (preference == null){
+            return getPreferenceStore().getBoolean(SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION);
+        }
+        return Boolean.valueOf(preference.getValue());
+    }
+
+    public static boolean getIsShowTaxonAssociations(boolean local){
+        CdmPreference preference = null;
+
+        if (!local) {
+            preference = getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
+        }
+        if (preference == null){
+            return getPreferenceStore().getBoolean(SHOW_TAXON_ASSOCIATIONS);
+        }
+        return Boolean.valueOf(preference.getValue());
+    }
+
+
+
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TemplatePreferencePage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TemplatePreferencePage.java
deleted file mode 100644 (file)
index e807894..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* 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.
-*/
-package eu.etaxonomy.taxeditor.preference;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * @author a.oppermann
- * @date 13.08.2014
- *
- */
-public class TemplatePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
-    @Override
-    public void init(IWorkbench workbench) {
-        setPreferenceStore(PreferencesUtil.getPreferenceStore());
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
-     */
-    @Override
-    protected void createFieldEditors() {
-        addField(new BooleanFieldEditor(IPreferenceKeys.IS_RL, "Rote Liste 2020",  getFieldEditorParent()));
-    }
-
-}
index 1bb99604f019f1911cb1cf73ed39b24e8a4e9f42..23ded94e278f24e41c15585c1478d14c9075243f 100644 (file)
@@ -16,7 +16,7 @@ import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.service.IPreferenceService;
 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
 import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
@@ -86,7 +86,7 @@ public class NomenclaturalCodePreferences extends FieldEditorPreferencePage
                setPreferenceStore(TaxeditorStorePlugin.getDefault()
                                .getPreferenceStore());
 
-             ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+             ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
           if (controller != null){
               IPreferenceService service = controller.getPreferenceService();
               PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
@@ -109,7 +109,7 @@ public class NomenclaturalCodePreferences extends FieldEditorPreferencePage
 //             if (result){
 //                     String value = getPreferenceStore().getString(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY);
 //                     CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
-//                     ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+//                     ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
 //                     if (controller == null){
 //                             return false;
 //                     }
index f8a87dea58c430e3534df40aeb7ed1885a97cb24..b84f9c9155d9b2aab794120659ca711eb94b4d09 100644 (file)
@@ -25,7 +25,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
 import eu.etaxonomy.cdm.api.application.CdmApplicationException;
 import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
@@ -89,7 +89,7 @@ public class CdmStore {
 
     private static CdmStore instance;
 
-    //private final ICdmApplicationConfiguration applicationConfiguration;
+    //private final ICdmRepository applicationConfiguration;
 
     private static ContextManager contextManager = new ContextManager();
 
@@ -273,14 +273,14 @@ public class CdmStore {
         CdmApplicationState.dispose();
     }
 
-    static void setInstance(ICdmApplicationConfiguration applicationController,
+    static void setInstance(ICdmRepository applicationController,
             ICdmSource cdmSource) {
         instance = new CdmStore(applicationController, cdmSource);
         CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
 
     }
 
-    private CdmStore(ICdmApplicationConfiguration applicationController,
+    private CdmStore(ICdmRepository applicationController,
             ICdmSource cdmSource) {
         CdmApplicationState.setCurrentAppConfig(applicationController);
         CdmApplicationState.setCurrentDataChangeService(new CdmUIDataChangeService());
@@ -293,7 +293,7 @@ public class CdmStore {
      *
      * @return
      */
-    private ICdmApplicationConfiguration getApplicationConfiguration() {
+    private ICdmRepository getApplicationConfiguration() {
         try {
             return CdmApplicationState.getCurrentAppConfig();
         } catch (Exception e) {
@@ -311,7 +311,7 @@ public class CdmStore {
      *         {@link eu.etaxonomy.cdm.remote.api.application.CdmApplicationController}
      *         object.
      */
-    public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
+    public static ICdmRepository getCurrentApplicationConfiguration() {
         if (getDefault() != null) {
             return getDefault().getApplicationConfiguration();
         }
@@ -369,7 +369,7 @@ public class CdmStore {
     }
 
     /**
-     * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+     * Generic method that will scan the getters of {@link ICdmRepository} for the given service
      * interface. If a matching getter is found the according service implementation is returned by
      * invoking the getter otherwise the method returns <code>null</code>.
      *
index 88f204955d8a2e3850c9aeb7ceeed807d4dd00fa..cf0066f3c0850b861cdfbf9eb4587a33be1567cb 100644 (file)
@@ -25,7 +25,7 @@ import org.springframework.core.io.Resource;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationController;
 import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.config.CdmSourceException;
 import eu.etaxonomy.cdm.config.ICdmSource;
 import eu.etaxonomy.cdm.database.DbSchemaValidation;
@@ -34,7 +34,7 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -102,7 +102,7 @@ class CdmStoreConnector extends Job {
             CdmStore.close(monitor);
         }
 
-        ICdmApplicationConfiguration applicationController = null;
+        ICdmRepository applicationController = null;
 
         if (!monitor.isCanceled()) {
             CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
@@ -176,7 +176,7 @@ class CdmStoreConnector extends Job {
                             }
                         });
 
-                        ICdmApplicationConfiguration applicationController = null;
+                        ICdmRepository applicationController = null;
 
                         if (!monitor.isCanceled()) {
                             CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
@@ -249,7 +249,7 @@ class CdmStoreConnector extends Job {
     }
 
 
-    private ICdmApplicationConfiguration getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
+    private ICdmRepository getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
         if(cdmSource instanceof ICdmDataSource) {
             return  CdmApplicationController.NewInstance(applicationContextBean,
                     (ICdmDataSource)cdmSource,
index fe313ec8da5ae765bf14f609a7c237bd8f8fc17a..6fc530d1c8c4aa86a78630c23fd255e1a6f521ce 100644 (file)
@@ -43,7 +43,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
index 6ffc3ef3833fa7896aacc541d5afc49dbbd66ced..a8addd126269acda91dc7a8d506afe851977ca0d 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
 
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.util.ApplicationUtil;
index 1701ffc31f2a75d4bb971a824b57fa07110086ab..130a0994e421ea531e6d417e20f2b73a337b0d91 100644 (file)
@@ -80,6 +80,14 @@ DisposeListener {
 
         Color color = AbstractUtility.getColor(colorId);
         combo.setBackground(color);
+        if (label != null) {
+            label.setBackground(color);
+        }
+        colorId = !irrelevant ? Resources.COLOR_COMPOSITE_IRRELEVANT
+                : Resources.COLOR_COMPOSITE_BACKGROUND;
+        color = AbstractUtility.getColor(colorId);
+        combo.setForeground(color);
+
     }
 
     public void setVisibleItemCount(int count){
index 6553cc99dd5ce05a2805b52caab7038984cbb7e3..7841fb7c9151e18983c835516d593b9e77ebd32c 100644 (file)
@@ -135,6 +135,8 @@ public class EnumComboElement<T extends IEnumTerm<T>> extends
                combo.addSelectionListener(this);
        }
 
+
+
        private String getDefaultLabelString() {
                if(enumType.equals(ReferenceType.class)){
                        return "Reference Type";
index 2f9d9e07927ee6bf51366abd3a0585d8e53b7584..fd2edd9dbc405e2aec858fb3ffe7e16cc6a6b5cd 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
index ae7c71cde58e12c0ff530197db97b81d4edfae15..41692b1b125464173159dec1960aad3cd38887f9 100644 (file)
@@ -58,7 +58,7 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -6,7 +6,7 @@
 * 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.
 */
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
@@ -24,7 +24,7 @@ import org.eclipse.ui.forms.widgets.Section;
  * @date Feb 16, 2015
  *
  */
-public class DeleteConfiguratorComposite extends Composite implements IExpansionListener{
+public class ConfiguratorComposite extends Composite implements IExpansionListener{
 
     private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
     private final Section sctnConfigure;
@@ -33,7 +33,7 @@ public class DeleteConfiguratorComposite extends Composite implements IExpansion
      * @param parent
      * @param style
      */
-    public DeleteConfiguratorComposite(final Composite parent, int style) {
+    public ConfiguratorComposite(final Composite parent, int style) {
         super(parent, SWT.NONE);
 
         addDisposeListener(new DisposeListener() {
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java
new file mode 100755 (executable)
index 0000000..5dcbed3
--- /dev/null
@@ -0,0 +1,254 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wb.swt.ResourceManager;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumConfiguratorWizardPage extends WizardPage implements Listener {
+    private DataBindingContext m_bindingContext;
+
+    private final static CdmFormFactory toolkit = new CdmFormFactory(Display.getCurrent());
+    private final SetSecundumForSubtreeConfigurator configurator;
+
+    private  Button btnBrowseReference = null;
+    private  Text textReference = null;
+    private  Button btnClear = null;
+    private EntitySelectionElement<Reference> selectReference;
+    private  Button btnIncludeAcceptedTaxa;
+    private Button btnIncludeSynonyms;
+    private Button btnOverwriteExistingAccepted;
+    private Button btnOverwriteExistingSynonyms;
+    private Button btnEmptySecundumDetail;
+    private Button btnIncludeSharedTaxa;
+
+
+    /**
+     * Create the composite.
+     * @param parent
+     * @param style
+     */
+    public SetSecundumConfiguratorWizardPage(SetSecundumForSubtreeConfigurator configurator, Wizard parent, int style ) {
+        super("Set Secundum Reference Configuration");
+        this.configurator = configurator;
+        this.setDescription(Messages.SetSecundumConfiguration_Description);
+
+//        addDisposeListener(new DisposeListener() {
+//            @Override
+//            public void widgetDisposed(DisposeEvent e) {
+//                toolkit.dispose();
+//            }
+//        });
+      //  toolkit.paintBordersFor(this);
+//        setLayout(new GridLayout());
+//        setBackground(getBackground());
+
+
+
+
+    }
+
+    /**
+     * @return
+     */
+    private DataBindingContext initDataBindings() {
+        DataBindingContext bindingContext = new DataBindingContext();
+
+        IObservableValue observeSelectionBtnIncludeAcceptedTaxa = WidgetProperties.selection().observe(btnIncludeAcceptedTaxa);
+        IObservableValue includeAcceptedTaxaConfiguratorObserveValue = PojoProperties.value("includeAcceptedTaxa").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnIncludeSynonyms = WidgetProperties.selection().observe(btnIncludeSynonyms);
+        IObservableValue includeSynonymsConfiguratorObserveValue = PojoProperties.value("includeSynonyms").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnOverwriteExistingAccepted = WidgetProperties.selection().observe(btnOverwriteExistingAccepted);
+        IObservableValue overwriteExistingAcceptedConfiguratorObserveValue = PojoProperties.value("overwriteExistingAccepted").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnOverwriteExistingAccepted, overwriteExistingAcceptedConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
+        IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnEmptySecundumDetail = WidgetProperties.selection().observe(btnEmptySecundumDetail);
+        IObservableValue emptySecundumDetailConfiguratorObserveValue = PojoProperties.value("emptySecundumDetail").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnEmptySecundumDetail, emptySecundumDetailConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
+        IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue, null, null);
+        return bindingContext;
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+
+        final Composite composite = new Composite(parent, SWT.NULL);
+
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 1;
+
+        composite.setLayout(gridLayout);
+        final Composite compositeRef = new Composite(composite, SWT.NULL);
+
+        GridLayout gridLayoutRef = new GridLayout();
+        gridLayoutRef.numColumns = 4;
+
+        compositeRef.setLayout(gridLayoutRef);
+        compositeRef.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+        Label label = new Label(compositeRef, SWT.NONE);
+        label.setText(Messages.SetSecundumConfiguration_NewSecundum_Label);
+       label.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+
+        textReference = new Text(compositeRef, SWT.BORDER);
+        textReference.setEditable(false);
+        textReference.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        textReference.setTextLimit(Text.LIMIT);
+
+        btnBrowseReference = new Button(compositeRef, SWT.NONE);
+        btnBrowseReference.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/open.gif"));
+        btnBrowseReference.addListener(SWT.Selection, this);
+        btnClear = new Button(compositeRef, SWT.NONE);
+        btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
+        btnClear.addListener(SWT.Selection, this);
+
+       // selectReference = toolkit.createSelectionElement(Rights.class, getConversationHolder(), composite, "Rights", null, EntitySelectionElement.SELECTABLE);
+        final Composite control = new Composite(composite, SWT.NULL);
+        GridLayout gridLayoutControl = new GridLayout();
+        gridLayoutControl.numColumns = 1;
+
+        control.setLayout(gridLayoutControl);
+        control.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+      //  Composite control = toolkit.createComposite(composite);
+        btnIncludeAcceptedTaxa = new Button(control, SWT.CHECK);
+        btnIncludeAcceptedTaxa.setText(Messages.SetSecundumConfiguration_IncludeAcceptedTaxa);
+        btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
+        btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() {
+            @Override
+         public void handleEvent(Event e) {
+                Button b = (Button) e.widget;
+                GridData data = (GridData)  btnIncludeAcceptedTaxa.getLayoutData();
+                data.exclude = b.getSelection();
+                btnOverwriteExistingAccepted.setVisible(data.exclude);
+                btnIncludeSharedTaxa.setVisible(data.exclude);
+                if (!btnIncludeSynonyms.getSelection() && !data.exclude){
+                    btnEmptySecundumDetail.setVisible(false);
+                    setPageComplete(false);
+                }else{
+                    btnEmptySecundumDetail.setVisible(true);
+                    setPageComplete(true);
+                }
+            }
+        });
+
+        btnOverwriteExistingAccepted = new Button(control, SWT.CHECK);
+        btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
+
+        btnIncludeSynonyms = new Button(control, SWT.CHECK);
+        btnIncludeSynonyms.setText(Messages.SetSecundumConfiguration_IncludeSynonyms);
+        btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
+        btnIncludeSynonyms.addListener(SWT.Selection, new Listener() {
+            @Override
+         public void handleEvent(Event e) {
+                Button b = (Button) e.widget;
+                GridData data = (GridData)  btnIncludeSynonyms.getLayoutData();
+                data.exclude = b.getSelection();
+                btnOverwriteExistingSynonyms.setVisible(data.exclude);
+                if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude){
+                    btnEmptySecundumDetail.setVisible(false);
+                    setPageComplete(false);
+                }else{
+                    btnEmptySecundumDetail.setVisible(true);
+                    setPageComplete(true);
+                }
+
+            }
+        });
+
+        btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
+        btnOverwriteExistingSynonyms = new Button(control, SWT.CHECK);
+        btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
+        btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
+        btnEmptySecundumDetail = new Button(control, SWT.CHECK);
+        btnEmptySecundumDetail.setText(Messages.SetSecundumConfiguration_EmptySecundumDetail);
+        btnEmptySecundumDetail.setSelection(configurator.isEmptySecundumDetail());
+
+        btnIncludeSharedTaxa = new Button(control, SWT.CHECK);
+        btnIncludeSharedTaxa.setText(Messages.SetSecundumConfiguration_IncludeSharedtaxa);
+        btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa());
+
+        m_bindingContext = initDataBindings();
+        setControl(composite);
+    }
+
+
+
+    @Override
+    public void handleEvent(Event event) {
+        Reference reference;
+        if(event.widget==btnBrowseReference){
+            reference = SelectionDialogFactory.getSelectionFromDialog(Reference.class, this.getShell(), null, null);
+            if(reference!=null){
+                this.configurator.setNewSecundum(reference);
+                textReference.setText(reference.getTitleCache());
+
+            }
+
+        } else if(event.widget==btnClear){
+            reference = null;
+            textReference.setText("");
+            this.configurator.setNewSecundum(null);
+        } else{
+            reference = null;
+            textReference.setText("");
+            this.configurator.setNewSecundum(null);
+        }
+
+    }
+
+//    /**
+//     * {@inheritDoc}
+//     */
+//    @Override
+//    public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+
+
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumForSubtreeConfigurationWizard.java
new file mode 100755 (executable)
index 0000000..a8186ca
--- /dev/null
@@ -0,0 +1,96 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumForSubtreeConfigurationWizard extends Wizard {
+
+    Reference newSecRef;
+    private final SetSecundumForSubtreeConfigurator configurator;
+
+
+    private SetSecundumConfiguratorWizardPage page;
+
+
+
+    /**
+     * @param parentShell
+     * @param dialogTitle
+     * @param dialogTitleImage
+     * @param dialogMessage
+     * @param dialogImageType
+     * @param dialogButtonLabels
+     * @param defaultIndex
+     * @param config
+     */
+    public SetSecundumForSubtreeConfigurationWizard(SetSecundumForSubtreeConfigurator config) {
+        super();
+       // super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
+        this.configurator = config;
+        setNeedsProgressMonitor(true);
+
+
+
+    }
+
+
+
+    /**
+     * @param configurator
+     * @param activeShell
+     * @param setSecundumHandler_confirm
+     * @param setSecundumHandler_configureSettings
+     * @return
+     */
+    public static void openConfirmWithConfigurator(SetSecundumForSubtreeConfigurator configurator, Shell parent, String title, String message) {
+
+        SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
+
+
+    }
+
+
+
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean performFinish() {
+       if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
+           return false;
+       }else{
+           return true;
+       }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void addPages() {
+        page = new SetSecundumConfiguratorWizardPage(configurator, this, SWT.NONE);
+        addPage(page);
+    }
+
+
+}
@@ -6,7 +6,7 @@
 * 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.
 */
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
 
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.ConfiguratorComposite;
 
 /**
  * Abstract subclass of MessageDialog providing the functionality to configure
@@ -52,7 +53,7 @@ public class DeleteConfiguratorDialog extends MessageDialog{
 
     @Override
     protected Control createCustomArea(Composite parent) {
-        DeleteConfiguratorComposite composite = new DeleteConfiguratorComposite(parent, NONE);
+        ConfiguratorComposite composite = new ConfiguratorComposite(parent, NONE);
         if(configurator instanceof TaxonDeletionConfigurator){
             composite.addConfiguratorComposite(new DeleteTaxonConfiguratorComposite((TaxonDeletionConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
         }else if (configurator instanceof SynonymDeletionConfigurator){
@@ -6,7 +6,7 @@
 * 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.
 */
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
 
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.beans.PojoProperties;
@@ -26,7 +26,7 @@ import org.eclipse.swt.widgets.Listener;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 import eu.etaxonomy.cdm.api.service.config.MediaDeletionConfigurator;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 /**
  * @author k.luther
@@ -6,7 +6,7 @@
 * 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.
 */
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
 
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.beans.PojoProperties;
@@ -1,76 +1,76 @@
-/**\r
-* Copyright (C) 2016 EDIT\r
-* European Distributed Institute of Taxonomy\r
-* http://www.e-taxonomy.eu\r
-*\r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;\r
-\r
-import org.eclipse.core.databinding.beans.PojoProperties;\r
-import org.eclipse.core.databinding.observable.value.IObservableValue;\r
-import org.eclipse.jface.databinding.swt.WidgetProperties;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-\r
-import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;\r
-\r
-/**\r
- * @author k.luther\r
- * @date 19.04.2016\r
- *\r
- */\r
-public class DeleteTaxonConfiguratorComposite extends DeleteTaxonBaseConfiguratorComposite {\r
-\r
-    private final Button btnDeleteSynonyms;\r
-    private final Button btnDeleteMisappliedNamesAndInvalidDesignations;\r
-    private final Button btnTaxonRelationships;\r
-    private final Button btnConceptRelationships;\r
-    /**\r
-     * @param configurator\r
-     * @param parent\r
-     * @param style\r
-     */\r
-    public DeleteTaxonConfiguratorComposite(TaxonBaseDeletionConfigurator configurator, Composite parent, int style) {\r
-        super(configurator, parent, style);\r
-        btnDeleteSynonyms = new Button(this, SWT.CHECK);\r
-        btnDeleteSynonyms.setText("Delete synonyms if possible");\r
-        btnDeleteSynonyms.setSelection(true);\r
-\r
-        btnDeleteMisappliedNamesAndInvalidDesignations = new Button(this, SWT.CHECK);\r
-        btnDeleteMisappliedNamesAndInvalidDesignations.setText("Delete misapplied names and invalid designations if possible");\r
-        btnDeleteMisappliedNamesAndInvalidDesignations.setSelection(true);\r
-\r
-\r
-        btnTaxonRelationships = new Button(this, SWT.CHECK);\r
-        btnTaxonRelationships.setText("Delete taxon relations if possible");\r
-        btnTaxonRelationships.setSelection(true);\r
-\r
-        btnConceptRelationships = new Button(this, SWT.CHECK);\r
-        btnConceptRelationships.setText("Delete concept relations if possible");\r
-        btnConceptRelationships.setSelection(true);\r
-        initDataBindingsTaxon();\r
-    }\r
-\r
-    protected void initDataBindingsTaxon() {\r
-\r
-        IObservableValue observeSelectionBtnDeleteSynonymsObserveWidget = WidgetProperties.selection().observe(btnDeleteSynonyms);\r
-        IObservableValue deleteSynonymsConfiguratorObserveValue = PojoProperties.value("deleteSynonymsIfPossible").observe(configurator);\r
-        m_bindingContext.bindValue(observeSelectionBtnDeleteSynonymsObserveWidget, deleteSynonymsConfiguratorObserveValue, null, null);\r
-\r
-        IObservableValue observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNamesAndInvalidDesignations);\r
-        IObservableValue deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);\r
-        m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget, deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue, null, null);\r
-\r
-        IObservableValue observeSelectionbtnTaxonRelationshipsObserveWidget = WidgetProperties.selection().observe(btnTaxonRelationships);\r
-        IObservableValue deleteTaxonRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteTaxonRelationships").observe(configurator);\r
-        m_bindingContext.bindValue(observeSelectionbtnTaxonRelationshipsObserveWidget, deleteTaxonRelationshipsConfiguratorObserveValue, null, null);\r
-\r
-        IObservableValue observeSelectionbtnConceptRelationshipsObserveWidget = WidgetProperties.selection().observe(btnConceptRelationships);\r
-        IObservableValue deleteConceptRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteConceptRelationships").observe(configurator);\r
-        m_bindingContext.bindValue(observeSelectionbtnConceptRelationshipsObserveWidget, deleteConceptRelationshipsConfiguratorObserveValue, null, null);\r
-\r
-    }\r
-}\r
+/**
+* Copyright (C) 2016 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
+
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
+
+/**
+ * @author k.luther
+ * @date 19.04.2016
+ *
+ */
+public class DeleteTaxonConfiguratorComposite extends DeleteTaxonBaseConfiguratorComposite {
+
+    private final Button btnDeleteSynonyms;
+    private final Button btnDeleteMisappliedNamesAndInvalidDesignations;
+    private final Button btnTaxonRelationships;
+    private final Button btnConceptRelationships;
+    /**
+     * @param configurator
+     * @param parent
+     * @param style
+     */
+    public DeleteTaxonConfiguratorComposite(TaxonBaseDeletionConfigurator configurator, Composite parent, int style) {
+        super(configurator, parent, style);
+        btnDeleteSynonyms = new Button(this, SWT.CHECK);
+        btnDeleteSynonyms.setText("Delete synonyms if possible");
+        btnDeleteSynonyms.setSelection(true);
+
+        btnDeleteMisappliedNamesAndInvalidDesignations = new Button(this, SWT.CHECK);
+        btnDeleteMisappliedNamesAndInvalidDesignations.setText("Delete misapplied names and invalid designations if possible");
+        btnDeleteMisappliedNamesAndInvalidDesignations.setSelection(true);
+
+
+        btnTaxonRelationships = new Button(this, SWT.CHECK);
+        btnTaxonRelationships.setText("Delete taxon relations if possible");
+        btnTaxonRelationships.setSelection(true);
+
+        btnConceptRelationships = new Button(this, SWT.CHECK);
+        btnConceptRelationships.setText("Delete concept relations if possible");
+        btnConceptRelationships.setSelection(true);
+        initDataBindingsTaxon();
+    }
+
+    protected void initDataBindingsTaxon() {
+
+        IObservableValue observeSelectionBtnDeleteSynonymsObserveWidget = WidgetProperties.selection().observe(btnDeleteSynonyms);
+        IObservableValue deleteSynonymsConfiguratorObserveValue = PojoProperties.value("deleteSynonymsIfPossible").observe(configurator);
+        m_bindingContext.bindValue(observeSelectionBtnDeleteSynonymsObserveWidget, deleteSynonymsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNamesAndInvalidDesignations);
+        IObservableValue deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);
+        m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget, deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionbtnTaxonRelationshipsObserveWidget = WidgetProperties.selection().observe(btnTaxonRelationships);
+        IObservableValue deleteTaxonRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteTaxonRelationships").observe(configurator);
+        m_bindingContext.bindValue(observeSelectionbtnTaxonRelationshipsObserveWidget, deleteTaxonRelationshipsConfiguratorObserveValue, null, null);
+
+        IObservableValue observeSelectionbtnConceptRelationshipsObserveWidget = WidgetProperties.selection().observe(btnConceptRelationships);
+        IObservableValue deleteConceptRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteConceptRelationships").observe(configurator);
+        m_bindingContext.bindValue(observeSelectionbtnConceptRelationshipsObserveWidget, deleteConceptRelationshipsConfiguratorObserveValue, null, null);
+
+    }
+}
index e02afa3c96e4811d1bae827d06df3239b7f4da3b..792a10026c6f438bc4659cd7c32b8c4678b8dffa 100644 (file)
@@ -49,55 +49,55 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
 
        private ConversationHolder conversation;
 
-       protected List<T> model;        
-       private String settings;        
-       
-       
-       
+       protected List<T> model;
+       private String settings;
+
+
+
        /**
         * <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
         *
         * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation 
+        * @param conversation
         * @param title a {@link java.lang.String} object.
         * @param multi a boolean.
         * @param settings a {@link java.lang.String} object.
         * @param cdmEnum a T object.
         * @param <T> a T object.
         */
-       protected AbstractFilteredCdmEnumSelectionDialog(Shell shell, 
-                       ConversationHolder conversation, 
-                       String title, 
-                       boolean multi, 
+       protected AbstractFilteredCdmEnumSelectionDialog(Shell shell,
+                       ConversationHolder conversation,
+                       String title,
+                       boolean multi,
                        String settings,
                        T cdmEnum) {
                super(shell, multi);
                setTitle(title);
                setMessage("Use * for wildcard, or ? to see all entries");
                this.settings = settings;
-               
+
                this.conversation = conversation;
-               
+
                init();
-               
+
                initModel();
-               
+
                String objectTitle = getTitle(cdmEnum);
                if (objectTitle != null) {
                        setInitialPattern(objectTitle);
                }
-               
+
                setListLabelProvider(createListLabelProvider());
                setDetailsLabelProvider(createDetailsLabelProvider());
-               
+
                setSelectionHistory(new ResourceSelectionHistory());
        }
-       
+
        /**
         * By default, we are returning the standard list label provider
-        * 
-        * Override in subclasses if you want different behavior 
-        * 
+        *
+        * Override in subclasses if you want different behavior
+        *
         * @return
         */
        protected ILabelProvider createDetailsLabelProvider() {
@@ -105,7 +105,7 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
        }
 
        /**
-        * 
+        *
         * @return
         */
        protected ILabelProvider createListLabelProvider() {
@@ -117,9 +117,9 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
         * Will run before initModel()
         */
        protected void init() {
-               
+
        }
-       
+
        /**
         * <p>getSelectionFromDialog</p>
         *
@@ -128,13 +128,13 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
         * @return a TYPE object.
         */
        protected static <TYPE extends IEnumTerm> TYPE getSelectionFromDialog(AbstractFilteredCdmEnumSelectionDialog<TYPE> dialog) {
-               
+
                int result = dialog.open();
-               
+
                if (result == Window.CANCEL) {
                        return null;
                }
-               
+
                return dialog.getSelectedEnumTerm();
        }
 
@@ -148,15 +148,15 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
        protected String getTitle(T cdmEnum) {
                return cdmEnum.getMessage();
        }
-       
+
 
        /** {@inheritDoc} */
        @Override
        public void refresh() {
-               initModel();            
+               initModel();
                super.refresh();
        }
-       
+
        /**
         * <p>initModel</p>
         */
@@ -177,7 +177,7 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                        public boolean equalsFilter(ItemsFilter filter) {
                                return false;
                        }
-                       
+
                        @Override
                        public boolean isConsistentItem(Object item) {
                                return false;
@@ -193,10 +193,10 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                                }
                                return text != null ? matches(text) : false;
                        }
-                       
+
                };
        }
-       
+
 
        /**
         * Set the filter input to the Agent's title cache
@@ -204,11 +204,11 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
         * @param cdmObject a T object.
         */
        protected void setPattern(T cdmObject) {
-               // FilteredSelection does some very tricky caching to make sure it 
-               // runs with high performance. 
+               // FilteredSelection does some very tricky caching to make sure it
+               // runs with high performance.
                // This works for most use cases, but we want to change the model while the dialog is open
                // and all the clever caching prevents the content provider from knowing that the model has changed
-               // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient 
+               // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
                // way to solve the problem.
                try {
                        Field lastCompletedFilter = this.getClass().getSuperclass().getSuperclass().getDeclaredField("lastCompletedFilter");
@@ -223,14 +223,14 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                } catch (IllegalAccessException e) {
                        MessagingUtils.error(getClass(), e);
                }
-               
-               // this also is not the nicest way to do it. 
+
+               // this also is not the nicest way to do it.
                // I am still amazed, that FilteredSelectionDialog does not offer any methods to change its data
                // once it was opened. Am I doing it wrong?
                String pattern = getTitle(cdmObject);
                ((Text) getPatternControl()).setText(pattern);
        }
-       
+
        /* (non-Javadoc)
        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
        */
@@ -240,7 +240,7 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
                throws CoreException {
                try {
-                       if(model != null){                              
+                       if(model != null){
                                progressMonitor.beginTask("Looking for entities", model.size());
                                for(T element : model){
                                        contentProvider.add(element, itemsFilter);
@@ -288,10 +288,19 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
        @Override
        protected Comparator getItemsComparator() {
                return new Comparator<IEnumTerm>() {
-                       public int compare(IEnumTerm entity1,
+                       @Override
+            public int compare(IEnumTerm entity1,
                                        IEnumTerm entity2) {
-                               Collator collator = Collator.getInstance();
-                               return collator.compare(entity1.getMessage(), entity2.getMessage());
+                               if (entity1.equals(entity2)){
+                                   return 0;
+                               }
+                           Collator collator = Collator.getInstance();
+
+                               int result = collator.compare(entity1.getMessage(), entity2.getMessage());
+                               if (result == 0){
+                                   return entity1.getUuid().compareTo(entity2.getUuid());
+                               }
+                               return result;
                        }
                };
        }
@@ -304,7 +313,7 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
        protected IStatus validateItem(Object item) {
                return Status.OK_STATUS;
        }
-       
+
        /**
         * <p>getSelectedUuidAndTitleCache</p>
         *
@@ -314,7 +323,7 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                Object[] result = getResult();
                return result[0] == null ? null : (T) result[0];
        }
-       
+
        /**
         * <p>Getter for the field <code>settings</code>.</p>
         *
@@ -326,9 +335,9 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                }
                return settings;
        }
-       
+
        /**
-        * 
+        *
         * @author n.hoffmann
         * @created Oct 19, 2009
         * @version 1.0
@@ -337,39 +346,42 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
            /*
            * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#restoreItemFromMemento(org.eclipse.ui.IMemento)
                */
-               protected Object restoreItemFromMemento(IMemento element) {
+               @Override
+        protected Object restoreItemFromMemento(IMemento element) {
                        return element.getString("resource"); //$NON-NLS-1$
                }
                /*
                 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#storeItemToMemento(java.lang.Object,
                 *      org.eclipse.ui.IMemento)
                 */
-               protected void storeItemToMemento(Object item, IMemento element) {
+               @Override
+        protected void storeItemToMemento(Object item, IMemento element) {
                        element.putString("resource", item.toString()); //$NON-NLS-1$
                }
        }
-       
+
        /**
         * <p>getNewWizardLinkText</p>
         *
         * @return a {@link java.lang.String} object.
         */
        protected abstract String getNewWizardLinkText();
-       
+
        /**
         * <p>getNewEntityWizard</p>
-        * @param parameter 
+        * @param parameter
         * @return a {@link eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard} object.
         */
        protected abstract AbstractNewEntityWizard getNewEntityWizard(String parameter);
-       
+
        public class FilteredCdmResourceLabelProvider extends LabelProvider {
-               public String getText(Object element) {
+               @Override
+        public String getText(Object element) {
                        if (element == null) {
                                return null;
                        }
                        return ((IEnumTerm) element).getMessage();
-               }                       
+               }
        };
 
        /* (non-Javadoc)
@@ -386,23 +398,23 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                }
                return null;
        }
-       
+
        protected SelectionListener getNewWizardLinkSelectionListener(){
                return new SelectionAdapter() {
-                       
+
                        /* (non-Javadoc)
                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
                         */
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               
+
                                AbstractNewEntityWizard wizard = getNewEntityWizard(e.text);
                                wizard.init(null, null);
                                WizardDialog dialog = new WizardDialog(getShell(), wizard);
                                int status = dialog.open();
-                               
+
                                if (status == IStatus.OK) {
-                                       
+
                                        T entity = (T) wizard.getEntity();
 
                                        refresh();
@@ -412,17 +424,19 @@ public abstract class AbstractFilteredCdmEnumSelectionDialog<T extends IEnumTerm
                        }
                };
        }
-       
+
        /**
         * <p>getConversationHolder</p>
         *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
-       public ConversationHolder getConversationHolder() {
+       @Override
+    public ConversationHolder getConversationHolder() {
                return conversation;
        }
-       
+
        /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {}
+       @Override
+    public void update(CdmDataChangeMap changeEvents) {}
 
 }
index 61e4b9b34e5cb38719e27e7ce7e017d26e1fbad0..a6ec94c170de6d86d423beb86ca5a7e69a7f1988 100644 (file)
@@ -365,7 +365,14 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                        public int compare(UuidAndTitleCache entity1,
                                        UuidAndTitleCache entity2) {
                                Collator collator = Collator.getInstance();
-                               return collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
+                               if (entity1.getUuid().equals(entity2.getUuid())){
+                                   return 0;
+                               }
+                               int result = collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
+                               if (result == 0){
+                                   result = entity1.getUuid().compareTo(entity2.getUuid());
+                               }
+                               return result;
                        }
                };
        }
@@ -492,10 +499,14 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                                       // model.add(new UuidAndTitleCache<T>(entity.getUuid(), entity.getId(), getTitle(entity)));
                                        refresh();
                                        setPattern(entity);
-                                       getConversationHolder().bind();
+                                       if (getConversationHolder() != null){
+                                           getConversationHolder().bind();
+                                       }
                                    }
                                    //FIXME : Need to make sure this is a stable fix (ticket 3822)
-                                   getConversationHolder().commit();
+                                   if (getConversationHolder() != null){
+                                       getConversationHolder().commit();
+                                   }
                                }
                            }
                        }
index 88cffafd38ec741d2f6d1bdccc0969e20ab977c3..cb666348ef0b8e724404519d2bce693c2193706f 100644 (file)
@@ -193,6 +193,10 @@ public class NomenclaturalAuthorSelectionDialog extends AgentSelectionDialog {
                        @Override
                        public int compare(UuidAndTitleCache entity1,
                                        UuidAndTitleCache entity2) {
+
+                           if (entity1.getUuid().equals(entity2.getUuid())){
+                               return 0;
+                           }
                                Collator collator = Collator.getInstance();
                                String compareString1 = "";
                                if (entity1.getAbbrevTitleCache() != null){
@@ -212,7 +216,11 @@ public class NomenclaturalAuthorSelectionDialog extends AgentSelectionDialog {
                                }
 
 
-                               return collator.compare(compareString1, compareString2);
+                               int result =collator.compare(compareString1, compareString2);
+                               if (result == 0){
+                                   result = entity1.getUuid().compareTo(entity2.getUuid());
+                               }
+                               return result;
                        }
                };
        }
index 6309647e2b0d964de0bf13d9c1f7683c25b3b00c..9442d18b46b4b9e3593c75892fb083f73de6a85a 100644 (file)
@@ -22,7 +22,7 @@ public class NomenclaturalReferenceSelectionDialog extends
 
        protected NomenclaturalReferenceSelectionDialog(Shell shell,
                        ConversationHolder conversation, String title, boolean multi,
-                       Reference reference) {
+                       Reference reference, boolean inReference) {
                super(shell, conversation, title, multi, reference);
                // TODO Auto-generated constructor stub
        }
@@ -66,7 +66,7 @@ public class NomenclaturalReferenceSelectionDialog extends
 
        public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
                NomenclaturalReferenceSelectionDialog dialog = new NomenclaturalReferenceSelectionDialog(shell, conversation,
-                               "Choose a reference", false, reference);
+                               "Choose a reference", isInReference, reference, false);
                return getSelectionFromDialog(dialog);
        }
 
@@ -132,31 +132,42 @@ public class NomenclaturalReferenceSelectionDialog extends
        };
 
        @Override
-       protected Comparator getItemsComparator() {
-               return new Comparator<UuidAndTitleCache>() {
-                       @Override
-                       public int compare(UuidAndTitleCache entity1,
-                                       UuidAndTitleCache entity2) {
-                               Collator collator = Collator.getInstance();
-                               String compareString1 = "";
-                               if (entity1.getAbbrevTitleCache() != null){
-                                       compareString1 = entity1.getAbbrevTitleCache();
-                               }
-                               if (entity1.getTitleCache() != null){
-                                       compareString1 += entity1.getTitleCache();
-                               }
-                               String compareString2 = "";
-                               if (entity2.getAbbrevTitleCache() != null){
-                                       compareString2 = entity2.getAbbrevTitleCache();
-                               }
-                               if (entity2.getTitleCache() != null){
-                                       compareString2 += entity2.getTitleCache();
-                               }
-                               return collator.compare(compareString1, compareString2);
-                       }
-               };
-       }
-
+    protected Comparator getItemsComparator() {
+        return new Comparator<UuidAndTitleCache>() {
+            @Override
+            public int compare(UuidAndTitleCache entity1,
+                    UuidAndTitleCache entity2) {
+
+                if (entity1.getUuid().equals(entity2.getUuid())){
+                    return 0;
+                }
+                Collator collator = Collator.getInstance();
+                String compareString1 = "";
+                if (entity1.getAbbrevTitleCache() != null){
+                    compareString1 = entity1.getAbbrevTitleCache();
+                }
+                if (entity1.getTitleCache() != null){
+                    compareString1 += entity1.getTitleCache();
+                }
+
+
+                String compareString2 = "";
+                if (entity2.getAbbrevTitleCache() != null){
+                    compareString2 = entity2.getAbbrevTitleCache();
+                }
+                if (entity2.getTitleCache() != null){
+                    compareString2 += entity2.getTitleCache();
+                }
+
+
+                int result =collator.compare(compareString1, compareString2);
+                if (result == 0){
+                    result = entity1.getUuid().compareTo(entity2.getUuid());
+                }
+                return result;
+            }
+        };
+    }
        @Override
        protected String getTitle(Reference cdmObject) {
         if(cdmObject == null){
index cc4d682c010bc678b74d75038e5cc11c962f1181..afaab4762a859aa097d8af8b01c0358074fc4789 100644 (file)
@@ -31,6 +31,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Reference> {
 
+    protected static boolean isInReference = false;
+    private Reference currentReference;
        /**
         * <p>select</p>
         *
@@ -39,12 +41,27 @@ public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelecti
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
         */
-       public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
+       public static Reference select(Shell shell, ConversationHolder conversation, Reference reference, boolean isInReference) {
                ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
-                               "Choose a reference", false, reference);
+                               "Choose a reference", false, reference, isInReference);
                return getSelectionFromDialog(dialog);
        }
 
+       /**
+     * <p>select</p>
+     *
+     * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+     */
+    public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
+        ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
+                "Choose a reference", false, reference);
+        return getSelectionFromDialog(dialog);
+    }
+
+
 
        /**
         * <p>Constructor for FilteredReferenceSelectionDialog.</p>
@@ -57,9 +74,28 @@ public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelecti
         */
        protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference) {
                super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
+               this.currentReference = reference;
        }
 
 
+
+
+       /**
+     * <p>Constructor for FilteredReferenceSelectionDialog.</p>
+     *
+     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
+     * @param title a {@link java.lang.String} object.
+     * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     * @param multi a boolean.
+     */
+    protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference, boolean isInReference) {
+        super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
+        this.isInReference = isInReference;
+        this.currentReference = reference;
+    }
+
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
         */
@@ -82,9 +118,17 @@ public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelecti
         }
 
         if (pattern == null || pattern.equals("?")){
-            model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null);
+            if (isInReference && currentReference != null){
+                model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null,currentReference.getType());
+            }else{
+                model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null);
+            }
         }else{
-            model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern);
+            if (isInReference && currentReference != null){
+                model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern, currentReference.getType());
+            }else{
+                model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern);
+            }
         }
        }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/RightsSelectionDialog.java
new file mode 100755 (executable)
index 0000000..86e8fc6
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+* Copyright (C) 2017 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
+
+import java.util.UUID;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.IRightsService;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @date 15.02.2017
+ *
+ */
+public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Rights> {
+
+
+    public static Rights select(Shell shell, ConversationHolder conversation, Rights rights){
+        RightsSelectionDialog dialog = new RightsSelectionDialog(shell, conversation,
+                "Choose Rights", false, RightsSelectionDialog.class.getCanonicalName(), rights);
+        return getSelectionFromDialog(dialog);
+    }
+
+    /**
+     * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
+     */
+    protected RightsSelectionDialog(Shell shell, ConversationHolder conversation, String title,
+            boolean multi, String settings, Rights rights) {
+        super(shell, conversation, title, multi, settings, rights);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Rights getPersistentObject(UUID uuid) {
+        Object object = CdmStore.getService(IRightsService.class).load(uuid);
+
+        Rights rights= (Rights) HibernateProxyHelper.deproxy(object);
+
+        if(rights != null){
+            return rights;
+        }
+        MessagingUtils.error(this.getClass(), "Selected element is not rights", null);
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected String getNewWizardLinkText() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void initModel() {
+        Control control = getPatternControl();
+        String pattern = null;
+        if (control != null){
+            pattern = ((Text)control).getText();
+        }
+
+        if (pattern == null || pattern.equals("?")){
+            model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(null,null);
+
+        }else{
+
+                model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(limitOfInitialElements,pattern);
+
+        }
+
+    }
+
+}
index dbb9ef191ff0f779af69632c8cbd3e063a63ab30..9c1c812bf34a3d76ac3ecac95696dddf644b1db8 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.model.media.Media;
+import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.molecular.Amplification;
 import eu.etaxonomy.cdm.model.molecular.Primer;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
@@ -47,6 +48,7 @@ import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;
 import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
 
 /**
  * @author n.hoffmann
@@ -80,6 +82,9 @@ public class SelectionDialogFactory {
                        return (T) NomenclaturalReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
                }
                if(clazz.equals(Reference.class)){
+                   if (parentElement instanceof ReferenceDetailElement){
+                       return (T) ReferenceSelectionDialog.select(shell, conversation, ((ReferenceDetailElement) parentElement).getEntity(), true);
+                   }
                        return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
                }
 
@@ -159,6 +164,9 @@ public class SelectionDialogFactory {
                if(clazz.equals(Media.class)){
                    return (T) MediaSelectionDialog.select(shell, conversation, (Media) currentSelection);
                }
+               if(clazz.equals(Rights.class)){
+            return (T) RightsSelectionDialog.select(shell, conversation, (Rights) currentSelection);
+        }
 
                return null;
        }
index f727331f7b4583ac36a232f9eeb03aeaefa7c9b3..09e106b5ff26a99d0d571367810bccb73bb52e8e 100644 (file)
@@ -140,7 +140,14 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
                 @Override
                 public int compare(Classification o1, Classification o2) {
-                    return o1.getTitleCache().compareTo(o2.getTitleCache());
+                    if (o1.equals(o2)){
+                        return 0;
+                    }
+                    int result = o1.getTitleCache().compareTo(o2.getTitleCache());
+                    if (result == 0){
+                        return o1.getUuid().compareTo(o2.getUuid());
+                    }
+                    return result;
                 }
             });
                        if (this.cdmBaseToBeFiltered == null){
index 3f8978a82589ceddd847b919d87ef065eb7386ff..9ee42023793a2a8e09d9ada86e8fa306fdec0f27 100644 (file)
@@ -16,7 +16,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 
 /**
  *
index 137e36afdec40830e187b2c973d84622959c0015..be66a75fa0305a0b638d9e718127b78c28eb813c 100644 (file)
@@ -2680,7 +2680,7 @@ public class CdmFormFactory extends FormToolkit {
         } else if (entity instanceof User) {
             element = new MemberDetailElement(this, parentElement, (User) entity, removeListener, style);
         } else if (entity instanceof GrantedAuthority) {
-            element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity,
+            element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity, ((Group)parentElement.getEntity()),
                     removeListener, style);
         } else if (entity instanceof Group) {
             element = new GroupsByUserDetailElement(this, parentElement, (Group) entity, removeListener, style);
@@ -2718,6 +2718,25 @@ public class CdmFormFactory extends FormToolkit {
             element = new StatisticalMeasureCollectionElement(this, parentElement, (StatisticalMeasure) entity, removeListener, backgroundColor, style);
         }
 
+        //check for parent section when entity is null
+        //this happens when AbstractUnboundEntityCollectionSection is used
+        if(entity==null){
+            if(parentElement instanceof ScopeSection || parentElement instanceof ScopeRestrictionSection){
+                element = new ScopeElement(this,
+                        parentElement,
+                        (DefinedTerm) entity,
+                        removeListener,
+                        style);
+            }
+            else if(parentElement instanceof ModifierSection){
+                element = new ModifierElement(this,
+                        parentElement,
+                        (DefinedTerm) entity,
+                        removeListener,
+                        style);
+            }
+        }
+
 
         if (element == null) {
             MessagingUtils.messageDialog("No element for entity", this,
index c34c2d288a8d24bc2b4dd957719bdcd2348f7e50..6e6f073ce5256e12f3be3ce50c9b77a355c2b030 100644 (file)
@@ -202,7 +202,7 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
        private void updateMinimum() {
                switch(unitType) {
                case ELEVATION:
-                       getEntity().setAbsoluteElevation(text_minVal.getDouble()!=null?text_minVal.getDouble().intValue():null);
+                       getEntity().setAbsoluteElevation(text_minVal.getDouble()!=null ? text_minVal.getDouble().intValue(): null);
                        break;
                case DIST_TO_GROUND:
                        getEntity().setDistanceToGround(text_minVal.getDouble());
@@ -231,7 +231,7 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
        private void updateMaximum() {
                switch(unitType) {
                case ELEVATION:
-                       getEntity().setAbsoluteElevationMax(text_maxVal.getDouble()!=null?text_maxVal.getDouble().intValue():null);
+                       getEntity().setAbsoluteElevationMax(text_maxVal.getDouble() != null ? text_maxVal.getDouble().intValue() : null);
                        break;
                case DIST_TO_GROUND:
                        getEntity().setDistanceToGroundMax(text_maxVal.getDouble());
index 8f1c40a606a704f47b57d4ba65b94928c3408d4e..59a6fd09018bf6569e164c9872374412cb8ee037 100644 (file)
@@ -20,7 +20,6 @@ import org.eclipse.swt.widgets.Display;
  *
  * @author n.hoffmann
  * @created Mar 22, 2010
- * @version 1.0
  */
 public class NumberWithLabelElement extends TextWithLabelElement {
 
@@ -63,7 +62,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
            if(super.getText()!=null){
                String text = super.getText().trim();
                try {
-                   return StringUtils.isBlank(text) ? 0 : new Integer(text);
+                   return StringUtils.isBlank(text) ? null : new Integer(text);
                } catch (NumberFormatException e) {
                    exception = e;
                }
@@ -78,7 +77,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
        public Float getFloat(){
            String text = super.getText();
            try {
-               return StringUtils.isBlank(text) ? 0 : new Float(text);
+               return StringUtils.isBlank(text) ? null : new Float(text);
            } catch (NumberFormatException e) {
                exception = e;
            }
@@ -92,7 +91,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
        public Double getDouble(){
            String text = super.getText();
            try {
-               return new Double(text);
+               return StringUtils.isBlank(text) ? null : new Double(text);
            } catch (NumberFormatException e) {
                exception = e;
            }
@@ -106,9 +105,6 @@ public class NumberWithLabelElement extends TextWithLabelElement {
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
-        */
        /** {@inheritDoc} */
        @Override
        public void modifyText(ModifyEvent event) {
@@ -120,14 +116,11 @@ public class NumberWithLabelElement extends TextWithLabelElement {
                }
 
                try{
-
-                       Float number = Float.parseFloat(value);
-
+                       Float number = Float.parseFloat(value);
                        if((start != null && number < start) || (end != null && number > end)){
                                exception = new NumberFormatException("You entered a number that is not within the allowed bounds.");
                                throw exception;
                        }
-
                }catch(NumberFormatException e){
                        text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
                        firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
index 063819a7d4b1537f8405328c556706090b49510f..c50229826d8af57f5b6d3d5e8a097492b4ab59c0 100644 (file)
 package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.joda.time.IllegalFieldValueException;
 import org.joda.time.Partial;
 
 import eu.etaxonomy.cdm.model.common.TimePeriod;
@@ -22,7 +25,6 @@ import eu.etaxonomy.cdm.model.common.TimePeriod;
  *
  * @author n.hoffmann
  * @created Mar 31, 2010
- * @version 1.0
  */
 public class PartialElement extends AbstractCdmFormElement implements ISelectable {
 
@@ -52,7 +54,7 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
                addControl(label);
 
                number_year = formFactory.createNumberTextWithLabelElement(this, "Year", null, style);
-               number_year.setLimits(4, -9999, 9999);
+               number_year.setLimits(4, 0, 9999);
 
                number_month = formFactory.createNumberTextWithLabelElement(this, "Month", null, style);
                number_month.setLimits(2, 1, 12);
@@ -88,9 +90,6 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
                return partial;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
-        */
        /** {@inheritDoc} */
        @Override
        public void propertyChange(PropertyChangeEvent event) {
@@ -119,30 +118,20 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
        }
 
        private void handleEvent(Object eventSource){
-               if(eventSource == number_month){
-                       if (number_month.getInteger() == 0){
-                               partial = TimePeriod.setPartialField(partial, null, TimePeriod.MONTH_TYPE);
-                       } else{
-                               partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
-                       }
-
-               }else if(eventSource == number_day){
-                       if (number_day.getInteger() == 0){
-                               partial = TimePeriod.setPartialField(partial, null, TimePeriod.DAY_TYPE);
-                       } else{
-                               partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
-                       }
-
-
-               }else if(eventSource == number_year){
-                       if (number_year.getInteger() == 0){
-                               partial = TimePeriod.setPartialField(partial, null, TimePeriod.YEAR_TYPE);
-                       } else{
-                               partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
+           if (eventSource instanceof NumberWithLabelElement){
+                       try{
+                       if(eventSource == number_month && number_month.getException()==null){
+                               partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
+                           }else if(eventSource == number_day && number_day.getException()==null){
+                       partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
+                           }else if(eventSource == number_year && number_year.getException()==null){
+                               partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
+                           }
+                       } catch (IndexOutOfBoundsException | IllegalFieldValueException e) {
+                               ((NumberWithLabelElement)eventSource).text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
                        }
-
-               }
-               firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
+           }
+           firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
        }
 
        /** {@inheritDoc} */
index b1cff1ad37587bddadeabfc0ea976273b8946ae9..a2c97edb1eab5f754fead5601dfae20c7d2ea207 100644 (file)
@@ -27,7 +27,6 @@ import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
  *
  * @author n.hoffmann
  * @created Oct 15, 2010
- * @version 1.0
  */
 public class PointElement extends AbstractCdmFormElement implements
                IEntityElement<Point>, ISelectable {
@@ -151,11 +150,6 @@ public class PointElement extends AbstractCdmFormElement implements
                }
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see eu.etaxonomy.taxeditor.forms.IEntityElement#getEntity()
-        */
        /** {@inheritDoc} */
        @Override
        public Point getEntity() {
index 01deec47f0268f6575971d15c372362afbd20bf9..284539b3add41fb01f3ea329c904c401322c68f8 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
index 8234ee2834a3f1d6d95b88d715c013372c1dc9c0..c26c709590b77eb82e6dca1cd438e1a533528f1e 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
index 975aff4c8ca08e3b11f4ea241313af42e0bf39dc..09289d8c6fb213515e90001e7b428f97180ba1ca 100644 (file)
@@ -19,7 +19,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -71,6 +71,7 @@ public class PasswordWizard extends Wizard implements IConversationEnabled{
                            CdmStore.getService(IUserService.class).changePasswordForUser(user.getUsername(), passwordPage.getNewPassword());
                        }
                        CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
+                       CdmStore.getLoginManager().authenticate(user.getUsername(), passwordPage.getNewPassword());
                    internalConversation.commit(false);
                    internalConversation.unbind();
                    internalConversation.close();
index 7c1e44fe5d4e5a235e4cb502e78d0912d5534a19..c2daa7f402a25c3585ad7850dbc638b48304377e 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Text;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
index c700e7d26bb6f604f85f833bad47d4b52aeab028..b593582936224a71f27025df0629da6964d5b98e 100644 (file)
@@ -126,6 +126,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                super.setEntity(entity);
                setSectionTitle();
                layout();
+
        }
 
        protected void setSectionTitle() {
@@ -137,7 +138,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                                if (label == null){
                                        label = ((DefinedTermBase<?>)getEntity()).getLabel();
                                }
-                               
+
                        } else if (getEntity() instanceof TextData){
                                label = ((TextData)getEntity()).getLanguageText(PreferencesUtil.getGlobalLanguage()).getText();
                                if (label == null){
@@ -147,7 +148,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                                label =((IdentifiableEntity) getEntity()).getTitleCache();
                        }
                        title = ": " + label;
-                       
+
                        // we have to duplicate ampersands otherwise they are treated as
                        // mnenomic (see Label.setText() documentation)
                        // see also #4302
@@ -173,6 +174,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
        @Override
     public void setIrrelevant(boolean irrelevant) {
                if (detailElement != null) {
+
                        detailElement.setIrrelevant(irrelevant);
                }
        }
index be5f378289f2969506a4c90a07a9f2a839aea789..cc6b3f4aab64d60f56906d55a7dce92436c8f39f 100644 (file)
@@ -74,7 +74,7 @@ public class ModifierElement extends AbstractEntityCollectionElement<DefinedTerm
                    }
                    combo_modifier.setTerms(modifierTerms);
                }
-        if(entity.getId()>0){
+        if(entity!=null && entity.getId()>0){
             combo_modifier.setSelection(entity);
             combo_modifier.removeEmptyElement();
         }
index b4ad1c9bbe8a2beac26bf542da1723eeaaccb83f..ec09e802c46b2a9226c2a2ac780feb48416cde19 100644 (file)
@@ -13,7 +13,6 @@ import java.util.Collection;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.description.IModifiable;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -45,7 +44,7 @@ public class ModifierSection extends AbstractUnboundEntityCollectionSection<IMod
        /** {@inheritDoc} */
        @Override
        public DefinedTerm createNewElement() {
-               return DefinedTerm.NewInstance(TermType.Modifier,"","Untitled","");
+               return null;
        }
 
        /** {@inheritDoc} */
index 19be7456c2cf42d87c15546d5fbeccbd09c186e2..a70daa5d941c69d3c0b922e115802fff8f5ce22a 100644 (file)
@@ -14,6 +14,7 @@ import org.eclipse.swt.events.SelectionListener;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -51,7 +52,7 @@ public class ScopeElement extends AbstractEntityCollectionElement<DefinedTerm> {
        @Override
        public void setEntity(DefinedTerm entity) {
                this.entity = entity;
-               if(entity.getId()!=0){
+               if(entity!=null && entity.getId()!=0){
                    combo_scope.setSelection(entity);
                    combo_scope.removeEmptyElement();
                }
@@ -74,6 +75,13 @@ public class ScopeElement extends AbstractEntityCollectionElement<DefinedTerm> {
                    key.addScopeRestriction(scopeTerm);
                 entity = scopeTerm;
                }
+               else if(getParentElement() instanceof ScopeSection){
+                   TaxonDescription description = ((ScopeSection)getParentElement()).getEntity();
+                   description.removeScope(entity);
+                   description.addScope(scopeTerm);
+                   entity = scopeTerm;
+
+               }
            }
        }
 
index 566f76a2d748ab096b349f4cc7f058786e1c36e2..6aae3f43b73ad87775c6f99169899b1ad9510f25 100644 (file)
@@ -13,7 +13,6 @@ import java.util.Collection;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -49,7 +48,7 @@ public class ScopeSection extends AbstractUnboundEntityCollectionSection<TaxonDe
        /** {@inheritDoc} */
        @Override
        public DefinedTerm createNewElement() {
-               return DefinedTerm.NewInstance(TermType.Scope,"","","");
+               return null;
        }
 
        /** {@inheritDoc} */
index 1dd94c12968df8485286ac4fcd7bb1da80e54580..d40e410844f34f22e4c60783c1630b3baff9c8ff 100644 (file)
@@ -22,45 +22,59 @@ public class SourceComparator implements Comparator<OriginalSourceBase> {
         Reference citation1 = o1.getCitation();
         Reference citation2 = o2.getCitation();
 
+        int result = 0;
+
         // the newly created should always be on top
-        if (id1 == 0 && id2!=0) {
-            return -1;
-        }
-        else if (id2==0) {
-            return 1;
+        if (id1 == 0){
+            if(id2!=0) {
+                result = -1;
+            }
+            else{
+                result = 0;
+            }
+        } else if(id2==0){
+            result = 1;
         }
 
         // sort by type (Primary taxonomic > Primary Media > others
         // alphabetically by reference title cache)
-        if (type1 != null && type1.equals(OriginalSourceType.PrimaryTaxonomicSource)
-                && (type2 == null || !type2.equals(OriginalSourceType.PrimaryTaxonomicSource))) {
-            return -1;
-        }
-        if ((type1 == null || !type1.equals(OriginalSourceType.PrimaryTaxonomicSource))
-                && type2 != null && type2.equals(OriginalSourceType.PrimaryTaxonomicSource)) {
-            return 1;
+        else if (type1 == null){
+            if(type2==null){
+                result = 0;
+            }
+            else{
+                result = 1;
+            }
+        } else if (type2 == null){
+            result = -1;
+        } else if(type1.equals(type2)){
+            result = 0;
+        } else if (type1.equals(OriginalSourceType.PrimaryTaxonomicSource)){
+            result = -1;
+        } else if (type2.equals(OriginalSourceType.PrimaryTaxonomicSource)){
+            result = 1;
+        } else if (type1.equals(OriginalSourceType.PrimaryMediaSource)){
+            result = -1;
+        } else if (type2.equals(OriginalSourceType.PrimaryMediaSource)){
+            result = 1;
         }
 
-        if ((type1 == null || type1.equals(OriginalSourceType.PrimaryMediaSource))
-                && (type2==null || !type2.equals(OriginalSourceType.PrimaryMediaSource))) {
-            return -1;
-        }
-        if (type2 != null && type2.equals(OriginalSourceType.PrimaryMediaSource)
-                && type1!=null && !type1.equals(OriginalSourceType.PrimaryMediaSource)) {
-            return 1;
-        }
-
-        //sort by citation title cache
-        if(citation1!=null && citation2!=null){
-            return citation1.getTitleCache().compareTo(citation2.getTitleCache());
-        }
+        //sort by citation title cache if types are equal
+        if (result == 0){
+            if(citation1!=null && citation2!=null){
+                result = citation1.getTitleCache().compareTo(citation2.getTitleCache());
+            }
 
-        if(o2.getCreated()!=null && o1.getCreated()!=null){
-            return o2.getCreated().compareTo(o1.getCreated());
+            if(o2.getCreated()!=null && o1.getCreated()!=null){
+                result = o2.getCreated().compareTo(o1.getCreated());
+            }
+            if (result == 0){
+                //default fallback
+                return o1.getId() - o2.getId();
+            }
         }
+        return result;
 
-        //default fallback
-        return o1.getId() - o2.getId();
 
     }
 }
index fb250dba30837cf98f00c3aa0676db6550010b09..f40a6403ddb65ee28a42f7fb75e88b86cee180a9 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2012 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.
 */
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.ui.section.grantedAuthority;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
+import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -24,14 +25,16 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
  *
  */
 public class GrantedAuthorityCollectionElement extends AbstractEntityCollectionElement<GrantedAuthorityImpl> {
-       
+
        private EntitySelectionElement<GrantedAuthorityImpl> selection_authority;
+       private Group grantedAuthorityUser;
 
 
        public GrantedAuthorityCollectionElement(CdmFormFactory formFactory,
-                       AbstractFormSection section, GrantedAuthorityImpl entity,
+                       AbstractFormSection section, GrantedAuthorityImpl entity, Group group,
                        SelectionListener removeListener, int style) {
-               super(formFactory, section, entity, removeListener, null, style);               
+               super(formFactory, section, entity, removeListener, null, style);
+               this.grantedAuthorityUser = group;
                // TODO Auto-generated constructor stub
        }
 
@@ -40,8 +43,8 @@ public class GrantedAuthorityCollectionElement extends AbstractEntityCollectionE
         */
        @Override
        public void setEntity(GrantedAuthorityImpl entity) {
-               selection_authority.setEntity(entity);
-               
+               this.entity = entity;
+
        }
 
        /* (non-Javadoc)
@@ -59,7 +62,12 @@ public class GrantedAuthorityCollectionElement extends AbstractEntityCollectionE
        @Override
        public void handleEvent(Object eventSource) {
                if (eventSource == selection_authority) {
+                   GrantedAuthorityImpl oldGrantedAuthority = entity;
+                   grantedAuthorityUser.removeGrantedAuthority(entity);
+
                        setEntity(selection_authority.getEntity());
+                       grantedAuthorityUser.addGrantedAuthority(entity);
+
                }
        }
 
index 75a70728e618a3c5c5ed9cd0e6fe787438812f35..ab5a27897341e0afded11b405fa46e68e09c6522 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.ui.section.grantedAuthority;
 
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
-import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmAuthority;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
@@ -25,7 +24,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 public class GrantedAuthorityDetailElement extends AbstractCdmDetailElement<GrantedAuthorityImpl> {
 
        private TextWithLabelElement text_authority;
-       
+
        /**
         * @param formFactory
         * @param formElement
@@ -38,10 +37,13 @@ public class GrantedAuthorityDetailElement extends AbstractCdmDetailElement<Gran
        @Override
        protected void createControls(ICdmFormElement formElement,
                        GrantedAuthorityImpl entity, int style) {
-               
-               String labelText = GrantedAuthorityLabelTextProvider.getText(entity);
-               text_authority = formFactory.createTextWithLabelElement(formElement, "Authority", labelText, style);
-               
+
+               String labelText = null;
+               if (entity.getAuthority() != null){
+                   labelText = GrantedAuthorityLabelTextProvider.getText(entity);
+               }
+           text_authority = formFactory.createTextWithLabelElement(formElement, "Authority", null, style);
+
        }
 
        @Override
@@ -49,9 +51,9 @@ public class GrantedAuthorityDetailElement extends AbstractCdmDetailElement<Gran
                if(eventSource == text_authority){
                        getEntity().setAuthority(text_authority.getText());
                }
-               
+
        }
 
 
-       
+
 }
index c94bb2a5a745e5f9a935d68477beb438469818d4..f83a8d31273e598bc0ac5b475947dfd012a3218b 100644 (file)
@@ -119,6 +119,7 @@ public class GrantedAuthorityDetailSection extends
      */
     @Override
     public GrantedAuthority addExisting() {
+        System.err.println("Test");
         return null;
     }
 
index d6b4286ed10a960c0fc8da0b8d7503b60fdde2eb..011ec43597a67cd51a66f4cd59e1097714352677 100644 (file)
@@ -63,7 +63,8 @@ public class PolytomousKeyDetailElement extends
                    getEntity().setTitleCache(textLabel.getText(), true);
                }
                else if(eventSource==numberStartNumber){
-                   getEntity().setStartNumber(numberStartNumber.getInteger());
+                       int startNumber = numberStartNumber.getInteger() == null? 0 : numberStartNumber.getInteger();
+                   getEntity().setStartNumber(startNumber);
                }
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
        }
index 8c302fcf657d3ccec0ffe905cce7d2cc86306af1..0da44aad62247b515f507922e6dfc561ac58a04b 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.section.key;
 
@@ -7,7 +7,6 @@ import java.util.Collection;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -31,9 +30,9 @@ public class ScopeRestrictionSection extends AbstractUnboundEntityCollectionSect
        }
 
        @Override
-       public DefinedTerm createNewElement() {         
-               return DefinedTerm.NewInstance(TermType.Scope,"","Untitled","");
-                       
+       public DefinedTerm createNewElement() {
+               return null;
+
        }
 
        @Override
index 783e5a9e6b4c71c348b9be02f863679e80171afc..73dde5b92d3fcee3db9334735bc0d68bc4f41b80 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Arrays;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.name.ZoologicalName;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -70,11 +71,8 @@ public class AuthorshipDetailElement extends
                toggleable_cache = formFactory.createToggleableTextField(this,
                                "Authorship Cache", entity.getAuthorshipCache(),
                                entity.isProtectedAuthorshipCache(), style);
-                   //TODO RL
-            if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                toggleable_cache.setVisible(false);
-            }
-           }
+               addElement(toggleable_cache);
+          }
            NomenclaturalCode code = entity.getNomenclaturalCode();
 
            if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
@@ -121,7 +119,7 @@ public class AuthorshipDetailElement extends
        @Override
        public void updateContent() {
                if (getEntity() == null) {
-                       setEntity(NonViralName.NewInstance(null));
+                       setEntity(TaxonNameFactory.NewNonViralInstance(null));
                }
 
                super.updateContent();
index ad84eea4cbfd9616ab55f92b81f03e151369c74a..4e1cf03a463377ee78873a494b288772cfe1577f 100644 (file)
@@ -10,6 +10,7 @@
 package eu.etaxonomy.taxeditor.ui.section.name;
 
 import java.util.Arrays;
+import java.util.Collection;
 
 import org.apache.log4j.Logger;
 import org.eclipse.swt.SWT;
@@ -19,6 +20,7 @@ import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.name.ZoologicalName;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
@@ -106,6 +108,7 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
                                text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
                }
            }
+
        }
 
        /**
@@ -125,15 +128,19 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
        @Override
        protected void updateContent() {
                if(getEntity() == null){
-                       setEntity(NonViralName.NewInstance(null));
+                       setEntity(TaxonNameFactory.NewNonViralInstance(null));
                }
 
                super.updateContent();
-               if (isAdvancedView){
-               if(isIrrelevant()){
-                       setIrrelevant(isIrrelevant());
-               }else{
-                       setIrrelevant(toggleable_cache.getState(), Arrays.asList(new Object[]{toggleable_cache}));
+               if (toggleable_cache != null){
+                   toggleable_cache.setEnabled(getEntity().isProtectedNameCache());
+
+               if (isAdvancedView){
+                       if(isIrrelevant()){
+                               setIrrelevant(isIrrelevant());
+                       }else{
+                               setIrrelevant(toggleable_cache.getState(), Arrays.asList(new Object[]{toggleable_cache}));
+                       }
                }
                }
        }
@@ -146,7 +153,7 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
                        switch(nonViralName.getNomenclaturalCode()){
                        case ICNAFP :
                                // TODO RL
-                               if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) && isAdvancedView)
+                               if(isAdvancedView)
                                {
                                        createBotanicalNameParts(formElement, nonViralName, style);
                                }
@@ -222,10 +229,10 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
                if (eventSource == toggleable_cache) {
                        getEntity().setNameCache(toggleable_cache.getText(),
                                        toggleable_cache.getState());
-                       if (!isIrrelevant()) {
+                       //if (!isIrrelevant()) {
                 setIrrelevant(toggleable_cache.getState(),
                                                Arrays.asList(new Object[] { toggleable_cache }));
-            }
+            //}
                }
                else if(eventSource == combo_rank){
                        getEntity().setRank(combo_rank.getSelection());
@@ -287,6 +294,19 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
         updateToggleableCacheField();
     }
 
+       @Override
+       public void setIrrelevant(boolean irrelevant, Collection<Object> except){
+           if (toggleable_cache != null){
+           if (toggleable_cache.getState() == irrelevant){
+               super.setIrrelevant(irrelevant, except);
+           }
+           if (except == null || except.isEmpty()){
+               toggleable_cache.setIrrelevant(irrelevant);
+           }
+           }
+
+       }
+
 
 
 
index 67b59f9cfb359b0694dcc06d2dce5b12172e9020..788f37ddff84f3cd57500fa1c812865232eec5ed 100644 (file)
@@ -50,7 +50,7 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
        @Override
        public void createControls(ICdmFormElement element, int style) {
            TermVocabulary vocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.NomenclaturalStatusType.getUuid());
-               nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Nomenclatural Status Type", null,style);
+               nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Nomenclatural Status Type", null,false, style, true);
                ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
 
                super.createControls(element, style);
index f9e00aa1fde5a3e1f52304091acc0b77d03a6aed..500f683c56c6f82460c3f831dd7e5276e05950c8 100644 (file)
@@ -58,24 +58,15 @@ public class NonViralNameDetailElement extends
             combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
             combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
             textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
-            //TODO RL
-            if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                toggleable_cache.setVisible(false);
-                combo_nomenclaturalCode.setVisible(false);
-            }
+
         }else{
                if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE)){
                        toggleable_cache = formFactory.createToggleableTextField(formElement, "Cache", entity.getTitleCache(), entity.isProtectedTitleCache() || entity.isProtectedFullTitleCache(), style);
-                if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                    toggleable_cache.setVisible(false);
-                }
-               }
+
+               }
                if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE)){
                        combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
                        combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
-                        if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                                 combo_nomenclaturalCode.setVisible(false);
-                 }
                }
                if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID)){
                        textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
@@ -98,12 +89,11 @@ public class NonViralNameDetailElement extends
            }
            //TODO RL
            if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
-           if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-               section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
-               section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-               addControl(section_hybrid);
-               addElement(section_hybrid);
-           }
+          section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
+          section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+          addControl(section_hybrid);
+          addElement(section_hybrid);
+
         }
 
 
@@ -113,16 +103,15 @@ public class NonViralNameDetailElement extends
        @Override
        protected void updateContent() {
                super.updateContent();
-
                // disable nomenclatural code, because changing of nom.code is not
                // implemented on library side
                if(combo_nomenclaturalCode!=null){
                    combo_nomenclaturalCode.setEnabled(false);
                }
-
+               toggleable_cache.setEnabled(getEntity().isProtectedTitleCache() || getEntity().isProtectedFullTitleCache());
                if(toggleable_cache!=null){
                    setIrrelevant(toggleable_cache.getState(),
-                           Arrays.asList(new Object[] { toggleable_cache }));
+                           Arrays.asList(new Object[] { toggleable_cache, textLsid }));
                }
        }
 
index 250b4b608e601f33ec334f4e719cd0e32c0ce17c..ece23c212635628a1f76745bcf6341a0ca6e8784 100644 (file)
@@ -23,8 +23,6 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.NameSelectionDialog;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
@@ -64,7 +62,7 @@ public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViral
        protected Control createToolbar() {
                ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
 
-               if(nameChoosable && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
+               if(nameChoosable ){
                    //choose name
                    Action chooseNameAction = new Action("Choose Name", IAction.AS_PUSH_BUTTON){
                        @Override
index 92dd2fdb5d4f0d76ec8a43ed7488c4f2853aab1f..d122962ce24dd26b7b8095e072c85222a090112a 100644 (file)
@@ -64,7 +64,9 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
 
        /**
         * Sorts source type combo alphabetically <b>except</b> for PrimaryTaxonomicSource resp.
-        * PrimaryMediaSource which are alway on top depending on the IdentifiableSource;
+        * PrimaryMediaSource which are always on top depending on the IdentifiableSource;
+        * <br>
+        * The last two are always "Other" followed by "Unknown"
         * @author pplitzner
         * @date Jan 6, 2017
         *
@@ -82,49 +84,63 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
          */
         @Override
         public int compare(OriginalSourceType o1, OriginalSourceType o2) {
-            if(o1!=null && o2==null){
-                return 1;
+            if(o1==null){
+                if(o2==null){
+                    return 0;
+                }
+                else{
+                    return -1;
+                }
             }
-            else if(o1==null && o2!=null){
-                return -1;
+            if(o2==null){
+                return 1;
             }
-            else if(o1!=null && o2 !=null){
-                //both are either taxonomic or media
-                if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
-                        && o2.equals(OriginalSourceType.PrimaryMediaSource)){
-                    if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
-                        return 1;
-                    }
-                    else{
-                        return -1;
-                    }
+            //both are either taxonomic or media
+            else if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
+                    && o2.equals(OriginalSourceType.PrimaryMediaSource)){
+                if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
+                    return 1;
                 }
-                else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
-                        && o1.equals(OriginalSourceType.PrimaryMediaSource)){
-                    if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
-                        return -1;
-                    }
-                    else{
-                        return 1;
-                    }
+                else{
+                    return -1;
+                }
+            }
+            else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
+                    && o1.equals(OriginalSourceType.PrimaryMediaSource)){
+                if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
+                    return -1;
                 }
-                //one is not taxonomic or media
                 else{
-                    if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
-                            ||o1.equals(OriginalSourceType.PrimaryMediaSource)){
-                        return -1;
+                    return 1;
+                }
+            }
+            //one is not taxonomic or media
+            else if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
+                    ||o1.equals(OriginalSourceType.PrimaryMediaSource)){
+                return -1;
 
-                    }
-                    else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
-                            || o2.equals(OriginalSourceType.PrimaryMediaSource)){
-                        return 1;
-                    }
-                    String message1 = o1.getKey();
-                    String message2 = o2.getKey();
-                    return message1.compareTo(message2);
+            }
+            else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
+                    || o2.equals(OriginalSourceType.PrimaryMediaSource)){
+                return 1;
+            }
+            //The last two are always "Other" followed by "Unknown"
+            else if(o1.equals(OriginalSourceType.Other)){
+                if(o2.equals(OriginalSourceType.Unknown)){
+                    return -11;
                 }
+                else{
+                    return 1;
+                }
+            }
+            if(o2.equals(OriginalSourceType.Other)){
+                return 1;
+            }
+            else{
+                String message1 = o1.getKey();
+                String message2 = o2.getKey();
+                return message1.compareTo(message2);
             }
-            return 0;
         }
 
        }
index 991aa0eaf4a9aa81aa56a91a4ee45f04e3e10e3b..5fc674c8ef99f4e3f2cd69c94e508b462842a667 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
@@ -8,6 +8,7 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.RightsSelectionDialog;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
@@ -74,8 +75,7 @@ public class RightsSection extends AbstractEntityCollectionSection<IdentifiableE
      */
     @Override
     public Rights addExisting() {
-        // TODO Auto-generated method stub
-        return null;
+        return RightsSelectionDialog.select(getShell(), getConversationHolder(), null);
     }
 
     /**
@@ -83,8 +83,10 @@ public class RightsSection extends AbstractEntityCollectionSection<IdentifiableE
      */
     @Override
     public boolean allowAddExisting() {
-        // TODO Auto-generated method stub
-        return false;
+        return true;
     }
 
+
+
+
 }
index 19311bff3ba27afe02276813ca9ee5c7c3fbdd9d..678014caf52cee566a00936371e4cc65ab694f71 100644 (file)
@@ -20,8 +20,6 @@ import eu.etaxonomy.cdm.model.taxon.SynonymType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -68,15 +66,12 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 
                //TODO RL
                boolean rl=true;
-               if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                       toggleable_cache.setVisible(false);
-               }
-               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                       text_appendedPhrase = formFactory.createTextWithLabelElement(
+
+               text_appendedPhrase = formFactory.createTextWithLabelElement(
                                        formElement, "Appended Phrase", entity.getAppendedPhrase(),
                                        SWT.WRAP);
 
-               }
+
 
                selection_secundum = formFactory.createSelectionElement(Reference.class,
                                getConversationHolder(), formElement, "Secundum",
@@ -88,13 +83,12 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
                entity.getSecMicroReference(),null,
                 SWT.WRAP);
 
-               // TODO RL
-               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)) {
-                       checkbox_useNameCache = formFactory.createCheckbox(formElement,
+
+               checkbox_useNameCache = formFactory.createCheckbox(formElement,
                                        "Exclude Authorship", entity.isUseNameCache(), style);
-                       checkbox_doubtful = formFactory.createCheckbox(formElement,
+               checkbox_doubtful = formFactory.createCheckbox(formElement,
                                        entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
-               }
+
 
                if (entity instanceof Taxon) {
                        checkbox_published = formFactory.createCheckbox(formElement,
index 63ac16aef2f1f012222c259fe968dffc7fa01b4b..a1cc9b4506f03919fb4dc0059e0c23d551350d67 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.ui.forms.widgets.TableWrapData;
 
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
index e8372443e30cf14f5b55ec533b9b06a1595aa681..09edf27acceb7a3cba2e134461b5419bc6c398a4 100644 (file)
@@ -12,6 +12,7 @@ import org.eclipse.jface.action.ContributionItem;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -26,7 +27,7 @@ import org.eclipse.ui.handlers.IHandlerService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -100,6 +101,10 @@ public class CdmViewerContextMenu extends CompoundContributionItem {
             if (selectedObject instanceof UuidAndTitleCache){
                 selectedObject = CdmStore.getCommonService().find(CdmBase.class, ((UuidAndTitleCache)selectedObject).getUuid());
             }
+            //for tree nodes get the value resp. the object of the node
+            else if (selectedObject instanceof TreeNode){
+                selectedObject = ((TreeNode) selectedObject).getValue();
+            }
             if(selectedObject instanceof ICdmBase){
                 params.put(command.getId()+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
             }
index 729b513f1c2a65dcfd6e1e2f31efb3e6ec11b2ce..04fe5cf4afdb4a73daffcbb75cccdca2a4da3023 100644 (file)
@@ -15,6 +15,7 @@ import org.eclipse.core.commands.Command;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.commands.ICommandService;
 
@@ -48,6 +49,11 @@ public class CdmViewerUtil {
                 UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache)input;
                 input = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
             }
+            //for tree nodes get the value resp. the object of the node
+            else if (input instanceof TreeNode){
+                TreeNode treeNode = (TreeNode)input;
+                input = treeNode.getValue();
+            }
 
 
             IExtensionRegistry reg = Platform.getExtensionRegistry();
index 7e01d6b00b3bf9e49d02a0bbaa46c672af12c9cb..c1765239407cccc4728af3fcf62d54dbb8c0604c 100644 (file)
@@ -9,14 +9,11 @@ import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import java.util.UUID;
 
 import org.apache.http.client.ClientProtocolException;
 import org.apache.log4j.Logger;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.ui.IWorkbenchPart;
@@ -24,8 +21,6 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
 import eu.etaxonomy.cdm.ext.occurrence.gbif.DataSetResponse;
@@ -33,19 +28,14 @@ import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifDataSetProtocol;
 import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper;
 import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-import eu.etaxonomy.cdm.io.specimen.gbif.in.*;
+import eu.etaxonomy.cdm.io.specimen.gbif.in.GbifImportConfigurator;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
 
 public class SaveImportedSpecimenAction extends Action {
 
     private final Logger logger = Logger.getLogger(SaveImportedSpecimenAction.class);
-    
+
     private Comparator<GbifResponse> comparator;
 
     /* (non-Javadoc)
@@ -63,7 +53,7 @@ public class SaveImportedSpecimenAction extends Action {
             Set<String[]> unitIdsGbif = new HashSet<String[]>();
             Set<String[]> unitIdsBioCase = new HashSet<String[]>();
             List<GbifResponse> biocaseResponses = new ArrayList<GbifResponse>();
-            
+
             for(TableItem item:table.getItems()){
                 if(item.getChecked()){
                     //Save Specimen
@@ -77,21 +67,21 @@ public class SaveImportedSpecimenAction extends Action {
                 for (GbifResponse response:checkedResults){
                        if (response != null){
                                tripleId = response.getTripleID();
-                               
+
                                if (response.getDataSetProtocol().equals(GbifDataSetProtocol.BIOCASE)){
                                        biocaseResponses.add(response);
-                                       
+
                                }else{
                                        unitIdsGbif.add(tripleId);
                                }
-                               
-                                       
+
+
                        }
                 }
-                Collections.sort(biocaseResponses, getComparator()); 
+                Collections.sort(biocaseResponses, getComparator());
                 URI dataSetUri = null;
                 Abcd206ImportConfigurator configuratorAbcd;
-                
+
                 List<Abcd206ImportConfigurator> abcdConfigurators = new ArrayList<Abcd206ImportConfigurator>();
                 DataSetResponse dataSetResponse;
                 OccurenceQuery bioCaseOccurrenceQuery = null;
@@ -109,6 +99,8 @@ public class SaveImportedSpecimenAction extends Action {
                        if (!response.getDataSetUri().equals(dataSetUri)){
                                configuratorAbcd = Abcd206ImportConfigurator.NewInstance(dataSetUri, null, false);
                                configuratorAbcd.addMediaAsMediaSpecimen(true);
+                               configuratorAbcd.setIgnoreAuthorship(true);
+                               configuratorAbcd.setMoveNewTaxaToDefaultClassification(false);
                                if (configuratorAbcd != null){
                                        abcdConfigurators.add(configuratorAbcd);
                                }
@@ -118,32 +110,32 @@ public class SaveImportedSpecimenAction extends Action {
                                if (dataImportView.getClassification() != null){
                                        configuratorAbcd.setClassificationUuid(dataImportView.getClassification().getUuid());
                                }
-                               
+
                        }
                        tripleId = response.getTripleID();
                        unitIdsBioCase.add(tripleId);
                 }
-              
+
                 OccurenceQuery query = new OccurenceQuery(unitIdsGbif);
                 GbifImportConfigurator configurator = GbifImportConfigurator.newInstance(query);
                 configurator.setSourceReferenceTitle("Import Gbif data");
-                
-               
-                
+
+
+
                 //  configurator.setQuery(query);
-               
+
                Job bioCaseJob = CdmStore.getImportManager().createIOServiceJob(abcdConfigurators);
                CdmStore.getImportManager().run(bioCaseJob);
-               
+
                Job gbifJob = CdmStore.getImportManager().createIOServiceJob(configurator);
                CdmStore.getImportManager().run(gbifJob);
-               
-               
-                
+
+
+
             }
         }
-    
+
+
     private void persistTerm(DefinedTermBase<?> term, ITermService termService, ConversationHolder conversation){
         if(term!=null){
             //if the term does not exist in the DB save it
@@ -152,7 +144,7 @@ public class SaveImportedSpecimenAction extends Action {
             }
         }
     }
-     
+
     /* (non-Javadoc)
      * @see org.eclipse.jface.action.Action#getText()
      */
@@ -160,13 +152,13 @@ public class SaveImportedSpecimenAction extends Action {
     public String getText() {
         return "Import";
     }
-    
+
     private Comparator<GbifResponse> getComparator(){
        if (comparator == null){
                comparator = new GbifResponseComparator();
        }
        return comparator;
     }
-    
-    
+
+
 }
index dfdb2d294db1f7fff87bb9feabca95b338a2e1d1..d5de5208c5cc3173dc4d2852f9b95e8e28e7e3b3 100644 (file)
@@ -15,21 +15,24 @@ import java.util.ArrayList;
 import java.util.Collection;
 
 import org.apache.http.client.ClientProtocolException;
-import org.eclipse.core.runtime.jobs.Job;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
-import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
-import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206DataHolder;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportParser;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportState;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206XMLFieldGetter;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.UnitAssociationWrapper;
 
 /**
  * @author pplitzner
  * @date Sep 3, 2014
  *
  */
-public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase<?>> {
+public class SpecimenImportView extends DataImportView<Abcd206DataHolder> {
 
     public static final String ID = "eu.etaxonomy.taxeditor.view.dataimport.SpecimenImportView"; //$NON-NLS-1$
 
@@ -49,8 +52,9 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
      * @see eu.etaxonomy.taxeditor.view.dataimport.DataImportView#getTextForTableItem(java.lang.Object)
      */
     @Override
-    protected String getTextForTableItem(SpecimenOrObservationBase<?> item) {
-        return item.getTitleCache();
+    protected String getTextForTableItem(Abcd206DataHolder item) {
+        //TODO: define a suitable toString method
+        return item.toString();
     }
 
     /* (non-Javadoc)
@@ -60,21 +64,38 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
     public void query() {
         String errorMessage = "Could not execute query " + query;
 
-        Collection<SpecimenOrObservationBase<?>> results = new ArrayList<SpecimenOrObservationBase<?>>();
+        Collection<Abcd206DataHolder> results = new ArrayList<Abcd206DataHolder>();
         try {
             //FIXME move ABCD import to cdmlib -> this will also get rid of the transient services
             InputStream resultStream;
             resultStream = new BioCaseQueryServiceWrapper().query(query, endPoint);
             Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(null, null);
-//            TransientCdmRepository repo =
+            configurator.setSourceUri(endPoint);
+
+            //            TransientCdmRepository repo =
 //                    new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
             //configurator.setCdmAppController(repo);
+
+            //TODO: do not query all data but with the selected triple IDs -> see GbifResponseImportView
             configurator.setAddMediaAsMediaSpecimen(true);
             configurator.setAllowReuseOtherClassifications(true);
-            
-            Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
-            CdmStore.getImportManager().run(job);
-            
+            configurator.setMoveNewTaxaToDefaultClassification(false);
+            UnitAssociationWrapper unitAssociationWrapper = AbcdParseUtility.parseUnitsNodeList(resultStream, null);
+            NodeList unitsList = unitAssociationWrapper.getAssociatedUnits();
+            Abcd206DataHolder dataHolder = new Abcd206DataHolder();
+            Abcd206XMLFieldGetter abcdFieldGetter = new Abcd206XMLFieldGetter(dataHolder, unitAssociationWrapper.getPrefix());
+            Abcd206ImportState state = new Abcd206ImportState(configurator);
+            state.setDataHolder(dataHolder);
+            for (int i = 0; i <unitsList.getLength(); i++){
+                Element item = (Element) unitsList.item(i);
+                //dataHolder = new Abcd206DataHolder();
+                Abcd206ImportParser.setUnitPropertiesXML(item, abcdFieldGetter, state);
+                results.add(dataHolder);
+            }
+
+//            Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
+//            CdmStore.getImportManager().run(job);
+
             setResults(results);
         } catch (ClientProtocolException e) {
             logger.error(errorMessage, e);
@@ -82,7 +103,7 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
             logger.error(errorMessage, e);
         }
 
-        setResults(results);
+       // setResults(results);
 
     }
 
index 7a30e21f8d2919bb6b504d341371a065da3f3cc8..1d559c11c16285b8732042dd1ca2a20598fc6177 100644 (file)
@@ -33,7 +33,6 @@ import eu.etaxonomy.cdm.ext.common.ServiceWrapperBase;
 import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
 import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.SpecimenImportReport;
 import eu.etaxonomy.cdm.io.specimen.abcd206.in.UnitAssociationWrapper;
@@ -80,7 +79,9 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
         configurator.setAddMediaAsMediaSpecimen(true);
         configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
         configurator.setIgnoreAuthorship(true);
-      
+        configurator.setMoveNewTaxaToDefaultClassification(false);
+
+
         //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
         //CdmStore.getImportManager().run(job);
         try {
@@ -96,9 +97,12 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
                 NodeList nodeList = unitNodesList.getAssociatedUnits();
                 String prefix = unitNodesList.getPrefix();
                 String associationType = unitNodesList.getAssociationType();
-                URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
-                String content = AbcdParseUtility.parseFirstTextContent(nodeList);
-                System.out.println(content);
+                if (nodeList != null){
+                    URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
+                    String content = AbcdParseUtility.parseFirstTextContent(nodeList);
+                    System.out.println(content);
+                }
+
 
 
                 SpecimenImportView specimenImportView = new SpecimenImportView();
@@ -115,9 +119,9 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
 
             } else{
                 try {
-                       
+
                     dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
-                    dataImportView.setQuery(query);            
+                    dataImportView.setQuery(query);
                        //      (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
                          // .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
 
@@ -134,7 +138,7 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
             e.printStackTrace();
         }
        // CdmStore.getImportManager().run(configurator);
-    
+
 //        try {
 //            switch (providerSelectionPage.getQueryType()) {
 //            case BIOCASE:
@@ -162,7 +166,7 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
 ////                }
 ////            });
             Job queryJob = new QueryJob("Query specimen provider", dataImportView);
-            queryJob.schedule();
+           queryJob.schedule();
 
         return true;
     }
index 28bb50bbbe6254535c4c41549e8e7725387193b5..99f8172f6acd3591f967ee5b017e6eb6f07b6a3d 100644 (file)
@@ -38,8 +38,8 @@ import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 
 import eu.etaxonomy.cdm.config.ICdmSource;
-import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.store.CdmStore;
index 92296cf186b86340d4f75e1b24be01d34d07de8e..59c7272272c64c463e4e062fb32ca8bb50e339ae 100644 (file)
@@ -15,8 +15,8 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer;
index b8f389a3e49404fadf27fb2e9b45f2552404a60c..6559248f4ad79f4081ce31fe6816f74019ab1c70 100644 (file)
@@ -44,6 +44,7 @@ import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
 import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.cdm.strategy.cache.common.IdentifiableEntityDefaultCacheStrategy;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -136,31 +137,70 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         if(element instanceof TreeNode){
             element = ((TreeNode) element).getValue();
         }
-        FormatKey[] formatKeys = {
-                FormatKey.GATHERING_COUNTRY, FormatKey.SPACE,
-                FormatKey.GATHERING_LOCALITY_TEXT, FormatKey.SPACE,
-                FormatKey.GATHERING_DATE, FormatKey.SPACE,
-                FormatKey.GATHERING_COLLECTOR, FormatKey.SPACE,
-                FormatKey.FIELD_NUMBER, FormatKey.SPACE,
-                FormatKey.COLLECTION_CODE, FormatKey.SPACE,
-                FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
-//                FormatKey.KIND_OF_UNIT, FormatKey.SPACE,
-                FormatKey.SAMPLE_DESIGNATION, FormatKey.SPACE,
-                FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, FormatKey.SPACE,
-                FormatKey.SEQUENCE_DNA_MARKER, FormatKey.SPACE,
-                FormatKey.AMPLIFICATION_LABEL, FormatKey.SPACE,
-                FormatKey.MEDIA_TITLE, FormatKey.SPACE,
-                FormatKey.MEDIA_ARTIST, FormatKey.SPACE
-        };
-        String text = CdmFormatterFactory.format(element, formatKeys);
-        if(element instanceof IdentifiableEntity){
+        String text = null;
+
+        //check if collection code does not exist -> use collection name then
+        FormatKey collectionKey = FormatKey.COLLECTION_CODE;
+        text = CdmFormatterFactory.format(element,new FormatKey[]{FormatKey.COLLECTION_CODE});
+        if(CdmUtils.isBlank(text)){
+            collectionKey = FormatKey.COLLECTION_NAME;
+        }
+
+        //Use titlecache for FieldUnits
+        if(element instanceof FieldUnit){
+            return ((FieldUnit) element).getTitleCache();
+        }
+        else if(element instanceof MediaSpecimen){
+            text = CdmFormatterFactory.format(element,
+                    new FormatKey[]{
+                            FormatKey.MEDIA_TITLE_CACHE, FormatKey.SPACE,
+                            collectionKey, FormatKey.SPACE,
+                            FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
+                            FormatKey.MEDIA_TITLE, FormatKey.SPACE,
+                            FormatKey.MEDIA_ARTIST, FormatKey.SPACE,
+                            });
+        }
+        else if (element instanceof DnaSample) {
+            text = CdmFormatterFactory.format(element,
+                    new FormatKey[] {
+                            collectionKey, FormatKey.SPACE,
+                            FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
+                            FormatKey.SAMPLE_DESIGNATION, FormatKey.SPACE
+                            });
+        }
+        else if (element instanceof DerivedUnit) {
+            text = CdmFormatterFactory.format(element,
+                    new FormatKey[] {
+                            collectionKey, FormatKey.SPACE,
+                            FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE
+                            });
+        }
+        else if (element instanceof Sequence) {
+            text = CdmFormatterFactory.format(element,
+                    new FormatKey[] {
+                            FormatKey.SEQUENCE_DNA_MARKER, FormatKey.SPACE
+                            });
+        }
+        else if (element instanceof SingleRead) {
+            text = CdmFormatterFactory.format(element,
+                    new FormatKey[] {
+                            FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, FormatKey.SPACE,
+                            FormatKey.AMPLIFICATION_LABEL, FormatKey.SPACE,
+            });
+        }
+        else if(element instanceof IdentifiableEntity){
                IdentifiableEntity identifiableEntity = (IdentifiableEntity) element;
                if(identifiableEntity.isProtectedTitleCache()){
                        text = identifiableEntity.getTitleCache();
                }
         }
-        if(CdmUtils.isBlank(text)){
-               return "[-]";
+        if(CdmUtils.isBlank(text) || text.equals(IdentifiableEntityDefaultCacheStrategy.TITLE_CACHE_GENERATION_NOT_IMPLEMENTED)){
+            if(element instanceof CdmBase){
+                text = ((CdmBase) element).getUuid().toString();
+            }
+            else{
+                text = element.toString();
+            }
         }
                return text;
     }
@@ -262,7 +302,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
                 //check for type designation
                 if(typeDesignations.get(derivedUnit)==null){
-                    for (SpecimenTypeDesignation specimenTypeDesignation : CdmStore.getService(IOccurrenceService.class).listTypeDesignations(derivedUnit, null, null, null, null)) {
+                    for (SpecimenTypeDesignation specimenTypeDesignation : derivedUnit.getSpecimenTypeDesignations()) {
                         addTypeDesignation(derivedUnit, specimenTypeDesignation);
                     }
                 }
@@ -460,7 +500,11 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                     derivedUnits.add(HibernateProxyHelper.deproxy(specimenOrObservationBase, DerivedUnit.class));
                 }
             }
-            typeDesignations = CdmStore.getService(IOccurrenceService.class).listTypeDesignations(derivedUnits, null, null, null, null);
+            for (DerivedUnit derivedUnit : derivedUnits) {
+                if(!derivedUnit.getSpecimenTypeDesignations().isEmpty()){
+                    typeDesignations.put(derivedUnit, derivedUnit.getSpecimenTypeDesignations());
+                }
+            }
         }
     }
 
index 7cc6f31565fdb5f7c254ecdeb73e93c56c2694a7..0af479c61cfc3a89d58e3dcdd19cfef7cb15684d 100644 (file)
@@ -24,7 +24,7 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.IContextListener;
index 7d778492da34644b4dfdaf38a7702e4a617ebb0e..05e4199bad1a96f28039c4cbc1ae22c26ff5b2f9 100644 (file)
@@ -128,7 +128,7 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
 public class DetailsViewer extends AbstractCdmDataViewer {
 
     private ISelection selection;
-    
+
     public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
         super(parent, viewPart);
     }
@@ -372,7 +372,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                    TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
                                ExpandableComposite.TWISTIE     | ExpandableComposite.EXPANDED);
                    formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-       
+
                    addPart(taxonBaseDetailSection);
                }
         }
@@ -380,12 +380,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
                         ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){       
+        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
                    NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
                                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
                    formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                    addPart(referenceDetailSection);
-               
+
         }
         if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
                    NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
@@ -393,25 +393,25 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                    formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                    addPart(nomenclaturalStatusSection);
         }
-        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)  ){
-               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
-                       ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-                       formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                       addPart(protologSection);
-               }
-               
-               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
-                       TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-                       formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                       addPart(typeDesignationSection);
-               }
-               
-               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
-                       NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-                       formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                       addPart(nameRelationshipSection);
-               }
-        }
+
+       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
+               ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+               addPart(protologSection);
+       }
+
+       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
+               TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+               addPart(typeDesignationSection);
+       }
+
+       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
+               NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+               addPart(nameRelationshipSection);
+       }
+
 
         addPart(parsingMessagesSection);
 
@@ -437,20 +437,19 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(nonViralNameSection);
         addPart(nomenclaturalStatusSection);
         addPart(referenceDetailSection);
-//TODO RL
-        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                       ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+               ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        addPart(protologSection);
+        addPart(typeDesignationSection);
+        addPart(nameRelationshipSection);
 
-               NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(protologSection);
-               addPart(typeDesignationSection);
-               addPart(nameRelationshipSection);
-        }
     }
 
     private void createReferenceSections(RootElement parent) {
@@ -793,7 +792,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
        @Override
        public void update(CdmDataChangeMap arg0) {
-               
+
        }
 
 }
index dfd2e4fde5d29f21eab41dc40146f2292a6a0e95..8b9af2d3c4e99851c3a2b4a1b7f9bc556943a3ee 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.ui.part.EditorPart;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
index a2a71bc3d15253d03ed41e51f98e18845a7b509d..02483eb92e1833021726b079c14f006c5171d4d6 100644 (file)
@@ -18,6 +18,8 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DefaultTermInitializer;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 
 /**
  * @author n.hoffmann
@@ -45,7 +47,7 @@ public class NameProtectTitleCacheTest /*extends CdmIntegrationTest */{
                
                (new DefaultTermInitializer()).initialize();
                
-               name = NonViralName.NewInstance(Rank.SPECIES());
+               name = TaxonNameFactory.NewNonViralInstance(Rank.SPECIES());
                
                name.setGenusOrUninomial("Joe");
                name.setSpecificEpithet("mama");
index cc0f994d1617e10c8c17f9f6f645df7094d76a52..caf33c4f7838ad758df3fadfd63e723187dd5976 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
        <classpathentry excluding="**/*.java" kind="src" path="src/test/resources"/>
index b9753f4dc4bf5e078b63ff13a35d9d6c3c6be39a..237d43f79e35ab7deeb05d0dd3712c03000873e3 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.test
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 4.4.0.qualifier
+Bundle-Version: 4.6.0
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: EDIT
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
@@ -21,8 +21,7 @@ Require-Bundle: org.eclipse.ui,
  org.apache.log4j,
  org.hamcrest,
  org.eclipse.swtbot.eclipse.core,
- org.eclipse.swtbot.eclipse.finder,
- eu.etaxonomy.taxeditor.webapp;bundle-version="3.13.0"
+ org.eclipse.swtbot.eclipse.finder
 Eclipse-RegisterBuddy: org.apache.log4j, org.eclipse.swtbot.swt.finder
 Bundle-ClassPath: .,
  lib/byte-buddy-0.5.1.jar,
index 19f896ffdc5cb0a97d385af56c2a16611942c913..5119078fc532e98b14dfec8f908e99153e7bb58e 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.4.0-SNAPSHOT</version>
+    <version>4.6.0</version>
   </parent>
   <artifactId>eu.etaxonomy.taxeditor.test</artifactId>
   <packaging>eclipse-test-plugin</packaging>
               <removeAll />
             </filter>
           </filters>
+          <dependency-resolution>
+           <extraRequirements>
+              <requirement>
+                 <type>eclipse-feature</type>
+                 <id>eu.etaxonomy.taxeditor.feature</id>
+                 <versionRange>1.0.0</versionRange>
+              </requirement>
+           </extraRequirements>
+        </dependency-resolution>
         </configuration>
       </plugin>
       <plugin>
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>tycho-surefire-plugin</artifactId>
         <version>${tycho.version}</version>
-        <configuration>
-          <!-- currently we run only the non-ui unit tests so we don't the 
-            harness -->
-          <!-- <useUIHarness>true</useUIHarness> -->
-          <dependencies>
-            <!-- This will pull the feature and its dependent plugins into 
-              the classpath for the tests. Note that this requires ALL taxeditor projects 
-              to be installed. -->
-            <dependency>
-              <type>eclipse-feature</type>
-              <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
-              <!-- This is the minimum required version -->
-              <version>1.0.0</version>
-            </dependency>
-          </dependencies>
-        </configuration>
+        
       </plugin>
       <plugin>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-maven-plugin</artifactId>
-        <version>9.1.3.v20140225</version><!-- do not update, since later versions are no longer compatible to java 7  -->
-        <!-- 
-            To see the detailed list of parameters that can be configured for a particular goal:
-            mvn jetty:help -Ddetail=true -Dgoal= goal-name
-         -->
+        <version>9.4.1.v20170120</version>
         <configuration>
           <systemProperties>
             <force>true</force>
index 2d99180267ac21d37b4212710ac5ebcc29437d8d..5ccc11410617d057da898b28ea8e27f8ce41223b 100644 (file)
@@ -30,6 +30,7 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
@@ -140,7 +141,7 @@ public class AbstractLazyInitializerTest extends BaseRemotingTest {
         public void testCDMEntitySaveLazyNew() {
             Team combAuthor = Team.NewInstance();
             combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
-            BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+            BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
             name.setCombinationAuthorship(combAuthor);
             Taxon tax1 = Taxon.NewInstance(name, null);
             UUID taxonUuid1 = taxonService.save(tax1).getUuid();
index 92cb68c505e337c28eff645baab39834af7426d5..9e3693d1524fc286ed0711cb30e32e1cbe99372b 100644 (file)
@@ -30,6 +30,7 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
@@ -140,7 +141,7 @@ public class RemoteLazyLoadingTest extends BaseRemotingTest {
 
         Team combAuthor = Team.NewInstance();
         combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
-        BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+        BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
         name.setCombinationAuthorship(combAuthor);
         Taxon taxon = Taxon.NewInstance(name, null);
         UUID taxonUuid = taxonService.save(taxon).getUuid();
@@ -202,7 +203,7 @@ public class RemoteLazyLoadingTest extends BaseRemotingTest {
     public void testCDMEntitySaveLazyNew() {
         Team combAuthor = Team.NewInstance();
         combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
-        BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+        BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
         name.setCombinationAuthorship(combAuthor);
         Taxon tax1 = Taxon.NewInstance(name, null);
         UUID taxonUuid1 = taxonService.save(tax1).getUuid();
index cee6198305f931a84e20e7afa6384cc409057d08..6d857439ce0cc1783f9d8aea5adeea96ec3c626e 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.cdm.model.name.BotanicalName;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
@@ -65,7 +66,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
         TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
         Taxon taxon = taxonNode.getTaxon();
         HomotypicalGroup group = taxon.getHomotypicGroup();
-        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
         newSynonymName.setTitleCache("New Synonym", true);
         operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                 undoContext, taxon, group, newSynonymName, postOperation);
@@ -86,7 +87,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
         TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
         Taxon taxon = taxonNode.getTaxon();
         HomotypicalGroup group = taxon.getHomotypicGroup();
-        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
         newSynonymName.setTitleCache("New Synonym", true);
         operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                 undoContext, taxon, group, newSynonymName, postOperation);
@@ -104,7 +105,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
         TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
         Taxon taxon = taxonNode.getTaxon();
         HomotypicalGroup group = taxon.getHomotypicGroup();
-        BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+        BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
         newSynonymName.setTitleCache("New Synonym", true);
         operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                 undoContext, taxon, group, newSynonymName, postOperation);
@@ -120,7 +121,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
 
         taxonNodeService.merge(taxonNode);
 
-        newSynonymName = BotanicalName.NewInstance(null);
+        newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
         newSynonymName.setTitleCache("Another New Synonym", true);
         operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
                 undoContext, taxon, group, newSynonymName, postOperation);
@@ -152,7 +153,7 @@ public class TaxonNameEditorTest extends BaseOperationTest {
 
     @Test
     public void addTaxon() {
-        NonViralName taxonName = NonViralName.NewInstance(null);
+        NonViralName taxonName = TaxonNameFactory.NewNonViralInstance(null);
         Taxon taxon = Taxon.NewInstance(taxonName, null);
         taxonService.merge(taxon);
     }
index dda9952c183393f412e5dd8966b676849985343c..11b95b2388a617db488f50db02b9e9b7755b4b7b 100644 (file)
@@ -10,6 +10,6 @@
     http://www.springframework.org/schema/tx
     http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
 
-    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>          
+    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
 
 </beans>
index 03d1c3ee48869ea8b3b2cf2b59d9e92e8e84c8e1..45b677beeeffee7795961a0537359cce7e586173 100644 (file)
@@ -9,7 +9,7 @@
        <classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/jetty-all-9.2.9.v20150224.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src/main/java"/>
        <classpathentry kind="src" path="src/main/resources"/>
index 17ef6326510995d5fbb749a2df147393ad1861e9..64b93bcf735a12c51d71e5ee6991b2f860e044fd 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Webapp
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.webapp;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
 Require-Bundle: org.eclipse.core.runtime
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
index f886609a8888afbe26852480dc24fe9cb2a72ba7..c4b33e133c37640fc7369a1b203a406869cb8c43 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.webapp</artifactId>
index 412e52cdec972aa242b13395e22eaf8a779f989b..1bedc4b7681ea7978a0ffe542feefc630ecf1889 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.application"/>
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.bulkeditor"/>
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.cdmlib"/>
@@ -8,5 +7,6 @@
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.navigation"/>
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.printpublisher"/>
        <classpathentry kind="src" path="/eu.etaxonomy.taxeditor.store"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 8c9af5b72f3428192357474c6790c756fbd2569e..b29156309bfb196a62dca218c186283fef31eef6 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="4.5.1">
+<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="4.6.0">
   <aboutInfo>
     <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
     <text>
@@ -10,7 +10,7 @@
   <launcherArgs>
     <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080
       </programArgs>
-    <vmArgs>-Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
+    <vmArgs>-Xmx512M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
       </vmArgs>
     <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
       </vmArgsMac>
index 26ab1847e4a92d5c4088983add9ad00d32a891e3..857b82ad48be1b50b30a8626374cb84506ab26fb 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="4.5.1" useFeatures="true" includeLaunchers="true">
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="4.6.0" useFeatures="true" includeLaunchers="true">
 
    <aboutInfo>
       <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
index fc2f6738a8b54a3495853a950e4342faec739007..7ddcf330f906dc1ff057a0f8daafc76f52b109c5 100644 (file)
@@ -2,7 +2,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>4.5.1</version>
+    <version>4.6.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/lifecycle-mapping-metadata.xml b/lifecycle-mapping-metadata.xml
new file mode 100644 (file)
index 0000000..257db8c
--- /dev/null
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+  <lifecycleMappings>
+    <lifecycleMapping>
+      <packagingType>maven-plugin</packagingType>
+      <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+      <pluginExecutions>
+        <pluginExecution>
+          <pluginExecutionFilter>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-plugin-plugin</artifactId>
+            <versionRange>[2.3,)</versionRange>
+            <goals>
+              <goal>descriptor</goal>
+              <goal>helpmojo</goal>
+            </goals>
+          </pluginExecutionFilter>
+          <action>
+            <execute>
+              <runOnIncremental>false</runOnIncremental>
+            </execute>
+          </action>
+        </pluginExecution>
+      </pluginExecutions>
+    </lifecycleMapping>
+
+    <lifecycleMapping>
+      <packagingType>nexus-plugin</packagingType>
+      <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+    </lifecycleMapping>
+
+    <lifecycleMapping>
+      <packagingType>war</packagingType>
+      <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+    </lifecycleMapping>
+  </lifecycleMappings>
+
+  <pluginExecutions>
+    <!--  standard maven plugins -->
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <goals>
+          <goal>resources</goal>
+          <goal>testResources</goal>
+          <goal>copy-resources</goal>
+        </goals>
+        <versionRange>[2.4,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <execute/>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <goals>
+          <goal>resources</goal>
+          <goal>testResources</goal>
+          <goal>copy-resources</goal>
+        </goals>
+        <versionRange>[0.0.1,2.4)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <goals>
+          <goal>copy-dependencies</goal>
+          <goal>unpack</goal>
+        </goals>
+        <versionRange>[2.0,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore>
+          <message>maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e.</message>
+        </ignore>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <goals>
+          <goal>enforce</goal>
+        </goals>
+        <versionRange>[1.0-alpha-1,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore>
+          <message>maven-enforcer-plugin (goal "enforce") is ignored by m2e.</message>
+        </ignore>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <goals>
+          <goal>install</goal>
+        </goals>
+        <versionRange>[1.6-SONATYPE-r940877,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore>
+          <message>maven-invoker-plugin (goal "install") is ignored by m2e.</message>
+        </ignore>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <versionRange>[1.0,)</versionRange>
+        <goals>
+          <goal>process</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <ignore>
+          <message>maven-remote-resources-plugin (goal "process") is ignored by m2e.</message>
+        </ignore>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <versionRange>[0,)</versionRange>
+        <goals>
+          <goal>configure-workspace</goal>
+          <goal>eclipse</goal>
+          <goal>clean</goal>
+
+          <goal>to-maven</goal>
+          <goal>install-plugins</goal>
+          <goal>make-artifacts</goal>
+
+          <goal>myeclipse</goal>
+          <goal>myeclipse-clean</goal>
+
+          <goal>rad</goal>
+          <goal>rad-clean</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <error>
+          <message>maven-eclipse-plugin is not compatible with m2e</message>
+        </error>
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <versionRange>[2.0,)</versionRange>
+        <goals>
+          <goal>jar-no-fork</goal>
+          <goal>test-jar-no-fork</goal>
+          <!-- theoretically, the following goals should not be bound to lifecycle, but ignore them just in case  -->
+          <goal>jar</goal>
+          <goal>aggregate</goal>
+          <goal>test-jar</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <ignore/>
+      </action>
+    </pluginExecution>
+
+    <!-- commonly used codehaus plugins -->
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.codehaus.enunciate</groupId>
+        <artifactId>maven-enunciate-plugin</artifactId>
+        <goals>
+          <goal>docs</goal>
+        </goals>
+        <versionRange>[1.20-SONATYPE-r919,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>animal-sniffer-maven-plugin</artifactId>
+        <versionRange>[1.0,)</versionRange>
+        <goals>
+          <goal>check</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <versionRange>[1.0-beta-1,)</versionRange>
+        <goals>
+          <goal>create</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+
+
+    <!-- commonly use sonatype plugins -->
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>provided-dependencies-maven-plugin</artifactId>
+        <goals>
+          <goal>generate</goal>
+        </goals>
+        <versionRange>[1.4,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>app-lifecycle-maven-plugin</artifactId>
+        <goals>
+          <goal>check-dependencies</goal>
+        </goals>
+        <versionRange>[1.1,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <execute />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>app-lifecycle-maven-plugin</artifactId>
+        <goals>
+          <goal>generate-metadata</goal>
+          <goal>inject-artifact-handler</goal>
+        </goals>
+        <versionRange>[1.1,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>nexus-test-environment-maven-plugin</artifactId>
+        <goals>
+          <goal>setup-environment</goal>
+        </goals>
+        <versionRange>[1.6-SNAPSHOT,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>net.sf.alchim</groupId>
+        <artifactId>yuicompressor-maven-plugin</artifactId>
+        <goals>
+          <goal>compress</goal>
+        </goals>
+        <versionRange>[0.7.1,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>yuicompressor-maven-plugin</artifactId>
+        <goals>
+          <goal>aggregate</goal>
+        </goals>
+        <versionRange>[0.0.1,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <ignore />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>maven-properties-plugin</artifactId>
+        <versionRange>[0.0.3-SNAPSHOT,)</versionRange>
+        <goals>
+          <goal>filter-file</goal>
+        </goals>
+      </pluginExecutionFilter>
+      <action>
+        <execute />
+      </action>
+    </pluginExecution>
+    <pluginExecution>
+      <pluginExecutionFilter>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <goals>
+          <goal>run</goal>
+        </goals>
+        <versionRange>[1.7,)</versionRange>
+      </pluginExecutionFilter>
+      <action>
+        <execute/>
+      </action>
+    </pluginExecution>
+  </pluginExecutions>
+</lifecycleMappingMetadata>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index fdc870dcd3c516a0da19c8094c8a5ee4e7ee86d5..ea7cc8ec6365475c1bbdbb48fd06a4869c7e941a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
   </prerequisites>
   <groupId>eu.etaxonomy</groupId>
   <artifactId>taxeditor-parent</artifactId>
-  <version>4.5.1</version>
+  <version>4.6.0</version>
   <name>EDIT Taxonomic Editor</name>
   <description>The Taxonomic Editor for EDIT's platform for
     cybertaxonomy
   <inceptionYear>2007</inceptionYear>
   <packaging>pom</packaging>
   <properties>
-    <java.codelevel>1.7</java.codelevel>
+    <java.codelevel>1.8</java.codelevel>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <cdmlib.version>4.5.1</cdmlib.version>
+    <cdmlib.version>4.6.0</cdmlib.version>
     <!-- TODO can we use project.version ????? -->
+    <!-- Increasing tycho above 0.22.0 will fail for the macosx build because 
+      for higher version numbers tycho needs to be build against Eclipse Mars or 
+      higher -->
     <tycho.version>0.22.0</tycho.version>
-    <taxeditor.version>4.5.1</taxeditor.version>
+    <taxeditor.version>4.6.0</taxeditor.version>
     <update.dir>snapshot</update.dir>
     <unitils.version>3.4.2</unitils.version>
     <log4j.version>1.2.17</log4j.version>
     <module>eu.etaxonomy.taxeditor.feature</module>
     <module>eu.etaxonomy.taxeditor.feature.jre.linux64</module>
     <module>eu.etaxonomy.taxeditor</module>
+    <module>eu.etaxonomy.taxeditor.test</module>
   </modules>
   <scm>
-    <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/
+    <connection>scm:git:https://dev.e-taxonomy.eu/git/taxeditor.git
     </connection>
-    <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/
+    <developerConnection>scm:git:ssh://git@dev.e-taxonomy.eu/var/git/taxeditor.git
     </developerConnection>
-    <url>https://dev.e-taxonomy.eu/trac/browser/trunk/taxeditor/</url>
+    <url>https://dev.e-taxonomy.eu/gitweb/taxeditor.git/tree</url>
   </scm>
   <mailingLists>
     <mailingList>
   </developers>
   <issueManagement>
     <system>Trac</system>
-    <url>http://dev.e-taxonomy.eu/trac/</url>
+    <url>https://dev.e-taxonomy.eu/redmine/projects/edit/</url>
   </issueManagement>
   <ciManagement>
     <system>Jenkins</system>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.3.2</version>
+        <version>3.6.1</version>
         <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
+          <source>${java.codelevel}</source>
+          <target>${java.codelevel}</target>
         </configuration>
       </plugin>
       <plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
-        <version>3.0</version>
+        <version>3.3</version>
         <configuration>
           <locales>en</locales>
         </configuration>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
-        <version>2.1.2</version>
+        <version>3.0.1</version>
         <executions>
           <execution>
             <id>attach-sources</id>
           <allowUntracked>true</allowUntracked>
         </configuration>
         <dependencies>
-          <!-- 
-                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
-                in order have ssl key exchange algorithms compatible with openssh 6.7 
-             -->
+          <!-- upgrading dependency jsch.agent.version of jgit-flow plugin 
+            to 0.1.53 in order have ssl key exchange algorithms compatible with openssh 
+            6.7 -->
           <dependency>
             <groupId>com.jcraft</groupId>
             <artifactId>jsch</artifactId>
diff --git a/setup-project.sh b/setup-project.sh
new file mode 100755 (executable)
index 0000000..40b2d1d
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+echo -n "Use the local repo? [y,n]"
+read choice
+
+if [ "$choice" == "y" ]; then
+  mvn_profile='-P local-repository'
+fi
+
+mvn clean install -DskipTests
+mvn $mvn_profile  -Dlocalrepo=~/.m2/repository validate -pl eu.etaxonomy.taxeditor.cdmlib,eu.etaxonomy.taxeditor.molecular.lib
index a27c259c6473204b6d40dbff139dbb3678e40df7..d018ce54bd70f09e9d6690e3932b4c7c72887331 100644 (file)
@@ -78,5 +78,26 @@ class "GtkWidget" style "eclipse"
                                </p>
                        </answer>
                </faq>
+               <faq id="windows_domain_active_directory">
+                       <question>Note for using the EDITor in a Windows Domain/Active directory</question>
+                       <answer>
+                       <p>Using the EDITor from a user account in an active directory is possible but in the case user profile folders are located on network folders, one of the following problems may occurr, when working with CDM databases:
+                       </p>
+                <p>
+                1) Problems are known, if the user profile path is an UNC path (e.g. "\\server\share").
+                2) CDM Information may be written to the local machine's profile copy (if the %USERPROFILE% evironment variable is set respectively) and get lost during synchronization.
+                </p>
+                <p>
+                If one of the described problems occurs, the following workaround can solve the problem:
+                </p>
+                <p>
+                - Connect a network drive with the UNC path of your network profile root folder (if that is not already done within your group policies). (Make sure to check the option to reconnect the drive on the next login.)
+                - Start the EDITor with the additional command line option "-Duser.home=I:\", where "I" should be replaced by the letter used for the network drive.
+                </p>
+                <p>
+                Now all CDM Information will directly be accessed on the network resource. (Note that with such a configuration, it is not recommended to run multiple instances of the EDITor in different machines of the domain using the same user profile in parallel.)
+                </p> 
+                       </answer>
+               </faq>
        </part>
 </faqs>
index 1cb522bab649dff8e7400b44f884fa0d6b7abc38..40ad3fe38fcf9c541e647b6fcad60a8319128400 100644 (file)
                        <item name="Manual" href="manual.html"/>
                        <!--item name="FAQ" href="faq.html"/-->
                        <item name="Releases" href="changes-report.html"/>
-                       <item name="Download" href="http://wp5.e-taxonomy.eu/download/taxeditor/"/>
+                       <item name="Download" href="https://cybertaxonomy.eu/download/taxeditor/"/>
                </menu>
                <menu name="Developer">
                        <item name="Getting started" href="getting-started.html"/>
                        <item name="Javadocs" href="apidocs/index.html"/>
                        <item name="Troubleshooting" href="troubleshooting.html"/>
-                       <item name="Wiki" href="http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorDev"/>
+                       <item name="Wiki" href="https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDev"/>
                </menu>
                <menu name="Project">
                        <item name="Mailing Lists" href="mail-lists.html"/>
                        <item name="Project Team" href="team-list.html"/>
                        <item name="Continuous Integration" href="integration.html"/>
-                       <item name="Issue Tracking" href="http://dev.e-taxonomy.eu/trac/"/>
+                       <item name="Issue Tracking" href="https://dev.e-taxonomy.eu/redmine/projects/edit"/>
                        <item name="Source Repository" href="source-repository.html"/>
                        <item name="License" href="license.html"/>
                </menu>