Merge branch 'release/3.8.0' root/tags/taxeditor/3.8.0 3.8.0
authorjenkins <jenkins-int@bgbm.org>
Fri, 11 Sep 2015 12:15:00 +0000 (14:15 +0200)
committerjenkins <jenkins-int@bgbm.org>
Fri, 11 Sep 2015 12:15:00 +0000 (14:15 +0200)
Conflicts:
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java
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/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/pom.xml
pom.xml

166 files changed:
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/plugin.xml
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorQuery.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/ConvertPerson2TeamHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/MergeGroupHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.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/referencingobjects/ReferencingObjectsView.java
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.editor.src/main/java/eu/etaxonomy/taxeditor/editor/name/container/RulerWithIcon.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_en.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
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 [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java [new file with mode: 0644]
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/PolytomousKeyListEditor.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/view/dataimport/DataImportEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/GbifImportEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientCdmRepository.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientClassificationService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientDescriptionService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDragListener.java
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/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/DerivateViewContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/SingleReadSequenceContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.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/OpenDerivateEditorForTaxonHandler.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/descriptive/handler/MoveDescriptionElementsHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
eu.etaxonomy.taxeditor.feature.platform/feature.xml
eu.etaxonomy.taxeditor.feature.platform/pom.xml
eu.etaxonomy.taxeditor.feature/build.properties.with.jre
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.feature/pom.xml
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.molecular.lib/.classpath [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/.gitignore [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/.project [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/build.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/lib/.gitignore [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular.lib/pom.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/.classpath [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/.gitignore [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/.project [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_en.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/build.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/insert-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/overwrite-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-disabled-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-disabled-16x16.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/plugin.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/pom.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/TaxeditorMolecularPlugin.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramMouseListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramViewPart.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractAlignmentEditorHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ChangePherogramQualityOutputType.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CreateConsensusSequenceHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramLeftHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramRightHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/EditSequenceHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/HandlerTools.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/LoadPherogramHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ReverseComplementHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ShowPherogramHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleLeftRightInsertionHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramBaseCallLinesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramProbabilitiesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/UpdateConsensusSequenceHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/package-info.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
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/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorContentService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDnDService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorViewer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDragListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java [new file with mode: 0644]
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/DeleteHandler.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/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/IPartContentHasMedia.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.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/dialog/deleteConfigurator/DeleteConfiguratorDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteNodeConfiguratorComposite.java [new file with mode: 0644]
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/AbstractFormSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.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/section/AbstractCdmDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyNodeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameTypeDesignationElement.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/name/SpecimenTypeDesignationElement.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/AbstractReferencedEntityElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/IdentifiableSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre [new file with mode: 0644]
eu.etaxonomy.taxeditor/pom.xml
eu.etaxonomy.taxeditor/rcp.target
pom.xml

index 52595180386f5ff84bba59d186e2d95e42839d83..a876b381a7e9732f2a9326f3b99a58b4a38e8b42 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: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: OSGI-INF/l10n/plugin
@@ -21,6 +21,7 @@ Require-Bundle: org.eclipse.ui,
  eu.etaxonomy.taxeditor.bulkeditor,
  eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.printpublisher,
+ eu.etaxonomy.taxeditor.molecular,
  eu.etaxonomy.taxeditor.help,
  org.eclipse.equinox.ds,
  org.eclipse.equinox.util,
index b74e209ce9d93b65fa3e04ed7461db32d7388015..40453cf2d1848c766922824ffe398ca9329c89e9 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<?eclipse version="3.2"?>\r
-<plugin>\r
-   <extension\r
-         id="application"\r
-         name="%extension.name"\r
-         point="org.eclipse.core.runtime.applications">\r
-      <application\r
-            cardinality="singleton-global"\r
-            thread="main"\r
-            visible="true">\r
-         <run\r
-               class="eu.etaxonomy.taxeditor.Application">\r
-         </run>\r
-      </application>\r
-   </extension>\r
-   <extension\r
-         point="org.eclipse.ui.perspectives">\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.Taxonomic"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.taxonomic"\r
-            name="%perspective.name">\r
-      </perspective>\r
-      <!--perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.BulkEditing"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.bulkeditor"\r
-            name="Bulk Editing">\r
-      </perspective-->\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.PolytomousKey"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.polytomous"\r
-            name="%perspective.name.0">\r
-      </perspective>\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.Uses"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.uses"\r
-            name="%perspective.name.1">\r
-      </perspective>\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.DerivatePerspective"\r
-            icon="icons/specimen_derivate-16x16-32.png"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.derivates"\r
-            name="%perspective.name.2">\r
-      </perspective>\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.perspective.ChecklistPerspective"\r
-            icon="icons/check.png"\r
-            id="eu.etaxonomy.taxeditor.perspective.checklistperspective"\r
-            name="Checklist">\r
-      </perspective>\r
-     \r
-   </extension>\r
-   <!--extension\r
-         point="org.eclipse.ui.views">\r
-      <view\r
-            class="eu.etaxonomy.taxeditor.navigation.taxonomictree.TaxonomicTreeView"\r
-            id="eu.etaxonomy.taxeditor.navigation.taxonomictree.treeView"\r
-            name="Taxonomic Tree">\r
-      </view>\r
-      <view\r
-            allowMultiple="true"\r
-            class="eu.etaxonomy.taxeditor.navigation.search.SearchResultView"\r
-            id="eu.etaxonomy.taxeditor.navigation.search.searchResultView"\r
-            name="Search Result"\r
-            restorable="true">\r
-      </view>\r
-   </extension-->\r
- <extension\r
-       point="org.eclipse.ui.perspectiveExtensions">\r
-    <perspectiveExtension\r
-          targetID="eu.etaxonomy.taxeditor.application.perspective.bulkeditor">\r
-       <showInPart\r
-             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
-       </showInPart>\r
-       <showInPart\r
-             id="eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview">\r
-       </showInPart>\r
-    </perspectiveExtension>\r
-    <perspectiveExtension\r
-          targetID="eu.etaxonomy.taxeditor.application.perspective.polytomous">\r
-       <showInPart\r
-             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
-       </showInPart>\r
-    </perspectiveExtension>\r
-    <perspectiveExtension\r
-          targetID="eu.etaxonomy.taxeditor.application.perspective.uses">\r
-       <showInPart\r
-             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
-       </showInPart>\r
-    </perspectiveExtension>\r
- </extension>\r
-   <extension\r
-         point="org.eclipse.ui.menus">\r
-      <menuContribution\r
-            locationURI="menu:org.eclipse.ui.main.menu">\r
-         <menu\r
-               id="org.eclipse.ui.main.menu.file"\r
-               label="%menu.label">\r
-         </menu>\r
-         <menu\r
-               id="org.eclipse.ui.main.menu.edit"\r
-               label="%menu.label.0">\r
-         </menu>\r
-         <menu\r
-               id="org.eclipse.ui.main.menu.window"\r
-               label="%menu.label.1">\r
-         </menu>\r
-         <menu\r
-               id="org.eclipse.ui.main.menu.help"\r
-               label="%menu.label.2">\r
-         </menu>\r
-      </menuContribution>\r
-      <menuContribution\r
-            locationURI="menu:org.eclipse.ui.main.menu.file">\r
-         <menu\r
-               id="eu.etaxonomy.navigation.menu.new"\r
-               label="%menu.label.3">\r
-         </menu>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.application.filemenu.new"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.file.close"\r
-               label="%command.label"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.file.closeAll"\r
-               label="%command.label.0"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.application.filemenu.close"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.file.save"\r
-               label="%command.label.1"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.file.saveAll"\r
-               label="%command.label.2"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.application.filemenu.save"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.file.import"\r
-               label="%command.label.3"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.file.export"\r
-               label="%command.label.4"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.application.filemenu.io"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.file.exit"\r
-               id="eu.etaxonomy.taxeditor.application.menu.exit"\r
-               label="%command.label.5"\r
-               style="push">\r
-         </command>\r
-      </menuContribution>\r
-      <menuContribution\r
-            locationURI="menu:org.eclipse.ui.main.menu.edit">\r
-         <command\r
-               commandId="org.eclipse.ui.edit.undo"\r
-               label="%command.label.6">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.edit.redo"\r
-               label="%command.label.7"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.ui.edit.separator1"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.edit.cut"\r
-               label="%command.label.8"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.edit.copy"\r
-               label="%command.label.9"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.edit.paste"\r
-               label="%command.label.10"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.ui.edit.separator2"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.edit.delete"\r
-               label="%command.label.11"\r
-               style="push">\r
-         </command>\r
-      </menuContribution>\r
-      <menuContribution\r
-            locationURI="menu:org.eclipse.ui.main.menu.window">\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.application.windowMenu.last"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.window.preferences"\r
-               label="%command.label.12"\r
-               style="push">\r
-         </command>\r
-      </menuContribution>\r
-      <menuContribution\r
-            locationURI="menu:org.eclipse.ui.main.menu.help">\r
-         <command\r
-               commandId="org.eclipse.ui.help.helpContents"\r
-               label="%command.label.13"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="org.eclipse.ui.help.helpSearch"\r
-               label="%command.label.14"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.ui.help.separator0"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.help.dynamicHelp"\r
-               label="%command.label.15"\r
-               style="push">\r
-         </command>\r
-         <command\r
-               commandId="eu.etaxonomy.taxeditor.application.help.parser"\r
-               label="%command.label.16"\r
-               style="push">\r
-         </command>\r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.ui.help.separator1"\r
-               visible="true">\r
-         </separator>\r
-         <!--command\r
-               commandId="eu.etaxonomy.taxeditor.install"\r
-               label="%command.label.18"\r
-               style="push"/-->\r
-         <command\r
-               commandId="eu.etaxonomy.taxeditor.update"\r
-               label="%command.label.17"\r
-               style="push"/>    \r
-         <separator\r
-               name="eu.etaxonomy.taxeditor.ui.help.separator2"\r
-               visible="true">\r
-         </separator>\r
-         <command\r
-               commandId="org.eclipse.ui.help.aboutAction"\r
-               label="%command.label.19">\r
-         </command>\r
-         <command\r
-               commandId="eu.etaxonomy.taxeditor.application.help.aboutPlatform"\r
-               label="%command.label.20"\r
-               style="push">\r
-         </command>\r
-      </menuContribution>\r
-            <menuContribution\r
-            locationURI="toolbar:org.eclipse.ui.main.toolbar">\r
-         <toolbar\r
-               id="eu.etaxonomy.taxeditor.editor.main">\r
-            <command\r
-                  commandId="org.eclipse.ui.newWizard"\r
-                  label="%command.label.21"\r
-                  style="push">\r
-            </command>\r
-            <command\r
-                  commandId="org.eclipse.ui.file.save"\r
-                  label="%command.label.22"\r
-                  style="push">\r
-            </command>\r
-         </toolbar>\r
-      </menuContribution>\r
-   </extension>\r
-   <extension\r
-         id="product"\r
-         point="org.eclipse.core.runtime.products">\r
-      <product\r
-            application="eu.etaxonomy.taxeditor.application.application"\r
-            name="%product.name">\r
-         <property\r
-               name="windowImages"\r
-               value="icons/256color_16x16.gif,icons/256color_32x32.gif,icons/256color_48x48.gif">\r
-         </property>\r
-         <property\r
-               name="aboutText"\r
-               value="%productBlurb">\r
-         </property>\r
-         <!--property\r
-               name="startupForegroundColor"\r
-               value="#C8D5EA"-->\r
-         <property\r
-               name="startupForegroundColor"\r
-               value="000000">\r
-         </property>\r
-         <property\r
-               name="startupProgressRect"\r
-               value="5,447,366,15">\r
-         </property>\r
-         <property\r
-               name="startupMessageRect"\r
-               value="7,432,360,20">\r
-         </property>\r
-         <property\r
-               name="appName"\r
-               value="EDIT Taxonomic Editor">\r
-         </property>\r
-         <property\r
-               name="preferenceCustomization"\r
-               value="plugin_customization.ini">\r
-         </property>\r
-         <property\r
-               name="aboutImage"\r
-               value="icons/256color_48x48.gif">\r
-         </property>\r
-      </product>\r
-   </extension>\r
-   <extension\r
-         point="org.eclipse.ui.commands">\r
-      <command\r
-            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler"\r
-            id="eu.etaxonomy.taxeditor.application.help.parser"\r
-            name="%command.name">\r
-      </command>\r
-      <command\r
-            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler"\r
-            id="eu.etaxonomy.taxeditor.application.help.aboutPlatform"\r
-            name="%command.name.0">\r
-      </command>\r
-      <command\r
-            defaultHandler="eu.etaxonomy.taxeditor.update.UpdateHandler"\r
-            id="eu.etaxonomy.taxeditor.update"\r
-            name="%command.label.17">\r
-      </command>\r
-      <command\r
-            defaultHandler="eu.etaxonomy.taxeditor.update.InstallNewSoftwareHandler"\r
-            id="eu.etaxonomy.taxeditor.install"\r
-            name="%command.label.18">\r
-      </command>\r
-   </extension>\r
-   \r
-   \r
-       <extension\r
-               point="org.eclipse.ui.activities">\r
-               <activity\r
-                       description="%activity.description"\r
-                       id="eu.etaxonomy.taxeditor.disable"\r
-                       name="%activity.name">\r
-               </activity>\r
-               <activityPatternBinding\r
-                       activityId="eu.etaxonomy.taxeditor.disable"\r
-                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.project">\r
-               </activityPatternBinding>\r
-               <activityPatternBinding\r
-                       activityId="eu.etaxonomy.taxeditor.disable"\r
-                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.file">\r
-               </activityPatternBinding>\r
-               <activityPatternBinding\r
-                       activityId="eu.etaxonomy.taxeditor.disable"\r
-                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.folder">\r
-               </activityPatternBinding>\r
-               <activityPatternBinding\r
-                       activityId="eu.etaxonomy.taxeditor.disable"\r
-                       pattern="org\.eclipse\.ui\.editors/org\.eclipse\.ui\.editors\.wizards\.UntitledTextFileWizard">\r
-               </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\..*externaltools.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.debug.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.team.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.ant.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.pde.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.jdt.*">\r
-  </activityPatternBinding>\r
-  <activityPatternBinding\r
-        activityId="eu.etaxonomy.taxeditor.disable"\r
-        pattern="org\.eclipse\.search.*">\r
-  </activityPatternBinding>\r
-       </extension>\r
- <extension\r
-       id="eu_etaxonomy_taxeditor_product"\r
-       point="org.eclipse.core.runtime.products">\r
-    <product\r
-          application="eu.etaxonomy.taxeditor.application.application"\r
-          name="EDIT Taxonomic Editor">\r
-       <property\r
-             name="appName"\r
-             value="EDIT Taxonomic Editor">\r
-       </property>\r
-       <property\r
-             name="aboutImage"\r
-             value="icons/256color_48x48.gif">\r
-       </property>\r
-       <property\r
-             name="aboutText"\r
-             value="%productBlurb">\r
-       </property>\r
-       <property\r
-             name="windowImages"\r
-             value="icons/256color_16x16.gif,icons/256color_32x32.gif,icons/256color_48x48.gif">\r
-       </property>\r
-       <property\r
-             name="startupForegroundColor"\r
-             value="000000">\r
-       </property>\r
-       <property\r
-             name="startupMessageRect"\r
-             value="7,432,360,20">\r
-       </property>\r
-       <property\r
-             name="startupProgressRect"\r
-             value="5,447,366,15">\r
-       </property>\r
-       <property\r
-             name="preferenceCustomization"\r
-             value="plugin_customization.ini">\r
-       </property>\r
-    </product>\r
- </extension>\r
-\r
-</plugin>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         id="application"
+         name="%extension.name"
+         point="org.eclipse.core.runtime.applications">
+      <application
+            cardinality="singleton-global"
+            thread="main"
+            visible="true">
+         <run
+               class="eu.etaxonomy.taxeditor.Application">
+         </run>
+      </application>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="eu.etaxonomy.taxeditor.perspective.Taxonomic"
+            id="eu.etaxonomy.taxeditor.application.perspective.taxonomic"
+            name="%perspective.name">
+      </perspective>
+      <!--perspective
+            class="eu.etaxonomy.taxeditor.perspective.BulkEditing"
+            id="eu.etaxonomy.taxeditor.application.perspective.bulkeditor"
+            name="Bulk Editing">
+      </perspective-->
+      <perspective
+            class="eu.etaxonomy.taxeditor.perspective.PolytomousKey"
+            id="eu.etaxonomy.taxeditor.application.perspective.polytomous"
+            name="%perspective.name.0">
+      </perspective>
+      <perspective
+            class="eu.etaxonomy.taxeditor.perspective.Uses"
+            id="eu.etaxonomy.taxeditor.application.perspective.uses"
+            name="%perspective.name.1">
+      </perspective>
+      <perspective
+            class="eu.etaxonomy.taxeditor.perspective.DerivatePerspective"
+            icon="icons/specimen_derivate-16x16-32.png"
+            id="eu.etaxonomy.taxeditor.application.perspective.derivates"
+            name="%perspective.name.2">
+      </perspective>
+      <perspective
+            class="eu.etaxonomy.taxeditor.perspective.ChecklistPerspective"
+            icon="icons/check.png"
+            id="eu.etaxonomy.taxeditor.perspective.checklistperspective"
+            name="Checklist">
+      </perspective>
+     
+   </extension>
+   <!--extension
+         point="org.eclipse.ui.views">
+      <view
+            class="eu.etaxonomy.taxeditor.navigation.taxonomictree.TaxonomicTreeView"
+            id="eu.etaxonomy.taxeditor.navigation.taxonomictree.treeView"
+            name="Taxonomic Tree">
+      </view>
+      <view
+            allowMultiple="true"
+            class="eu.etaxonomy.taxeditor.navigation.search.SearchResultView"
+            id="eu.etaxonomy.taxeditor.navigation.search.searchResultView"
+            name="Search Result"
+            restorable="true">
+      </view>
+   </extension-->
+ <extension
+       point="org.eclipse.ui.perspectiveExtensions">
+    <perspectiveExtension
+          targetID="eu.etaxonomy.taxeditor.application.perspective.bulkeditor">
+       <showInPart
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">
+       </showInPart>
+       <showInPart
+             id="eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview">
+       </showInPart>
+    </perspectiveExtension>
+    <perspectiveExtension
+          targetID="eu.etaxonomy.taxeditor.application.perspective.polytomous">
+       <showInPart
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">
+       </showInPart>
+    </perspectiveExtension>
+    <perspectiveExtension
+          targetID="eu.etaxonomy.taxeditor.application.perspective.uses">
+       <showInPart
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">
+       </showInPart>
+    </perspectiveExtension>
+ </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="org.eclipse.ui.main.menu.file"
+               label="%menu.label">
+         </menu>
+         <menu
+               id="org.eclipse.ui.main.menu.edit"
+               label="%menu.label.0">
+         </menu>
+         <menu
+               id="org.eclipse.ui.main.menu.window"
+               label="%menu.label.1">
+         </menu>
+         <menu
+               id="org.eclipse.ui.main.menu.help"
+               label="%menu.label.2">
+         </menu>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu.file">
+         <menu
+               id="eu.etaxonomy.navigation.menu.new"
+               label="%menu.label.3">
+         </menu>
+         <separator
+               name="eu.etaxonomy.taxeditor.application.filemenu.new"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.file.close"
+               label="%command.label"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.file.closeAll"
+               label="%command.label.0"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.application.filemenu.close"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.file.save"
+               label="%command.label.1"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.file.saveAll"
+               label="%command.label.2"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.application.filemenu.save"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.file.import"
+               label="%command.label.3"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.file.export"
+               label="%command.label.4"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.application.filemenu.io"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.file.exit"
+               id="eu.etaxonomy.taxeditor.application.menu.exit"
+               label="%command.label.5"
+               style="push">
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu.edit">
+         <command
+               commandId="org.eclipse.ui.edit.undo"
+               label="%command.label.6">
+         </command>
+         <command
+               commandId="org.eclipse.ui.edit.redo"
+               label="%command.label.7"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.ui.edit.separator1"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.edit.cut"
+               label="%command.label.8"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.edit.copy"
+               label="%command.label.9"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.edit.paste"
+               label="%command.label.10"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.ui.edit.separator2"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.edit.delete"
+               label="%command.label.11"
+               style="push">
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu.window">
+         <separator
+               name="eu.etaxonomy.taxeditor.application.windowMenu.last"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.window.preferences"
+               label="%command.label.12"
+               style="push">
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu.help">
+         <command
+               commandId="org.eclipse.ui.help.helpContents"
+               label="%command.label.13"
+               style="push">
+         </command>
+         <command
+               commandId="org.eclipse.ui.help.helpSearch"
+               label="%command.label.14"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.ui.help.separator0"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.help.dynamicHelp"
+               label="%command.label.15"
+               style="push">
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.application.help.parser"
+               label="%command.label.16"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.ui.help.separator1"
+               visible="true">
+         </separator>
+         <!--command
+               commandId="eu.etaxonomy.taxeditor.install"
+               label="%command.label.18"
+               style="push"/-->
+         <command
+               commandId="eu.etaxonomy.taxeditor.update"
+               label="%command.label.17"
+               style="push"/>    
+         <separator
+               name="eu.etaxonomy.taxeditor.ui.help.separator2"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.help.aboutAction"
+               label="%command.label.19">
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.application.help.aboutPlatform"
+               label="%command.label.20"
+               style="push">
+         </command>
+      </menuContribution>
+            <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar">
+         <toolbar
+               id="eu.etaxonomy.taxeditor.editor.main">
+            <command
+                  commandId="org.eclipse.ui.newWizard"
+                  label="%command.label.21"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.file.save"
+                  label="%command.label.22"
+                  style="push">
+            </command>
+         </toolbar>
+      </menuContribution>
+   </extension>
+   <extension
+         id="product"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="eu.etaxonomy.taxeditor.application.application"
+            name="%product.name">
+         <property
+               name="windowImages"
+               value="icons/256color_16x16.gif,icons/256color_32x32.gif,icons/256color_48x48.gif">
+         </property>
+         <property
+               name="aboutText"
+               value="%productBlurb">
+         </property>
+         <!--property
+               name="startupForegroundColor"
+               value="#C8D5EA"-->
+         <property
+               name="startupForegroundColor"
+               value="000000">
+         </property>
+         <property
+               name="startupProgressRect"
+               value="5,447,366,15">
+         </property>
+         <property
+               name="startupMessageRect"
+               value="7,432,360,20">
+         </property>
+         <property
+               name="appName"
+               value="EDIT Taxonomic Editor">
+         </property>
+         <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+         </property>
+         <property
+               name="aboutImage"
+               value="icons/256color_48x48.gif">
+         </property>
+      </product>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler"
+            id="eu.etaxonomy.taxeditor.application.help.parser"
+            name="%command.name">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler"
+            id="eu.etaxonomy.taxeditor.application.help.aboutPlatform"
+            name="%command.name.0">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.update.UpdateHandler"
+            id="eu.etaxonomy.taxeditor.update"
+            name="%command.label.17">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.update.InstallNewSoftwareHandler"
+            id="eu.etaxonomy.taxeditor.install"
+            name="%command.label.18">
+      </command>
+   </extension>
+   
+   
+       <extension
+               point="org.eclipse.ui.activities">
+               <activity
+                       description="%activity.description"
+                       id="eu.etaxonomy.taxeditor.disable"
+                       name="%activity.name">
+               </activity>
+               <activityPatternBinding
+                       activityId="eu.etaxonomy.taxeditor.disable"
+                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.project">
+               </activityPatternBinding>
+               <activityPatternBinding
+                       activityId="eu.etaxonomy.taxeditor.disable"
+                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.file">
+               </activityPatternBinding>
+               <activityPatternBinding
+                       activityId="eu.etaxonomy.taxeditor.disable"
+                       pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.folder">
+               </activityPatternBinding>
+               <activityPatternBinding
+                       activityId="eu.etaxonomy.taxeditor.disable"
+                       pattern="org\.eclipse\.ui\.editors/org\.eclipse\.ui\.editors\.wizards\.UntitledTextFileWizard">
+               </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\..*externaltools.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.debug.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.team.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.ant.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.pde.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.jdt.*">
+  </activityPatternBinding>
+  <activityPatternBinding
+        activityId="eu.etaxonomy.taxeditor.disable"
+        pattern="org\.eclipse\.search.*">
+  </activityPatternBinding>
+       </extension>
+ <extension
+       id="eu_etaxonomy_taxeditor_product"
+       point="org.eclipse.core.runtime.products">
+    <product
+          application="eu.etaxonomy.taxeditor.application.application"
+          name="EDIT Taxonomic Editor">
+       <property
+             name="appName"
+             value="EDIT Taxonomic Editor">
+       </property>
+       <property
+             name="aboutImage"
+             value="icons/256color_48x48.gif">
+       </property>
+       <property
+             name="aboutText"
+             value="%productBlurb">
+       </property>
+       <property
+             name="windowImages"
+             value="icons/256color_16x16.gif,icons/256color_32x32.gif,icons/256color_48x48.gif">
+       </property>
+       <property
+             name="startupForegroundColor"
+             value="000000">
+       </property>
+       <property
+             name="startupMessageRect"
+             value="7,432,360,20">
+       </property>
+       <property
+             name="startupProgressRect"
+             value="5,447,366,15">
+       </property>
+       <property
+             name="preferenceCustomization"
+             value="plugin_customization.ini">
+       </property>
+    </product>
+ </extension>
+
+</plugin>
index e4ca3d88743b4ff63b35f6d149e0d8584b7b3f19..a0836b2ee8542fe41a048b5b53052e8fc61dd754 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.7.1</version>
+    <version>3.8.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 036f203b5a8e44f92e8322b028d7beb4d609f8ee..c06088fee3d675a309a9ee627d61500333b0d5e1 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: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
index 3dc3ad16960c1d79b088125c9a319ac6b003804e..cb6853e8c4f06650d507fa3721fa9a296d5bfbdc 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.7.1</version>
+               <version>3.8.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index c2978874b1a990ce1ac9e37636fe71b87580c3c0..4c97dbfb51582f3a52d614059d26acf2f4b05d12 100644 (file)
@@ -34,9 +34,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 
 import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider;
@@ -44,7 +42,7 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
-import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
+import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
@@ -54,10 +52,6 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>
- * BulkEditor class.
- * </p>
- *
  * @author p.ciardelli
  * @created 07.07.2009
  * @version 1.0
@@ -76,16 +70,10 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
 
        private boolean isDirty;
 
-       /**
-        * <p>Constructor for BulkEditor.</p>
-        */
        public BulkEditor() {
                super(CdmStore.createConversation());
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#initializeEditor()
-        */
        /** {@inheritDoc} */
        @Override
        protected void initializeEditor() {
@@ -103,9 +91,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                setSourceViewerConfiguration(new BulkEditorViewerConfiguration(lineDisplayStrategy));
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.ListEditor#createSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, int)
-        */
        /** {@inheritDoc} */
        @Override
     protected ISourceViewer createSourceViewer(Composite parent,
@@ -117,9 +102,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                return viewer;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.AnnotatedLineEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
-        */
        /** {@inheritDoc} */
        @Override
        public void init(IEditorSite site, IEditorInput input)
@@ -132,9 +114,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                super.init(site, input);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
-        */
        /** {@inheritDoc} */
        @Override
        public void createPartControl(Composite parent) {
@@ -164,9 +143,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                }
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#dispose()
-        */
        /** {@inheritDoc} */
        @Override
        public void dispose() {
@@ -177,18 +153,12 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
        }
 
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#isEditable()
-        */
        /** {@inheritDoc} */
        @Override
        public boolean isEditable() {
                return false;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#setFocus()
-        */
        /** {@inheritDoc} */
        @Override
        public void setFocus() {
@@ -203,9 +173,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                }
        }
 
-       /**
-        *
-        */
        private void displayWarningDialog() {
                IPreferenceStore prefs = PreferencesUtil.getPreferenceStore();
                if (!prefs.getBoolean(PreferencesUtil.HIDE_BULKEDITOR_INFO)) {
@@ -221,9 +188,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                }
        }
 
-       /**
-        * @param control
-        */
        private void addToggleMergeCandidateListener(Control control) {
                control.addMouseListener(new MouseAdapter() {
                        @Override
@@ -235,11 +199,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                });
        }
 
-       /**
-        * <p>toggleMergeCandidateAnnotation</p>
-        *
-        * @param line a int.
-        */
        public void toggleMergeCandidateAnnotation(int line) {
 
                IDocument document = getSourceViewer().getDocument();
@@ -261,9 +220,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                }
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#isDirty()
-        */
        @Override
        public boolean isDirty() {
            if(isDirty){
@@ -280,17 +236,14 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
            firePropertyChange(PROP_DIRTY);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
-        */
        @Override
        public void doSave(IProgressMonitor progressMonitor) {
            isDirty = false;
-          
+
            super.doSave(progressMonitor);
-           
+
            selectFirstItem();
-          
+
                getSourceViewer().getTextWidget().setFocus();
 
        }
@@ -304,9 +257,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
 //             firePropertyChange(PROP_DIRTY);
        }
 
-       /* (non-Javadoc)
-        * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
-        */
        /** {@inheritDoc} */
        public void performSearch(BulkEditorQuery query) {
                if (query != null) {
@@ -323,7 +273,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        }
                        conversation.commit();
                        conversation.clear();
-                       
+
                        getEditorInput().performSearch(query);
 
                        refresh();
@@ -339,9 +289,6 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                getSelectionProvider().setSelection(selection);
        }
 
-       /**
-        *
-        */
        public void refresh() {
                if(getDocumentProvider().getAnnotationModel(getEditorInput()) != null){
                        ((AnnotationModel) getDocumentProvider().getAnnotationModel(getEditorInput())).removeAllAnnotations();
@@ -363,4 +310,9 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                menu.remove(ITextEditorActionConstants.SHIFT_LEFT);
                menu.remove(ITextEditorActionConstants.CONTEXT_PREFERENCES);
        }
+
+       @Override
+       public boolean canAttachMedia() {
+           return getEditorInput() instanceof TaxonEditorInput?true:false;
+       }
 }
index 96b0cbed6fcb4ac6c33077779f453099abea96ce..e65805b9d516c14d23c75b36652cfe13cca4dfff 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * 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,10 +24,10 @@ import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
  * @version 1.0
  */
 public class BulkEditorQuery {
-               
-       private String searchString;
-       private Comparator<?> comparator;
-       private IIdentifiableEntityServiceConfigurator searchConfigurator;
+
+       private final String searchString;
+       private final Comparator<?> comparator;
+       private final IIdentifiableEntityServiceConfigurator searchConfigurator;
 
        public BulkEditorQuery (String searchString, Comparator comparator) {
                this.searchString = searchString;
@@ -38,30 +38,21 @@ public class BulkEditorQuery {
                searchConfigurator.setTitleSearchString(searchString);
                searchConfigurator.setMatchMode(null);
                searchConfigurator.setPropertyPaths(propertyPath);
-               
+
                if(searchString != null && searchString.trim().equals("*")){
                        searchConfigurator.setPageSize(1000);
                }
-               
+
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getComparator()
-        */
        public Comparator getComparator() {
                return comparator;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getSearchString()
-        */
        public String getSearchString() {
                return searchString;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getSearchConfigurator()
-        */
        public IIdentifiableEntityServiceConfigurator getSearchConfigurator() {
                return searchConfigurator;
        }
index eb17b543514a658b5722337ce78b2e8c88d9a551..552a9d0dfa46af09e0ff38a26280854d3fd59c8e 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * 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,8 +33,6 @@ import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.SearchManager;
 
 /**
- * <p>BulkEditorSearchComposite class.</p>
- *
  * @author p.ciardelli
  * @author e.-m.lee
  * @author n.hoffmann
@@ -42,83 +40,63 @@ import eu.etaxonomy.taxeditor.store.SearchManager;
  * @version 1.0
  */
 public class BulkEditorSearch {
-       
-       /**
-        * 
-        */
+
        private static final String SEARCH = "Search";
-       
+
        private static final String DEFAULT_TEXT = String.format("Use \'%s\' for wildcard searching", SearchManager.WILDCARD);
-       
+
        private final BulkEditor editor;
-       
+
        private Text text;
        private BulkEditorSortCombo sortCombo;
-       
+
        private Button button;
-       
-       
+
+
        public Object ORDER_BY = new Object();
-       
-       /**
-        * <p>Constructor for BulkEditorSearchComposite.</p>
-        *
-        * @param parent a {@link org.eclipse.swt.widgets.Composite} object.
-        * @param style a int.
-        * @param editor a {@link org.eclipse.ui.IEditorPart} object.
-        */
+
        public BulkEditorSearch(BulkEditor editor, Composite parent, int style) {
                this.editor = editor;
-               
+
                createControl(parent, style);
        }
 
-       /*
-        * Creates the search control.
-        */
        /**
-        * <p>createControl</p>
+        * Creates the search control.
         */
        protected void createControl(Composite parent, int style) {
-       
+
                final Composite container = new Composite(parent, style);
                GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
                container.setLayoutData(gridData);
                container.setLayout(new GridLayout(5, false));
-               
+
                createSearchTextField(container, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
-               
+
                createSortCombo(container, style);
-               
+
                button = new Button(container, SWT.PUSH);
                button.setText(SEARCH);
                button.addSelectionListener(new SelectionAdapter() {
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                updateEditorInput();
                        }
                });
-               
+
                registerAtFocusService();
        }
 
-       /**
-        * @param container
-        * @param style
-        */
        private void createSortCombo(Composite parent, int style) {
                sortCombo = new BulkEditorSortCombo(parent, editor.getEditorInput().getSortProviders());
-               
+
        }
 
        /**
         * Handles focus changes for the textfield.
         */
        private void registerAtFocusService() {
-               IFocusService focusService = 
+               IFocusService focusService =
                        (IFocusService) PlatformUI.getWorkbench().getService(IFocusService.class);
                if (focusService != null) {
                        focusService.addFocusTracker(text, "bulkeditor.textControlId");
@@ -132,32 +110,31 @@ public class BulkEditorSearch {
        private void createSearchTextField(Composite parent, int style) {
                final Label label = new Label(parent, SWT.NONE);
                label.setText("Title Cache");
-               
+
                text = new Text(parent, style);
                text.setText(DEFAULT_TEXT);
                text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
-               
+
                text.addFocusListener(new FocusListener() {
 
-                       public void focusGained(FocusEvent e) {
+                       @Override
+            public void focusGained(FocusEvent e) {
                                text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOCUS));
                                if (DEFAULT_TEXT.equals(text.getText())) {
                                        text.setText("");
                                }
                        }
 
-                       public void focusLost(FocusEvent e) {
+                       @Override
+            public void focusLost(FocusEvent e) {
                                if (CdmUtils.isEmpty(text.getText())) {
                                        text.setForeground(BulkEditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
-                                       text.setText(DEFAULT_TEXT);             
-                               } 
+                                       text.setText(DEFAULT_TEXT);
+                               }
                        }
                });
-               
+
                text.addKeyListener(new KeyAdapter() {
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent)
-                        */
                        @Override
                        public void keyReleased(KeyEvent e) {
                                if (e.keyCode == SWT.CR) {
@@ -165,59 +142,39 @@ public class BulkEditorSearch {
                                }
                        }
                });
-               
+
                GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
                text.setLayoutData(gridData);
        }
 
 
-       /*
+       /**
         * Shows the results of the search.
         */
        private void updateEditorInput() {
-               
+
                String searchString = getSearchString().trim();
-                               
-               if(DEFAULT_TEXT.equals(searchString) || CdmUtils.isEmpty(searchString)){
+
+               if(DEFAULT_TEXT.equals(searchString) || CdmUtils.isBlank(searchString)){
                        return;
-               }                       
-               
-               BulkEditorQuery query = new BulkEditorQuery(getSearchString(), getComparator());
+               }
+
+               BulkEditorQuery query = new BulkEditorQuery(searchString, getComparator());
                editor.performSearch(query);
        }
-       
-       /*
+
+       /**
         * Returns the current string in the search textfield.
         * @return the content of the textfield
         */
-       /**
-        * <p>getSearchString</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
        public String getSearchString() {
                return text.getText().trim();
        }
-       
-       /*
-        * 
-        */
-       /**
-        * <p>getComparator</p>
-        *
-        * @return a {@link java.util.Comparator} object.
-        */
+
        public Comparator getComparator() {
                return sortCombo.getSelection();
-       };
-       
-       /*
-        * 
-        */
+       }
 
-       /**
-        * 
-        */
        public void setFocus() {
                if(text != null && ! text.isDisposed()){
                        text.setFocus();
index ee587aaa601eb440f9336f4fc9c8ec959bee1d50..a016571e2862abf02bffe9917525ea9a842af317 100644 (file)
@@ -46,9 +46,9 @@ public class ConvertPerson2TeamHandler extends AbstractHandler {
        @Override\r
        public Object execute(ExecutionEvent event) throws ExecutionException {\r
                ISelection selection = HandlerUtil.getCurrentSelection(event);\r
-               \r
+\r
                IEditorPart editor = HandlerUtil.getActiveEditor(event);\r
-               \r
+\r
                IEditorInput input = editor.getEditorInput();\r
                if (editor.isDirty()){\r
                        boolean proceed = MessageDialog.openQuestion(null,\r
@@ -60,17 +60,17 @@ public class ConvertPerson2TeamHandler extends AbstractHandler {
                        }\r
                }\r
                if((input instanceof IEntityPersistenceService) && (selection instanceof IStructuredSelection)){\r
-                       \r
-                       \r
+\r
+\r
                        IDocumentProvider provider = ((BulkEditor) editor).getDocumentProvider();\r
-                       LineAnnotationModel model = \r
+                       LineAnnotationModel model =\r
                                        (LineAnnotationModel) provider.getAnnotationModel(input);\r
-                       \r
-                       \r
+\r
+\r
                        IStructuredSelection structuredSelection = (IStructuredSelection) selection;\r
-                       \r
+\r
                        IEntityPersistenceService persistenceService = (IEntityPersistenceService) input;\r
-               \r
+\r
                        Team team ;\r
                        for(Object object : structuredSelection.toList()){\r
                                LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);\r
@@ -82,12 +82,12 @@ public class ConvertPerson2TeamHandler extends AbstractHandler {
                                        } catch (IllegalArgumentException e) {\r
                                                MessagingUtils.errorDialog("Can not convert Person into a Team", null, e.getLocalizedMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID,e, true);\r
                                        } catch (MergeException e) {\r
-                                               MessagingUtils.errorDialog("Can not convert Person into a Team", null, e.getMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID,e, true);\r
+                                               MessagingUtils.informationDialog("Convert not possible", "Person can not be transformed into team as it is referenced in a way that does not allow converting");\r
                                        }\r
                                }else{\r
                                        MessagingUtils.informationDialog("Can not convert Person into a Team", "convert Person to Team can only be called on a person.");\r
                                }\r
-                               \r
+\r
                                if (team != null){\r
                                        ((BulkEditor) editor).removeAnnotatedLine(annotation);\r
                                        ((BulkEditor) editor).createAnnotatedLine(team);\r
index 5c0e8676ed02da8bbc536308dd3309393683d872..4a8ae8a3ce9df24256ef97a5e99e4312e99a7e11 100644 (file)
@@ -22,12 +22,17 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.strategy.merge.MergeException;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityContainer;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>MergeGroupHandler class.</p>
@@ -71,10 +76,41 @@ public class MergeGroupHandler extends AbstractHandler {
                        }                       
                        Object targetEntity = ((IEntityContainer<?>) targetAnnotation).getEntity();
                        
+                       TeamOrPersonBase teamOrPerson = null;
+                       Reference ref = null;
+                       if (targetEntity instanceof TeamOrPersonBase){
+                               teamOrPerson = HibernateProxyHelper.deproxy(targetEntity, TeamOrPersonBase.class);
+                       } else if(targetEntity instanceof Reference){
+                               ref = HibernateProxyHelper.deproxy(targetEntity, Reference.class);
+                       }
                        logger.info("Merging group");
 //                     model.printAnnotations();
                        for (LineAnnotation annotation : candidateAnnotations) {
+                               //first check whether entities are mergeable
+                               
                                
+                       try{
+                               if (ref != null){
+                                       Reference ref2 = HibernateProxyHelper.deproxy(annotation.getEntity(), Reference.class);
+                                       
+                                       if (!CdmStore.getCommonService().isMergeable(ref, ref2, null)){
+                                               MessageDialog.openWarning(HandlerUtil.getActiveShell(event), 
+                                                               "No merge possible", "A merge of " + ref.getTitleCache() + " and " + ref2.getTitleCache() + " is not possible.");
+                                               return null;
+                                       }
+                               }
+                               if (teamOrPerson != null){
+                                       TeamOrPersonBase teamOrPerson2 = HibernateProxyHelper.deproxy(annotation.getEntity(), TeamOrPersonBase.class);
+                                       
+                                       if (!CdmStore.getCommonService().isMergeable(teamOrPerson, teamOrPerson2, null)){
+                                               MessageDialog.openWarning(HandlerUtil.getActiveShell(event), 
+                                                               "No merge possible", "A merge of " + teamOrPerson.getTitleCache() + " and " + teamOrPerson2.getTitleCache() + " is not possible.");
+                                               return null;
+                                       }
+                               }
+                       }catch(MergeException e){
+                                       
+                       }
                                ((BulkEditor) editor).removeAnnotatedLine(annotation);
                                
                                // Mark entity container for merging with target entity
index 82cd233202777608632aee5d212f9fbc00bf7ee6..8cf5d3357e22a6ace1df8b40854e94f5ff703179 100644 (file)
@@ -22,6 +22,7 @@ import org.eclipse.ui.IPersistableElement;
 
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.MarkerType;
@@ -231,7 +232,7 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
     public boolean merge(T entity, T mergeTarget) {
                if (entity instanceof IMergable) {
                        try {
-                               CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity);
+                               CdmStore.getCommonService().merge(mergeTarget.getId(), entity.getId(), (Class<? extends CdmBase>)entity.getClass());
                        } catch (MergeException e) {
                                MessagingUtils.errorDialog("Bulk Editor Merge Error",
                                                this,
index 2a739544f0deeab50984dc606b4db9d09ca8d4d0..4c2dccc55e38157da4cff496d941179ebc5c4152 100644 (file)
@@ -1,23 +1,18 @@
 // $Id$
 /**
 * 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.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
-
-import org.eclipse.core.commands.ExecutionException;
 
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Person;
@@ -29,7 +24,6 @@ import eu.etaxonomy.cdm.strategy.merge.MergeException;
 import eu.etaxonomy.cdm.strategy.merge.MergeMode;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
-import eu.etaxonomy.taxeditor.bulkeditor.handler.MergeGroupHandler;
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.AgentCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.IdentifiableEntitySortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
@@ -38,62 +32,32 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
 /**
- * <p>AgentEditorInput class.</p>
- *
  * @author p.ciardelli
  * @created 25.06.2009
  * @version 1.0
  */
 public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase> {
 
-       /**
-        * 
-        */
        private static final long serialVersionUID = 3387950621617078479L;
 
-       /** Constant <code>ID="bulkeditor.input.author"</code> */
        public static final String ID = "bulkeditor.input.author";
-       
+
        private static AgentEditorInput instance;
 
-       /**
-        * <p>getID</p>
-        *
-        * @return the iD
-        */
        public static String getID() {
                return ID;
        }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getName()
-        */
-       /**
-        * <p>getName</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       public String getName() {
+
+       @Override
+    public String getName() {
                return BulkEditorInputType.AGENT.label;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IEditorInput#getToolTipText()
-        */
-       /**
-        * <p>getToolTipText</p>
-        *
-        * @return a {@link java.lang.String} object.
-        */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
-       /**
-        * <p>Getter for the field <code>instance</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
-        */
        public static AbstractBulkEditorInput getInstance() {
                if (instance == null) {
                        instance = new AgentEditorInput();
@@ -101,32 +65,31 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return instance;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()
-        */
        /** {@inheritDoc} */
        @Override
        public boolean isMergingEnabled() {
                return true;
        }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()
-        */
+
        /** {@inheritDoc} */
        @Override
        public boolean isConvertingEnabled() {
                return true;
        }
-       
+
        /** {@inheritDoc} */
        @Override
     public boolean merge(TeamOrPersonBase entity, TeamOrPersonBase mergeTarget) {
                if (entity instanceof IMergable) {
                        try {
-                               IMergeStrategy strategy = DefaultMergeStrategy.NewInstance(Person.class);
-                               strategy.setMergeMode("institutionalMemberships", MergeMode.FIRST);
-                               CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity, strategy);                         
+                               if(entity instanceof Person && mergeTarget instanceof Person) {
+                                   IMergeStrategy strategy = DefaultMergeStrategy.NewInstance(Person.class);
+                                   strategy.setMergeMode("institutionalMemberships", MergeMode.FIRST);
+                                   CdmStore.getCommonService().merge(mergeTarget.getId(), entity.getId(), Person.class);
+                               } else {
+                                   IMergeStrategy strategy = DefaultMergeStrategy.NewInstance(TeamOrPersonBase.class);
+                                   CdmStore.getCommonService().merge(mergeTarget.getId(), entity.getId(), TeamOrPersonBase.class);
+                               }
                        } catch (MergeException e) {
                                MessagingUtils.errorDialog("Bulk Editor Merge Error",
                                                this,
@@ -144,42 +107,36 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        public List<TeamOrPersonBase> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findTeamOrPersons(configurator);
        }
-       
-       /** {@inheritDoc} 
+
+       /** {@inheritDoc}
        @Override
        public AgentBase loadEntity(UUID uuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IAgentService.class).load(uuid, propertyPaths);
        }*/
 
-       
+
        public boolean delete(AgentBase entity) throws ReferencedObjectUndeletableException  {
-               
-                       return CdmStore.getService(IAgentService.class).delete(entity) != null;                 
-               
+
+                       return CdmStore.getService(IAgentService.class).delete(entity) != null;
+
        }
 
        /** {@inheritDoc} */
        public boolean save(AgentBase entity) {
-               
+
                return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
-        */
        @Override
        public List<IBulkEditorSortProvider<TeamOrPersonBase>> getSortProviders() {
                List<IBulkEditorSortProvider<TeamOrPersonBase>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<TeamOrPersonBase>());
-               
+
                return sortProviders;
        }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
-        */
+
        @Override
        protected IEntityCreator<TeamOrPersonBase> createEntityCreator() {
                return new AgentCreator();
index ee3cd44efb078430a6d24fdee4cd1db9eb08a8a1..604f3874a6d788c0f879e2e7f6f6cf5d77648c06 100644 (file)
@@ -264,7 +264,7 @@ public class ReferencingObjectsView extends AbstractCdmViewPart{
                                }
                                showViewer();
                        }catch(Exception e){
-                               setContentDescription("Some Problems occured.");
+                               setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
                        }
 
                }
index 20cffab12135d832275af97a5af5a8ae56d0d5a2..b0f55de1383fd7ff981cfc322caf7666c5dec0a0 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.7.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.7.0.jar"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <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/aspectjrt-1.7.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.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.7.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.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.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.8.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.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-logging-1.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.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.9.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.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-4.0.1.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.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-4.2.0.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.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/javassist-3.17.1-GA.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.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/jboss-logging-3.1.3.GA.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/jdbc4-2.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-2.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.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-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.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.eclipse.equinox.common-3.6.0.v20110523.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.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-container-default-1.0-alpha-30.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.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-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.1.3.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.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/unitils-core-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.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.0.0.GA.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.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/xmlgraphics-commons-1.5.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.4.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.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/xstream-1.4.4.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>
-       <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.8.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.8.0.jar" sourcepath="lib/cdmlib-services-3.8.0-sources.jar"/>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\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/aspectjrt-1.7.1.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.7.1.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.7.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.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.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.8.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.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-logging-1.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.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/easymock-3.1.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.9.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/guava-r05.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-4.1.10.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-4.0.1.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-4.1.10.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-4.1.10.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-4.1.10.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-4.1.10.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.0-api-1.0.1.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-4.2.0.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-4.2.0.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.3.1.Final.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.2.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.2.4.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-SNAPSHOT-sources.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.4.0.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-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/javassist-3.17.1-GA.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.7.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.2-EA.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2-EA.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/jboss-logging-3.1.3.GA.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/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/joda-time-2.1.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/junit-4.11.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.5.0.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-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-core-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-facet-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-kuromoji-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-memory-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-misc-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-phonetic-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-queries-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-smartcn-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spatial-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/lucene-stempel-3.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.24.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.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.eclipse.equinox.common-3.6.0.v20110523.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.test-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/p6spy-1.3.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-container-default-1.0-alpha-30.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/plexus-utils-2.0.5.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-9.1-901.jdbc4.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.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.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.2.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-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-beans-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-context-support-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-core-3.2.2.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-expression-3.2.2.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-security-config-3.1.3.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.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/unitils-core-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.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.0.0.GA.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/xalan-2.6.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/xmlgraphics-commons-1.5.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/xmlParserAPIs-2.6.2.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.4.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.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/xstream-1.4.4.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.10-FINAL.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.10-FINAL.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>\r
+       <classpathentry kind="output" path="target/classes"/>\r
+</classpath>\r
index d40161fb8e5f95e25ee48ec0752a5ae1579f554c..f5a327f841094484a7473dda01f05496c48e97be 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: 3.7.1
+Bundle-Version: 3.8.0
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
@@ -612,12 +612,12 @@ Bundle-ClassPath: .,
  lib/xmlbeans-2.3.0.jar,
  lib/poi-ooxml-schemas-3.10-FINAL.jar,
  lib/swagger-annotations-1.3.5.jar,
- lib/cdmlib-commons-3.7.0.jar,
- lib/cdmlib-ext-3.7.0.jar,
- lib/cdmlib-io-3.7.0.jar,
- lib/cdmlib-model-3.7.0.jar,
- lib/cdmlib-persistence-3.7.0.jar,
- lib/cdmlib-print-3.7.0.jar,
- lib/cdmlib-remote-3.7.0.jar,
- lib/cdmlib-services-3.7.0.jar
+ lib/cdmlib-commons-3.8.0.jar,
+ lib/cdmlib-ext-3.8.0.jar,
+ lib/cdmlib-io-3.8.0.jar,
+ lib/cdmlib-model-3.8.0.jar,
+ lib/cdmlib-persistence-3.8.0.jar,
+ lib/cdmlib-print-3.8.0.jar,
+ lib/cdmlib-remote-3.8.0.jar,
+ lib/cdmlib-services-3.8.0.jar
 Import-Package: eu.etaxonomy.cdm.api.application
index e5abfe10683163772e1a966a434c0d85ad7dc75d..e60f70e256e7d2fb083e028e9d978160191707a4 100644 (file)
@@ -194,14 +194,14 @@ bin.includes = META-INF/,\
                lib/poi-ooxml-schemas-3.10-FINAL.jar,\\r
                lib/xmlbeans-2.3.0.jar,\\r
                lib/swagger-annotations-1.3.5.jar,\\r
-               lib/cdmlib-commons-3.7.0.jar,\\r
-               lib/cdmlib-ext-3.7.0.jar,\\r
-               lib/cdmlib-io-3.7.0.jar,\\r
-               lib/cdmlib-model-3.7.0.jar,\\r
-               lib/cdmlib-persistence-3.7.0.jar,\\r
-               lib/cdmlib-print-3.7.0.jar,\\r
-               lib/cdmlib-remote-3.7.0.jar,\\r
-               lib/cdmlib-services-3.7.0.jar\r
+               lib/cdmlib-commons-3.8.0.jar,\\r
+               lib/cdmlib-ext-3.8.0.jar,\\r
+               lib/cdmlib-io-3.8.0.jar,\\r
+               lib/cdmlib-model-3.8.0.jar,\\r
+               lib/cdmlib-persistence-3.8.0.jar,\\r
+               lib/cdmlib-print-3.8.0.jar,\\r
+               lib/cdmlib-remote-3.8.0.jar,\\r
+               lib/cdmlib-services-3.8.0.jar\r
 \r
 jars.compile.order = .\r
 output.. = bin/\r
index 2bd3a7b0f562154fa8906927c528803a67e8a1a4..12b40f8b7d824a945ee0fe3f47e8883086619fa0 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.7.1</version>
+    <version>3.8.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>
diff --git a/eu.etaxonomy.taxeditor.editor.src/main/java/eu/etaxonomy/taxeditor/editor/name/container/RulerWithIcon.java b/eu.etaxonomy.taxeditor.editor.src/main/java/eu/etaxonomy/taxeditor/editor/name/container/RulerWithIcon.java
new file mode 100644 (file)
index 0000000..db44161
--- /dev/null
@@ -0,0 +1,660 @@
+/**
+* Copyright (C) 2007 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.name.container;
+
+import java.util.Iterator;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.IViewportListener;
+import org.eclipse.jface.text.JFaceTextUtil;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationAccess;
+import org.eclipse.jface.text.source.IAnnotationAccessExtension;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelListener;
+import org.eclipse.jface.text.source.IAnnotationPresentation;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.IVerticalRulerExtension;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+
+/**
+ * 99% of the code in this class was copied from org.eclipse.jface.text.source.VerticalRuler,
+ * which allows neither access to its paint methods nor subclassing to do same.
+ * <p>
+ * Changes made in method doubleBufferPaint(doubleBufferPaint(GC dest)).
+ *
+ * @see org.eclipse.jface.text.source.VerticalRuler
+ * @author p.ciardelli
+ * @created 27.01.2009
+ * @version 1.0
+ */
+public class RulerWithIcon implements IVerticalRuler, IVerticalRulerExtension {
+       private static final Logger logger = Logger.getLogger(RulerWithIcon.class);
+
+       /**
+        * Internal listener class.
+        */
+       class InternalListener implements IViewportListener, IAnnotationModelListener, ITextListener {
+
+               /*
+                * @see IViewportListener#viewportChanged(int)
+                */
+               public void viewportChanged(int verticalPosition) {
+                       if (verticalPosition != fScrollPos)
+                               redraw();
+               }
+
+               /*
+                * @see IAnnotationModelListener#modelChanged(IAnnotationModel)
+                */
+               public void modelChanged(IAnnotationModel model) {
+                       update();
+               }
+
+               /*
+                * @see ITextListener#textChanged(TextEvent)
+                */
+               public void textChanged(TextEvent e) {
+                       if (fTextViewer != null && e.getViewerRedrawState())
+                               redraw();
+               }
+       }
+
+       /** The vertical ruler's text viewer */
+       private ITextViewer fTextViewer;
+       /** The ruler's canvas */
+       private Canvas fCanvas;
+       /** The vertical ruler's model */
+       private IAnnotationModel fModel;
+       /** Cache for the actual scroll position in pixels */
+       private int fScrollPos;
+       /** The buffer for double buffering */
+       private Image fBuffer;
+       /** The line of the last mouse button activity */
+       private int fLastMouseButtonActivityLine= -1;
+       /** The internal listener */
+       private InternalListener fInternalListener= new InternalListener();
+       /** The width of this vertical ruler */
+       private int fWidth;
+       /**
+        * The annotation access of this vertical ruler
+        * @since 3.0
+        */
+       private IAnnotationAccess fAnnotationAccess;
+       private Image icon;
+
+       /**
+        * Constructs a vertical ruler with the given width.
+        *
+        * @param width the width of the vertical ruler
+        */
+       public RulerWithIcon(int width) {
+               this(width, null);
+       }
+
+       /**
+        * Constructs a vertical ruler with the given width and the given annotation
+        * access.
+        *
+        * @param width the width of the vertical ruler
+        * @param annotationAcccess the annotation access
+        * @since 3.0
+        */
+       public RulerWithIcon(int width, IAnnotationAccess annotationAcccess) {
+               fWidth= width;
+               fAnnotationAccess= annotationAcccess;
+       }
+
+       /*
+        * @see IVerticalRuler#getControl()
+        */
+       /**
+        * <p>getControl</p>
+        *
+        * @return a {@link org.eclipse.swt.widgets.Control} object.
+        */
+       public Control getControl() {
+               return fCanvas;
+       }
+
+       /*
+        * @see IVerticalRuler#createControl(Composite, ITextViewer)
+        */
+       /** {@inheritDoc} */
+       public Control createControl(Composite parent, ITextViewer textViewer) {
+
+               fTextViewer= textViewer;
+
+               fCanvas= new Canvas(parent, SWT.NO_BACKGROUND);
+
+               TableWrapData layout = new TableWrapData(TableWrapData.LEFT);
+               layout.heightHint = 20;
+               layout.maxWidth = fWidth;
+               fCanvas.setLayoutData(layout);          
+               
+               fCanvas.addPaintListener(new PaintListener() {
+                       public void paintControl(PaintEvent event) {
+                               if (fTextViewer != null)
+                                       doubleBufferPaint(event.gc);
+                       }
+               });
+
+               fCanvas.addDisposeListener(new DisposeListener() {
+                       public void widgetDisposed(DisposeEvent e) {
+                               handleDispose();
+                               fTextViewer= null;
+                       }
+               });
+
+               fCanvas.addMouseListener(new MouseListener() {
+                       public void mouseUp(MouseEvent event) {
+                       }
+
+                       public void mouseDown(MouseEvent event) {
+                               fLastMouseButtonActivityLine= toDocumentLineNumber(event.y);
+                       }
+
+                       public void mouseDoubleClick(MouseEvent event) {
+                               fLastMouseButtonActivityLine= toDocumentLineNumber(event.y);
+                       }
+               });
+
+               if (fTextViewer != null) {
+                       fTextViewer.addViewportListener(fInternalListener);
+                       fTextViewer.addTextListener(fInternalListener);
+               }
+
+               return fCanvas;
+       }
+
+       /**
+        * Disposes the ruler's resources.
+        */
+       private void handleDispose() {
+
+               if (fTextViewer != null) {
+                       fTextViewer.removeViewportListener(fInternalListener);
+                       fTextViewer.removeTextListener(fInternalListener);
+                       fTextViewer= null;
+               }
+
+               if (fModel != null)
+                       fModel.removeAnnotationModelListener(fInternalListener);
+
+               if (fBuffer != null) {
+                       fBuffer.dispose();
+                       fBuffer= null;
+               }
+       }
+
+
+       /**
+        * Double buffer drawing.
+        *
+        * @param dest the GC to draw into
+        */
+       private void doubleBufferPaint(GC dest) {
+
+               Point size= fCanvas.getSize();
+
+               if (size.x <= 0 || size.y <= 0)
+                       return;
+
+               if (fBuffer != null) {
+                       Rectangle r= fBuffer.getBounds();
+                       if (r.width != size.x || r.height != size.y) {
+                               fBuffer.dispose();
+                               fBuffer= null;
+                       }
+               }
+               if (fBuffer == null)
+                       fBuffer= new Image(fCanvas.getDisplay(), size.x, size.y);
+
+               GC gc= new GC(fBuffer);
+               gc.setFont(fTextViewer.getTextWidget().getFont());
+               try {
+                       gc.setBackground(fCanvas.getBackground());
+                       gc.fillRectangle(0, 0, size.x, size.y);
+
+                       // Code added to VerticalRuler starts here
+                       if (icon != null) {
+                               
+                               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.");
+                               } else {
+
+                                       // Set destination coordinates to center icon
+                                       int x = (size.x - r.width) / 2;
+                                       int y = (size.y - r.height) / 2;
+                                       
+                                       gc.drawImage(icon, 0, 0, r.width, r.height, x, y, r.width, r.height);
+                               }                               
+                       }
+                       // Code added to VerticalRuler ends here
+                       
+                       if (fTextViewer instanceof ITextViewerExtension5)
+                               doPaint1(gc);
+                       else
+                               doPaint(gc);
+
+               } finally {
+                       gc.dispose();
+               }
+
+               dest.drawImage(fBuffer, 0, 0);
+       }
+
+       /**
+        * Returns the document offset of the upper left corner of the
+        * widgets view port, possibly including partially visible lines.
+        *
+        * @return the document offset of the upper left corner including partially visible lines
+        * @since 2.0
+        */
+       private int getInclusiveTopIndexStartOffset() {
+
+               StyledText textWidget= fTextViewer.getTextWidget();
+               if (textWidget != null && !textWidget.isDisposed()) {
+                       int top= JFaceTextUtil.getPartialTopIndex(fTextViewer);
+                       try {
+                               IDocument document= fTextViewer.getDocument();
+                               return document.getLineOffset(top);
+                       } catch (BadLocationException x) {
+                       }
+               }
+
+               return -1;
+       }
+
+
+
+       /**
+        * Draws the vertical ruler w/o drawing the Canvas background.
+        *
+        * @param gc  the GC to draw into
+        */
+       protected void doPaint(GC gc) {
+
+               if (fModel == null || fTextViewer == null)
+                       return;
+
+               IAnnotationAccessExtension annotationAccessExtension= null;
+               if (fAnnotationAccess instanceof IAnnotationAccessExtension)
+                       annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess;
+
+               StyledText styledText= fTextViewer.getTextWidget();
+               IDocument doc= fTextViewer.getDocument();
+
+               int topLeft= getInclusiveTopIndexStartOffset();
+               int bottomRight= fTextViewer.getBottomIndexEndOffset();
+               int viewPort= bottomRight - topLeft;
+
+               Point d= fCanvas.getSize();
+               fScrollPos= styledText.getTopPixel();
+
+               int topLine= -1, bottomLine= -1;
+               try {
+                       IRegion region= fTextViewer.getVisibleRegion();
+                       topLine= doc.getLineOfOffset(region.getOffset());
+                       bottomLine= doc.getLineOfOffset(region.getOffset() + region.getLength());
+               } catch (BadLocationException x) {
+                       return;
+               }
+
+               // draw Annotations
+               Rectangle r= new Rectangle(0, 0, 0, 0);
+               int maxLayer= 1;        // loop at least once though layers.
+
+               for (int layer= 0; layer < maxLayer; layer++) {
+                       Iterator<?> iter= fModel.getAnnotationIterator();
+                       while (iter.hasNext()) {
+                               IAnnotationPresentation annotationPresentation= null;
+                               Annotation annotation= (Annotation) iter.next();
+
+                               int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
+                               if (annotationAccessExtension != null)
+                                       lay= annotationAccessExtension.getLayer(annotation);
+                               else if (annotation instanceof IAnnotationPresentation) {
+                                       annotationPresentation= (IAnnotationPresentation)annotation;
+                                       lay= annotationPresentation.getLayer();
+                               }
+                               maxLayer= Math.max(maxLayer, lay+1);    // dynamically update layer maximum
+                               if (lay != layer)       // wrong layer: skip annotation
+                                       continue;
+
+                               Position position= fModel.getPosition(annotation);
+                               if (position == null)
+                                       continue;
+
+                               if (!position.overlapsWith(topLeft, viewPort))
+                                       continue;
+
+                               try {
+
+                                       int offset= position.getOffset();
+                                       int length= position.getLength();
+
+                                       int startLine= doc.getLineOfOffset(offset);
+                                       if (startLine < topLine)
+                                               startLine= topLine;
+
+                                       int endLine= startLine;
+                                       if (length > 0)
+                                               endLine= doc.getLineOfOffset(offset + length - 1);
+                                       if (endLine > bottomLine)
+                                               endLine= bottomLine;
+
+                                       startLine -= topLine;
+                                       endLine -= topLine;
+
+                                       r.x= 0;
+                                       r.y= JFaceTextUtil.computeLineHeight(styledText, 0, startLine, startLine)  - fScrollPos;
+                                       
+                                       r.width= d.x;
+                                       int lines= endLine - startLine;
+                                       
+                                       r.height= JFaceTextUtil.computeLineHeight(styledText, startLine, endLine + 1, (lines+1));
+
+                                       if (r.y < d.y && annotationAccessExtension != null)  // annotation within visible area
+                                               annotationAccessExtension.paint(annotation, gc, fCanvas, r);
+                                       else if (annotationPresentation != null)
+                                               annotationPresentation.paint(gc, fCanvas, r);
+
+                               } catch (BadLocationException e) {
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Draws the vertical ruler w/o drawing the Canvas background. Uses
+        * <code>ITextViewerExtension5</code> for its implementation. Will replace
+        * <code>doPaint(GC)</code>.
+        *
+        * @param gc  the GC to draw into
+        */
+       protected void doPaint1(GC gc) {
+
+               if (fModel == null || fTextViewer == null)
+                       return;
+
+               IAnnotationAccessExtension annotationAccessExtension= null;
+               if (fAnnotationAccess instanceof IAnnotationAccessExtension)
+                       annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess;
+
+               ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+               StyledText textWidget= fTextViewer.getTextWidget();
+
+               fScrollPos= textWidget.getTopPixel();
+               Point dimension= fCanvas.getSize();
+
+               // draw Annotations
+               Rectangle r= new Rectangle(0, 0, 0, 0);
+               int maxLayer= 1;        // loop at least once through layers.
+
+               for (int layer= 0; layer < maxLayer; layer++) {
+                       Iterator<?> iter= fModel.getAnnotationIterator();
+                       while (iter.hasNext()) {
+                               IAnnotationPresentation annotationPresentation= null;
+                               Annotation annotation= (Annotation) iter.next();
+
+                               int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
+                               if (annotationAccessExtension != null)
+                                       lay= annotationAccessExtension.getLayer(annotation);
+                               else if (annotation instanceof IAnnotationPresentation) {
+                                       annotationPresentation= (IAnnotationPresentation)annotation;
+                                       lay= annotationPresentation.getLayer();
+                               }
+                               maxLayer= Math.max(maxLayer, lay+1);    // dynamically update layer maximum
+                               if (lay != layer)       // wrong layer: skip annotation
+                                       continue;
+
+                               Position position= fModel.getPosition(annotation);
+                               if (position == null)
+                                       continue;
+
+                               IRegion widgetRegion= extension.modelRange2WidgetRange(new Region(position.getOffset(), position.getLength()));
+                               if (widgetRegion == null)
+                                       continue;
+
+                               int startLine= extension.widgetLineOfWidgetOffset(widgetRegion.getOffset());
+                               if (startLine == -1)
+                                       continue;
+
+                               int endLine= extension.widgetLineOfWidgetOffset(widgetRegion.getOffset() + Math.max(widgetRegion.getLength() -1, 0));
+                               if (endLine == -1)
+                                       continue;
+
+                               r.x= 0;
+                               r.y= JFaceTextUtil.computeLineHeight(textWidget, 0, startLine, startLine)  - fScrollPos;
+                               
+                               r.width= dimension.x;
+                               int lines= endLine - startLine;
+                               
+                               r.height= JFaceTextUtil.computeLineHeight(textWidget, startLine, endLine + 1, lines+1);
+
+                               if (r.y < dimension.y && annotationAccessExtension != null)  // annotation within visible area
+                                       annotationAccessExtension.paint(annotation, gc, fCanvas, r);
+                               else if (annotationPresentation != null)
+                                       annotationPresentation.paint(gc, fCanvas, r);
+                       }
+               }
+       }
+
+       /**
+        * Thread-safe implementation.
+        * Can be called from any thread.
+        */
+       /*
+        * @see IVerticalRuler#update()
+        */
+       public void update() {
+               if (fCanvas != null && !fCanvas.isDisposed()) {
+                       Display d= fCanvas.getDisplay();
+                       if (d != null) {
+                               d.asyncExec(new Runnable() {
+                                       public void run() {
+                                               redraw();
+                                       }
+                               });
+                       }
+               }
+       }
+
+       /**
+        * Redraws the vertical ruler.
+        */
+       private void redraw() {
+               if (fCanvas != null && !fCanvas.isDisposed()) {
+                       GC gc= new GC(fCanvas);
+                       doubleBufferPaint(gc);
+                       gc.dispose();
+               }
+       }
+
+       /*
+        * @see IVerticalRuler#setModel(IAnnotationModel)
+        */
+       /** {@inheritDoc} */
+       public void setModel(IAnnotationModel model) {
+               if (model != fModel) {
+
+                       if (fModel != null)
+                               fModel.removeAnnotationModelListener(fInternalListener);
+
+                       fModel= model;
+
+                       if (fModel != null)
+                               fModel.addAnnotationModelListener(fInternalListener);
+
+                       update();
+               }
+       }
+
+       /*
+        * @see IVerticalRuler#getModel()
+        */
+       /**
+        * <p>getModel</p>
+        *
+        * @return a {@link org.eclipse.jface.text.source.IAnnotationModel} object.
+        */
+       public IAnnotationModel getModel() {
+               return fModel;
+       }
+
+       /*
+        * @see IVerticalRulerInfo#getWidth()
+        */
+       /**
+        * <p>getWidth</p>
+        *
+        * @return a int.
+        */
+       public int getWidth() {
+               return fWidth;
+       }
+
+       /*
+        * @see IVerticalRulerInfo#getLineOfLastMouseButtonActivity()
+        */
+       /**
+        * <p>getLineOfLastMouseButtonActivity</p>
+        *
+        * @return a int.
+        */
+       public int getLineOfLastMouseButtonActivity() {
+               return fLastMouseButtonActivityLine;
+       }
+
+       /*
+        * @see IVerticalRulerInfo#toDocumentLineNumber(int)
+        */
+       /** {@inheritDoc} */
+       public int toDocumentLineNumber(int y_coordinate) {
+               if (fTextViewer == null  || y_coordinate == -1)
+                       return -1;
+
+               StyledText text= fTextViewer.getTextWidget();
+               int line= text.getLineIndex(y_coordinate);
+               
+               if (line == text.getLineCount() - 1) {
+                       // check whether y_coordinate exceeds last line
+                       if (y_coordinate > text.getLinePixel(line + 1))
+                               return -1;
+               }
+               
+               return widgetLine2ModelLine(fTextViewer, line);
+       }
+
+       /**
+        * Returns the line of the viewer's document that corresponds to the given widget line.
+        *
+        * @param viewer the viewer
+        * @param widgetLine the widget line
+        * @return the corresponding line of the viewer's document
+        * @since 2.1
+        */
+       protected final static int widgetLine2ModelLine(ITextViewer viewer, int widgetLine) {
+
+               if (viewer instanceof ITextViewerExtension5) {
+                       ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
+                       return extension.widgetLine2ModelLine(widgetLine);
+               }
+
+               try {
+                       IRegion r= viewer.getVisibleRegion();
+                       IDocument d= viewer.getDocument();
+                       return widgetLine += d.getLineOfOffset(r.getOffset());
+               } catch (BadLocationException x) {
+               }
+               return widgetLine;
+       }
+
+       /*
+        * @see IVerticalRulerExtension#setFont(Font)
+        * @since 2.0
+        */
+       /** {@inheritDoc} */
+       public void setFont(Font font) {
+       }
+
+       /*
+        * @see IVerticalRulerExtension#setLocationOfLastMouseButtonActivity(int, int)
+        * @since 2.0
+        */
+       /** {@inheritDoc} */
+       public void setLocationOfLastMouseButtonActivity(int x, int y) {
+               fLastMouseButtonActivityLine= toDocumentLineNumber(y);
+       }
+
+       /**
+        * Adds the given mouse listener.
+        *
+        * @param listener the listener to be added
+        * @deprecated will be removed
+        * @since 2.0
+        */
+       public void addMouseListener(MouseListener listener) {
+               if (fCanvas != null && !fCanvas.isDisposed())
+                       fCanvas.addMouseListener(listener);
+       }
+
+       /**
+        * Removes the given mouse listener.
+        *
+        * @param listener the listener to be removed
+        * @deprecated will be removed
+        * @since 2.0
+        */
+       public void removeMouseListener(MouseListener listener) {
+               if (fCanvas != null && !fCanvas.isDisposed())
+                       fCanvas.removeMouseListener(listener);
+       }
+
+       /**
+        * <p>Setter for the field <code>icon</code>.</p>
+        *
+        * @param icon a {@link org.eclipse.swt.graphics.Image} object.
+        */
+       public void setIcon(Image icon) {
+               this.icon = icon;
+               redraw();
+       }
+}
+       
index e755f5759ad78e90200cdcb08db5cf1e5aedf993..13871a951594edb86e59d81045014c54e32616ca 100644 (file)
@@ -2,13 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: OSGI-INF/l10n/plugin
 Export-Package: eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.editor.handler,
  eu.etaxonomy.taxeditor.editor.internal,
+ eu.etaxonomy.taxeditor.editor.key.polytomous,
  eu.etaxonomy.taxeditor.editor.name,
  eu.etaxonomy.taxeditor.editor.name.handler,
  eu.etaxonomy.taxeditor.editor.view.concept,
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
new file mode 100644 (file)
index 0000000..9b2fa83
--- /dev/null
@@ -0,0 +1,37 @@
+CreateDerivateContextMenu_ADD=Add...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Media Specimen with existing media
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Media Specimen
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=No child derivatives
+CreateDerivateContextMenu_SEQUENCE=Consensus Sequence
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Specimen
+CreateDerivateContextMenu_TISSUE_SAMPLE=Tissue Sample
+
+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=Derivative Editor
+DerivateView_SAVING_HIERARCHY=Saving hierarchy
+DerivateView_UNSAVED_CHANGES=View has unsaved changes
+DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
+
+DeleteDerivateOperation_AND_CHILDREN= and its children
+DeleteDerivateOperation_CONFIRM=Confirm Deletion
+DeleteDerivateOperation_DELETE_FAILED=Deletion failed
+DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
+
+DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
+
+DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
+DerivateViewEditorInput_NO_ROOT=No root element found\!
+
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
+
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Derivative Editor
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
diff --git a/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
new file mode 100644 (file)
index 0000000..2fc5cfc
--- /dev/null
@@ -0,0 +1,37 @@
+CreateDerivateContextMenu_ADD=Hinzufügen...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Media Specimen mit vorhandender Mediadatei
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Media Specimen
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
+CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Beleg
+CreateDerivateContextMenu_TISSUE_SAMPLE=Gewebeprobe
+
+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=Derivat-Editor
+DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
+DerivateView_UNSAVED_CHANGES=Ungepeicherte Ã„nderungen
+DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
+
+DeleteDerivateOperation_CONFIRM=Löschen bestätigen
+DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
+DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
+DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
+
+DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
+
+DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
+DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
+
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
+
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Derivat-Editor nicht Ã¶ffnen
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
index 1c03030fc915ddc834cf1df4280e190e31a92032..8281fca55730c8e4d81a2fa766ff092f498fea7d 100644 (file)
@@ -9,7 +9,7 @@ editor.name.1 = Key
 editor.name.2 = Polytomous Key Graph Editor\r
 editor.name.3 = Polytomous Key List Editor\r
 editor.name.4 = Cdm Authority Editor\r
-editor.name.5 = Derivative View\r
+editor.name.5 = Derivative Editor\r
 view.name = Factual Data\r
 view.name.0 = Uses\r
 view.name.1 = Media\r
@@ -112,7 +112,7 @@ command.name.32 = Create Concept Relation
 command.name.33 = Open Related Concept\r
 category.name.7 = -- Group\r
 command.name.34 = Edit CDM Authorities\r
-command.name.35 = Open Derivative View\r
+command.name.35 = Open Derivative Editor\r
 scheme.description = The default key binding scheme for the Taxonomic Editor\r
 scheme.name = Taxonomic Editor Default Key Bindings\r
 editor.name.6 = Specimen Import Editor\r
index 8c098c37d1ef2755eed2653be8f0e0114b075ec4..a4d096a11d103606e828005e75ba6cb461142e33 100644 (file)
@@ -112,7 +112,7 @@ command.name.32 = Erstelle Konzeptrelationen
 command.name.33 = \u00d6ffne verbundenes Konzept
 category.name.7 = -- Gruppe
 command.name.34 = Bearbeite CDM Rechte
-command.name.35 = \u00d6ffne Derivate Ansicht
+command.name.35 = \u00d6ffne Derivat-Editor
 scheme.description = Die Standard Tastenkombinationsschema f\u00fcr den Taxonomischen Editor
 scheme.name = Taxonomic Editor Standard Tastenkombinationen
 editor.name.6 = Specimen Import Editor
@@ -139,8 +139,8 @@ marker.field.2 = Attribut
 marker.field.3 = Problematischer Wert
 marker.field.4 = Problembeschreibung
 marker.field.5 = Validierer
-marker.field.6 = Entit�tsklasse
-marker.field.7 = Entit�ts ID
+marker.field.6 = Entit\u00e4tsklasse
+marker.field.7 = Entit\u00e4ts ID
 extension.name.0 = Validierungs-Fehler
 command.label.51 = \u00d6ffne Specimen-Editor
 command.label.52 = L\u00f6schen
index 65d48bae536842cd7d76985773f77ae134851e3f..17a5b049048252c4a6b4c41bee895d67cbf1b017 100644 (file)
@@ -111,7 +111,6 @@ command.name.32 = Create Concept Relation
 command.name.33 = Open Related Concept\r
 category.name.7 = -- Group\r
 command.name.34 = Edit CDM Authorities\r
-command.name.35 = Open Derivate View\r
 scheme.description = The default key binding scheme for the Taxonomic Editor\r
 scheme.name = Taxonomic Editor Default Key Bindingseditor.name.6 = Specimen Import Editor\r
 editor.name.7 = Gbif Import Editor\r
index b9a3d50db54a0e6946d6ef4b413333c62c4b3d6a..66def47309837982fcbfaea4fa1efb79fc917fc0 100644 (file)
                   <reference
                         definitionId="isFeatureNodeContainer">
                   </reference>
-               </or>
+                   <reference
+                        definitionId="isDescriptionElement">
+                  </reference>
+              </or>
             </visibleWhen>
          </command>
          <separator
             </test>
          </with>
       </definition>
+      <definition
+            id="isSequence">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSequence">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isSingleRead">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleRead">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             properties="isGroupEditor"
             type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            id="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            properties="isSequence,isSingleRead"
+            type="org.eclipse.jface.viewers.IStructuredSelection">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.bindings">   
index 309747a6a55545011018b33a7f7c96508c6b7b35..26a62da35b01e4d6aa73e9649f47b27aa889ebb1 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-    <version>3.7.1</version>
+    <version>3.8.0</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
index c9350145261000221c842ae1127f8c5d96779a32..e87142c40ea62fbe582d74221d87aa1d5b932a1a 100644 (file)
@@ -168,7 +168,9 @@ public class EditorUtil extends AbstractUtility {
         }
                TaxonEditorInput input = TaxonEditorInput
                                .NewInstanceFromTaxonBase(taxonBaseUuid);
-               open(input);
+               if(input!=null){
+                   open(input);
+               }
        }
 
        /**
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
new file mode 100644 (file)
index 0000000..34684d1
--- /dev/null
@@ -0,0 +1,58 @@
+// $Id$
+/**
+ * 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 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 DeleteDerivateOperation_AND_CHILDREN;
+    public static String DeleteDerivateOperation_CONFIRM;
+    public static String DeleteDerivateOperation_DELETE_FAILED;
+    public static String DeleteDerivateOperation_REALLY_DELETE;
+    public static String DerivateDropListener_MOVE_TO;
+    public static String DerivateView_DERIVATIVE_EDITOR;
+    public static String DerivateView_SAVING_HIERARCHY;
+    public static String DerivateView_UNSAVED_CHANGES;
+    public static String DerivateView_YOU_NEED_TO_SAVE;
+    public static String DerivateViewEditorInput_FAIL_INIT;
+    public static String DerivateViewEditorInput_NO_ROOT;
+    public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
+    public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
+    public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
+    public static String OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN;
+    public static String OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
+    public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
+    public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
+    public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
+    public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
index 94107c24aa62579a0771388f9ed03a5724d1d099..74e264dc5ec66cf1fb4a4b8ac7ed7e2c1dcb6cc8 100644 (file)
@@ -86,11 +86,6 @@ public class MultiPageTaxonEditor extends FormEditor implements
                super.dispose();
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
-        */
        /** {@inheritDoc} */
        @Override
        protected void addPages() {
@@ -173,28 +168,11 @@ public class MultiPageTaxonEditor extends FormEditor implements
                firePropertyChange(PROP_DIRTY);
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.ui.part.MultiPageEditorPart#isDirty()
-        */
-       /**
-        * <p>
-        * isDirty
-        * </p>
-        *
-        * @return a boolean.
-        */
        @Override
     public boolean isDirty() {
                return dirty;
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.ui.forms.editor.FormEditor#editorDirtyStateChanged()
-        */
        /** {@inheritDoc} */
        @Override
        public void editorDirtyStateChanged() {
@@ -210,11 +188,6 @@ public class MultiPageTaxonEditor extends FormEditor implements
         * place before passing property change along to
         * <code>super.handlePropertyChange(int propertyId)</code>.
         */
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.ui.part.MultiPageEditorPart#handlePropertyChange(int)
-        */
        @Override
     protected void handlePropertyChange(int propertyId) {
                if (propertyId == PROP_DIRTY) {
@@ -312,9 +285,6 @@ public class MultiPageTaxonEditor extends FormEditor implements
         setPartName();
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
-     */
     @Override
     public void forceDirty() {
         changed(null);
@@ -329,60 +299,19 @@ public class MultiPageTaxonEditor extends FormEditor implements
                return input.getTaxon();
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder
-        * ()
-        */
-       /**
-        * <p>
-        * getConversationHolder
-        * </p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *         object.
-        */
        @Override
     public ConversationHolder getConversationHolder() {
                return conversation;
        }
 
-       /**
-        * <p>
-        * setConversationHolder
-        * </p>
-        *
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        */
        public void setConversationHolder(ConversationHolder conversation) {
                this.conversation = conversation;
        }
 
-       /**
-        * <p>
-        * Getter for the field <code>undoContext</code>.
-        * </p>
-        *
-        * @return a {@link org.eclipse.core.commands.operations.IUndoContext}
-        *         object.
-        */
        public IUndoContext getUndoContext() {
                return undoContext;
        }
 
-       /**
-        * <p>
-        * Setter for the field <code>undoContext</code>.
-        * </p>
-        *
-        * @param undoContext
-        *            a {@link org.eclipse.core.commands.operations.IUndoContext}
-        *            object.
-        */
        public void setUndoContext(IUndoContext undoContext) {
                this.undoContext = undoContext;
        }
@@ -397,14 +326,7 @@ public class MultiPageTaxonEditor extends FormEditor implements
                getActiveEditor().setFocus();
        }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu
-     * .etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
-     */
-    /** {@inheritDoc} */
+       /** {@inheritDoc} */
     @Override
     public void update(CdmDataChangeMap events) {
         if (dataChangeBehavior == null) {
@@ -414,13 +336,6 @@ public class MultiPageTaxonEditor extends FormEditor implements
         DataChangeBridge.handleDataChange(events, dataChangeBehavior);
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation
-     * ()
-     */
     /** {@inheritDoc} */
     @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
@@ -496,13 +411,6 @@ public class MultiPageTaxonEditor extends FormEditor implements
                return editorPage != null && editorPage.redraw(focus);
        }
 
-       /**
-        * <p>
-        * onComplete
-        * </p>
-        *
-        * @return a boolean.
-        */
        @Override
     public boolean onComplete() {
                return false;
@@ -549,4 +457,9 @@ public class MultiPageTaxonEditor extends FormEditor implements
                }
                return true;
        }
+
+       @Override
+       public boolean canAttachMedia() {
+           return true;
+       }
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java
new file mode 100644 (file)
index 0000000..eb3995c
--- /dev/null
@@ -0,0 +1,52 @@
+package eu.etaxonomy.taxeditor.editor.handler;
+
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
+
+import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+
+
+
+/**
+ * Tests types of specimens to add items to the context menu.
+ *
+ * @author pplitzner
+ * @author BenStoever
+ */
+public class SpecimenPropertyTester extends PropertyTester {
+    private static final String SEQUENCE = "isSequence";
+    private static final String SINGLE_READ = "isSingleRead";
+
+
+    public SpecimenPropertyTester() {}
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+        if (receiver instanceof IStructuredSelection) {
+            IStructuredSelection selection = (IStructuredSelection) receiver;
+            TreeNode treeNodeOfSelection = EditorUtil.getTreeNodeOfSelection(selection);
+            if (treeNodeOfSelection!=null) {
+                if (SEQUENCE.equals(property)) {
+                    return isSequence(treeNodeOfSelection.getValue());
+                }
+                else if (SINGLE_READ.equals(property)) {
+                       return isSingleReadAlignment(treeNodeOfSelection.getValue());
+                }
+            }
+        }
+        return false;
+    }
+
+       private boolean isSequence(Object object) {
+       return (object instanceof Sequence);
+       }
+
+       private boolean isSingleReadAlignment(Object object) {
+       return (object instanceof SingleRead);
+    }
+}
index 5fc0b2b9a7398afbfecf0dc27e8f399364f39646..7b9a605cf3719f445a17a58678363142ff271d39 100644 (file)
@@ -83,6 +83,7 @@ public class KeyEditor extends FormEditor implements IConversationEnabled,
 
        @Override
        public void setFocus() {
+               getConversationHolder().commit(true);
                getConversationHolder().bind();
                super.setFocus();
        }
index ceae45d69d43fd57c6ea825e9928e868b7ac14f8..dc81964bcb980a3f797810c654c7f6c6b073264f 100644 (file)
@@ -345,7 +345,8 @@ public class PolytomousKeyListEditor extends EditorPart implements
        @Override
        public boolean postOperation(CdmBase objectAffectedByOperation) {
                viewer.refresh();
-
+               getConversationHolder().bind();
+               getConversationHolder().commit(true);
                editor.changed(objectAffectedByOperation);
 
                if (objectAffectedByOperation != null) {
index 3b4ae0d7ab1d1bcad784e2b7d041f4eabee34ad3..f31a83125aa62cf9cf7d9846550908e69a0b318d 100644 (file)
@@ -12,9 +12,12 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -52,15 +55,27 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
                controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
                
                IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
-               
+               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?")) {
-                               service.delete(node.getUuid(), false);
+                               result = service.delete(node.getUuid(), false);
                        } else{
-                               service.delete(node.getUuid(), true);
+                               result = service.delete(node.getUuid(), true);
                        }
                } else{
-                       service.delete(node.getUuid(), true);
+                       result = service.delete(node.getUuid(), true);
+               }
+               
+               if (!result.isOk() || result.getExceptions().size() > 0){
+                       Exception t = new Exception();
+                       if (result.getExceptions().size() >1){
+                               for (Exception e:result.getExceptions()){
+                                       t.addSuppressed(e);
+                               }
+                       }else {
+                               t = result.getExceptions().iterator().next();
+                       }
+                       MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
                }
                return postExecute(null);
        }
index a74d15d44c56ca2ddcb11d95df5fc740297d1631..5be66c8bce3a9913d602e7e09673efd28c78891d 100644 (file)
@@ -21,6 +21,9 @@ import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
+ * Input for {@link DataImportEditor}. This class queries a data source for
+ * occurrences and passes them to the editor.
+ *
  * @author pplitzner
  * @date 25.02.2014
  *
@@ -35,65 +38,40 @@ public abstract class DataImportEditorInput<T> implements IEditorInput {
 
     protected OccurenceQuery query;
 
-    /**
-     * @param results
-     */
     public DataImportEditorInput() {
         this.conversationHolder = CdmStore.createConversation();
     }
 
-
-    /* (non-Javadoc)
-     * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-     */
     @Override
     public Object getAdapter(Class adapter) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IEditorInput#exists()
-     */
     @Override
     public boolean exists() {
         return false;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
-     */
     @Override
     public ImageDescriptor getImageDescriptor() {
         // TODO Auto-generated method stub
         return null;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IEditorInput#getPersistable()
-     */
     @Override
     public IPersistableElement getPersistable() {
         return null;
     }
 
-    /**
-     * @return the results
-     */
     public Collection<T> getResults() {
         return results;
     }
 
-    /**
-     * @param results the results to set
-     */
     public void setResults(Collection<T> results) {
         this.results = results;
     }
 
-    /**
-     * @return the conversationHolder
-     */
     public ConversationHolder getConversationHolder() {
         return conversationHolder;
     }
index ed7c89cc0cf3313004d0ee90754c186585ec99ec..3aaf22c5269c7e72b2681852295ae285da873d1f 100644 (file)
@@ -26,9 +26,6 @@ import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
  */
 public class GbifImportEditorInput extends DataImportEditorInput<GbifResponse> {
 
-    /**
-     * @param query
-     */
     public GbifImportEditorInput(OccurenceQuery query) {
         super();
         this.query = query;
@@ -50,25 +47,16 @@ public class GbifImportEditorInput extends DataImportEditorInput<GbifResponse> {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IEditorInput#getName()
-     */
     @Override
     public String getName() {
         return "[GBIF] " + query.toString();
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IEditorInput#getToolTipText()
-     */
     @Override
     public String getToolTipText() {
         return "[GBIF] " + query.toString();
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -77,9 +65,6 @@ public class GbifImportEditorInput extends DataImportEditorInput<GbifResponse> {
         return result;
     }
 
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
     @Override
     public boolean equals(Object obj) {
         if (this == obj) {
index caa6991897609acb5672a25d1935bddccf132a7b..aebdee8f95469a89c17da851e339333ae2b726eb 100644 (file)
@@ -18,6 +18,7 @@ import org.springframework.transaction.TransactionStatus;
 import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
+import eu.etaxonomy.cdm.api.service.IAnnotationService;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.api.service.ICollectionService;
 import eu.etaxonomy.cdm.api.service.ICommonService;
@@ -409,4 +410,12 @@ public class TransientCdmRepository implements ICdmApplicationConfiguration {
        public IEntityValidationService getEntityValidationService() {
                return defaultApplicationConfiguration.getEntityValidationService();
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getAnnotationService()
+     */
+    @Override
+    public IAnnotationService getAnnotationService() {
+        return defaultApplicationConfiguration.getAnnotationService();
+    }
 }
index 9459d7799f9fdfe5181c62f31fd2f922f27e7e78..07fdcf242c6dcb7a32a98cd34f2f451152bed0e9 100644 (file)
@@ -245,22 +245,6 @@ public class TransientClassificationService implements IClassificationService {
         return defaultService.getPreviousAuditEvent(t);
     }
 
-    /**
-     * @param classification
-     * @param rank
-     * @param limit
-     * @param start
-     * @param propertyPaths
-     * @return
-     * @deprecated
-     * @see eu.etaxonomy.cdm.api.service.IClassificationService#loadRankSpecificRootNodes(eu.etaxonomy.cdm.model.taxon.Classification, eu.etaxonomy.cdm.model.name.Rank, java.lang.Integer, java.lang.Integer, java.util.List)
-     */
-    @Deprecated
-    @Override
-    public List<TaxonNode> loadRankSpecificRootNodes(Classification classification, Rank rank, Integer limit, Integer start, List<String> propertyPaths) {
-        return defaultService.loadRankSpecificRootNodes(classification, rank, limit, start, propertyPaths);
-    }
-
     /**
      * @param clazz
      * @return
@@ -966,4 +950,6 @@ public class TransientClassificationService implements IClassificationService {
         return defaultService.merge(arg0);
     }
 
+
+
 }
index ebcd3128c38605bd094c12d1f99ad408e7b7f0fe..4640d7e3a52c2de8bf037dcd0cbd6b81cd7fea3b 100644 (file)
@@ -1075,11 +1075,12 @@ public class TransientDescriptionService implements IDescriptionService {
      * @param descriptionElements
      * @param targetDescription
      * @param isPaste
+     * @return
      * @see eu.etaxonomy.cdm.api.service.IDescriptionService#moveDescriptionElementsToDescription(java.util.Collection, eu.etaxonomy.cdm.model.description.DescriptionBase, boolean)
      */
     @Override
-    public void moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isPaste) {
-        defaultService.moveDescriptionElementsToDescription(descriptionElements, targetDescription, isPaste);
+    public UpdateResult moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isPaste) {
+        return defaultService.moveDescriptionElementsToDescription(descriptionElements, targetDescription, isPaste);
     }
 
     /* (non-Javadoc)
@@ -1179,4 +1180,20 @@ public class TransientDescriptionService implements IDescriptionService {
         return defaultService.merge(arg0);
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IDescriptionService#moveDescriptionElementsToDescription(java.util.Set, java.util.UUID, boolean)
+     */
+    @Override
+    public UpdateResult moveDescriptionElementsToDescription(Set<UUID> arg0, UUID arg1, boolean arg2) {
+        return defaultService.moveDescriptionElementsToDescription(arg0, arg1, arg2);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IDescriptionService#moveDescriptionElementsToDescription(java.util.Set, java.util.UUID, java.lang.String, boolean)
+     */
+    @Override
+    public UpdateResult moveDescriptionElementsToDescription(Set<UUID> arg0, UUID arg1, String arg2, boolean arg3) {
+        return defaultService.moveDescriptionElementsToDescription(arg0, arg1, arg2, arg3);
+    }
+
 }
index e2a30d9226a6150fcb788ca67ff7c80003e9c6fc..4b5d0106a9ccb5add07c05655a1f249ba7dccfa3 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
@@ -864,13 +865,9 @@ public class TransientOccurenceService implements IOccurrenceService {
                 maxDepth, pageSize, pageNumber, orderHints, propertyPaths);
     }
 
-    @Override
-    public boolean moveDerivate(SpecimenOrObservationBase<?> from, SpecimenOrObservationBase<?> to, DerivedUnit derivate) {
-        return defaultService.moveDerivate(from, to, derivate);
-    }
 
     @Override
-    public boolean moveSequence(DnaSample from, DnaSample to, Sequence sequence) {
+    public UpdateResult moveSequence(DnaSample from, DnaSample to, Sequence sequence) {
         return defaultService.moveSequence(from, to, sequence);
     }
 
@@ -1016,5 +1013,45 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.merge(arg0);
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#deleteDerivateHierarchy(java.util.UUID, eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator)
+     */
+    @Override
+    public DeleteResult deleteDerivateHierarchy(UUID arg0, SpecimenDeleteConfigurator arg1) {
+        return defaultService.deleteDerivateHierarchy(arg0, arg1);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#deleteSingleRead(java.util.UUID, java.util.UUID)
+     */
+    @Override
+    public DeleteResult deleteSingleRead(UUID arg0, UUID arg1) {
+        return defaultService.deleteSingleRead(arg0, arg1);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveDerivate(java.util.UUID, java.util.UUID, java.util.UUID)
+     */
+    @Override
+    public UpdateResult moveDerivate(UUID arg0, UUID arg1, UUID arg2) {
+        return defaultService.moveDerivate(arg0, arg1, arg2);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveDerivate(eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase, eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase, eu.etaxonomy.cdm.model.occurrence.DerivedUnit)
+     */
+    @Override
+    public boolean moveDerivate(SpecimenOrObservationBase<?> from, SpecimenOrObservationBase<?> to, DerivedUnit derivate) {
+        return defaultService.moveDerivate(from, to, derivate);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#moveSequence(java.util.UUID, java.util.UUID, java.util.UUID)
+     */
+    @Override
+    public UpdateResult moveSequence(UUID arg0, UUID arg1, UUID arg2) {
+        return defaultService.moveSequence(arg0, arg1, arg2);
+    }
+
 
 }
index b191647d838a123ed117900bf00d401a175a643e..fac79adfb19e9ea1e0875118ee202a6ebcba5980 100644 (file)
@@ -1453,7 +1453,7 @@ public class TransientTaxonService implements ITaxonService {
      * {@inheritDoc}
      */
     @Override
-    public SynonymRelationship moveSynonymToAnotherTaxon(
+    public UpdateResult moveSynonymToAnotherTaxon(
             SynonymRelationship oldSynonymRelation, UUID newTaxonUUID,
             boolean moveHomotypicGroup,
             SynonymRelationshipType newSynonymRelationshipType,
@@ -1496,4 +1496,31 @@ public class TransientTaxonService implements ITaxonService {
     public DeleteResult deleteSynonym(UUID arg0, SynonymDeletionConfigurator arg1) {
         return defaultService.deleteSynonym(arg0, arg1);
     }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeRelatedTaxonToSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType)
+     */
+    @Override
+    public UpdateResult changeRelatedTaxonToSynonym(UUID arg0, UUID arg1, TaxonRelationshipType arg2,
+            SynonymRelationshipType arg3) throws DataChangeNoRollbackException {
+        return defaultService.changeRelatedTaxonToSynonym(arg0, arg1, arg2, arg3);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeSynonymToRelatedTaxon(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.reference.Reference, java.lang.String)
+     */
+    @Override
+    public UpdateResult changeSynonymToRelatedTaxon(UUID arg0, UUID arg1, TaxonRelationshipType arg2, Reference arg3,
+            String arg4) {
+        return defaultService.changeSynonymToRelatedTaxon(arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeSynonymToAcceptedTaxon(java.util.UUID, java.util.UUID, java.util.UUID, boolean, boolean, eu.etaxonomy.cdm.model.reference.Reference, java.lang.String)
+     */
+    @Override
+    public UpdateResult changeSynonymToAcceptedTaxon(UUID arg0, UUID arg1, UUID arg2, boolean arg3, boolean arg4,
+            Reference arg5, String arg6) throws HomotypicalGroupChangeException {
+        return defaultService.changeSynonymToAcceptedTaxon(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    }
 }
index c597eca6c8d21910272feb68ca94b23a994d7b54..e96e5badff0627d016287900d2a1a63a0dc9a7e2 100644 (file)
@@ -33,9 +33,6 @@ public class DerivateDragListener extends DragSourceAdapter{
         this.derivateView = derivateView;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.swt.dnd.DragSourceAdapter#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)
-     */
     @Override
     public void dragSetData(DragSourceEvent event) {
         if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
@@ -44,14 +41,11 @@ public class DerivateDragListener extends DragSourceAdapter{
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
-     */
     @Override
     public void dragStart(DragSourceEvent event) {
         if(derivateView.isDirty()){
             event.doit = false;
-            MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+            MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
             return;
         }
         ISelection selection = derivateView.getViewer().getSelection();
index 55b2f77520e58795c8e91288fd7a4c61e482d366..4b5a12a5b147235a8e8af8196cf7db2768566fee 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.TransferData;
 
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.operation.MoveDerivateOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -36,13 +37,10 @@ public class DerivateDropListener extends ViewerDropAdapter {
         this.derivateView = derivateView;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
-     */
     @Override
     public boolean performDrop(Object data) {
         if(derivateView.isDirty()){
-            MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+            MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
             return false;
         }
         Object target = getCurrentTarget();
@@ -51,16 +49,13 @@ public class DerivateDropListener extends ViewerDropAdapter {
             TreeNode targetNode = (TreeNode) target;
             TreeNode draggedNode = EditorUtil.getTreeNodeOfSelection(derivateViewSelection.getSelection());
             if(draggedNode!=null){
-                MoveDerivateOperation moveDerivateOperation = new MoveDerivateOperation("Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\"", EditorUtil.getUndoContext(), derivateView, draggedNode, targetNode);
+                MoveDerivateOperation moveDerivateOperation = new MoveDerivateOperation(String.format(Messages.DerivateDropListener_MOVE_TO, derivateView.getLabelProvider().getDerivateText(draggedNode), derivateView.getLabelProvider().getDerivateText(targetNode)), EditorUtil.getUndoContext(), derivateView, draggedNode, targetNode);
                 return AbstractUtility.executeOperation(moveDerivateOperation).equals(Status.OK_STATUS)?true:false;
             }
         }
         return false;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
-     */
     @Override
     public boolean validateDrop(Object target, int operation, TransferData transferType) {
         return LocalSelectionTransfer.getTransfer().isSupportedType(transferType) && target instanceof TreeNode;
index 7548960d901fee8e5cf57967c11d847e1f60866a..d7fcc56f8d710cd59e31b4c7d2f0a926a006b217 100644 (file)
@@ -39,6 +39,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.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
@@ -57,7 +58,10 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         IConversationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
         ISelectionChangedListener, IPostOperationEnabled {
 
-    public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView";
+    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 ConversationHolder conversation;
 
@@ -79,9 +83,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
     public DerivateView() {
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
-     */
     @Override
     public void createPartControl(Composite parent) {
         viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION));
@@ -123,15 +124,12 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.addDropSupport(dndOperations, transfers, new DerivateDropListener(this));
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void doSave(IProgressMonitor monitor) {
-        String taskName = "Saving hierarchy";
+        String taskName = Messages.DerivateView_SAVING_HIERARCHY;
         if(getEditorInput() instanceof DerivateViewEditorInput){
             DerivateViewEditorInput derivateViewEditorInput = (DerivateViewEditorInput) getEditorInput();
-            taskName += " "+derivateViewEditorInput.getName();
+            taskName += " "+derivateViewEditorInput.getName(); //$NON-NLS-1$
         }
         monitor.beginTask(taskName, 3);
         if (!conversation.isBound()) {
@@ -150,28 +148,19 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         refreshTree();
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#doSaveAs()
-     */
     @Override
     public void doSaveAs() {
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#getTitleToolTip()
-     */
     @Override
     public String getTitleToolTip() {
         if(getEditorInput() instanceof DerivateViewEditorInput){
             DerivateViewEditorInput derivateViewEditorInput = (DerivateViewEditorInput) getEditorInput();
             return derivateViewEditorInput.getName();
         }
-        return "Derivative View";
+        return Messages.DerivateView_DERIVATIVE_EDITOR;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
-     */
     @Override
     public void init(IEditorSite site, IEditorInput input) throws PartInitException {
         setSite(site);
@@ -183,9 +172,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#isDirty()
-     */
     @Override
     public boolean isDirty() {
         return isDirty;
@@ -198,18 +184,11 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         this.isDirty = isDirty;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
-     */
     @Override
     public boolean isSaveAsAllowed() {
         return false;
     }
 
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
-     */
     @Override
     public void setFocus() {
         viewer.getControl().setFocus();
@@ -219,16 +198,10 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         }
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
-     */
     @Override
     public void update(CdmDataChangeMap changeEvents) {
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-     */
     @Override
     public ConversationHolder getConversationHolder() {
         return conversation;
@@ -241,9 +214,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return viewer;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#changed(java.lang.Object)
-     */
     @Override
     public void changed(Object element) {
         setDirty(true);
@@ -251,9 +221,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.refresh();
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
-     */
     @Override
     public void forceDirty() {
         changed(null);
@@ -281,7 +248,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.refresh();
     }
 
-
     private void generateMultiLinkSingleReads() {
         Set<SingleRead> multiLinkSingleReads = new HashSet<SingleRead>();
         for(Entry<SingleRead, Collection<Sequence>> entry:CdmStore.getService(ISequenceService.class).getSingleReadSequencesMap().entrySet()){
@@ -299,9 +265,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return this.multiLinkSingleReads;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-     */
     @Override
     public void selectionChanged(SelectionChangedEvent event) {
         this.selection  = event.getSelection();
@@ -315,9 +278,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return labelProvider;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
-     */
     @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
         refreshTree();
@@ -327,12 +287,14 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return true;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
-     */
     @Override
     public boolean onComplete() {
         return true;
     }
 
+    @Override
+    public boolean canAttachMedia() {
+        return true;
+    }
+
 }
index 7050078e1a47d191c10a4bd35d679ad14c9dd265..3527fe5edae30a358c3304dc47172eb03968da75 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
@@ -75,7 +76,7 @@ public class DerivateViewEditorInput implements IEditorInput{
             rootUUIDs = derivateUUIDs;
         }
         if(rootUUIDs.isEmpty()){
-            MessagingUtils.messageDialog("Failed initializing editor", DerivateViewEditorInput.class, "No root element found!");
+            MessagingUtils.messageDialog(Messages.DerivateViewEditorInput_FAIL_INIT, DerivateViewEditorInput.class, Messages.DerivateViewEditorInput_NO_ROOT);
         }
     }
 
@@ -138,7 +139,7 @@ public class DerivateViewEditorInput implements IEditorInput{
                     name = DerivateLabelProvider.getDerivateText(specimen, conversationHolder);
                 }
                 else{
-                    name += " + "+DerivateLabelProvider.getDerivateText(specimen, conversationHolder);
+                    name += " + "+DerivateLabelProvider.getDerivateText(specimen, conversationHolder); //$NON-NLS-1$
                 }
             }
         }
index b04582f5e453ad17148e2868bbd88099a3846f0d..2438c4325c2bdc03cf9896fc5efd4c08d2d6d8e8 100644 (file)
@@ -26,6 +26,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.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -37,9 +38,13 @@ import eu.etaxonomy.taxeditor.ui.dialog.selection.MediaSelectionDialog;
  */
 public class CreateDerivateContextMenu extends CompoundContributionItem {
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
-     */
+    private static final String SINGLE_READ = Messages.CreateDerivateContextMenu_SINGLE_READ;
+    private static final String CONSENSUS_SEQUENCE = Messages.CreateDerivateContextMenu_SEQUENCE;
+    private static final String MEDIA_SPECIMEN = Messages.CreateDerivateContextMenu_MEDIA_SPECIMEN;
+    private static final String DNA_SAMPLE = Messages.CreateDerivateContextMenu_DNA_SAMPLE;
+    private static final String TISSUE_SAMPLE = Messages.CreateDerivateContextMenu_TISSUE_SAMPLE;
+    private static final String SPECIMEN = Messages.CreateDerivateContextMenu_SPECIMEN;
+
     @Override
     protected IContributionItem[] getContributionItems() {
         IContributionItem[] contributionItems = new IContributionItem[] {
@@ -47,7 +52,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     @Override
                     public void fill(Menu menu, int index) {
                         MenuItem addItem = new MenuItem(menu, SWT.CASCADE);
-                        addItem.setText("Add...");
+                        addItem.setText(Messages.CreateDerivateContextMenu_ADD);
                         Menu addMenu = new Menu(menu);
                         addItem.setMenu(addMenu);
                         final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
@@ -56,37 +61,37 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                         if(selectedTreeNode!=null){
                             //context menu for FieldUnit
                             if(selectedTreeNode.getValue() instanceof FieldUnit){
-                                createMenuItem(addMenu, "Specimen", selectedTreeNode, DerivedUnit.class, SpecimenOrObservationType.PreservedSpecimen, DerivationEventType.GATHERING_IN_SITU());
+                                createMenuItem(addMenu, SPECIMEN, selectedTreeNode, DerivedUnit.class, SpecimenOrObservationType.PreservedSpecimen, DerivationEventType.GATHERING_IN_SITU());
                                 new MenuItem(addMenu, SWT.SEPARATOR);
-                                createMenuItem(addMenu, "Tissue Sample", selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
-                                createMenuItem(addMenu, "DNA Sample", selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
+                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
                             }
                             //context menu for Specimen
                             else if(selectedTreeNode.getValue() instanceof DerivedUnit && ((DerivedUnit)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
 
-                                createMenuItem(addMenu, "Tissue Sample", selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
-                                createMenuItem(addMenu, "DNA Sample", selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
+                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
                             }
                             //context menu for TissueSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
-                               createMenuItem(addMenu, "DnaSample", selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                               createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                               createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
+                               createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
                             }
                             //context menu for DnaSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                                createMenuItem(addMenu, "Consensus Sequence", selectedTreeNode, Sequence.class, null, null);
-                                createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, CONSENSUS_SEQUENCE, selectedTreeNode, Sequence.class, null, null);
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
                             }
                             //context menu for Sequence
                             else if(selectedTreeNode.getValue() instanceof Sequence){
-                                createMenuItem(addMenu, "Single Read", selectedTreeNode, SingleRead.class, null, null);
+                                createMenuItem(addMenu, SINGLE_READ, selectedTreeNode, SingleRead.class, null, null);
                             }
                             //default
                             else{
                                 MenuItem menuItem = new MenuItem(addMenu, SWT.NONE);
-                                menuItem.setText("No child derivates");
+                                menuItem.setText(Messages.CreateDerivateContextMenu_NO_CHILD_DERIVATE);
                                 menuItem.setEnabled(false);
                             }
                         }
@@ -102,7 +107,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
         if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.Media)){
             //media submenu
             MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
-            mediaItem.setText("Media...");
+            mediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA);
             Menu mediaMenu = new Menu(menu);
             mediaItem.setMenu(mediaMenu);
 
@@ -113,11 +118,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
 
             //existing media menu
             MenuItem existingMediaItem = new MenuItem(mediaMenu, SWT.NONE);
-            existingMediaItem.setText("Media Specimen with existing media");
+            existingMediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA_EXISTING);
             existingMediaItem.addSelectionListener(new SelectionAdapter() {
-                /* (non-Javadoc)
-                 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                 */
                 @Override
                 public void widgetSelected(SelectionEvent e) {
                     //select media
@@ -173,9 +175,6 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
             this.derivationEventType = derivationEventType;
         }
 
-        /* (non-Javadoc)
-         * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-         */
         @Override
         public void widgetSelected(SelectionEvent e) {
             DerivateView derivateView = null;
@@ -185,7 +184,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
             if(derivateView!=null){
                 if(derivateView.isDirty()){
                     e.doit = false;
-                    MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                    MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
                     return;
                 }
             }
@@ -195,7 +194,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
             if(selectedDerivate instanceof DnaSample && ((DnaSample) selectedDerivate).getRecordBasis()==SpecimenOrObservationType.DnaSample){
                 DnaSample dnaSample = (DnaSample)selectedDerivate;
                 if(childClass.equals(Sequence.class)){
-                    Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0);
+                    Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
             }
index b03172f35d895bb0de2fd1efece6f638ec2cd076..17d95b1976ecb4531358069717fe7b26b50c4dac 100644 (file)
@@ -5,9 +5,6 @@ import org.eclipse.ui.actions.CompoundContributionItem;
 
 public class DerivateViewContextMenu extends CompoundContributionItem  {
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
-     */
     @Override
     protected IContributionItem[] getContributionItems() {
         IContributionItem[] contributionItems = new IContributionItem[] {
index b3164a4586ad66bf81e18c829ad23aff663db6ef..92848bc39ba9b90f031a5c47fbf547e4fd1b817a 100644 (file)
@@ -19,6 +19,7 @@ import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -35,9 +36,6 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
         ADD_TO_SEQUENCE
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
-     */
     @Override
     protected IContributionItem[] getContributionItems() {
         IContributionItem[] contributionItems = new IContributionItem[] {
@@ -54,17 +52,17 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
                             if(selectedTreeNode.getValue() instanceof Sequence
                                     && clipboardNode!=null && clipboardNode.getValue() instanceof SingleRead){
                                 MenuItem item = new MenuItem(menu, SWT.NONE);
-                                item.setText("Reuse SingleRead here");
+                                item.setText(Messages.SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE);
                                 item.addSelectionListener(new WidgetSelectionListener(CommandType.ADD_TO_SEQUENCE));
                             }
                             else if(selectedTreeNode.getValue() instanceof SingleRead){
                                 MenuItem item = new MenuItem(menu, SWT.NONE);
-                                item.setText("Reuse for other Sequence");
+                                item.setText(Messages.SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE);
                                 item.addSelectionListener(new WidgetSelectionListener(CommandType.COPY_TO_CLIPBOARD));
                                 if(activeEditor instanceof DerivateView
                                         && ((DerivateView) activeEditor).getMultiLinkSingleReads().contains(selectedTreeNode.getValue())){
                                     MenuItem unlinkItem = new MenuItem(menu, SWT.NONE);
-                                    unlinkItem.setText("Remove from this Sequence");
+                                    unlinkItem.setText(Messages.SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE);
                                     unlinkItem.addSelectionListener(new WidgetSelectionListener(CommandType.REMOVE_FROM_SEQUENCE));
                                 }
                             }
@@ -87,9 +85,6 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
             this.commandType = commandType;
         }
 
-        /* (non-Javadoc)
-         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-         */
         @Override
         public void widgetSelected(SelectionEvent e) {
             IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
@@ -100,7 +95,7 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
             switch (commandType) {
             case REMOVE_FROM_SEQUENCE:
                 if(activeEditor.isDirty()){
-                    MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                    MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
                     return;
                 }
                 if(selectedTreeNode!=null && selectedTreeNode.getParent()!=null &&
@@ -118,7 +113,7 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
                 break;
             case ADD_TO_SEQUENCE:
                 if(activeEditor.isDirty()){
-                    MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                    MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
                     return;
                 }
                 if(clipBoardTreeNode!=null && clipBoardTreeNode.getValue() instanceof SingleRead
index da8c8db71c764714d20eb03b4df65af6ea54f6cf..e57cbfbf728e562f367b2b2657fb5176270cea01 100644 (file)
@@ -19,7 +19,7 @@ public class CreateFieldUnitHandler extends AbstractHandler {
         if(AbstractUtility.getActivePart() instanceof DerivateView){
             DerivateView derivateView = (DerivateView)AbstractUtility.getActivePart();
             if(derivateView.isDirty()){
-                MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
                 return null;
             }
             FieldUnit fieldUnit = FieldUnit.NewInstance();
index 1f429451b3cd0f2842b1b4e4bc9f1f408f245f3d..28d7f2bd627fd109c98ab2463dc27083d5e89ab3 100644 (file)
@@ -42,9 +42,6 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
  */
 public class DeleteDerivateHandler extends AbstractHandler {
 
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-     */
     /** {@inheritDoc} */
     @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -66,10 +63,10 @@ public class DeleteDerivateHandler extends AbstractHandler {
                     if(value instanceof SpecimenOrObservationBase<?> || value instanceof Sequence || value instanceof SingleRead){
                         if(postOperationEnabled instanceof IConversationEnabled){
                             ConversationHolder conversationHolder = ((IConversationEnabled) postOperationEnabled).getConversationHolder();
-                            label += " "+DerivateLabelProvider.getDerivateText(value, conversationHolder);
+                            label += " "+DerivateLabelProvider.getDerivateText(value, conversationHolder); //$NON-NLS-1$
                         }
                         SpecimenDeleteConfigurator config = new SpecimenDeleteConfigurator();
-                        boolean deepDelete = event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivate.deepDelete");
+                        boolean deepDelete = event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivate.deepDelete"); //$NON-NLS-1$
                         config.setDeleteChildren(deepDelete);
                         config.setDeleteMolecularData(deepDelete);
                         DeleteDerivateOperation deleteDerivateOperation = new DeleteDerivateOperation(label, undoContext, (CdmBase) value, (TreeNode) object, postOperationEnabled, config);
@@ -82,7 +79,7 @@ public class DeleteDerivateHandler extends AbstractHandler {
             }
 
         } catch (NotDefinedException e) {
-            MessagingUtils.warn(getClass(), "Command name not set.");
+            MessagingUtils.warn(getClass(), "Command name not set");
         }
         return null;
     }
index 5f29227659bd535f89c4bc3708723831b6f2f646..7b30737f96d682aa6d861142b8a59274e7bfac1b 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -40,6 +41,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class OpenDerivateEditorForTaxonHandler extends AbstractHandler {
 
+    private static final String COULD_NOT_OPEN_DERIVATIVE_EDITOR = Messages.OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
+
     /* (non-Javadoc)
      * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
      */
@@ -61,16 +64,16 @@ public class OpenDerivateEditorForTaxonHandler extends AbstractHandler {
                 }
             }
             if(derivateUuids.isEmpty()){
-                MessagingUtils.warningDialog("Could not open Derivative Editor", this, "No Derivatives found");
+                MessagingUtils.warningDialog(COULD_NOT_OPEN_DERIVATIVE_EDITOR, this, Messages.OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND);
                 return null;
             }
             DerivateViewEditorInput input = new DerivateViewEditorInput(derivateUuids);
             try {
                 EditorUtil.open(input);
             } catch (PartInitException e) {
-                MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open Derivative Editor", e);
+                MessagingUtils.error(OpenDerivateViewHandler.class, COULD_NOT_OPEN_DERIVATIVE_EDITOR, e);
             } catch (NullPointerException npe){
-                MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open Derivative Editor. The derivative hierarchy is corrupted!", npe);
+                MessagingUtils.messageDialog(Messages.OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN, OpenDerivateViewHandler.class, Messages.OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED, npe);
             }
         }
         return null;
index c467a943e007f923330bb62fdee50b8681b1a0c4..839beb546d070ffa28c4062b2b2678a1a412566e 100644 (file)
@@ -24,6 +24,7 @@ import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -60,16 +61,16 @@ public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
     @Override
     public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         if(getPostOperationEnabled() instanceof ISaveablePart){
-            String confirmationQuestion = "Do you really want to delete the selected element";
+            String confirmationQuestion = Messages.DeleteDerivateOperation_REALLY_DELETE;
             if(deleteConfigurator.isDeleteChildren()){
-                confirmationQuestion += " and its children";
+                confirmationQuestion += Messages.DeleteDerivateOperation_AND_CHILDREN;
             }
-            confirmationQuestion += "?";
-            if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, "Confirm Deletion", confirmationQuestion)){
+            confirmationQuestion += "?"; //$NON-NLS-1$
+            if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfigurator, null, Messages.DeleteDerivateOperation_CONFIRM, confirmationQuestion)){
                 return Status.CANCEL_STATUS;
             }
             if(((ISaveablePart) getPostOperationEnabled()).isDirty()){
-                MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
                 return Status.CANCEL_STATUS;
             }
         }
@@ -97,7 +98,7 @@ public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
             }
         }
         else{
-            MessagingUtils.warningDialog("Deletion failed", this, deleteResult.toString());
+            MessagingUtils.warningDialog(Messages.DeleteDerivateOperation_DELETE_FAILED, this, deleteResult.toString());
             return Status.CANCEL_STATUS;
         }
         return Status.OK_STATUS;
index b863dcbe28a14aa047007dccf5189f11df1cd582..5a1756b9c04ae433f1d157d4947f8c195861d4f0 100644 (file)
@@ -28,6 +28,7 @@ import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -53,9 +54,6 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         this.targetNode = targetNode;
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         DerivateView derivateView = null;
@@ -63,11 +61,11 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
             derivateView = (DerivateView) getPostOperationEnabled();
         }
         if(derivateView==null){
-            MessagingUtils.operationDialog(this, new NullPointerException("DerivativeView was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel());
+            MessagingUtils.operationDialog(this, new NullPointerException("Derivative Editor was null"), TaxeditorEditorPlugin.PLUGIN_ID, this.getLabel(), getLabel()); //$NON-NLS-1$
             return Status.CANCEL_STATUS;
         }
         if(derivateView.isDirty()){
-            MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+            MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
             return Status.CANCEL_STATUS;
         }
 
@@ -79,7 +77,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
             return postExecute(null);
         }
         else{
-            MessagingUtils.warningDialog("Moving derivatives not possible!", derivateView, "Moving \""+derivateView.getLabelProvider().getDerivateText(draggedNode)+"\" to \""+derivateView.getLabelProvider().getDerivateText(targetNode)+"\" is not possible!");
+            MessagingUtils.warningDialog(Messages.MoveDerivateOperation_MOVE_NOT_POSSIBLE, derivateView, String.format(Messages.MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE, derivateView.getLabelProvider().getDerivateText(draggedNode), derivateView.getLabelProvider().getDerivateText(targetNode)));
         }
         return Status.CANCEL_STATUS;
     }
@@ -109,7 +107,7 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof SingleRead && targetNodeValue instanceof Sequence){
             SingleRead singleRead = (SingleRead) draggedNodeValue;
             if(fromParentSpecimen instanceof Sequence){
-                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead);
+                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead).isOk();
             }
         }
 
@@ -117,16 +115,12 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
             Sequence sequence = (Sequence)draggedNodeValue;
             if(fromParentSpecimen instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence);
+                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence).isOk();
             }
         }
         return false;
     }
 
-
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         //swap fromNode and targetNode
@@ -134,9 +128,6 @@ public class MoveDerivateOperation extends AbstractPostOperation<CdmBase>  {
         return execute(new NullProgressMonitor(), null);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         //swap fromNode and targetNode
index 9a801a4d412797995c6899f6ae3f8c6045152438..3c1fee4fb25fe4fedafaefdb96797c876f3bb951 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * 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.
 */
@@ -25,7 +25,6 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.AnnotationType;
@@ -34,13 +33,13 @@ import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
-import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
@@ -48,7 +47,6 @@ 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.selection.TaxonBaseSelectionDialog;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
 
@@ -65,31 +63,31 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               
+
 //             ConversationHolder conversation = CdmStore.createConversation();
                editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(Page.NAME);
                ISelection selection = HandlerUtil.getCurrentSelection(event);
-               
+               Taxon actualTaxon= null;
                if(selection instanceof IStructuredSelection){
 
                        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-                       
+
                        List<DescriptionElementBase> elements = new ArrayList<DescriptionElementBase>();
-                       
+
                        for(Object element : structuredSelection.toArray()){
                                if(element instanceof DescriptionElementBase){
                                        UUID uuid = ((DescriptionElementBase) element).getUuid();
-                                       
+
                                        elements.add(CdmStore.getService(IDescriptionService.class).loadDescriptionElement(uuid, null));
                                } else if(element instanceof FeatureNodeContainer){
                                        for(DescriptionElementBase de : ((FeatureNodeContainer)element).getDescriptionElements()){
                                                elements.add(
-                                                               (DescriptionElementBase)CdmStore.getService(IDescriptionService.class).loadDescriptionElement(de.getUuid(), null)
+                                                               CdmStore.getService(IDescriptionService.class).loadDescriptionElement(de.getUuid(), null)
                                                        );
                                        }
                                }
                        }
-                       
+
                        if(elements.size() == 0){
                                return null;
                        }
@@ -97,45 +95,51 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                        List<UUID> excludeTaxa = new ArrayList<UUID>();
                        if (description.isInstanceOf(TaxonDescription.class)){
                                TaxonDescription taxonDescription = HibernateProxyHelper.deproxy(description, TaxonDescription.class);
-                               Taxon actualTaxon = taxonDescription.getTaxon();
+                               actualTaxon = taxonDescription.getTaxon();
                                excludeTaxa.add(actualTaxon.getUuid());
                        }
-                       
-                       
+                       Classification classification = null;
+                       if (actualTaxon != null){
+                           if (!actualTaxon.getTaxonNodes().isEmpty() && actualTaxon.getTaxonNodes().size() ==1){
+                               classification = actualTaxon.getTaxonNodes().iterator().next().getClassification();
+                           }
+                       }
                        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
                                        editor.getConversationHolder(),
                                        "Choose the accepted taxon",
                                        excludeTaxa,
-                                       null,
-                                       null);
-                       Taxon targetTaxon = newAcceptedTaxonNode.getTaxon();
-                       
-                       if(targetTaxon == null){
-                               // canceled
-                               return null;
-                       }
-                       newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();                      
-                       TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
-                       String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
-                       targetDescription.setTitleCache(moveMessage, true);
-                       Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
-                       annotation.setAnnotationType(AnnotationType.TECHNICAL());
-                       targetDescription.addAnnotation(annotation);
-                       
-                       try {
-                               AbstractPostOperation operation = new MoveDescriptionElementsOperation(
-                                               event.getCommand().getName(), EditorUtil.getUndoContext(), 
-                                               targetDescription, elements, false, this);
-                               
-                               EditorUtil.executeOperation(operation);
-                               
-                               //CdmStore.getService(ITaxonService.class).saveOrUpdate(targetTaxon);
-                               
-                       } catch (NotDefinedException e) {
-                               MessagingUtils.error(getClass(), e);
+                                       null,classification
+                                       );
+                       if (newAcceptedTaxonNode != null){
+                       Taxon targetTaxon = newAcceptedTaxonNode.getTaxon();
+
+                       if(targetTaxon == null){
+                               // canceled
+                               return null;
+                       }
+                       newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();
+                       TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
+                       String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
+                       targetDescription.setTitleCache(moveMessage, true);
+                       Annotation annotation = Annotation.NewInstance(moveMessage, Language.getDefaultLanguage());
+                       annotation.setAnnotationType(AnnotationType.TECHNICAL());
+                       targetDescription.addAnnotation(annotation);
+
+                       try {
+                               AbstractPostOperation operation = new MoveDescriptionElementsOperation(
+                                               event.getCommand().getName(), EditorUtil.getUndoContext(),
+                                               targetDescription, elements, false, this);
+
+                               EditorUtil.executeOperation(operation);
+
+                               //CdmStore.getService(ITaxonService.class).saveOrUpdate(targetTaxon);
+
+                       } catch (NotDefinedException e) {
+                               MessagingUtils.error(getClass(), e);
+                       }
                        }
                }
-               
+
                return null;
        }
 
@@ -145,11 +149,12 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
        /** {@inheritDoc} */
        @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
-               
+
                editor.getConversationHolder().bind();
                editor.getConversationHolder().commit(true);
                Display.getDefault().asyncExec(new Runnable(){
-                       
+
+            @Override
             public void run() {
                                //AbstractUtility.close(editor.getMultiPageTaxonEditor());
 
@@ -178,5 +183,5 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                // TODO Auto-generated method stub
                return false;
        }
-       
+
 }
index 07cbd473dc5f8a3dd3f4f78d1e2b1bd17d2e64ce..e0520f0027b906427b9f20dc9a5b5934a63d08de 100644 (file)
@@ -40,24 +40,17 @@ import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
 import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
 
 /**
- * <p>MediaViewPart class.</p>
- *
  * @author n.hoffmann
  * @created Jun 15, 2010
  * @version 1.0
  */
 public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData {
 
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.medi"{trunked}</code> */
        public static final String ID = "eu.etaxonomy.taxeditor.editor.view.media";
 
 
        private TreeViewer viewer;
 
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.AbstractCdmViewPart#createViewer(org.eclipse.swt.widgets.Composite)
-        */
        /** {@inheritDoc} */
        @Override
        public void createViewer(Composite parent) {
@@ -83,9 +76,6 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
 
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.AbstractCdmViewPart#getInitialSelection()
-        */
        /** {@inheritDoc} */
        @Override
        protected ISelection getInitialSelection() {
@@ -112,26 +102,25 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
             return;
         }
 
-               if(part instanceof IPartContentHasMedia){
+               if(part instanceof IPartContentHasMedia && ((IPartContentHasMedia) part).canAttachMedia()){
                    if(part instanceof MultiPageTaxonEditor){
                        IEditorInput input = ((IEditorPart) part).getEditorInput();
                        showViewer(part, new StructuredSelection(input));
+                       return;
                    }
                    else if(selection instanceof IStructuredSelection){
                        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
                        if(firstElement instanceof TreeNode){
                            showViewer(part, new StructuredSelection(((TreeNode) firstElement).getValue()));
+                           return;
                        }
-                       else{
+                       else if(firstElement!=null){
                            showViewer(part, (IStructuredSelection) selection);
+                           return;
                        }
-                   }else{
-                       showEmptyPage();
                    }
                }
-               else{
-                   showEmptyPage();
-               }
+               showEmptyPage();
        }
 
        /** {@inheritDoc} */
@@ -158,11 +147,6 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
                return viewer;
        }
 
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
-        */
        @Override
     public boolean onComplete() {
                return true;
index 4c3f86c24d363bf30614e09d049474982ec831ca..7c50d3ecb03b125d3140944f571e120b1347fa2b 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.platform"
       label="Taxeditor Dependencies"
-      version="3.7.1"
+      version="3.8.0"
       os="linux,macosx,win32"
       ws="cocoa,gtk,win32"
       arch="x86,x86_64">
index 0405f3a8dbade69ae7a7012a034a51bdd683bdfe..dfa11f2bc46ba8f98ec234259223030938be1a8d 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.7.1</version>
+               <version>3.8.0</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
index 73564880ab8a98167a170b6ea6baf7e95a4185d6..421dda37b47695e7305d74400a71e3d3e1ac2a72 100644 (file)
@@ -8,4 +8,4 @@ root.win32.win32.x86_64.permissions.755=jre/bin/**
 root.win32.win32.x86=win-32
 root.win32.win32.x86.permissions.755=jre/bin/**
 root.macosx.cocoa.x86_64=mac-64
-root.macosx.cocoa.x86_64.permissions.755=jre/bin/**
\ No newline at end of file
+root.macosx.cocoa.x86_64.permissions.755=jre/Contents/Home/jre/bin/**
\ No newline at end of file
index 84cce12917a2d09a9c52fb91dbc99d61cec770b8..0317d51e76d5cc78bb36bab7fa6c9d9355cca860 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="3.7.1"
+      version="3.8.0"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="eu.etaxonomy.taxeditor.molecular"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="eu.etaxonomy.taxeditor.molecular.lib"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
index e5797f685a0d0d29095ed6787a78fbacbb1c0e7e..7f1d3383b18088903503105fd975553f6856a595 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.7.1</version>
+    <version>3.8.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index 66aa89c7142340e2ab969583f952498539f2e515..6c029b73d6b8e1a8eb0c4bb7f9fbcf3e73b6a4b6 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: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
index 56036e12afa0a229a396078d8a59f6a3a0db53d1..0042922f07868f6c358a4e834d0d5393a30cd552 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.7.1</version>
+               <version>3.8.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/.classpath b/eu.etaxonomy.taxeditor.molecular.lib/.classpath
new file mode 100644 (file)
index 0000000..1d66dd2
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-bio-2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-core-2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-swing-2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/bioinfweb-commons-swt-2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/core-1.9.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/libralign-biojava1-0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/libralign-core-0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/libralign-swt-0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/sequencing-1.9.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/tic-core-2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/tic-swt-2-SNAPSHOT.jar"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/.gitignore b/eu.etaxonomy.taxeditor.molecular.lib/.gitignore
new file mode 100644 (file)
index 0000000..e6066b2
--- /dev/null
@@ -0,0 +1,2 @@
+/target
+.settings/
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/.project b/eu.etaxonomy.taxeditor.molecular.lib/.project
new file mode 100644 (file)
index 0000000..45f118a
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>eu.etaxonomy.taxeditor.molecular.lib</name>
+       <comment>The Taxonomic Editor for EDIT&apos;s platform for
+    cybertaxonomy. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.molecular.lib/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..65596ff
--- /dev/null
@@ -0,0 +1,164 @@
+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: 3.8.0
+Bundle-ClassPath: .,
+ lib/bioinfweb-commons-bio-2-SNAPSHOT.jar,
+ lib/bioinfweb-commons-core-2-SNAPSHOT.jar,
+ lib/bioinfweb-commons-swing-2-SNAPSHOT.jar,
+ lib/bioinfweb-commons-swt-2-SNAPSHOT.jar,
+ lib/core-1.9.2-SNAPSHOT.jar,
+ lib/libralign-biojava1-0-SNAPSHOT.jar,
+ lib/libralign-core-0-SNAPSHOT.jar,
+ lib/libralign-swt-0-SNAPSHOT.jar,
+ lib/sequencing-1.9.2-SNAPSHOT.jar,
+ lib/tic-core-2-SNAPSHOT.jar,
+ lib/tic-swt-2-SNAPSHOT.jar
+Export-Package: info.bioinfweb.commons,
+ info.bioinfweb.commons.appversion,
+ info.bioinfweb.commons.beans,
+ info.bioinfweb.commons.bio,
+ info.bioinfweb.commons.changemonitor,
+ info.bioinfweb.commons.collections,
+ info.bioinfweb.commons.collections.observable,
+ info.bioinfweb.commons.graphics,
+ info.bioinfweb.commons.io,
+ info.bioinfweb.commons.log,
+ info.bioinfweb.commons.progress,
+ info.bioinfweb.commons.swing,
+ info.bioinfweb.commons.swing.scrollpaneselector,
+ info.bioinfweb.commons.swt,
+ info.bioinfweb.commons.text,
+ info.bioinfweb.libralign,
+ info.bioinfweb.libralign.actions,
+ info.bioinfweb.libralign.alignmentarea,
+ info.bioinfweb.libralign.alignmentarea.content,
+ info.bioinfweb.libralign.alignmentarea.label,
+ info.bioinfweb.libralign.alignmentarea.order,
+ info.bioinfweb.libralign.alignmentarea.paintsettings,
+ info.bioinfweb.libralign.alignmentarea.rowsarea,
+ info.bioinfweb.libralign.alignmentarea.selection,
+ info.bioinfweb.libralign.alignmentarea.tokenpainter,
+ info.bioinfweb.libralign.dataarea,
+ info.bioinfweb.libralign.dataarea.implementations,
+ info.bioinfweb.libralign.dataarea.implementations.charset,
+ info.bioinfweb.libralign.dataarea.implementations.pherogram,
+ info.bioinfweb.libralign.editsettings,
+ info.bioinfweb.libralign.model,
+ info.bioinfweb.libralign.model.adapters,
+ info.bioinfweb.libralign.model.concatenated,
+ info.bioinfweb.libralign.model.data,
+ info.bioinfweb.libralign.model.events,
+ info.bioinfweb.libralign.model.exception,
+ info.bioinfweb.libralign.model.factory,
+ info.bioinfweb.libralign.model.factory.continuous,
+ info.bioinfweb.libralign.model.implementations,
+ info.bioinfweb.libralign.model.implementations.swingundo,
+ info.bioinfweb.libralign.model.implementations.swingundo.edits,
+ info.bioinfweb.libralign.model.implementations.swingundo.edits.sequence,
+ info.bioinfweb.libralign.model.implementations.swingundo.edits.token,
+ info.bioinfweb.libralign.model.implementations.translation,
+ info.bioinfweb.libralign.model.tokenset,
+ info.bioinfweb.libralign.model.tokenset.continuous,
+ info.bioinfweb.libralign.multiplealignments,
+ info.bioinfweb.libralign.pherogram,
+ info.bioinfweb.libralign.pherogram.distortion,
+ info.bioinfweb.libralign.pherogram.model,
+ info.bioinfweb.libralign.pherogram.provider,
+ info.bioinfweb.libralign.pherogram.view,
+ info.bioinfweb.tic,
+ info.bioinfweb.tic.exception,
+ info.bioinfweb.tic.input,
+ info.bioinfweb.tic.toolkit,
+ info.bioinfweb.tic.toolkit.layoutdata,
+ org.biojava.bibliography,
+ org.biojava.bio,
+ org.biojava.bio.alignment,
+ org.biojava.bio.annodb,
+ org.biojava.bio.chromatogram,
+ org.biojava.bio.chromatogram.graphic,
+ org.biojava.bio.dist,
+ org.biojava.bio.dp,
+ org.biojava.bio.dp.onehead,
+ org.biojava.bio.dp.twohead,
+ org.biojava.bio.molbio,
+ org.biojava.bio.program,
+ org.biojava.bio.program.abi,
+ org.biojava.bio.program.blast2html,
+ org.biojava.bio.program.fastq,
+ org.biojava.bio.program.formats,
+ org.biojava.bio.program.gff,
+ org.biojava.bio.program.gff3,
+ org.biojava.bio.program.hmmer,
+ org.biojava.bio.program.homologene,
+ org.biojava.bio.program.indexdb,
+ org.biojava.bio.program.phred,
+ org.biojava.bio.program.scf,
+ org.biojava.bio.program.ssaha,
+ org.biojava.bio.program.ssbind,
+ org.biojava.bio.program.tagvalue,
+ org.biojava.bio.program.unigene,
+ org.biojava.bio.program.xff,
+ org.biojava.bio.program.xml,
+ org.biojava.bio.proteomics,
+ org.biojava.bio.proteomics.aaindex,
+ org.biojava.bio.search,
+ org.biojava.bio.seq,
+ org.biojava.bio.seq.db,
+ org.biojava.bio.seq.db.biofetch,
+ org.biojava.bio.seq.db.emblcd,
+ org.biojava.bio.seq.db.flat,
+ org.biojava.bio.seq.distributed,
+ org.biojava.bio.seq.filter,
+ org.biojava.bio.seq.homol,
+ org.biojava.bio.seq.impl,
+ org.biojava.bio.seq.io,
+ org.biojava.bio.seq.io.agave,
+ org.biojava.bio.seq.io.filterxml,
+ org.biojava.bio.seq.io.game,
+ org.biojava.bio.seq.io.game12,
+ org.biojava.bio.seq.projection,
+ org.biojava.bio.symbol,
+ org.biojava.bio.taxa,
+ org.biojava.directory,
+ org.biojava.naming,
+ org.biojava.ontology,
+ org.biojava.ontology.io,
+ org.biojava.ontology.obo,
+ org.biojava.stats.svm,
+ org.biojava.stats.svm.tools,
+ org.biojava.utils,
+ org.biojava.utils.automata,
+ org.biojava.utils.cache,
+ org.biojava.utils.candy,
+ org.biojava.utils.io,
+ org.biojava.utils.lsid,
+ org.biojava.utils.math,
+ org.biojava.utils.net,
+ org.biojava.utils.process,
+ org.biojava.utils.regex,
+ org.biojava.utils.stax,
+ org.biojava.utils.walker,
+ org.biojava.utils.xml,
+ org.biojavax,
+ org.biojavax.bio,
+ org.biojavax.bio.alignment,
+ org.biojavax.bio.alignment.blast,
+ org.biojavax.bio.db,
+ org.biojavax.bio.db.ncbi,
+ org.biojavax.bio.seq,
+ org.biojavax.bio.seq.io,
+ org.biojavax.bio.taxa,
+ org.biojavax.bio.taxa.io,
+ org.biojavax.ga,
+ org.biojavax.ga.exception,
+ org.biojavax.ga.functions,
+ org.biojavax.ga.impl,
+ org.biojavax.ga.util,
+ org.biojavax.ontology,
+ org.biojavax.utils,
+ org.jdesktop.swingx.scrollpaneselector
+Bundle-ActivationPolicy: lazy
+Import-Package: javax.swing
+Require-Bundle: org.eclipse.swt
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/build.properties b/eu.etaxonomy.taxeditor.molecular.lib/build.properties
new file mode 100644 (file)
index 0000000..97e80af
--- /dev/null
@@ -0,0 +1,12 @@
+bin.includes = META-INF/,\
+               lib/bioinfweb-commons-bio-2-SNAPSHOT.jar,\
+               lib/bioinfweb-commons-core-2-SNAPSHOT.jar,\
+               lib/bioinfweb-commons-swing-2-SNAPSHOT.jar,\
+               lib/bioinfweb-commons-swt-2-SNAPSHOT.jar,\
+               lib/core-1.9.2-SNAPSHOT.jar,\
+               lib/libralign-biojava1-0-SNAPSHOT.jar,\
+               lib/libralign-core-0-SNAPSHOT.jar,\
+               lib/libralign-swt-0-SNAPSHOT.jar,\
+               lib/sequencing-1.9.2-SNAPSHOT.jar,\
+               lib/tic-core-2-SNAPSHOT.jar,\
+               lib/tic-swt-2-SNAPSHOT.jar
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/lib/.gitignore b/eu.etaxonomy.taxeditor.molecular.lib/lib/.gitignore
new file mode 100644 (file)
index 0000000..0557829
--- /dev/null
@@ -0,0 +1 @@
+/*.jar
diff --git a/eu.etaxonomy.taxeditor.molecular.lib/pom.xml b/eu.etaxonomy.taxeditor.molecular.lib/pom.xml
new file mode 100644 (file)
index 0000000..2b6e964
--- /dev/null
@@ -0,0 +1,184 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>eu.etaxonomy.taxeditor</groupId>
+  <artifactId>eu.etaxonomy.taxeditor.molecular.lib</artifactId>
+  <packaging>eclipse-plugin</packaging>
+  
+  <parent>
+    <groupId>eu.etaxonomy</groupId>
+    <artifactId>taxeditor-parent</artifactId>
+    <version>3.8.0</version>
+  </parent>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.4</version>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              <includeArtifactIds>libralign-swt, libralign-core,
+                bioinfweb-commons-swt, bioinfweb-commons-core,
+                bioinfweb-commons-bio, bioinfweb-commons-swing,
+                tic-core, libralign-biojava1, core, sequencing, tic-swt</includeArtifactIds>
+              <outputDirectory>lib</outputDirectory>
+              <overWriteReleases>true</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+              <excludeTransitive>true</excludeTransitive>
+            </configuration>
+          </execution>
+          <!-- <execution> -->
+          <!-- <id>copy-dependencies-sources</id> -->
+          <!-- <phase>validate</phase> -->
+          <!-- <goals> -->
+          <!-- <goal>copy-dependencies</goal> -->
+          <!-- </goals> -->
+          <!-- <configuration> -->
+          <!-- <classifier>sources</classifier> -->
+          <!-- <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds> -->
+          <!-- <outputDirectory>lib</outputDirectory> -->
+          <!-- <overWriteReleases>true</overWriteReleases> -->
+          <!-- <overWriteSnapshots>true</overWriteSnapshots> -->
+          <!-- <excludeTransitive>true</excludeTransitive> -->
+          <!-- <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact> -->
+          <!-- </configuration> -->
+          <!-- </execution> -->
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <id>remove-existing-jars</id>
+            <phase>clean</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <echo>Remove all jars</echo>
+                <delete>
+                  <fileset dir="./lib" includes="*" />
+                </delete>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>update-snapshot-jar-names</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <echo>Update jars to SNAPSHOT when build with
+                  timestamp</echo>
+                <move todir="./lib">
+                  <fileset dir="./lib" />
+                  <mapper type="regexp" from="(^bioinfweb\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                </move>
+                <move todir="./lib">
+                  <fileset dir="./lib" />
+                  <mapper type="regexp" from="(^libralign\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                </move>
+                <move todir="./lib">
+                  <fileset dir="./lib" />
+                  <mapper type="regexp" from="(^tic\-.*\-[0-9]-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+                </move>
+                <move todir="./lib">
+                  <fileset dir="./lib" />
+                  <mapper type="regexp" from="(^core\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
+                </move>
+                <move todir="./lib">
+                  <fileset dir="./lib" />
+                  <mapper type="regexp" from="(^sequencing\-[0-9]\.[0-9]\.[0-9])(\.jar)" to="\1-SNAPSHOT\2" />
+                </move>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <!-- LibrAling -->
+    <dependency>
+      <groupId>info.bioinfweb.libralign</groupId>
+      <artifactId>libralign-core</artifactId>
+      <version>0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.libralign</groupId>
+      <artifactId>libralign-swt</artifactId>
+      <version>0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.libralign</groupId>
+      <artifactId>libralign-biojava1</artifactId>
+      <version>0-SNAPSHOT</version>
+    </dependency>
+    <!-- commons -->
+    <dependency>
+      <groupId>info.bioinfweb.commons.java</groupId>
+      <artifactId>bioinfweb-commons-swt</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.commons.java</groupId>
+      <artifactId>bioinfweb-commons-core</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.commons.java</groupId>
+      <artifactId>bioinfweb-commons-bio</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.commons.java</groupId>
+      <artifactId>bioinfweb-commons-swing</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <!-- tic -->
+    <dependency>
+      <groupId>info.bioinfweb.tic</groupId>
+      <artifactId>tic-core</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>info.bioinfweb.tic</groupId>
+      <artifactId>tic-swt</artifactId>
+      <version>2-SNAPSHOT</version>
+    </dependency>
+    <!-- biojava -->
+    <dependency>
+      <groupId>org.biojava</groupId>
+      <artifactId>core</artifactId>
+      <version>1.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.biojava</groupId>
+      <artifactId>sequencing</artifactId>
+      <version>1.9.2</version>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+    <repository>
+      <id>bioinfweb-maven-repo</id>
+      <name>bioinfweb repository</name>
+      <url>http://bioinfweb.info/MavenRepository/</url>
+    </repository>
+  </repositories>
+  
+</project> 
+
diff --git a/eu.etaxonomy.taxeditor.molecular/.classpath b/eu.etaxonomy.taxeditor.molecular/.classpath
new file mode 100644 (file)
index 0000000..f14ba2c
--- /dev/null
@@ -0,0 +1,7 @@
+<?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.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/eu.etaxonomy.taxeditor.molecular/.gitignore b/eu.etaxonomy.taxeditor.molecular/.gitignore
new file mode 100644 (file)
index 0000000..e6066b2
--- /dev/null
@@ -0,0 +1,2 @@
+/target
+.settings/
diff --git a/eu.etaxonomy.taxeditor.molecular/.project b/eu.etaxonomy.taxeditor.molecular/.project
new file mode 100644 (file)
index 0000000..3826881
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>eu.etaxonomy.taxeditor.molecular</name>
+       <comment>Provides editors, views and operations for handling molecular data and alignments. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.molecular/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..84dc5d0
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Molecular Bundle
+Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular;singleton:=true
+Bundle-Version: 3.8.0
+Bundle-Activator: eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.expressions,
+ org.eclipse.ui.ide,
+ eu.etaxonomy.taxeditor.bulkeditor,
+ eu.etaxonomy.taxeditor.cdmlib,
+ eu.etaxonomy.taxeditor.editor,
+ eu.etaxonomy.taxeditor.store,
+ eu.etaxonomy.taxeditor.molecular.lib
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: EDIT
+Export-Package: eu.etaxonomy.taxeditor.molecular,
+ eu.etaxonomy.taxeditor.molecular.editor,
+ eu.etaxonomy.taxeditor.molecular.handler
+Bundle-ClassPath: .
diff --git a/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin.properties b/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin.properties
new file mode 100644 (file)
index 0000000..e2943e3
--- /dev/null
@@ -0,0 +1,164 @@
+#Properties file for taxeditor-editor
+Bundle-Vendor.0 = EDIT
+Bundle-Name.0 = EDIT Taxonomic Editor - Editor Bundle
+command.name.17 = Set Basionym
+command.name.18 = Remove Basionym
+editor.name = Multipage Taxon Editor
+editor.name.0 = Taxon Name Editor
+editor.name.1 = Key
+editor.name.2 = Polytomous Key Graph Editor
+editor.name.3 = Polytomous Key List Editor
+editor.name.4 = Cdm Authority Editor
+editor.name.5 = Derivative View
+view.name = Factual Data
+view.name.0 = Uses
+view.name.1 = Media
+view.name.2 = Concept Relations
+view.name.3 = Concept Graph
+category.name = Taxonomic Editor
+command.label = Reference
+command.label.0 = Name
+command.label.1 = Team
+command.label.2 = Person
+command.label.3 = Specimen
+command.label.4 = Factual Data
+command.label.5 = Media
+command.label.6 = Concept
+command.label.7 = Concept Graph
+command.label.8 = Open Parent
+menu.label = New
+command.label.9 = Heterotypic Synonym
+command.label.10 = Homotypic Synonym
+command.label.11 = Synonym In Homotypical Group
+menu.label.0 = Change To
+command.label.12 = Accepted Taxon
+command.label.13 = Synonym
+command.label.14 = Misapplication
+command.label.15 = Delete
+command.label.16 = Delete All Empty Names
+command.label.17 = Swap Synonym With Accepted
+command.label.18 = Show Details
+command.label.19 = Save
+command.label.20 = New Node
+command.label.21 = Delete
+command.label.22 = Apply Layout
+command.label.23 = New Key Number
+command.label.24 = New Alternative
+command.label.25 = Refresh Nodes
+command.label.26 = Delete
+command.label.27 = New Factual Data
+menu.label.1 = New
+command.label.28 = Move Description to Taxon
+command.label.29 = Move Elements to Taxon
+command.label.30 = Delete
+command.label.31 = Save
+menu.label.2 = New Derivative
+command.label.32 = New Use
+command.label.33 = New Use Summary
+command.label.34 = New Use Record
+command.label.35 = Delete
+command.label.36 = Save
+command.label.37 = New Image Gallery
+command.label.38 = New Image
+command.label.39 = Move Image Up In List
+command.label.40 = Move Image Down In List
+command.label.41 = Delete
+command.label.42 = Save
+menu.label.3 = New
+command.label.43 = Open Related Concept
+command.label.44 = Delete
+command.label.45 = Edit Authorities
+extension.name = Name Commands
+category.name.0 = -- Name Editor
+command.name = Open Parent
+command.name.0 = Create Homotypic Synonym
+command.name.1 = Create Heterotypic Synonym
+command.name.2 = Create Synonym In Homotypical Group
+command.name.3 = Change To Synonym
+command.name.4 = Change To Accepted Taxon
+command.name.5 = Change To Misapplication
+command.name.6 = Swap Synonym With Accepted
+
+command.name.7 = Set Basionym / Original Combination
+command.name.8 = Remove Basionym / Original Combination
+command.name.9 = Delete All Empty Names
+category.name.1 = -- Factual
+command.name.10 = Create Description Element
+command.name.11 = New Description
+command.name.12 = Move Description Elements to Taxon
+command.name.13 = Move Description to Taxon
+category.name.2 = -- New Uses
+command.name.14 = New Use
+command.name.15 = New Use Summary
+command.name.16 = New Use Record
+category.name.3 = -- Media
+command.name.19 = Move Image Down In List
+command.name.20 = New Image Gallery
+command.name.21 = New Image
+command.name.22 = Move Image Up In List
+category.name.4 = -- New Entity
+command.name.23 = New Reference
+command.name.24 = New Name
+command.name.25 = New Team
+command.name.26 = New Person
+command.name.27 = New Specimen
+category.name.5 = -- Polytomous Keys
+command.name.28 = New Child Node
+command.name.29 = New Sibling Node
+command.name.30 = Refresh Node Numbering
+command.name.31 = Apply Layout
+category.name.6 = -- Concept Relations
+command.name.32 = Create Concept Relation
+command.name.33 = Open Related Concept
+category.name.7 = -- Group
+command.name.34 = Edit CDM Authorities
+command.name.35 = Open Derivative View
+scheme.description = The default key binding scheme for the Taxonomic Editor
+scheme.name = Taxonomic Editor Default Key Bindings
+editor.name.6 = Specimen Import Editor
+editor.name.7 = Gbif Import Editor
+editor.name.8 = Checklist Editor
+view.name.4 = Specimen Import
+view.name.5 = GBIF Specimen Import
+command.label.46 = Name
+command.label.47 = Reference
+command.label.48 = Datasource
+command.label.49 = Misapplication
+command.label.50 = Use Existing Image
+command.name.36 = Create Misapplication
+command.name.37 = Use Existing Image
+command.name.38 = Open Checklist Editor
+command.name.39 = New Datasource
+wizard.name = Specimen Search/Import
+wizard.description = Queries data provider for specimens with specified parameters.\nNote: Query results are currently limited to 100.
+command.name.40 = Validation
+view.name.6 = Validation
+marker.field.0 = Object Type
+marker.field.1 = Object
+marker.field.2 = Attribute
+marker.field.3 = Problematic Value
+marker.field.4 = Problem description
+marker.field.5 = Validator
+marker.field.6 = Entity Class
+marker.field.7 = Entity Id
+extension.name.0 = Validation Error
+command.label.51 = Open in Specimen Editor
+command.label.52 = Delete
+command.label.53 = Create Field Unit
+command.label.54 = Delete (with children)
+command.tooltip = Show Only Individuals Associations
+command.label.55 = Open Associated Specimens
+command.name.41 = Show Only Individual Associations
+command.name.42 = Open Taxon Editor
+command.name.43 = Create Field Unit
+command.name.44 = Deep Delete
+command.name.46 = Move Synonym (Homotypical Group) to another Accepted Taxon
+command.label.56 = Move Synonym (Homotypical Group) to another Accepted Taxon
+markerContentGenerator.name = Validation Problems Marker Generator
+command.name.45 = Delete
+command.name.47 = Delete
+commandParameter.name = taxonUUID
+Bundle-Name = Editor Bundle
+command.name.48 = delete
+command.name.49 = delete
+command.name.50 = delete
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_de.properties b/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_de.properties
new file mode 100644 (file)
index 0000000..8c098c3
--- /dev/null
@@ -0,0 +1,156 @@
+# Properties file for taxeditor-editor
+Bundle-Vendor.0 = EDIT
+Bundle-Name.0 = EDIT Taxonomischer Editor - Editor Bundle
+command.name.17 = Setze Basionym
+command.name.18 = Entferne Basionym
+editor.name = Multipage Taxon Editor
+editor.name.0 = Editor Taxonname
+editor.name.1 = Bestimmungsschl\u00fcssel
+editor.name.2 = Polytomer Bestimmungsschl\u00fcssel Graph Editor
+editor.name.3 = Polytomer Bestimmungsschl\u00fcssel List Editor
+editor.name.4 = CDM Rechtemanagement
+editor.name.5 = Ansicht Derivate
+view.name = Faktendaten
+view.name.0 = Nutzung
+view.name.1 = Medien
+view.name.2 = Konzeptrelationen
+view.name.3 = Konzeptgraph
+category.name = Taxonomischer Editor
+command.label = Referenz
+command.label.0 = Name
+command.label.1 = Team
+command.label.2 = Person
+command.label.3 = Beleg
+command.label.4 = Faktendaten
+command.label.5 = Medien
+command.label.6 = Konzeptrelationen
+command.label.7 = Konzeptgraph
+command.label.8 = \u00d6ffne Parent
+menu.label = Neue
+command.label.9 = Heterotypisches Synonym
+command.label.10 = Homotypisches Synonym
+command.label.11 = Synonym in Homotypischer Gruppe
+menu.label.0 = \u00c4ndere zu
+command.label.12 = Akzeptiertes Taxon
+command.label.13 = Synonym
+command.label.14 = Misapplication
+command.label.15 = L\u00f6schen
+command.label.16 = L\u00f6sche alle leeren Namen
+command.label.17 = Tausche Synonym mit akzeptiertem Namen
+command.label.18 = Zeige Details
+command.label.19 = Speichern
+command.label.20 = Neue Knoten
+command.label.21 = L\u00f6schen
+command.label.22 = Wende Layout an
+command.label.23 = Neue Bestimmungsschl\u00fcsselnummer
+command.label.24 = Neue Alternative
+command.label.25 = Erneuere Knoten
+command.label.26 = L\u00f6schen
+command.label.27 = Neue Faktendaten
+menu.label.1 = Neue
+command.label.28 = Verschiebe Eigenschaften zu Taxon
+command.label.29 = Verschiebe Elemente zu Taxon
+command.label.30 = L\u00f6schen
+command.label.31 = Speichern
+menu.label.2 = Neue Derivate
+command.label.32 = Neue Nutzung
+command.label.33 = Neue Zusammenfassung
+command.label.34 = Neuer Nutzungsdatensatz
+command.label.35 = L\u00f6schen
+command.label.36 = Speichern
+command.label.37 = Neue Bildergalerie
+command.label.38 = Neues Bild
+command.label.39 = Bild nach oben
+command.label.40 = Bild nach unten
+command.label.41 = L\u00f6schen
+command.label.42 = Speichern
+menu.label.3 = Neue
+command.label.43 = \u00d6ffne verbundenes Konzept
+command.label.44 = L\u00f6schen
+command.label.45 = Bearbeite Rechte
+extension.name = Namensbefehle
+category.name.0 = -- Namenseditor
+command.name = \u00d6ffne Elter
+command.name.0 = Erstelle homotypisches Synonym
+command.name.1 = Erstelle heterotypisches Synonym
+command.name.2 = Erstelle Synonym in homotypischer Gruppe
+command.name.3 = \u00c4ndere zu Synonym
+command.name.4 = \u00c4ndere zu akzeptiertem Taxon
+command.name.5 = \u00c4ndere zu Misapplication
+command.name.6 = Tausche Synonym mit akzeptiertem Namen
+
+command.name.7 = Setze Basionym / Originalkombination
+command.name.8 = Entferne Basionym / Originalkombination
+command.name.9 = L\u00f6sche alle leeren Namen
+category.name.1 = -- Fakten
+command.name.10 = Erstelle Beschreibungselement
+command.name.11 = Neue Beschreibung
+command.name.12 = Bewege Beschreibungselement zu Taxon
+command.name.13 = Bewege Beschreibung zu Taxon
+category.name.2 = -- Neue Nutzung
+command.name.14 = Neue Nutzung
+command.name.15 = Neue Zusammenfassung
+command.name.16 = Neuer Nutzungsdatensatz
+category.name.3 = -- Media
+command.name.19 = Bewege Bild nach unten
+command.name.20 = Neue Bildergalerie
+command.name.21 = Neues Bild
+command.name.22 = Bewege Bild nach oben
+category.name.4 = -- Neue Entit\u00e4t
+command.name.23 = Neue Referenz
+command.name.24 = Neuer Name
+command.name.25 = Neues Team
+command.name.26 = Neue Person
+command.name.27 = Neuer Beleg
+category.name.5 = -- Polytomer Bestimmungsschl\u00fcssel
+command.name.28 = Neue Kinderknoten
+command.name.29 = Neuer Geschwisterknoten
+command.name.30 = Knotennummerierung aktualisieren
+command.name.31 = Layout anwenden
+category.name.6 = -- Konzeptbeziehungen
+command.name.32 = Erstelle Konzeptrelationen
+command.name.33 = \u00d6ffne verbundenes Konzept
+category.name.7 = -- Gruppe
+command.name.34 = Bearbeite CDM Rechte
+command.name.35 = \u00d6ffne Derivate Ansicht
+scheme.description = Die Standard Tastenkombinationsschema f\u00fcr den Taxonomischen Editor
+scheme.name = Taxonomic Editor Standard Tastenkombinationen
+editor.name.6 = Specimen Import Editor
+editor.name.7 = GBIF Import Editor
+editor.name.8 = Checklist Editor
+view.name.4 = Specimen Import
+view.name.5 = GBIF Specimen Import
+command.label.46 = Name
+command.label.47 = Referenz
+command.label.48 = Datenquelle
+command.label.49 = Misapplication
+command.label.50 = Benutze vorhandenes Bild
+command.name.36 = Erstelle Misapplication
+command.name.37 = Benutze vorhandenes Bild
+command.name.38 = \u00d6ffne Checklist Editor
+command.name.39 = Neue Datenquelle
+wizard.name = Specimen Suche/Import
+wizard.description = Sendet eine Anfrage mit den eingegebenen Parametern an den Datenprovider.\nHinweis: Die Anzahl der Anfrageergebnisse sind auf 100 begrenzt.
+command.name.40 = Validierung
+view.name.6 = Validierung
+marker.field.0 = Objekttyp
+marker.field.1 = Objekt
+marker.field.2 = Attribut
+marker.field.3 = Problematischer Wert
+marker.field.4 = Problembeschreibung
+marker.field.5 = Validierer
+marker.field.6 = Entit�tsklasse
+marker.field.7 = Entit�ts ID
+extension.name.0 = Validierungs-Fehler
+command.label.51 = \u00d6ffne Specimen-Editor
+command.label.52 = L\u00f6schen
+command.label.53 = Neue Field Unit
+command.label.54 = L\u00f6schen (mit Kindern)
+command.tooltip = Nur Individuals Associations anzeigen
+command.label.55 = \u00d6ffne zugeh\u00f6rige Specimens
+command.name.41 = Nur Individuals Associations anzeigen
+command.name.42 = \u00d6ffne Taxon Editor
+command.name.43 = Neue Field Unit
+command.name.44 = L\u00f6schen (mit Kindern)
+command.name.46 = Verschiebe Synonym(Homotypische Gruppe) zu neuem Akzeptierten Taxon
+command.label.56 = Verschiebe Synonym(Homotypische Gruppe) zu neuem Akzeptierten Taxon
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_en.properties b/eu.etaxonomy.taxeditor.molecular/OSGI-INF/l10n/plugin_en.properties
new file mode 100644 (file)
index 0000000..897175a
--- /dev/null
@@ -0,0 +1,141 @@
+#Properties file for taxeditor-editor
+Bundle-Vendor.0 = EDIT
+Bundle-Name.0 = EDIT Taxonomic Editor - Editor Bundle
+command.name.17 = Set Basionym
+command.name.18 = Remove Basionym
+editor.name = Multipage Taxon Editor
+editor.name.0 = Taxon Name Editor
+editor.name.1 = Key
+editor.name.2 = Polytomous Key Graph Editor
+editor.name.3 = Polytomous Key List Editor
+editor.name.4 = Cdm Authority Editor
+editor.name.5 = Derivate View
+view.name = Factual Data
+view.name.0 = Uses
+view.name.1 = Media
+view.name.2 = Concept Relations
+view.name.3 = Concept Graph
+category.name = Taxonomic Editor
+command.label = Reference
+command.label.0 = Name
+command.label.1 = Team
+command.label.2 = Person
+command.label.3 = Specimen
+command.label.4 = Factual Data
+command.label.5 = Media
+command.label.6 = Concept
+command.label.7 = Concept Graph
+command.label.8 = Open Parent
+menu.label = New
+command.label.9 = Heterotypic Synonym
+command.label.10 = Homotypic Synonym
+command.label.11 = Synonym In Homotypical Group
+menu.label.0 = Change To
+command.label.12 = Accepted Taxon
+command.label.13 = Synonym
+command.label.14 = Misapplication
+command.label.15 = Delete
+command.label.16 = Delete All Empty Names
+command.label.17 = Swap Synonym With Accepted
+command.label.18 = Show Details
+command.label.19 = Save
+command.label.20 = New Node
+command.label.21 = Delete
+command.label.22 = Apply Layout
+command.label.23 = New Key Number
+command.label.24 = New Alternative
+command.label.25 = Refresh Nodes
+command.label.26 = Delete
+command.label.27 = New Factual Data
+menu.label.1 = New
+command.label.28 = Move Description to Taxon
+command.label.29 = Move Elements to Taxon
+command.label.30 = Delete
+command.label.31 = Save
+menu.label.2 = New Derivate
+command.label.32 = New Use
+command.label.33 = New Use Summary
+command.label.34 = New Use Record
+command.label.35 = Delete
+command.label.36 = Save
+command.label.37 = New Image Gallery
+command.label.38 = New Image
+command.label.39 = Move Image Up In List
+command.label.40 = Move Image Down In List
+command.label.41 = Delete
+command.label.42 = Save
+menu.label.3 = New
+command.label.43 = Open Related Concept
+command.label.44 = Delete
+command.label.45 = Edit Authorities
+extension.name = Name Commands
+category.name.0 = -- Name Editor
+command.name = Open Parent
+command.name.0 = Create Homotypic Synonym
+command.name.1 = Create Heterotypic Synonym
+command.name.2 = Create Synonym In Homotypical Group
+command.name.3 = Change To Synonym
+command.name.4 = Change To Accepted Taxon
+command.name.5 = Change To Misapplication
+command.name.6 = Swap Synonym With Accepted
+command.name.7 = Set Basionym / Original Combination
+command.name.8 = Remove Basionym / Original Combination
+command.name.9 = Delete All Empty Names
+category.name.1 = -- Factual
+command.name.10 = Create Description Element
+command.name.11 = New Description
+command.name.12 = Move Description Elements to Taxon
+command.name.13 = Move Description to Taxon
+category.name.2 = -- New Uses
+command.name.14 = New Use
+command.name.15 = New Use Summary
+command.name.16 = New Use Record
+category.name.3 = -- Media
+command.name.19 = Move Image Down In List
+command.name.20 = New Image Gallery
+command.name.21 = New Image
+command.name.22 = Move Image Up In List
+category.name.4 = -- New Entity
+command.name.23 = New Reference
+command.name.24 = New Name
+command.name.25 = New Team
+command.name.26 = New Person
+command.name.27 = New Specimen
+category.name.5 = -- Polytomous Keys
+command.name.28 = New Child Node
+command.name.29 = New Sibling Node
+command.name.30 = Refresh Node Numbering
+command.name.31 = Apply Layout
+category.name.6 = -- Concept Relations
+command.name.32 = Create Concept Relation
+command.name.33 = Open Related Concept
+category.name.7 = -- Group
+command.name.34 = Edit CDM Authorities
+command.name.35 = Open Derivate View
+scheme.description = The default key binding scheme for the Taxonomic Editor
+scheme.name = Taxonomic Editor Default Key Bindingseditor.name.6 = Specimen Import Editor
+editor.name.7 = Gbif Import Editor
+editor.name.8 = Checklist Editor
+view.name.4 = Specimen Import
+view.name.5 = GBIF Specimen Import
+command.label.46 = Name
+command.label.47 = Reference
+command.label.48 = Datasource
+command.label.49 = Misapplication
+command.label.50 = Use Existing Image
+command.name.36 = Create Misapplication
+command.name.37 = Use Existing Image
+command.name.38 = Open Checklist Editor
+command.name.39 = New Datasource
+wizard.name = Specimen Search/Import
+wizard.description = Queries data provider for specimens with specified parameters.\nNote: Query results are currently limited to 100.
+command.name.40 = Validation
+view.name.6 = Validation
+marker.field.0 = Object Type
+marker.field.1 = Object
+marker.field.2 = Attribute
+marker.field.3 = Problematic Value
+marker.field.4 = Problem description
+marker.field.5 = Validator
+marker.field.6 = Entity Class
+marker.field.7 = Entity Id
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.molecular/build.properties b/eu.etaxonomy.taxeditor.molecular/build.properties
new file mode 100644 (file)
index 0000000..bdd1c23
--- /dev/null
@@ -0,0 +1,6 @@
+bin.includes = .,\
+                          META-INF/,\
+               plugin.xml,\
+               icons/,\
+               OSGI-INF/
+source.. = src/main/java/
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/insert-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/insert-16x16.png
new file mode 100644 (file)
index 0000000..6c9bce7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/insert-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/overwrite-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/overwrite-16x16.png
new file mode 100644 (file)
index 0000000..d2aa9e2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/overwrite-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-16x16.png
new file mode 100644 (file)
index 0000000..d36e479
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-disabled-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-disabled-16x16.png
new file mode 100644 (file)
index 0000000..b7a23fa
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-left-disabled-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-16x16.png
new file mode 100644 (file)
index 0000000..4d10fb1
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-disabled-16x16.png b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-disabled-16x16.png
new file mode 100644 (file)
index 0000000..3f9fa7c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.molecular/icons/pherogram-insert-right-disabled-16x16.png differ
diff --git a/eu.etaxonomy.taxeditor.molecular/plugin.xml b/eu.etaxonomy.taxeditor.molecular/plugin.xml
new file mode 100644 (file)
index 0000000..7b968c4
--- /dev/null
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor"
+            default="false"
+            id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor"
+            name="Alignment Editor">
+      </editor>
+   </extension>
+      <extension
+            point="org.eclipse.ui.views">
+         <view
+               allowMultiple="true"
+               class="eu.etaxonomy.taxeditor.molecular.editor.PherogramViewPart"
+               id="eu.etaxonomy.taxeditor.molecular.PherogramView"
+               name="PherogramView"
+               restorable="true">
+         </view>
+      </extension>
+      <extension
+            point="org.eclipse.ui.commands">
+         <command
+               defaultHandler="eu.etaxonomy.taxeditor.molecular.handler.EditSequenceHandler"
+               id="eu.etaxonomy.taxeditor.molecular.editSequence"
+               name="Edit Sequence">
+         </command>
+         <command
+               defaultHandler="eu.etaxonomy.taxeditor.molecular.handler.ShowPherogramHandler"
+               id="eu.etaxonomy.taxeditor.molecular.showPherogram"
+               name="Show Pherogram">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramLeft"
+               name="Cut pherogram left">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramRight"
+               name="Cut pherogram right">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.reverseComplementRows"
+               name="Reverse complement selected rows">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.createConsensus"
+               name="(Re)create consensus sequence">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.updateConsensus"
+               name="Update consensus sequence">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowProbabilities"
+               name="Toggle show probability values">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowBaseCallLines"
+               name="Toggle show base call lines">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.pherogramComponent.changeQualityOutput"
+               name="Change quality output">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.loadPherogram"
+               name="Load Pherogram">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"
+               name="Toggle insert/overwrite">
+         </command>
+         <command
+               id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion"
+               name="Toggle left/right insertion in base call sequence">
+         </command>
+      </extension>
+      <extension
+            point="org.eclipse.ui.menus">
+         <menuContribution
+               locationURI="toolbar:org.eclipse.ui.main.toolbar?after=eu.etaxonomy.taxeditor.navigation.search.toolbar">
+            <toolbar
+                  id="eu.etaxonomy.taxeditor.molecular.alignmentToolbar">
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"
+                     label="Toggle insert/overwrite"
+                     style="push">
+                  <visibleWhen
+                        checkEnabled="true">
+                     <with
+                           variable="activePartId">
+                        <equals
+                              value="eu.etaxonomy.taxeditor.molecular.AlignmentEditor">
+                        </equals>
+                     </with>
+                  </visibleWhen>
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion"
+                     icon="icons/pherogram-insert-left-16x16.png"
+                     style="push">
+                  <visibleWhen
+                        checkEnabled="true">
+                     <with
+                           variable="activePartId">
+                        <equals
+                              value="eu.etaxonomy.taxeditor.molecular.AlignmentEditor">
+                        </equals>
+                     </with>
+                  </visibleWhen>
+               </command>
+            </toolbar>
+         </menuContribution>
+         <menuContribution
+               allPopups="false"
+               locationURI="menu:org.eclipse.ui.main.menu">
+            <menu
+                  label="Alignment Editor">
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.loadPherogram"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramLeft"
+                     id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramLeft"
+                     name="Cut pherogram left">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramRight"
+                     id="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramRight"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.reverseComplementRows"
+                     mnemonic="r"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.createConsensus"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.updateConsensus"
+                     style="push">
+               </command>
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="eu.etaxonomy.taxeditor.molecular.AlignmentEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </menu>
+            <menu
+                  label="Pherogram View">
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.changeQualityOutput"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowProbabilities"
+                     style="push">
+               </command>
+               <command
+                     commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowBaseCallLines"
+                     style="push">
+               </command>
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="eu.etaxonomy.taxeditor.molecular.PherogramView">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </menu>
+         </menuContribution>
+         <menuContribution
+               locationURI="popup:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView?before=eu.etaxonomy.taxeditor.editor.view.derivate.DerivateContextMenu">
+            <command
+                  commandId="eu.etaxonomy.taxeditor.molecular.editSequence"
+                  label="Edit Sequence"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <reference
+                        definitionId="isSequence">
+                  </reference>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.molecular.showPherogram"
+                  label="Show Pherogram"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <reference
+                        definitionId="isSingleRead">
+                  </reference>
+               </visibleWhen>
+            </command>
+         </menuContribution>
+      </extension>
+      <extension
+            point="org.eclipse.ui.handlers">
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.LoadPherogramHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.loadPherogram">
+            <activeWhen>
+               <with
+                     variable="activePartId">
+                  <equals
+                        value="eu.etaxonomy.taxeditor.molecular.AlignmentEditor">
+                  </equals>
+               </with>
+            </activeWhen>
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ToggleInsertOverwriteHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ToggleLeftRightInsertionHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.CutPherogramLeftHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramLeft">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.CutPherogramRightHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.cutPherogramRight">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ReverseComplementHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.reverseComplementRows">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.CreateConsensusSequenceHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.createConsensus">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.UpdateConsensusSequenceHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.updateConsensus">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ToggleShowPherogramProbabilitiesHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowProbabilities">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ToggleShowPherogramBaseCallLinesHandler"
+               commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.toggleShowBaseCallLines">
+         </handler>
+         <handler
+               class="eu.etaxonomy.taxeditor.molecular.handler.ChangePherogramQualityOutputType"
+               commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.changeQualityOutput">
+         </handler>
+      </extension>
+      <extension
+            point="org.eclipse.ui.bindings">
+         <scheme
+               description="%scheme.description"
+               id="eu.etaxonomy.taxeditor.bindings.scheme.default"
+               name="%scheme.name">
+         </scheme>
+         <key
+               commandId="eu.etaxonomy.taxeditor.molecular.AlignmentEditor.loadPherogram"
+               schemeId="eu.etaxonomy.taxeditor.bindings.scheme.default"
+               sequence="M1+O">
+         </key>
+      </extension>
+      
+</plugin>
diff --git a/eu.etaxonomy.taxeditor.molecular/pom.xml b/eu.etaxonomy.taxeditor.molecular/pom.xml
new file mode 100644 (file)
index 0000000..4611f55
--- /dev/null
@@ -0,0 +1,16 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <parent>
+    <groupId>eu.etaxonomy</groupId>
+    <artifactId>taxeditor-parent</artifactId>
+    <version>3.8.0</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>eu.etaxonomy.taxeditor.molecular</artifactId>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Molecular Bundle</name>
+  <description>Provides editors, views and operations for handling molecular data and alignments</description>
+
+</project>
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/TaxeditorMolecularPlugin.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/TaxeditorMolecularPlugin.java
new file mode 100644 (file)
index 0000000..77818ed
--- /dev/null
@@ -0,0 +1,44 @@
+package eu.etaxonomy.taxeditor.molecular;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class TaxeditorMolecularPlugin extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.molecular"; //$NON-NLS-1$
+
+       // The shared instance
+       private static TaxeditorMolecularPlugin plugin;
+
+       /**
+        * The constructor
+        */
+       public TaxeditorMolecularPlugin() {
+       }
+
+       @Override
+    public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       @Override
+    public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static TaxeditorMolecularPlugin getDefault() {
+               return plugin;
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditor.java
new file mode 100644 (file)
index 0000000..35b0a2d
--- /dev/null
@@ -0,0 +1,738 @@
+// $Id$
+/**
+* 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.molecular.editor;
+
+
+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.SequenceIndexArea;
+import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+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.AlignmentModelUtils;
+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.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;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.biojava.bio.chromatogram.ChromatogramFactory;
+import org.biojava.bio.chromatogram.UnsupportedChromatogramFormatException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.part.EditorPart;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
+import eu.etaxonomy.cdm.model.media.MediaUtils;
+import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.cdm.model.molecular.SequenceString;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;
+import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment.Shift;
+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.store.CdmStore;
+import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
+
+
+
+/**
+ * Editor component to edit a contig alignment used to combine different overlapping pherograms from Sanger sequencing to
+ * a consensus sequence.
+ * <p>
+ * The contained GUI components used to edit the alignment come from <a href="http://bioinfweb.info/LibrAlign/">LibrAlign</a>.
+ *
+ * @author Ben Stöver
+ * @author pplitzner
+ * @date 04.08.2014
+ */
+public class AlignmentEditor extends EditorPart {
+    public static final String ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor";
+
+       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";
+
+
+    private final ConversationHolder conversationHolder;
+       private final AlignmentModelChangeListener DIRTY_LISTENER = new AlignmentModelChangeListener() {
+                               @Override
+                               public <T> void afterTokenChange(TokenChangeEvent<T> e) {
+                                       setDirty();
+                               }
+
+                               @Override
+                               public <T> void afterSequenceRenamed(SequenceRenamedEvent<T> e) {
+                                       setDirty();
+                               }
+
+                               @Override
+                               public <T> void afterSequenceChange(SequenceChangeEvent<T> e) {
+                                       setDirty();
+                               }
+
+                               @Override
+                               public <T, U> void afterProviderChanged(AlignmentModel<T> oldProvider,
+                                               AlignmentModel<U> newProvider) {  // Not expected.
+
+                                       setDirty();
+                               }
+                       };
+
+    private MultipleAlignmentsContainer alignmentsContainer = null;
+    private final Map<Integer, SingleReadAlignment> cdmMap = new TreeMap<Integer, SingleReadAlignment>();  //TODO Move this to ContigSequenceDataProvider
+    private boolean dirty = false;
+
+
+    public AlignmentEditor() {
+       super();
+       conversationHolder = CdmStore.createConversation();
+       //conversationHolder = null;
+    }
+
+
+    private void refreshToolbarElement(String id) {
+               ICommandService commandService =
+                               (ICommandService)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);
+               if (commandService != null) {
+                       commandService.refreshElements(id, Collections.EMPTY_MAP);
+               }
+    }
+
+
+    private void registerEditSettingListener(MultipleAlignmentsContainer container) {
+       container.getEditSettings().addListener(new EditSettingsListener() {
+                                       @Override
+                                       public void workingModeChanged(EditSettingsChangeEvent e) {}  // Currently nothing to do
+
+                                       @Override
+                                       public void insertLeftInDataAreaChanged(EditSettingsChangeEvent e) {
+                                               updateStatusBar();
+                                       refreshToolbarElement(ToggleLeftRightInsertionHandler.COMMAND_ID);
+                                       }
+
+                                       @Override
+                                       public void insertChanged(EditSettingsChangeEvent e) {
+                                               updateStatusBar();
+                                       refreshToolbarElement(ToggleInsertOverwriteHandler.COMMAND_ID);
+                                       }
+                               });
+    }
+
+
+  private AlignmentArea createIndexArea(MultipleAlignmentsContainer container, AlignmentArea labeledArea) {
+               AlignmentArea result = new AlignmentArea(container);
+               result.setAllowVerticalScrolling(false);
+               result.getDataAreas().getTopAreas().add(new SequenceIndexArea(result.getContentArea(), labeledArea));
+               return result;
+  }
+
+
+  private AlignmentArea createEditableAlignmentArea(MultipleAlignmentsContainer container, boolean allowVerticalScrolling) {
+               AlignmentArea result = new AlignmentArea(container);
+               result.setAllowVerticalScrolling(allowVerticalScrolling);
+
+               CharacterTokenSet tokenSet = CharacterTokenSet.newDNAInstance();  //TODO Should NUCLEOTIDE be used instead?
+               AlignmentModel<Character> provider = new PackedAlignmentModel<Character>(tokenSet);
+               result.setAlignmentModel(provider, false);
+               provider.getChangeListeners().add(DIRTY_LISTENER);
+               result.getPaintSettings().getTokenPainterList().set(0, new NucleotideTokenPainter());
+
+               return result;
+       }
+
+
+    private AlignmentArea createConsensusHintArea(MultipleAlignmentsContainer container,
+               AlignmentArea labeledArea) {
+
+               AlignmentArea result = new AlignmentArea(container);
+               result.setAllowVerticalScrolling(false);
+               result.getDataAreas().getBottomAreas().add(
+                               new ConsensusSequenceArea(result.getContentArea(), labeledArea));
+               return result;
+         }
+
+
+    private MultipleAlignmentsContainer getAlignmentsContainer() {
+       if (alignmentsContainer == null) {
+               alignmentsContainer = new MultipleAlignmentsContainer();
+
+               AlignmentAreaList list = alignmentsContainer.getAlignmentAreas();
+               AlignmentArea readsArea = createEditableAlignmentArea(alignmentsContainer, true);
+           list.add(createIndexArea(alignmentsContainer, readsArea));
+               list.add(readsArea);  // Make sure READS_AREA_INDEX is correct.
+               list.add(createEditableAlignmentArea(alignmentsContainer, false));  // Make sure COMSENSUS_AREA_INDEX is correct.
+               list.add(createConsensusHintArea(alignmentsContainer, readsArea));
+
+               registerEditSettingListener(alignmentsContainer);
+               }
+               return alignmentsContainer;
+       }
+
+
+    public AlignmentArea getReadsArea() {
+       return getAlignmentsContainer().getAlignmentAreas().get(READS_AREA_INDEX);
+    }
+
+
+    private AlignmentArea getEditableConsensusArea() {
+       return getAlignmentsContainer().getAlignmentAreas().get(EDITABLE_CONSENSUS_AREA_INDEX);
+    }
+
+
+    public boolean hasPherogram(int sequenceID) {
+        return getReadsArea().getDataAreas().getSequenceAreas(sequenceID).size() > PHEROGRAM_AREA_INDEX;
+    }
+
+
+    public PherogramArea getPherogramArea(int sequenceID) {
+        if (hasPherogram(sequenceID)) {
+            return (PherogramArea)getReadsArea().getDataAreas().getSequenceAreas(sequenceID).get(PHEROGRAM_AREA_INDEX);
+        }
+        else {
+            return null;
+        }
+    }
+
+
+    private ConsensusSequenceArea getConsensusHintDataArea() {
+        return (ConsensusSequenceArea)getAlignmentsContainer().getAlignmentAreas().
+                get(CONSENSUS_HINT_AREA_INDEX).getDataAreas().getBottomAreas().
+                get(CONSENSUS_DATA_AREA_INDEX);
+    }
+
+
+    @Deprecated  //TODO Remove as soon as testing period is over
+    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/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);
+
+                       // Add test consensus sequence:
+                       AlignmentModel consensusModel = getEditableConsensusArea().getAlignmentModel();
+                       int 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"));
+                       consensusModel.insertTokensAt(id, 0, tokens);
+               }
+               catch (Exception e) {
+                       throw new RuntimeException(e);
+               }
+    }
+
+
+    private void readCDMData(Sequence sequenceNode) {
+       //TODO If called from somewhere else than createPartControl() the editorInput needs to be checked and previous contents need to be cleared (or updated).
+
+               // Add reads:
+               for (SingleReadAlignment singleReadAlignment : sequenceNode.getSingleReadAlignments()) {
+                       try {
+                               SingleRead pherogramInfo = singleReadAlignment.getSingleRead();
+                               URI uri = null;
+                               if (pherogramInfo.getPherogram() != null) {
+                                   uri = MediaUtils.getFirstMediaRepresentationPart(pherogramInfo.getPherogram()).getUri();
+                               }
+                               int id = addRead(DerivateLabelProvider.getDerivateText(pherogramInfo, conversationHolder),
+                                               uri,
+                                               singleReadAlignment.isReverseComplement(),
+                                               singleReadAlignment.getEditedSequence(),
+                                               singleReadAlignment.getFirstSeqPosition(),
+                                               singleReadAlignment.getLeftCutPosition(),
+                                               singleReadAlignment.getRightCutPosition(),
+                                               singleReadAlignment.getShifts());
+                               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" +
+                        e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID, e, false);
+                       }
+               }
+
+               // Set consensus sequence:
+               AlignmentModel consensusProvider = getEditableConsensusArea().getAlignmentModel();
+               int id = consensusProvider.addSequence(CONSENSUS_NAME);
+               consensusProvider.insertTokensAt(id, 0, AlignmentModelUtils.charSequenceToTokenList(
+                               sequenceNode.getConsensusSequence().getString(), consensusProvider.getTokenSet()));
+               //TODO Can the consensus sequence also be null? / Should it be created here, if nothing is in the DB?
+    }
+
+
+       /* (non-Javadoc)
+     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+    public void createPartControl(Composite parent) {
+               SWTComponentFactory.getInstance().getSWTComponent(getAlignmentsContainer(), parent, SWT.NONE);
+               updateStatusBar();
+
+               if (getEditorInput() instanceof AlignmentEditorInput) {
+                       if (((AlignmentEditorInput)getEditorInput()).getSequenceNodeUuid() != null) {
+                           Sequence sequenceNode = CdmStore.getService(ISequenceService.class).load(((AlignmentEditorInput)getEditorInput()).getSequenceNodeUuid());
+                       //re-load into the current session if it is already persisted in the DB
+                       if(sequenceNode!=null && sequenceNode.getId()!=0){
+                           sequenceNode = CdmStore.getService(ISequenceService.class).load(sequenceNode.getUuid());
+                       }
+                               readCDMData(sequenceNode);
+                       }
+                       else {
+                               createTestContents();  // This case will removed after the test phase and an exception should probably be thrown.
+                       }
+               }
+               else {
+                       throw new IllegalArgumentException("The editor input must have the type " +
+                                       AlignmentEditorInput.class.getCanonicalName());  //TODO What should be done here?
+               }
+       }
+
+
+    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"));
+    }
+
+
+    private SingleReadAlignment.Shift[] convertToCDMShifts(PherogramAreaModel model) {
+       Iterator<ShiftChange> iterator = model.shiftChangeIterator();
+       List<Shift> shifts = new ArrayList<SingleReadAlignment.Shift>();
+       while (iterator.hasNext()) {
+               ShiftChange shiftChange = iterator.next();
+               shifts.add(new SingleReadAlignment.Shift(shiftChange.getBaseCallIndex(), shiftChange.getShiftChange()));
+       }
+       return shifts.toArray(new Shift[]{});
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    @Override
+    public void doSave(IProgressMonitor monitor) {
+       if (getEditorInput() instanceof AlignmentEditorInput) {
+               String taskName = "Saving alignment";
+            monitor.beginTask(taskName, 3);
+
+            //re-loading sequence to avoid session conflicts
+               Sequence sequenceNode = CdmStore.getService(ISequenceService.class).load(((AlignmentEditorInput)getEditorInput()).getSequenceNodeUuid());
+               StringAdapter stringProvider = new StringAdapter(getEditableConsensusArea().getAlignmentModel(), false);  // Throws an exception if a token has more than one character.
+
+               // Write consensus sequence:
+               SequenceString consensusSequenceObj = sequenceNode.getConsensusSequence();
+               String newConsensusSequence = stringProvider.getSequence(
+                               getEditableConsensusArea().getAlignmentModel().sequenceIDByName(CONSENSUS_NAME));
+               if (consensusSequenceObj == null) {
+                       sequenceNode.setConsensusSequence(SequenceString.NewInstance(newConsensusSequence));
+               }
+               else {
+                       consensusSequenceObj.setString(newConsensusSequence);
+               }
+
+               // Write single reads:
+               stringProvider.setUnderlyingProvider(getReadsArea().getAlignmentModel());
+               sequenceNode.getSingleReadAlignments().retainAll(cdmMap.values());  // Remove all reads that are not in the alignment anymore.
+               Iterator<Integer> iterator = getReadsArea().getAlignmentModel().sequenceIDIterator();
+               while (iterator.hasNext()) {
+                       int id = iterator.next();
+                       SingleReadAlignment singleRead = cdmMap.get(id);
+                       if (singleRead == null) {
+                           throw new InternalError("Creating new reads from AlignmentEditor not implemented.");
+                               //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);
+                       }
+
+                       singleRead.setEditedSequence(stringProvider.getSequence(id));
+
+                       PherogramArea pherogramArea = getPherogramArea(id);
+                       if (pherogramArea != null) {
+                               PherogramAreaModel model = pherogramArea.getModel();
+                               singleRead.setReverseComplement(model.getPherogramProvider() instanceof ReverseComplementPherogramProvider);  // Works only if ReverseComplementPherogramProvider instances are not nested.
+                               singleRead.setShifts(convertToCDMShifts(getPherogramArea(id).getModel()));
+                               singleRead.setFirstSeqPosition(model.getFirstSeqPos());
+                               singleRead.setLeftCutPosition(model.getLeftCutPosition());
+                               singleRead.setRightCutPosition(model.getRightCutPosition());
+                       }
+               }
+
+               if (!conversationHolder.isBound()) {
+                conversationHolder.bind();
+            }
+            monitor.worked(1);
+
+            // Commit the conversation and start a new transaction immediately:
+            conversationHolder.commit(true);
+            monitor.worked(1);
+
+            dirty = false;
+            monitor.worked(1);
+            monitor.done();
+            firePropertyChange(PROP_DIRTY);
+       }
+       else {
+               //TODO Throw exception as soon as testing period which allows unlinked AlignmentEditor is over.
+       }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+     */
+    @Override
+    public void doSaveAs() {}
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+     */
+    @Override
+    public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+        setSite(site);
+        setInput(input);
+        System.out.println("AlignmentEditor.init(): " + ActionFactory.COPY.getId());
+        site.getActionBars().setGlobalActionHandler(ActionFactory.COPY.getId(), new Action(ActionFactory.COPY.getId()) {
+            @Override
+            public boolean isEnabled() {
+                System.out.println("isEnabled()");
+                return true;
+            }
+
+            @Override
+            public void run() {
+                System.out.println("run");
+                    super.run();
+                }
+            });
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.EditorPart#isDirty()
+     */
+    @Override
+    public boolean isDirty() {
+        return dirty;
+    }
+
+
+    private void setDirty() {
+       dirty = true;
+       firePropertyChange(IEditorPart.PROP_DIRTY);
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+     */
+    @Override
+    public boolean isSaveAsAllowed() {
+        return false;  // "Save as" not allowed.
+    }
+
+
+    @Override
+    public void setFocus() {
+        if(conversationHolder!=null){
+            conversationHolder.bind();
+        }
+    }
+
+
+    public boolean isInsertMode() {
+        return getAlignmentsContainer().getEditSettings().isInsert();
+    }
+
+
+    public boolean isInsertLeftInPherogram() {
+        return getAlignmentsContainer().getEditSettings().isInsertLeftInDataArea();
+    }
+
+
+    public void toggleLeftRightInsertionInPherogram() {
+       getAlignmentsContainer().getEditSettings().toggleInsertLeftInDataArea();
+    }
+
+
+    public void toggleInsertOverwrite() {
+       getAlignmentsContainer().getEditSettings().toggleInsert();
+    }
+
+
+    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.";
+        }
+        else {
+            PherogramArea pherogramArea =
+                    getPherogramArea(getReadsArea().getSequenceOrder().idByIndex(selection.getCursorRow()));
+            if (pherogramArea == null) {
+                return "There is no pherogram attached to the current sequence.";
+            }
+            else {
+                if (left) {
+                    if (pherogramArea.setLeftCutPositionBySelection()) {
+                        return null;
+                    }
+                    else {
+                        return "The left end of the selection lies outside the pherogram attached to this sequence.";
+                    }
+                }
+                else {
+                    if (pherogramArea.setRightCutPositionBySelection()) {
+                        return null;
+                    }
+                    else {
+                        return "The right end of the selection lies outside the pherogram attached to this sequence.";
+                    }
+                }
+            }
+        }
+    }
+
+
+    public String cutPherogramLeft() {
+        return cutPherogram(true);
+    }
+
+
+    public String cutPherogramRight() {
+        return cutPherogram(false);
+    }
+
+
+    public void reverseComplementSelectedSequences() {
+       SelectionModel selection = getReadsArea().getSelection();
+       AlignmentModel<?> model = getReadsArea().getAlignmentModel();
+       for (int row = selection.getFirstRow(); row < selection.getFirstRow() + selection.getCursorHeight(); row++) {
+                       int sequenceID = getReadsArea().getSequenceOrder().idByIndex(row);
+                       PherogramArea area = getPherogramArea(sequenceID);
+                       PherogramAreaModel pherogramAlignmentModel = area.getModel();
+                       AlignmentModelUtils.reverseComplement(model, sequenceID,
+                               pherogramAlignmentModel.editableIndexByBaseCallIndex(
+                                       pherogramAlignmentModel.getLeftCutPosition()).getBeforeValidIndex(),
+                               pherogramAlignmentModel.editableIndexByBaseCallIndex(
+                                       pherogramAlignmentModel.getRightCutPosition()).getAfterValidIndex());
+                       pherogramAlignmentModel.reverseComplement();
+               }
+    }
+
+
+    /**
+     * Recreates the whole consensus sequence from all single read sequences. The previous consensus
+     * sequence is overwritte.
+     */
+    @SuppressWarnings("unchecked")
+    public <T> void createConsensusSequence() {
+        ConsensusSequenceArea area = getConsensusHintDataArea();
+        AlignmentModel<T> model = (AlignmentModel<T>)getEditableConsensusArea().getAlignmentModel();
+        int sequenceID = model.sequenceIDIterator().next();  // There is always one sequence contained.
+        int length = getReadsArea().getAlignmentModel().getMaxSequenceLength();
+
+        Collection<T> tokens = new ArrayList<T>(length);
+        for (int column = 0; column < length; column++) {
+            tokens.add(model.getTokenSet().tokenByRepresentation(area.getConsensusToken(column)));
+        }
+
+        model.removeTokensAt(sequenceID, 0, model.getSequenceLength(sequenceID));
+        model.insertTokensAt(sequenceID, 0, tokens);
+    }
+
+
+    /**
+     * Updates the current consensus sequence by replacing gaps by the according consensus tokens
+     * calculated from the single read sequences and extends the consensus sequence if necessary.
+     */
+    @SuppressWarnings("unchecked")
+    public <T> void updateConsensusSequence() {
+        ConsensusSequenceArea area = getConsensusHintDataArea();
+        AlignmentModel<T> model = (AlignmentModel<T>)getEditableConsensusArea().getAlignmentModel();
+        TokenSet<T> tokenSet = model.getTokenSet();
+        int sequenceID = model.sequenceIDIterator().next();  // There is always one sequence contained.
+        int currentConsensusLength = model.getSequenceLength(sequenceID);
+        int overallLength = getReadsArea().getAlignmentModel().getMaxSequenceLength();
+
+        // Replace gaps by new information:
+        for (int column = 0; column < currentConsensusLength; column++) {
+            if (tokenSet.isGapToken(model.getTokenAt(sequenceID, column))) {
+                T newToken = tokenSet.tokenByRepresentation(area.getConsensusToken(column));
+                if (!tokenSet.isGapToken(newToken)) {
+                    model.setTokenAt(sequenceID, column, newToken);
+                }
+            }
+        }
+
+        // Append additional tokens:
+        if (overallLength > currentConsensusLength) {
+            Collection<T> tokens = new ArrayList<T>(overallLength);
+            for (int column = currentConsensusLength; column < overallLength; column++) {
+                tokens.add(tokenSet.tokenByRepresentation(area.getConsensusToken(column)));
+            }
+            model.appendTokens(sequenceID, tokens);
+        }
+    }
+
+
+       public static PherogramProvider readPherogram(URI uri) throws IOException, UnsupportedChromatogramFormatException {
+           PherogramProvider result;
+               InputStream stream = uri.toURL().openStream();
+               try {
+                       result = new BioJavaPherogramProvider(ChromatogramFactory.create(stream));
+               }
+               finally {
+                       stream.close();
+               }
+               return result;
+       }
+
+
+       private String newReadName() {
+               int index = 1;
+               while (getReadsArea().getAlignmentModel().sequenceIDByName(DEFAULT_READ_NAME_PREFIX + index)
+                               != AlignmentModel.NO_SEQUENCE_FOUND) {
+
+                       index++;
+               }
+               return DEFAULT_READ_NAME_PREFIX + index;
+       }
+
+
+    public void addRead(URI pherogramURI, boolean reverseComplemented) throws IOException, UnsupportedChromatogramFormatException {
+       addRead(newReadName(), pherogramURI, reverseComplemented, null, null, null, null, null);
+    }
+
+
+    /**
+     * Adds a new sequence with attached phergram data area to the reads alignment.
+     * <p>
+     * If {@code null} is specified as {@code editedSequence} the base call sequence from the pherogram will
+     * be set as the edited sequence. If {@code null} is specified as {@code shifts} no shifts between the edited
+     * and the base calls sequence are assumed.
+     *
+     * @param name the name of the new sequence
+     * @param pherogramURI the URI where the associated pherogram file is located
+     * @param reverseComplemented Specify {@code true} here, if the reverse complement of the pherogram data should
+     *        be added, {@code false} otherwise.
+     * @param editedSequence the edited version of the base call sequence (May be {@code null}.)
+     * @param shifts the alignment information that links the edited and the base call sequence (May be {@code null}.)
+     * @return the sequence ID of the added read
+     * @throws IOException if an error occurred when trying to read the pherogram file
+     * @throws UnsupportedChromatogramFormatException if the format of the pherogram file is not supported
+     */
+    public int addRead(String name, URI pherogramURI, boolean reverseComplemented, String editedSequence,
+            Integer firstSeqPos, Integer leftCutPos, Integer rightCutPos, SingleReadAlignment.Shift[] shifts)
+            throws IOException, UnsupportedChromatogramFormatException {
+
+               AlignmentModel provider = getReadsArea().getAlignmentModel();
+               PherogramProvider pherogramProvider = null;
+               if (pherogramURI != null) {
+                   pherogramProvider = readPherogram(pherogramURI);  // Must happen before a sequence is added, because it might throw an exception.
+            if (reverseComplemented) {
+                pherogramProvider = new ReverseComplementPherogramProvider(pherogramProvider);
+            }
+               }
+
+        // Create sequence:
+               provider.addSequence(name);
+               int id = provider.sequenceIDByName(name);
+
+               // Set edited sequence:
+               Collection<Object> tokens = null;  // First save tokens in a collection to avoid GUI updated for each token.
+               if (editedSequence != null) {
+                       tokens = AlignmentModelUtils.charSequenceToTokenList(editedSequence, provider.getTokenSet());
+               }
+               else if (pherogramProvider != null) {  // Copy base call sequence into alignment:
+                       tokens = new ArrayList<Object>();
+                       for (int i = 0; i < pherogramProvider.getSequenceLength(); i++) {
+                               tokens.add(provider.getTokenSet().tokenByRepresentation(
+                                       Character.toString(pherogramProvider.getBaseCall(i))));
+                       }
+                       setDirty();
+               }
+
+               if (tokens != null) {  // If either an edited sequence or a pherogram URI was provided.
+                   provider.insertTokensAt(id, 0, tokens);
+
+                   if (pherogramProvider != null) {
+                       // Create pherogram area:
+                       PherogramArea pherogramArea = new PherogramArea(getReadsArea().getContentArea(),
+                               new PherogramAreaModel(pherogramProvider));
+
+                       // Set position properties and shifts:
+                       PherogramAreaModel model = pherogramArea.getModel();
+                       if ((firstSeqPos != null) && (leftCutPos != null)) {
+                           model.setFirstSeqLeftCutPos(firstSeqPos, leftCutPos);
+                       }
+                       if (rightCutPos != null) {
+                           model.setRightCutPosition(rightCutPos);
+                       }
+                       if ((shifts != null) && (shifts.length > 0)) {
+                           for (int i = 0; i < shifts.length; i++) {
+                               model.addShiftChange(shifts[i].position, shifts[i].shift);
+                           }
+                           setDirty();
+                       }
+
+                       // Add pherogram area to GUI:
+                       pherogramArea.addMouseListener(new PherogramMouseListener(pherogramArea));
+                       getReadsArea().getDataAreas().getSequenceAreas(id).add(pherogramArea);
+                   }
+               }
+               return id;
+       }
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
new file mode 100644 (file)
index 0000000..b823625
--- /dev/null
@@ -0,0 +1,138 @@
+// $Id$
+/**
+* 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.molecular.editor;
+
+
+import java.util.UUID;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+
+
+/**
+ * @author pplitzner
+ * @author Ben Stöver
+ * @date 04.08.2014
+ */
+public class AlignmentEditorInput implements IEditorInput {
+    private static final String name = "AlignmentEditor";
+
+
+    private final UUID sequenceNodeUuid;
+
+
+    public AlignmentEditorInput(UUID sequenceNodeUuid) {
+               super();
+               this.sequenceNodeUuid = sequenceNodeUuid;
+       }
+
+
+       /* (non-Javadoc)
+     * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+     */
+    @Override
+    public Object getAdapter(Class adapter) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#exists()
+     */
+    @Override
+    public boolean exists() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+     */
+    @Override
+    public ImageDescriptor getImageDescriptor() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getName()
+     */
+    @Override
+    public String getName() {
+        return name;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getPersistable()
+     */
+    @Override
+    public IPersistableElement getPersistable() {
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IEditorInput#getToolTipText()
+     */
+    @Override
+    public String getToolTipText() {
+        return name;
+    }
+
+
+       /**
+        * Returns the {@link UUID} of the sequence CDM node that should be edited by the {@link AlignmentEditor} this object
+        * is used with.
+        *
+        * @return the uuid of the CDM node to work on
+        */
+       public UUID getSequenceNodeUuid() {
+               return sequenceNodeUuid;
+       }
+
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result
+                               + ((sequenceNodeUuid == null) ? 0 : sequenceNodeUuid.hashCode());
+               return result;
+       }
+
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj) {
+            return true;
+        }
+               if (obj == null) {
+            return false;
+        }
+               if (getClass() != obj.getClass()) {
+            return false;
+        }
+               AlignmentEditorInput other = (AlignmentEditorInput) obj;
+               if (sequenceNodeUuid == null) {
+                       if (other.sequenceNodeUuid != null) {
+                return false;
+            }
+               } else if (!sequenceNodeUuid.equals(other.sequenceNodeUuid)) {
+            return false;
+        }
+               return true;
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramMouseListener.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramMouseListener.java
new file mode 100644 (file)
index 0000000..71e2c9a
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+* Copyright (C) 2007 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.editor;
+
+
+import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+import info.bioinfweb.tic.input.TICMouseAdapter;
+import info.bioinfweb.tic.input.TICMouseEvent;
+
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
+import eu.etaxonomy.taxeditor.molecular.handler.ShowPherogramHandler;
+
+
+
+/**
+ * Listens to mouse events on data areas displaying a pherogram in {@link AlignmentEditor}.
+ *
+ * @author Ben Stöver
+ * @date 25.11.2014
+ */
+public class PherogramMouseListener extends TICMouseAdapter {
+       private final PherogramArea area;
+
+
+       public PherogramMouseListener(PherogramArea area) {
+               super();
+               this.area = area;
+       }
+
+
+       @Override
+       public boolean mousePressed(TICMouseEvent event) {
+               if (event.getClickCount() == 2) {  // Double click
+                       try {
+                           ShowPherogramHandler.showPherogram(area.getModel());
+                       }
+                       catch (PartInitException e) {
+                MessagingUtils.errorDialog("Unable to create pherogram view", null, e.getLocalizedMessage(),
+                        TaxeditorMolecularPlugin.PLUGIN_ID,  e, false);  //TODO set pluginID
+                       }
+            return true;
+               }
+               else {
+                   return false;
+               }
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramViewPart.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/PherogramViewPart.java
new file mode 100644 (file)
index 0000000..40c0470
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+* Copyright (C) 2007 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.editor;
+
+
+import info.bioinfweb.libralign.pherogram.PherogramFormats.QualityOutputType;
+import info.bioinfweb.libralign.pherogram.model.PherogramComponentModel;
+import info.bioinfweb.libralign.pherogram.view.PherogramView;
+import info.bioinfweb.tic.SWTComponentFactory;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+
+
+/**
+ * Component that allows to view a pherogram without the distortion due to aligning it to a sequence as in
+ * {@link AlignmentEditor}.
+ *
+ * @author Ben Stöver
+ * @date Nov 20, 2014
+ */
+public class PherogramViewPart extends ViewPart {
+    public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView";
+
+    private PherogramView pherogramView = null;
+
+
+    public static PherogramViewPart createView(PherogramComponentModel model) throws PartInitException {
+        PherogramViewPart view = (PherogramViewPart)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(ID);
+        view.getPherogramView().getTraceCurveView().setModel(model);
+        view.getPherogramView().assignSize();
+        return view;
+    }
+
+
+       public PherogramView getPherogramView() {
+               if (pherogramView == null) {
+                       pherogramView = new PherogramView();
+                       pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(true);
+                       pherogramView.getTraceCurveView().setHorizontalScale(1);
+                       pherogramView.getTraceCurveView().setVerticalScale(100);
+                       pherogramView.getTraceCurveView().getFormats().setQualityOutputType(QualityOutputType.NONE);  //TODO Make this user defined
+                       pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(false);
+               }
+               return pherogramView;
+       }
+
+
+       @Override
+       public void createPartControl(Composite parent) {
+               SWTComponentFactory.getInstance().getSWTComponent(getPherogramView(), parent, SWT.NONE);
+               getPherogramView().assignSize();
+       }
+
+
+       @Override
+       public void setFocus() {}  // nothing to do
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractAlignmentEditorHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractAlignmentEditorHandler.java
new file mode 100644 (file)
index 0000000..0c8a6ed
--- /dev/null
@@ -0,0 +1,43 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+
+/**
+ * Abstract implementation for all handlers triggering actions in an active instance of
+ * {@link AlignmentEditor}.
+ *
+ * @author Ben Stöver
+ * @date 19.06.2015
+ */
+public abstract class AbstractAlignmentEditorHandler extends AbstractHandler {
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+        if (activeEditor instanceof AlignmentEditor) {
+            doExecute(event, (AlignmentEditor)activeEditor);
+        }
+        return null;
+    }
+
+
+    public abstract void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException;
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/AbstractPherogramComponentHandler.java
new file mode 100644 (file)
index 0000000..55c24e3
--- /dev/null
@@ -0,0 +1,60 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
+import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+import info.bioinfweb.libralign.pherogram.PherogramComponent;
+
+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.ui.IWorkbenchPart;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.editor.PherogramViewPart;
+
+
+
+/**
+ * Abstract handler implementation allows to performs the concrete operation either on an instance of
+ * {@link PherogramViewPart} or all {@link AlignmentArea}s inside an instance of {@link AlignmentEditor}.
+ *
+ * @author Ben Stöver
+ * @date 23.06.2015
+ */
+public abstract class AbstractPherogramComponentHandler extends AbstractHandler {
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        IWorkbenchPart activePart = AbstractUtility.getActivePart();
+
+        if (activePart instanceof AlignmentEditor) {
+            AlignmentEditor editor = (AlignmentEditor)activePart;
+            Iterator<Integer> idIterator = editor.getReadsArea().getAlignmentModel().sequenceIDIterator();
+            while (idIterator.hasNext()) {
+                PherogramArea area = editor.getPherogramArea(idIterator.next());
+                if (area != null) {
+                    doExecute(event, area);
+                }
+            }
+        }
+        else if (activePart instanceof PherogramViewPart) {
+            doExecute(event, ((PherogramViewPart)activePart).getPherogramView().getTraceCurveView());
+        }
+        return null;
+    }
+
+
+    public abstract void doExecute(ExecutionEvent event, PherogramComponent component) throws ExecutionException;
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ChangePherogramQualityOutputType.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ChangePherogramQualityOutputType.java
new file mode 100644 (file)
index 0000000..a5fba94
--- /dev/null
@@ -0,0 +1,31 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import info.bioinfweb.libralign.pherogram.PherogramComponent;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+
+
+/**
+ * Switches between the quality output types available for components displaying pherograms.
+ *
+ * @author Ben Stöver
+ * @date 19.06.2015
+ */
+public class ChangePherogramQualityOutputType extends AbstractPherogramComponentHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, PherogramComponent component) throws ExecutionException {
+        component.getFormats().changeQualityOutputType();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CreateConsensusSequenceHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CreateConsensusSequenceHandler.java
new file mode 100644 (file)
index 0000000..a95de50
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+* Copyright (C) 2007 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.handler;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+
+/**
+ * Handler that creates the consensus sequence from all single read sequences in the active instance
+ * of {@link AlignmentEditor}. A previously present consensus sequence will be overwritten.
+ *
+ * @author Ben Stöver
+ * @date 19.06.2015
+ * @see UpdateConsensusSequenceHandler
+ * @see AlignmentEditor#createConsensusSequence()
+ */
+public class CreateConsensusSequenceHandler extends AbstractAlignmentEditorHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
+        editor.createConsensusSequence();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramLeftHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramLeftHandler.java
new file mode 100644 (file)
index 0000000..955dbae
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+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;
+
+
+
+/**
+ * Handler that cuts the base call sequence of a pherogram attached to the current sequence on the left
+ * of the current selection or cursor position.
+ *
+ * @author Ben Stöver
+ * @date 15.06.2015
+ */
+public class CutPherogramLeftHandler extends AbstractAlignmentEditorHandler {
+    @Override
+    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);
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramRightHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/CutPherogramRightHandler.java
new file mode 100644 (file)
index 0000000..dd8bc90
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+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;
+
+
+
+/**
+ * Handler that cuts the base call sequence of a pherogram attached to the current sequence on the right
+ * of the current selection or cursor position.
+ *
+ * @author BenStoever
+ * @date 15.06.2015
+ */
+public class CutPherogramRightHandler extends AbstractAlignmentEditorHandler {
+    @Override
+    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);
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/EditSequenceHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/EditSequenceHandler.java
new file mode 100644 (file)
index 0000000..69597f1
--- /dev/null
@@ -0,0 +1,46 @@
+package eu.etaxonomy.taxeditor.molecular.handler;
+
+
+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.TreeNode;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.molecular.Sequence;
+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;
+
+
+
+/**
+ * Opens the alignment editor from the CDM tree.
+ *
+ * @author Ben St&ouml;ver
+ * @author pplitzner
+ */
+public class EditSequenceHandler extends AbstractHandler {
+
+    org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(EditSequenceHandler.class);
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+        TreeNode treeNodeOfSelection = EditorUtil.getTreeNodeOfSelection(currentSelection);
+        if(treeNodeOfSelection != null && treeNodeOfSelection.getValue() instanceof Sequence){
+            AlignmentEditorInput input = new AlignmentEditorInput(((Sequence)treeNodeOfSelection.getValue()).getUuid());  //TODO Should there always be a new instance created here? What if the specified CDM node is already opened in an AlignmentEditor? => Possible create Singleton that keeps instances by sequence objects in a map.
+            try {
+                TaxeditorMolecularPlugin.getDefault().getWorkbench()
+                .getActiveWorkbenchWindow().getActivePage().openEditor(input, AlignmentEditor.ID);
+            }
+            catch (PartInitException e) {
+                logger.error("Could not open AlignmentEditor", e);
+            }
+        }
+        return null;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/HandlerTools.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/HandlerTools.java
new file mode 100644 (file)
index 0000000..11d92e6
--- /dev/null
@@ -0,0 +1,40 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
+
+
+
+/**
+ * Implements shared functionality for handler implementations using tool bar icons.
+ *
+ * @author Ben Stöver
+ * @date 15.06.2015
+ */
+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);
+        if (url != null) {
+            return ImageDescriptor.createFromURL(url);
+        }
+        else {
+            throw new InternalError("Icon \"" + iconName + "\" could not be loaded.");  //TODO Throw other type of exception?
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/LoadPherogramHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/LoadPherogramHandler.java
new file mode 100644 (file)
index 0000000..97e1b97
--- /dev/null
@@ -0,0 +1,70 @@
+/**
+* Copyright (C) 2007 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.handler;
+
+
+import java.io.File;
+import java.io.IOException;
+
+import org.biojava.bio.chromatogram.UnsupportedChromatogramFormatException;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.IEditorPart;
+
+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;
+
+
+
+/**
+ * Handler that loads an additional read into the contig alignment displayed by an instance of {@link AlignmentEditor}.
+ *
+ * @author Ben Stöver
+ * @author pplitzner
+ */
+public class LoadPherogramHandler extends AbstractHandler {
+       //TODO Change so that also URIs which do not point to files can be specified.
+
+       /* (non-Javadoc)
+     * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+        if (activeEditor instanceof AlignmentEditor) {
+            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", "*.*"});
+
+            String path = fileDialog.open();
+            if (path != null) {
+               try {
+                       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
+               }
+               catch (IOException e) {
+                    MessagingUtils.errorDialog("Unsupported format", this,
+                               "An IO error occurred while trying to read the file \"" + path + "\".",
+                               TaxeditorMolecularPlugin.PLUGIN_ID, e, false);  //TODO set pluginID
+               }
+            }
+        }
+        return null;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ReverseComplementHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ReverseComplementHandler.java
new file mode 100644 (file)
index 0000000..99e7388
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+* Copyright (C) 2007 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.handler;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+
+/**
+ * Reverse complements the single read sequence in an active {@link AlignmentEditor}, where the alignment cursor
+ * is currently located.
+ *
+ * @author Ben Stöver
+ */
+public class ReverseComplementHandler extends AbstractAlignmentEditorHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
+        editor.reverseComplementSelectedSequences();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ShowPherogramHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ShowPherogramHandler.java
new file mode 100644 (file)
index 0000000..f4c6580
--- /dev/null
@@ -0,0 +1,66 @@
+package eu.etaxonomy.taxeditor.molecular.handler;
+
+
+import info.bioinfweb.libralign.pherogram.model.PherogramComponentModel;
+
+import java.net.URI;
+
+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.TreeNode;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.media.MediaUtils;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+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;
+
+
+
+/**
+ * Displays an undistorted pherogram with {@link PherogramViewPart}.
+ *
+ * @author Ben Stöver
+ *
+ */
+public class ShowPherogramHandler extends AbstractHandler {
+       public static void showPherogram(PherogramComponentModel model) throws PartInitException {
+               PherogramViewPart.createView(model);
+       }
+
+
+       @Override
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+               TreeNode treeNodeOfSelection = EditorUtil.getTreeNodeOfSelection(currentSelection);
+               if (treeNodeOfSelection != null && treeNodeOfSelection.getValue() instanceof SingleRead) {
+                   //TODO Can the parent node (containing the cut positions) be extracted from SingleRead?
+                       try {
+                           SingleRead singleRead = (SingleRead)treeNodeOfSelection.getValue();
+                           URI uri = null;
+                           if (singleRead.getPherogram() != null) {  // Pherogram objects without URI are possible.
+                               uri = MediaUtils.getFirstMediaRepresentationPart(singleRead.getPherogram()).getUri();
+                           }
+
+                           if (uri == null) {
+                       MessagingUtils.messageDialog("No pherogram available", this,
+                               "The selected read does not have an associated pherogram.");
+                           }
+                           else {
+                     showPherogram(new PherogramComponentModel(AlignmentEditor.readPherogram(uri)));
+                           }
+                       }
+               catch (Exception e) {
+                   MessagingUtils.errorDialog("Error", null, e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID,
+                           e, false);
+               }
+        }
+        return null;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java
new file mode 100644 (file)
index 0000000..e94a290
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+* Copyright (C) 2007 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.handler;
+
+
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.menus.UIElement;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+/**
+ * Switches an {@link AlignmentEditor} between insertion and overwrite mode.
+ *
+ * @author Ben Stöver
+ * @date 04.12.2014
+ */
+public class ToggleInsertOverwriteHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
+       public static final String COMMAND_ID =
+                       "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite";
+
+
+    private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png");
+    private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png");
+
+
+    @Override
+    public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
+        editor.toggleInsertOverwrite();
+    }
+
+
+       @Override
+       public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) {
+        IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+               if (activeEditor instanceof AlignmentEditor) {
+                       if (((AlignmentEditor)activeEditor).isInsertMode()) {
+                           element.setIcon(INSERT_DESCRIPTOR);
+                               element.setText("INS");
+                               element.setTooltip("Click to switch to overwrite mode");
+                       }
+                       else {
+                element.setIcon(OVERWRITE_DESCRIPTOR);
+                               element.setText("OVR");
+                               element.setTooltip("Click to switch to insertion mode");
+                       }
+            ((ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class)).refreshElements(
+                    ToggleLeftRightInsertionHandler.COMMAND_ID, null);
+               }
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleLeftRightInsertionHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleLeftRightInsertionHandler.java
new file mode 100644 (file)
index 0000000..291e72c
--- /dev/null
@@ -0,0 +1,72 @@
+/**
+ * Copyright (C) 2007 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.handler;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.menus.UIElement;
+
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+/**
+ * Switches an {@link AlignmentEditor} between insertion in the base sequence to
+ * the left or to the right.
+ *
+ * @author Ben Stöver
+ * @date 04.12.2014
+ */
+public class ToggleLeftRightInsertionHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
+    public static final String COMMAND_ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion";
+
+
+    private final ImageDescriptor INSERT_LEFT_DESCRIPTOR =
+            HandlerTools.createImageDescriptor("pherogram-insert-left-16x16.png");
+    private final ImageDescriptor INSERT_RIGHT_DESCRIPTOR =
+            HandlerTools.createImageDescriptor("pherogram-insert-right-16x16.png");
+    private final ImageDescriptor INSERT_LEFT_DISABLED_DESCRIPTOR =
+            HandlerTools.createImageDescriptor("pherogram-insert-left-disabled-16x16.png");
+    private final ImageDescriptor INSERT_RIGHT_DISABLED_DESCRIPTOR =
+            HandlerTools.createImageDescriptor("pherogram-insert-right-disabled-16x16.png");
+
+
+    @Override
+    public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
+        editor.toggleLeftRightInsertionInPherogram();
+    }
+
+
+    @Override
+    public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) {
+        IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+        if (activeEditor instanceof AlignmentEditor) {
+            setBaseEnabled(((AlignmentEditor)activeEditor).isInsertMode());
+            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.");
+            }
+            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.");
+            }
+        }
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramBaseCallLinesHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramBaseCallLinesHandler.java
new file mode 100644 (file)
index 0000000..c8663eb
--- /dev/null
@@ -0,0 +1,30 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import info.bioinfweb.libralign.pherogram.PherogramComponent;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+
+
+/**
+ * @author BenStoever
+ * @date 23.06.2015
+ *
+ */
+public class ToggleShowPherogramBaseCallLinesHandler extends AbstractPherogramComponentHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, PherogramComponent component) throws ExecutionException {
+        component.getFormats().toggleShowBaseCallLines();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramProbabilitiesHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleShowPherogramProbabilitiesHandler.java
new file mode 100644 (file)
index 0000000..50d45d6
--- /dev/null
@@ -0,0 +1,36 @@
+// $Id$
+/**
+* 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.molecular.handler;
+
+
+import info.bioinfweb.libralign.pherogram.PherogramComponent;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.editor.PherogramViewPart;
+
+
+
+
+/**
+ * Toggles whether probability values (substitution, overcall and undercall) should be displayed
+ * in pherogram areas of {@link AlignmentEditor} or {@link PherogramViewPart}.
+ *
+ * @author Ben Stöver
+ * @date 23.06.2015
+ */
+public class ToggleShowPherogramProbabilitiesHandler extends AbstractPherogramComponentHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, PherogramComponent component) throws ExecutionException {
+        component.getFormats().toggleShowProbabilityValues();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/UpdateConsensusSequenceHandler.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/UpdateConsensusSequenceHandler.java
new file mode 100644 (file)
index 0000000..50cc1b1
--- /dev/null
@@ -0,0 +1,25 @@
+/**
+* Copyright (C) 2007 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.handler;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+
+
+
+
+public class UpdateConsensusSequenceHandler extends AbstractAlignmentEditorHandler {
+    @Override
+    public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
+        editor.updateConsensusSequence();
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/package-info.java b/eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/package-info.java
new file mode 100644 (file)
index 0000000..64bc123
--- /dev/null
@@ -0,0 +1,17 @@
+// $Id$
+/**
+ * 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.
+ */
+/**
+ * Contains handlers that trigger actions in an active instance of
+ * {@link main.java.eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor}. Handlers opening
+ * an alignment editor or pherogram view are not contained in here.
+ *
+ * @author Ben Stöver
+ */
+package eu.etaxonomy.taxeditor.molecular.handler;
\ No newline at end of file
index ef370db724c000f852a89fe4c793f042d335ec50..5dce9d76aa54e6ca4ba68744115664b8659bdaa3 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: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
index 86609245a3571b0d1283dfd2b75e6977e441a567..9d828fb455d36b9a94c4fbefd695a12d73f2c5d5 100644 (file)
                   commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode"
                   label="%command.label.2"
                   style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="selection">
+                     <count
+                           value="+">
+                     </count>
+                  </with>
+               </visibleWhen>
             </command>
             <separator
                   name="eu.etaxonomy.navigation.menu.new.separator1"
                            definitionId="isSynonymNode">
                      </reference>
                   </not>
+                  <with
+                        variable="selection">
+                     <count
+                           value="+">
+                     </count>
+                  </with>
                </and>
             </visibleWhen>
          </command>
index 4a0533d60f277b7ca503e085fb5116027d894be8..f990136f31568be2594c0d1d93b378e326f4166a 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.7.1</version>
+               <version>3.8.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 6075a5062f122bba9aaa72f6a72341269d26685e..09861da31f570eab8ec72987fa1871250de4df73 100644 (file)
@@ -247,6 +247,8 @@ public class PolytomousKeyViewPart extends ViewPart implements
         */
        @Override
        public boolean postOperation(CdmBase objectAffectedByOperation) {
+               getConversationHolder().bind();
+               getConversationHolder().commit(true);
                viewer.refresh();
                return true;
        }
index faf141c73ba8ded1c2a973b3a72100bbf6fd2c64..449a661f0835530b985a3910961d8153e197905b 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * 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,9 +17,14 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
@@ -33,28 +38,31 @@ import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  */
 public class DeleteHandler extends AbstractHandler {
 
+    protected IWorkbenchPage activePage;
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
                IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
-               
+               activePage =  HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
                List<PolytomousKey> keys = selection.toList();
-               
+
                if(keys.isEmpty()){
                        return null;
                }
-               
-               boolean confirmation = MessagingUtils.confirmDialog("Confirm deletaion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
-               
+               for (PolytomousKey key : keys){
+                   closeObsoleteEditor(key);
+               }
+               boolean confirmation = MessagingUtils.confirmDialog("Confirm deletion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
+
                if(confirmation){
-               
+
                        for(PolytomousKey key : keys){
                                try {
                                        AbstractPostOperation operation = new DeleteOperation(
                                                        event.getCommand().getName(),
-                                                       NavigationUtil.getUndoContext(), key, 
+                                                       NavigationUtil.getUndoContext(), key,
                                                        (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false),
                                                        (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false));
                                        NavigationUtil.executeOperation(operation);
@@ -63,8 +71,30 @@ public class DeleteHandler extends AbstractHandler {
                                }
                        }
                }
-               
+
                return null;
        }
 
+
+       protected boolean closeObsoleteEditor(PolytomousKey key){
+        boolean result = true;
+        for (IEditorReference ref : activePage.getEditorReferences()) {
+            try {
+
+                IEditorInput input = ref.getEditorInput();
+                if (input instanceof PolytomousKeyEditorInput) {
+                    PolytomousKey pKey = ((PolytomousKeyEditorInput)input).getKey();
+                    //if node is a child of taxonNode then close the editor
+                    if(key.equals(pKey)){
+                    //if (taxonNode.equals(node)) {
+                        result &= activePage.closeEditor(ref.getEditor(false), true);
+
+                    }
+                }
+            } catch (PartInitException e) {
+                continue;
+            }
+        }
+        return result;
+    }
 }
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorContentService.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorContentService.java
new file mode 100644 (file)
index 0000000..46c659b
--- /dev/null
@@ -0,0 +1,30 @@
+package eu.etaxonomy.taxeditor.navigation.navigator;
+
+import org.eclipse.ui.internal.navigator.NavigatorContentService;
+import org.eclipse.ui.navigator.INavigatorDnDService;
+
+public class TaxonNavigatorContentService extends NavigatorContentService {
+
+       private TaxonNavigatorDnDService navigatorDnDService;
+
+       public TaxonNavigatorContentService(String viewerID) {
+               super(viewerID);
+               
+               
+       }
+       
+       public TaxonNavigatorContentService(String aViewerId,
+                       TaxonNavigatorViewer taxonNavigatorViewer) {
+               super(aViewerId, taxonNavigatorViewer);
+               getDnDService();
+       }
+
+       @Override
+       public TaxonNavigatorDnDService getDnDService() {
+               if (navigatorDnDService == null) {
+                       navigatorDnDService = new TaxonNavigatorDnDService(this);
+               }
+               return navigatorDnDService;
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDnDService.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDnDService.java
new file mode 100644 (file)
index 0000000..5de170c
--- /dev/null
@@ -0,0 +1,170 @@
+package eu.etaxonomy.taxeditor.navigation.navigator;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.ui.internal.navigator.dnd.CommonDropAdapterDescriptor;
+import org.eclipse.ui.internal.navigator.dnd.CommonDropDescriptorManager;
+import org.eclipse.ui.internal.navigator.extensions.CommonDragAssistantDescriptor;
+import org.eclipse.ui.internal.navigator.extensions.NavigatorViewerDescriptor;
+import org.eclipse.ui.navigator.CommonDragAdapterAssistant;
+import org.eclipse.ui.navigator.CommonDropAdapter;
+import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
+import org.eclipse.ui.navigator.INavigatorContentService;
+import org.eclipse.ui.navigator.INavigatorDnDService;
+
+import eu.etaxonomy.taxeditor.navigation.navigator.dnd.TaxonNavigatorDragAdapterAssistant;
+
+public class TaxonNavigatorDnDService implements INavigatorDnDService {
+       private static final CommonDropAdapterAssistant[] NO_ASSISTANTS = new CommonDropAdapterAssistant[0];
+
+       private INavigatorContentService contentService;
+
+       private TaxonNavigatorDragAdapterAssistant[] dragAssistants;
+       
+       private TreeNodeDropAdapter dropAdapter;
+
+       private final Map dropAssistants = new HashMap();
+       
+       public TaxonNavigatorDnDService(INavigatorContentService contentService){
+               this.contentService = contentService;
+       }
+       
+       
+       @Override
+       public CommonDragAdapterAssistant[] getCommonDragAssistants() {
+               
+               return dragAssistants;
+       }
+
+       @Override
+       public void bindDragAssistant(CommonDragAdapterAssistant anAssistant) {
+               if(dragAssistants == null) 
+                       initializeDragAssistants(); 
+               TaxonNavigatorDragAdapterAssistant[] newDragAssistants = new TaxonNavigatorDragAdapterAssistant[dragAssistants.length + 1];
+               System.arraycopy(dragAssistants, 0, newDragAssistants, 0, dragAssistants.length);
+               newDragAssistants[dragAssistants.length] = (TaxonNavigatorDragAdapterAssistant) anAssistant;
+               dragAssistants = newDragAssistants;             
+
+       }
+       
+       private void initializeDragAssistants() {
+               int i = 0;
+               Set dragDescriptors = ((NavigatorViewerDescriptor) contentService
+                               .getViewerDescriptor()).getDragAssistants();
+               dragAssistants = new TaxonNavigatorDragAdapterAssistant[dragDescriptors
+                               .size()];
+               for (Iterator iter = dragDescriptors.iterator(); iter.hasNext();) {
+                       CommonDragAssistantDescriptor descriptor = (CommonDragAssistantDescriptor) iter
+                                       .next();
+                       dragAssistants[i++] = (TaxonNavigatorDragAdapterAssistant) descriptor.createDragAssistant();
+               }
+       }
+
+       @Override
+       public CommonDropAdapterAssistant[] findCommonDropAdapterAssistants(
+                       Object aDropTarget, TransferData aTransferType) {
+               CommonDropAdapterDescriptor[] descriptors = CommonDropDescriptorManager
+                               .getInstance().findCommonDropAdapterAssistants(aDropTarget,
+                                               contentService);
+
+               if (descriptors.length == 0) {
+                       return NO_ASSISTANTS;
+               }
+
+               if (LocalSelectionTransfer.getTransfer().isSupportedType(aTransferType)  
+                                               && LocalSelectionTransfer.getTransfer().getSelection() instanceof IStructuredSelection) {
+                       return getAssistantsBySelection(descriptors, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection());
+               } 
+               return getAssistantsByTransferData(descriptors, aTransferType);
+       }
+       
+       private CommonDropAdapterAssistant[] getAssistantsByTransferData(
+                       CommonDropAdapterDescriptor[] descriptors,
+                       TransferData aTransferType) {
+
+               Set assistants = new LinkedHashSet();
+               for (int i = 0; i < descriptors.length; i++) {
+                       CommonDropAdapterAssistant asst = getAssistant(descriptors[i]);
+                       if (asst.isSupportedType(aTransferType)) {
+                               assistants.add(asst);
+                       }
+               }
+               return sortAssistants((CommonDropAdapterAssistant[]) assistants
+                               .toArray(new CommonDropAdapterAssistant[assistants.size()]));
+
+       }
+       
+       private CommonDropAdapterAssistant[] getAssistantsBySelection(
+                       CommonDropAdapterDescriptor[] descriptors, IStructuredSelection aSelection) {
+
+               Set assistants = new LinkedHashSet(); 
+                       
+               for (int i = 0; i < descriptors.length; i++) {
+                       if(descriptors[i].areDragElementsSupported(aSelection)) {
+                               assistants.add(getAssistant(descriptors[i]));
+                       }
+               }  
+
+               return sortAssistants((CommonDropAdapterAssistant[]) assistants
+                               .toArray(new CommonDropAdapterAssistant[assistants.size()]));
+       }
+       
+       private CommonDropAdapterAssistant getAssistant(
+                       CommonDropAdapterDescriptor descriptor) {
+               TreeNodeDropAdapterAssistant asst = (TreeNodeDropAdapterAssistant) dropAssistants
+                               .get(descriptor);
+               if (asst != null) {
+                       return asst;
+               }
+               synchronized (dropAssistants) {
+                       asst = (TreeNodeDropAdapterAssistant) dropAssistants.get(descriptor);
+                       if (asst == null) {
+                               dropAssistants.put(descriptor, (asst = (TreeNodeDropAdapterAssistant) descriptor
+                                               .createDropAssistant()));
+                               asst.init(contentService);
+                               //asst.setCommonDropAdapter(dropAdapter);
+                       }
+               }
+               return asst;
+       }
+
+
+       private CommonDropAdapterAssistant[] sortAssistants(CommonDropAdapterAssistant[] array) {
+               Arrays.sort(array, new Comparator() {
+                       public int compare(Object arg0, Object arg1) {
+                               CommonDropAdapterAssistant a = (CommonDropAdapterAssistant) arg0;
+                               CommonDropAdapterAssistant b = (CommonDropAdapterAssistant) arg1;
+                               // This is to ensure that the navigator resources drop assistant will
+                               // always be first on the list of drop assistant, if a conflict ever 
+                               // occurs.
+                               String id = "org.eclipse.ui.navigator.resources."; //$NON-NLS-1$
+                               if (a.getClass().getName().startsWith(id))
+                                       return -1;
+                               if (b.getClass().getName().startsWith(id))
+                                       return 1;
+                               return a.getClass().getName().compareTo(b.getClass().getName());
+                       }
+               });
+               return array;
+       }
+
+       @Override
+       public CommonDropAdapterAssistant[] findCommonDropAdapterAssistants(
+                       Object aDropTarget, IStructuredSelection theDragSelection) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       public void setDropAdaptor(TreeNodeDropAdapter da) {
+               dropAdapter = da;
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorViewer.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorViewer.java
new file mode 100644 (file)
index 0000000..8fdabb8
--- /dev/null
@@ -0,0 +1,54 @@
+package eu.etaxonomy.taxeditor.navigation.navigator;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.internal.navigator.NavigatorContentService;
+import org.eclipse.ui.internal.navigator.dnd.NavigatorDnDService;
+import org.eclipse.ui.navigator.CommonDragAdapter;
+import org.eclipse.ui.navigator.CommonDropAdapter;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.INavigatorContentService;
+
+import eu.etaxonomy.taxeditor.dnd.transfer.TaxonNodeTransfer;
+
+public class TaxonNavigatorViewer extends CommonViewer {
+
+       private NavigatorContentService contentService;
+       String viewerId;
+
+       public TaxonNavigatorViewer(String aViewerId, Composite aParent, int aStyle) {
+               super(aViewerId, aParent, aStyle);
+               contentService = new TaxonNavigatorContentService(aViewerId, this);
+               viewerId = aViewerId;
+       }
+
+       @Override
+       protected void initDragAndDrop() {
+
+               int operations =  DND.DROP_MOVE ;
+
+               CommonDragAdapter dragAdapter = createDragAdapter();
+               addDragSupport(operations, dragAdapter.getSupportedDragTransfers(),
+                               dragAdapter);
+               Transfer[] transfers = new Transfer[] { TaxonNodeTransfer.getInstance() };
+               TreeNodeDropAdapter dropAdapter = createTreeNodeDropAdapter();
+               addDropSupport(operations, transfers, dropAdapter);
+
+               TaxonNavigatorDnDService dnd = (TaxonNavigatorDnDService)getNavigatorContentService().getDnDService();
+               dnd.setDropAdaptor(dropAdapter);
+       }
+       
+       
+       protected TreeNodeDropAdapter createTreeNodeDropAdapter() {
+               return new TreeNodeDropAdapter(this);
+       }
+       
+       public NavigatorContentService getNavigatorContentService(){
+               if (contentService == null){
+                       contentService = new TaxonNavigatorContentService(viewerId);
+               } 
+               return contentService;
+       }
+       
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDragListener.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDragListener.java
new file mode 100644 (file)
index 0000000..9cd02f9
--- /dev/null
@@ -0,0 +1,83 @@
+// $Id$
+/**
+* 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.navigation.navigator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.dnd.DragSourceAdapter;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.ui.navigator.CommonViewer;
+
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.dnd.transfer.TaxonNodeTransfer;
+import eu.etaxonomy.taxeditor.editor.definedterm.TermTransfer;
+
+/**
+ * @author k.luther
+ * @date 02.06.2015
+ *
+ */
+public class TreeNodeDragListener extends DragSourceAdapter {
+       private CommonViewer viewer;
+
+       /**
+        * 
+        */
+       public TreeNodeDragListener(CommonViewer viewer) {
+               this.viewer = viewer;
+       }
+
+       
+       public void setViewer(CommonViewer viewer){
+               this.viewer = viewer;
+       }
+       /* (non-Javadoc)
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
+        */
+       @Override
+       public void dragStart(DragSourceEvent event) {
+               
+               event.doit = true;// set to false if needed - default is true
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)
+        */
+       @Override
+       public void dragFinished(DragSourceEvent event) {
+               // TODO Auto-generated method stub
+               super.dragFinished(event);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)
+        */
+       @Override
+       public void dragSetData(DragSourceEvent event) {
+               
+               IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+               List<ITaxonTreeNode> taxonNodes = new ArrayList<ITaxonTreeNode>();
+               
+               for (Object object : selection.toList()){
+                       taxonNodes.add((ITaxonTreeNode)object);
+                       }
+                       
+               if (TaxonNodeTransfer.getInstance().isSupportedType(
+                               event.dataType)) {
+                       event.data = taxonNodes.toArray(new TaxonNode[taxonNodes.size()]);
+               }
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
new file mode 100644 (file)
index 0000000..e0f8a05
--- /dev/null
@@ -0,0 +1,280 @@
+// $Id$
+/**
+* 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.navigation.navigator;
+
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.TransferData;
+
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+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.navigator.operation.MoveTaxonOperation;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * <p>TreeNodeDropAdapter class.</p>
+ *
+ * @author k.luther
+ * @date 02.06.2015
+ * @version 1.0
+ */
+public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOperationEnabled {
+
+       /**
+        * @param viewer
+        */
+       protected TreeNodeDropAdapter(TaxonNavigatorViewer navigatorViewer) {
+               super(navigatorViewer);
+               this.navigatorViewer = navigatorViewer;
+
+       }
+
+       private final TaxonNavigatorViewer navigatorViewer;
+       private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
+
+       /** Constant <code>ID="eu.etaxonomy.taxeditor.navigation.navig"{trunked}</code> */
+       public static final String ID = "eu.etaxonomy.taxeditor.navigation.navigator.dropassistant"; //$NON-NLS-1$
+
+       private static final EnumSet<CRUD> UPDATE = EnumSet.of(CRUD.UPDATE);
+
+
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse.ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, java.lang.Object)
+        */
+       /** {@inheritDoc} */
+       @Override
+       public boolean performDrop(Object target) {
+
+
+               if (target instanceof ITaxonTreeNode) {
+                       Set<TaxonNode> taxonNodes = getSelectedTaxa();
+                       ITaxonTreeNode targetTreeNode = (ITaxonTreeNode) target;
+                       if (targetTreeNode instanceof Classification){
+                               targetTreeNode = ((Classification)targetTreeNode).getRootNode();
+                               targetTreeNode = HibernateProxyHelper.deproxy(targetTreeNode, TaxonNode.class);
+                       }
+                       if(taxonNodes != null) {
+                               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.")){
+                                               return true;
+                                       }
+                               }
+            }
+               }
+
+               return false;
+       }
+
+       private Set<TaxonNode> getSelectedTaxa(){
+               HashSet<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
+
+               ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+               if (selection instanceof TreeSelection) {
+
+                       Iterator selectionIterator = ((TreeSelection) selection).iterator();
+
+                       while (selectionIterator.hasNext()){
+                               Object object = selectionIterator.next();
+                               if(object instanceof TaxonNode){
+                                       TaxonNode taxonNode = (TaxonNode) object;
+                                       taxonNodes.add(taxonNode);
+                               }
+                       }
+               }
+               return taxonNodes.size() > 0 ? taxonNodes : null;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.navigator.CommonDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
+        */
+       /** {@inheritDoc} */
+       @Override
+       public boolean validateDrop(Object target, int operation,
+                       TransferData transferType) {
+
+               if (target instanceof ITaxonTreeNode) {
+
+                   // check users permissions with target taxonnode and taxon
+                   if (target instanceof TaxonNode) {
+                       TaxonNode targetNode = (TaxonNode)target;
+                       Boolean hasTargetNodePermission = CdmStore.currentAuthentiationHasPermission(targetNode, UPDATE);
+                Boolean hasTargetTaxonPermission = CdmStore.currentAuthentiationHasPermission(targetNode.getTaxon(), UPDATE);
+
+                if(logger.isDebugEnabled()){
+                    logger.debug("target: " + targetNode.getTaxon().getTitleCache());
+                }
+
+                       if(!hasTargetNodePermission || ! hasTargetNodePermission){
+                           if(logger.isDebugEnabled()){
+                               logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " ");
+                           }
+                           return false;
+                       }
+                   }
+
+                   // 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());
+                               Boolean isSameTaxonNode = taxonNode.equals(target);
+                               Boolean hasTaxonNodePermission = CdmStore.currentAuthentiationHasPermission(taxonNode, UPDATE);
+                               Boolean hasTaxonPermission = CdmStore.currentAuthentiationHasPermission(taxonNode.getTaxon(), UPDATE);
+                if (
+                               isSameTaxonNode
+                               || !hasTaxonNodePermission
+                   || !hasTaxonPermission
+                       ) {
+                    if(logger.isDebugEnabled()){
+                        logger.debug("CANCEL_STATUS for selected  " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " ");
+                    }
+                                       return false;
+                               }
+                       }
+                       logger.debug("OK_STATUS");
+                       return true;
+               }
+               logger.debug("CANCEL_STATUS");
+               return false;
+       }
+
+
+       /**
+        * @param childTaxonNode
+        * @param parentTaxon
+        * @return
+        */
+       private boolean moveTaxon(Set<TaxonNode> taxonNodes, ITaxonTreeNode targetITaxonTreeNode) {
+
+               TaxonNavigator taxonNavigator;
+               taxonNavigator = (TaxonNavigator) NavigationUtil.showView(TaxonNavigator.ID);
+
+               if(targetITaxonTreeNode instanceof TaxonNode){
+
+                       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.");
+                               return false;
+                       }
+
+               }
+               Iterator<TaxonNode> taxIterator = taxonNodes.iterator();
+        Set<UUID> uuids = new HashSet<UUID>();
+        TaxonNode node = null;
+        while(taxIterator.hasNext()){
+            node = taxIterator.next();
+            uuids.add(node.getUuid());
+        }
+               if (!PreferencesUtil.getSortNodesNaturally()){
+                       IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
+                       if (workspaceUndoContext == null) {
+                               logger.error("Workspace undo context is null. DND operation cancelled");
+                               return false;
+                       }
+
+                       AbstractPostOperation operation = new MoveTaxonOperation
+                                       ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
+                       NavigationUtil.executeOperation(operation);
+
+                       logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                       return true;
+               }else{
+                       String[] buttonLables = {"Parent", "Predecessor", "Cancel"};
+                       MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to use the target node as parent or do you want to move the taxon below the target.", 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");
+                                       return false;
+                               }
+
+                               AbstractPostOperation operation = new MoveTaxonOperation
+                                               ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
+                               NavigationUtil.executeOperation(operation);
+
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               return true;
+                       }else if (returnCode == 1){
+                               IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
+                               if (workspaceUndoContext == null) {
+                                       logger.error("Workspace undo context is null. DND operation cancelled");
+                                       return false;
+                               }
+                               TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
+
+                               AbstractPostOperation operation = new MoveTaxonOperation
+                                               ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
+                               NavigationUtil.executeOperation(operation);
+
+                               logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+                               return true;
+                       } else{
+                               return false;
+                       }
+
+
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
+        */
+       /** {@inheritDoc} */
+       @Override
+    public boolean postOperation(CdmBase objectAffectedByOperation) {
+               return true;
+       }
+
+       /**
+        * <p>onComplete</p>
+        *
+        * @return a boolean.
+        */
+       @Override
+    public boolean onComplete() {
+               // TODO Auto-generated method stub
+               return false;
+       }
+       @Override
+       public void dragOver(DropTargetEvent event) {
+               super.dragOver(event);
+               event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_INSERT_AFTER;
+
+       }
+
+}
index 86eb9506f926fd1267fbb4f1a23972d0ff3d4663..289d9d1b99596249b0fc4da64faf594532475e2a 100644 (file)
@@ -14,21 +14,18 @@ import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.UUID;
 
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IconAndMessageDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.navigator.CommonDropAdapter;
 import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
 
@@ -69,7 +66,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
        public IStatus handleDrop(CommonDropAdapter dropAdapter,
                        DropTargetEvent dropTargetEvent, Object target) {
 
-               
+
                if (target instanceof ITaxonTreeNode) {
                        Set<TaxonNode> taxonNodes = getSelectedTaxa();
                        ITaxonTreeNode targetTreeNode = (ITaxonTreeNode) target;
@@ -77,17 +74,17 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                targetTreeNode = ((Classification)targetTreeNode).getRootNode();
                                targetTreeNode = HibernateProxyHelper.deproxy(targetTreeNode, TaxonNode.class);
                        }
-                       if(taxonNodes != null) {
-                               if (taxonNodes.size() == 1){
-                                       return moveTaxon(taxonNodes.iterator().next(), targetTreeNode);
-                               } else{
+                       //if(taxonNodes != null) {
+                               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.")){
                                                return null;
                                        }
-                               }
+                               }*/
             }
                }
-               
+
                return Status.CANCEL_STATUS;
        }
 
@@ -168,7 +165,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
         * @param parentTaxon
         * @return
         */
-       private IStatus moveTaxon(TaxonNode taxonNode, ITaxonTreeNode targetITaxonTreeNode) {
+       private IStatus moveTaxon(Set<TaxonNode> taxonNodes, ITaxonTreeNode targetITaxonTreeNode) {
 
                TaxonNavigator taxonNavigator;
                taxonNavigator = (TaxonNavigator) NavigationUtil.showView(TaxonNavigator.ID);
@@ -184,17 +181,24 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                        }
 
                }
+               Iterator<TaxonNode> taxIterator = taxonNodes.iterator();
+        Set<UUID> uuids = new HashSet<UUID>();
+        TaxonNode node = null;
+        while(taxIterator.hasNext()){
+            node = taxIterator.next();
+            uuids.add(node.getUuid());
+        }
                if (!PreferencesUtil.getSortNodesNaturally()){
                        IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
                        if (workspaceUndoContext == null) {
                                logger.error("Workspace undo context is null. DND operation cancelled");
                                return Status.CANCEL_STATUS;
                        }
-       
+
                        AbstractPostOperation operation = new MoveTaxonOperation
-                                       ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, true);
+                                       ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
                        NavigationUtil.executeOperation(operation);
-                       
+
                        logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                        return Status.OK_STATUS;
                }else{
@@ -208,11 +212,11 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        logger.error("Workspace undo context is null. DND operation cancelled");
                                        return Status.CANCEL_STATUS;
                                }
-               
+
                                AbstractPostOperation operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, true);
+                                               ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, true);
                                NavigationUtil.executeOperation(operation);
-                               
+
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
                        }else if (returnCode == 1){
@@ -221,18 +225,18 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        logger.error("Workspace undo context is null. DND operation cancelled");
                                        return Status.CANCEL_STATUS;
                                }
-               
+                               TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
                                AbstractPostOperation operation = new MoveTaxonOperation
-                                               ("Move Taxon", workspaceUndoContext, taxonNode, targetITaxonTreeNode, this, taxonNavigator, false);
+                                               ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
                                NavigationUtil.executeOperation(operation);
-                               
+
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
                        } else{
                                return Status.CANCEL_STATUS;
                        }
-                       
-                       
+
+
                }
        }
 
index 55df02ba26580f05fa4cc09d74df9336257d6b6e..f8e789caf1eb1b506a52ed9e2f6d577a481374f2 100644 (file)
@@ -87,6 +87,7 @@ public class DeleteHandler extends AbstractHandler{
                                ITaxonTreeNode treeNode = treeNodes.iterator().next();
                                ITaxonTreeNode taxonNode =treeNode;
                                TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+                               //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.")){
                                                return null;
@@ -122,9 +123,10 @@ public class DeleteHandler extends AbstractHandler{
 
                                                }
                                        }else{
-                                               if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, 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?")){
                                                        return null;
                                                }
+                                               config.setTaxonNodeConfig(configNodes);
                                        }
                                }
 
@@ -144,6 +146,8 @@ public class DeleteHandler extends AbstractHandler{
 
                        } catch (NotDefinedException e) {
                                MessagingUtils.warn(getClass(), "Command name not set");
+                       } catch (Exception e){
+                           MessagingUtils.error(getClass(), e);
                        }
                } else{
                        try{
@@ -159,7 +163,9 @@ public class DeleteHandler extends AbstractHandler{
                                }
                        }catch (NotDefinedException e) {
                                MessagingUtils.warn(getClass(), "Command name not set");
-                       }
+                       } catch (Exception e){
+                MessagingUtils.error(getClass(), e);
+            }
                }
                return null;
        }
index 4c84b0197943fbdcd70f5ab5564839119aa1cef6..a761433ad4462b238d487c9d39d809ea973cc21b 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.
 */
@@ -19,32 +19,21 @@ import java.util.UUID;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.expressions.EvaluationContext;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.ITreeNode;
-import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionNaturalOrderDialog;
 
 /**
  * <p>MoveTaxonHandler class.</p>
@@ -61,35 +50,41 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
         * @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 {
                activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
                TaxonNavigator taxonNavigator = (TaxonNavigator)NavigationUtil.showView(TaxonNavigator.ID);
-               
+
                TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
-               
+
                Iterator selectionIterator = selection.iterator();
-               TaxonNode taxonNode = null;
-               UUID taxonNodeUUID = null;
+               Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
+               TaxonNode taxonNode= null;
+               Set<UUID> taxonNodeUUIDs = new HashSet<UUID>();
                // do not show the current selection
                List<UUID> excludeTaxa = new ArrayList<UUID>();
-               
-               if (selection.size() == 1){
+
+               //if (selection.size() == 1){
+
+               while (selectionIterator.hasNext()){
                        Object object = selectionIterator.next();
                        if(object instanceof TaxonNode){
-                               taxonNode = HibernateProxyHelper.deproxy(object,TaxonNode.class);
-                               taxonNodeUUID = taxonNode.getUuid();
+                           taxonNode = HibernateProxyHelper.deproxy(object,TaxonNode.class);
+                               taxonNodes.add(taxonNode);
+                               taxonNodeUUIDs.add(taxonNode.getUuid());
                                excludeTaxa.add(taxonNode.getTaxon().getUuid());
                        }
-               } else{
+               }
+               /*} else{
                        if( MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Moving taxon", "The operation move accepted taxon to other parent is available only for a single taxon.")){
                                return null;
                        }
-               }
-               
-               
+               }*/
+
+
 //             TaxonNode taxonNode = (TaxonNode) selection.getFirstElement();
-               if (taxonNode != null){
-                       boolean moveToNewParent = true; 
+               if (taxonNodes.size() >= 1){
+                       boolean moveToNewParent = true;
                        if (PreferencesUtil.getSortNodesNaturally()){
                                if(!MessageDialog.openQuestion(null, "Target node", "The choosen target node should be the parent?")){
                                        moveToNewParent = false;
@@ -104,13 +99,13 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
                                                        "changes in the parent taxon. Please save first.");
                                        return null;
                                }
-                               
+
                                AbstractPostOperation operation = new MoveTaxonOperation
                                                ("Move taxon to new parent", NavigationUtil.getUndoContext(),
-                                                               taxonNode, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$
+                                                               taxonNodeUUIDs, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$
                                NavigationUtil.executeOperation(operation);
                                taxonNavigator.refresh();
-                       
+
                        }
                }
                return null;
@@ -120,7 +115,8 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
         * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
         */
        /** {@inheritDoc} */
-       public boolean postOperation(CdmBase objectAffectedByOperation) {
+       @Override
+    public boolean postOperation(CdmBase objectAffectedByOperation) {
                return true;
        }
 
@@ -129,10 +125,11 @@ public class MoveTaxonHandler extends AbstractHandler implements IPostOperationE
         *
         * @return a boolean.
         */
-       public boolean onComplete() {
+       @Override
+    public boolean onComplete() {
                return false;
        }
-       
-       
-       
+
+
+
 }
index 0471420414d1b0506c810a3593dbdb46c45d273a..5e78bd2ddb6ff8da75c17075ec28f1443afec236 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.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -107,10 +108,14 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                } else if (!result.getExceptions().isEmpty()){
                                        String separator = ", ";
                                    String exceptionString = "";
+                                   int count = 1;
                                    for (Exception exception : result.getExceptions()) {
-                                   exceptionString += exception.getLocalizedMessage()+separator;
+                                       exceptionString += exception.getLocalizedMessage();
+                                       if (count < result.getExceptions().size()){
+                                           exceptionString += separator;
+                                       }
                                }
-                                       MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString);
+                                       MessagingUtils.informationDialog("Delete of the node was successful but the taxon could not be deleted.", exceptionString);
                                }
 
 
@@ -124,8 +129,12 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
 
                                DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
                                if (result.isError() && !result.getExceptions().isEmpty()){
-                                       //TODO:Error message!
-                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                                   String separator = ", ";
+                    String exceptionString = "";
+                    for (Exception exception : result.getExceptions()) {
+                        exceptionString += exception.getLocalizedMessage()+separator;
+                    }
+                                   MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
                                }
 
                                /*}else{
@@ -139,8 +148,12 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
 
                                DeleteResult result =service.deleteTaxonNodes(treeNodes, config);
                                if (result.isError() && !result.getExceptions().isEmpty()){
-                                       //TODO:Error message!
-                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                                   String separator = ", ";
+                    String exceptionString = "";
+                    for (Exception exception : result.getExceptions()) {
+                        exceptionString += exception.getLocalizedMessage()+separator;
+                    }
+                    MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
                                }
                        }
 
index bd2b57db5ecb6f2daebf24ad111b936ad3e5ad93..830d572a4cb9088551fbeca75738c0cfdec9846b 100644 (file)
@@ -9,9 +9,6 @@
 
 package eu.etaxonomy.taxeditor.navigation.navigator.operation;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -22,13 +19,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
-import eu.etaxonomy.cdm.model.taxon.IllegalAncestryException;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@ -46,14 +40,14 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
        /**
         * A reference to the new taxonomical parent.
         */
-       private ITaxonTreeNode newParentTreeNode;
+       private final ITaxonTreeNode newParentTreeNode;
        /**
         * A reference to the former taxonomical parents
         */
        //private Map<TaxonNode, ITaxonTreeNode> oldParentTreeNodes;
 
-       private TaxonNode taxonNode;
-       private boolean moveToParentNode;
+       private final Set<UUID> taxonNodesUuid;
+       private final boolean moveToParentNode;
        /**
         * <p>Constructor for MoveTaxonOperation.</p>
         *
@@ -65,18 +59,18 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
        public MoveTaxonOperation(String label, IUndoContext undoContext,
-                       TaxonNode taxonNodeToMove, ITaxonTreeNode newParentTreeNode, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled, boolean moveToParentNode) {
+                       Set<UUID> taxonNodesUUIDToMove, ITaxonTreeNode newParentTreeNode, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled, boolean moveToParentNode) {
                super(label, undoContext, postOperationEnabled, conversationEnabled);
-               
-               this.taxonNode = taxonNodeToMove;
+
+               this.taxonNodesUuid = taxonNodesUUIDToMove;
                /*for (TaxonNode node:taxonNodes){
                        this.taxonNodes.add(service.load(node.getUuid()));
                }*/
-               
+
                this.newParentTreeNode = newParentTreeNode;
                this.moveToParentNode = moveToParentNode;
                // Save old parent ITaxonTreeNodes for undo
-               
+
                //this.parentNode = taxonNode.getParent();
        }
 
@@ -90,13 +84,13 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
                bind();
                monitor.worked(20);
 
-               UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNode(this.taxonNode.getUuid(),newParentTreeNode.getUuid(), moveToParentNode);
+               UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNodes(this.taxonNodesUuid,newParentTreeNode.getUuid());
 //             try {
 //                     for (TaxonNode taxonNode : taxonNodes){
 //                             TaxonNode newTaxonNode = newParentTreeNode.addChildNode(taxonNode,
 //                                             newParentTreeNode.getReference(), newParentTreeNode.getMicroReference());
 //                             //taxonNodes.add(newTaxonNode);
-//                             
+//
 //                             monitor.worked(2);
 //                     }
 //             } catch(IllegalAncestryException e) {
index 1afcab1392dd1ae6078b0b88bf58eef08b33fc24..c2fab1cf1fe09b1d991485d1f9ab9467740e5c34 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: 3.7.1
+Bundle-Version: 3.8.0
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib,
index 8b130dfe655eb7fc64db4c10e7019dec5f5ff26e..efa42a578cb6b1fb8a8a543fc880cc01b8480d0d 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <artifactId>taxeditor-parent</artifactId>
                <groupId>eu.etaxonomy</groupId>
-               <version>3.7.1</version>
+               <version>3.8.0</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index dbb481a833410e2cffdd8b679c126345211f7381..113e56e71416bfe49c7b43de0d5f0b762f768ac5 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: 3.7.1
+Bundle-Version: 3.8.0
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
index a13d96793be297842565f4adad8c6dd84442ae23..14ce99859929ece86fb1049e56f92d4939cc4ab5 100644 (file)
@@ -155,4 +155,7 @@ extension-point.name = Cdm Viewer
 Bundle-Vendor = EDIT\r
 Bundle-Name = DataStore Bundle\r
 command.name.13 = delete\r
-command.name.14 = delete
\ No newline at end of file
+command.name.14 = delete\r
+page.name.32 = TaxonNavigator\r
+page.name.33 = Sort of Taxonnodes\r
+command.name.15 = Open
\ No newline at end of file
index 28fb041ac8601f9408ed20a1a97425661483ef05..fdc32d0692732090b3a5cdbd64382a4a76178335 100644 (file)
@@ -129,5 +129,7 @@ page.name.27 = Media
 page.name.28 = Checklisten Editor
 page.name.29 = Editor Profil
 page.name.30 = Sprache
+page.name.32 = TaxonNavigator
+page.name.33 = Sortierung im TaxonNavigator
 command.label.clone = Klonen
 command.label.openInSpecimenEditor = \u00d6ffnen im Specimen-Editor
\ No newline at end of file
index 9d02cb1d2161281aeb6db9994cc46588b4536df7..282c00b7f59e2e9acdefbabc7fa5d1932dbc577c 100644 (file)
@@ -15,4 +15,8 @@ LanguageEditorPreferencePage_EditorHasToRestart=The application has to be restar
 LanguageEditorPreferencePage_PleaseRestart=Please Restart\r
 LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.\r
 OrderPreferencePage_NewNavigatorWindowRequired=After changing the order of the taxon nodes, closing and reopen of the taxon navigator is required.\r
-OrderPreferencePage_PleaseReopenNavigator=Please close and reopen the taxon navigator.
\ No newline at end of file
+OrderPreferencePage_PleaseReopenNavigator=Please close and reopen the taxon navigator.\r
+UriWithLabelElement_URL_NOT_SAVED=URL won't be saved\! \r
+UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Could not open external browser. URI is invalid.\r
+UriWithLabelElement_INVALID_URL=Invalid URI\r
+UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Open in external browser\r
index 3c18fec10e3b677c3d05f72f09091afde89a3769..f60b1dc309f846c8e9054a9a9728abd70233be1f 100644 (file)
@@ -1,17 +1,21 @@
-CdmDataSourceViewPart_1=Datenquelle wird geladen\r
-CdmDataSourceViewPart_10=Server\r
-CdmDataSourceViewPart_11=Name\r
-CdmDataSourceViewPart_12=Verbunden\r
-CdmDataSourceViewPart_2=Notizen\r
-CdmDataSourceViewPart_3=Kompatibel\r
-CdmDataSourceViewPart_4=CDM Version\r
-CdmDataSourceViewPart_5=Erstellt\r
-CdmDataSourceViewPart_6=Nomenklaturcode\r
-CdmDataSourceViewPart_7=Datenquelle\r
-CdmDataSourceViewPart_8=Typ\r
-CdmDataSourceViewPart_9=Verf\u00FCgbar\r
-LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte wählen Sie die Standardsprache für den Taxonomischen Editor aus.\r
-LanguageEditorPreferencePage_EditorHasToRestart=Der Anwendung muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?\r
-LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten\r
-LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.\r
-OrderPreferencePage_NewNavigatorWindowRequired=Nach dem Ã„ndern der Taxon Sortierung, ist das Schließen und erneute Ã–ffnen des taxon Navigators erforderlich.
\ No newline at end of file
+CdmDataSourceViewPart_1=Datenquelle wird geladen
+CdmDataSourceViewPart_10=Server
+CdmDataSourceViewPart_11=Name
+CdmDataSourceViewPart_12=Verbunden
+CdmDataSourceViewPart_2=Notizen
+CdmDataSourceViewPart_3=Kompatibel
+CdmDataSourceViewPart_4=CDM Version
+CdmDataSourceViewPart_5=Erstellt
+CdmDataSourceViewPart_6=Nomenklaturcode
+CdmDataSourceViewPart_7=Datenquelle
+CdmDataSourceViewPart_8=Typ
+CdmDataSourceViewPart_9=Verf\u00FCgbar
+LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte wählen Sie die Standardsprache für den Taxonomischen Editor aus.
+LanguageEditorPreferencePage_EditorHasToRestart=Der Anwendung muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?
+LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten
+LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.
+OrderPreferencePage_NewNavigatorWindowRequired=Nach dem Ã„ndern der Taxon Sortierung, ist das Schließen und erneute Ã–ffnen des taxon Navigators erforderlich.
+UriWithLabelElement_URL_NOT_SAVED=URL wird nicht gespeichert\! 
+UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Externer Browser konnte nicht geöffnet werden. URI ist ung\u00FCtlig.
+UriWithLabelElement_INVALID_URL=Ung\u00FCltige URI
+UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Im Browser Ã¶ffnen 
\ No newline at end of file
index 41a4ad279bcfe7f014dca98ed5648424dd114637..320968a8ba32cac8b9abdb71a6e7b08e4d0451ce 100644 (file)
             id="eu.etaxonomy.taxeditor.preference.defaultlanguagepditorpreferencePage"
             name="%page.name.30">
       </page>
-      <page
+       <page
             category="eu.etaxonomy.taxeditor.preferences.general"
             class="eu.etaxonomy.taxeditor.preference.OrderPreferences"
-            id="eu.etaxonomy.taxeditor.preference.OrderPreferencesPage"
-            name="%page.name.31">
+            id="eu.etaxonomy.taxeditor.preference.TaxonNavigator"
+            name="%page.name.32">
       </page>
    </extension>
    <extension
       <command
             defaultHandler="eu.etaxonomy.taxeditor.handler.OpenHandler"
             id="eu.etaxonomy.taxeditor.store.open"
-            name="Open">
+            name="%command.name.15">
       </command>
    </extension>
    <extension
index 38be44236c77c7a0bee3da8a85fc1789f228314f..bb1ea1746ea24c121b07f77767d5f68f36f515f3 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-       <version>3.7.1</version>
+       <version>3.8.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 9757c60b19eec36087b3f7ba0bc39a0eac1e5683..0aa1e9c64bf59c75a92f0ac8e4439478b7219c74 100644 (file)
@@ -36,6 +36,10 @@ public class Messages extends NLS {
     public static String CdmDataSourceViewPart_7;
     public static String CdmDataSourceViewPart_8;
     public static String CdmDataSourceViewPart_9;
+    public static String UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
+    public static String UriWithLabelElement_INVALID_URL;
+    public static String UriWithLabelElement_OPEN_EXTERNAL_BROWSER;
+    public static String UriWithLabelElement_URL_NOT_SAVED;
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index 3b6997e0ae28ff2cf8ad487fe3c4816c733b05e3..42bd4714e1306cb938c6b5a9a0016b57ff21963f 100644 (file)
@@ -1,20 +1,20 @@
 // $Id$
 /**
-* Copyright (C) 2007 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.
-*/
+ * Copyright (C) 2007 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.model;
 
-
 /**
  *
- * Clients implementing this interface indicate, that the data they present is suitable for the media view
- * and that the media view should handle selection from the implementing part.
+ * Clients implementing this interface indicate, that the data they present is
+ * suitable for the media view and that the media view should handle selection
+ * from the implementing part.
  *
  * @author pplitzner
  * @date Sep 16, 2014
@@ -22,4 +22,12 @@ package eu.etaxonomy.taxeditor.model;
  */
 public interface IPartContentHasMedia {
 
+    /**
+     * Return <code>true</code> if media can be attached to the editor input and
+     * <code>false</code> otherwise
+     *
+     * @return true or false depending on the input of the implementing part
+     */
+    public boolean canAttachMedia();
+
 }
index 336f39eb8bb75ba4d4f52a1a6ab6a1c9e9d67020..66f714a87147fcdd77112130eec42e3f64b3cf35 100644 (file)
@@ -160,6 +160,7 @@ public class ImageResources {
 
     public static final String CHARACTER_DATA_DERIVATE = "character_data_derivate";
 
+    public static final String WEB = "web";
 
 
        /***************************************************************************
@@ -381,6 +382,9 @@ public class ImageResources {
                registerImage(registry, CHARACTER_DATA_DERIVATE,
                        "character_data_derivate-16x16-32.png");
 
+               registerImage(registry, WEB,
+                       "web.gif");
+
        }
 
        private void registerImage(ImageRegistry registry, String key,
index 54c8d498fcf6fc7592ed088d6e8f3cdd9e6b071f..b316c2a0692e06056eb5f368d5a5206dbb07c898 100644 (file)
@@ -193,6 +193,8 @@ public class MessagingUtils {
         contextInfo.add("editor version : " + version);
         contextInfo.add("server : " + server + " / " + name);
         contextInfo.add("schema version : " + schemaVersion);
+        contextInfo.add("os : " + System.getProperty("os.name")+" "+System.getProperty("os.version")+" "+System.getProperty("os.arch"));
+        contextInfo.add("java : "+System.getProperty("java.version"));
 
         return contextInfo;
     }
index 0eb45b3dd42c8ea7d90f6e83f83c7f773928d010..cc437488aaf73287944eff9dc011fe589bec495c 100644 (file)
@@ -13,6 +13,7 @@ package eu.etaxonomy.taxeditor.store;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.widgets.Display;
@@ -22,6 +23,7 @@ import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.IReferenceService;
+import eu.etaxonomy.cdm.api.service.IService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;
@@ -29,6 +31,7 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.User;
@@ -59,15 +62,11 @@ public class SearchManager {
        // TODO make this configurable via preferences
        private static final int MAX_RESULTS_BEFORE_WARNING = 500;
 
-       /**
-        * <p>findNames</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
        public List<TaxonNameBase> findNames(IIdentifiableEntityServiceConfigurator configurator){
                if(checkLargeResult(CdmStore.getService(INameService.class).countByTitle(configurator))){
-                       return CdmStore.getService(INameService.class).findByTitle(configurator).getRecords();
+                       List<TaxonNameBase> records = CdmStore.getService(INameService.class).findByTitle(configurator).getRecords();
+                       addUuidSearchResults(records, configurator, INameService.class);
+            return records;
                }
                return NO_RESULTS;
        }
@@ -75,6 +74,7 @@ public class SearchManager {
        public List<NameRelationship> findNameRelationships(
                        IIdentifiableEntityServiceConfigurator configurator) {
                if(true){
+                   //if activated again remember to add uuid search results like in other searches
                        return NO_RESULTS;
                }
 
@@ -86,62 +86,54 @@ public class SearchManager {
                                relationships.add((NameRelationship) relationship);
                        }
                }
-
-
                return relationships;
-
        }
 
-       /**
-        * <p>findTaxaAndNames</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
        public List<UuidAndTitleCache<IdentifiableEntity>> findTaxaAndNames(IFindTaxaAndNamesConfigurator<TaxonBase> configurator){
                return CdmStore.getService(ITaxonService.class).findTaxaAndNamesForEditor(configurator);
        }
 
-
-
-
-       /**
-        * <p>findReferences</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
        public List<Reference> findReferences(IIdentifiableEntityServiceConfigurator configurator){
                if(checkLargeResult(CdmStore.getService(IReferenceService.class).countByTitle(configurator))){
-                       return  CdmStore.getService(IReferenceService.class).findByTitle(configurator).getRecords();
+                       List<Reference> records = CdmStore.getService(IReferenceService.class).findByTitle(configurator).getRecords();
+                       addUuidSearchResults(records, configurator, IReferenceService.class);
+            return records;
                }
                return NO_RESULTS;
        }
 
-
-       /**
-        * <p>findAgents</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
        public List<AgentBase> findAgents(IIdentifiableEntityServiceConfigurator configurator){
                if(checkLargeResult(CdmStore.getService(IAgentService.class).countByTitle(configurator))){
-                       return CdmStore.getService(IAgentService.class).findByTitle(configurator).getRecords();
+                       List<AgentBase> records = CdmStore.getService(IAgentService.class).findByTitle(configurator).getRecords();
+                       addUuidSearchResults(records, configurator, IAgentService.class);
+            return records;
                }
                return NO_RESULTS;
        }
 
-       /**
-        * <p>findTeamOrPersons</p>
-        *
-        * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
-        * @return a {@link java.util.List} object.
-        */
+    /**
+     * Check search string if it is a {@link UUID} and, if <code>true</code>, search for the corresponding entity.
+     * @param records the list to which the search results are added
+     * @param configurator the configurator holding the search string
+     * @param service the service to use for searching
+     */
+    private <T extends ICdmBase> void addUuidSearchResults(List<T> records, IIdentifiableEntityServiceConfigurator configurator, Class<? extends IService<T>> service) {
+        String titleSearchString = configurator.getTitleSearchString();
+               try {
+                   UUID uuid = UUID.fromString(titleSearchString);
+                   T foundRecord = CdmStore.getService(service).find(uuid);
+                   if(foundRecord!=null){
+                       records.add(foundRecord);
+                   }
+               } catch (IllegalArgumentException e) {
+                   //search string was no UUID
+               }
+    }
+
        @SuppressWarnings("unchecked")
        public List<TeamOrPersonBase> findTeamOrPersons(IIdentifiableEntityServiceConfigurator configurator){
-               configurator.setClazz(TeamOrPersonBase.class);
-               return (List)findAgents(configurator);
+           configurator.setClazz(TeamOrPersonBase.class);
+           return (List)findAgents(configurator);
        }
 
        /**
@@ -169,6 +161,7 @@ public class SearchManager {
         * @return
         */
        public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> configurator, boolean showFieldUnits){
+           List<SpecimenOrObservationBase> records = new ArrayList<SpecimenOrObservationBase>();
                if(configurator.getClazz()==null){
                    if(showFieldUnits){
                        configurator.setClazz(SpecimenOrObservationBase.class);
@@ -179,7 +172,6 @@ public class SearchManager {
                }
                if(configurator.getClazz().equals(SpecimenOrObservationBase.class)){
                    //get FieldUnits + DerivedUnits
-                   List<SpecimenOrObservationBase> records = new ArrayList<SpecimenOrObservationBase>();
                    configurator.setClazz(DerivedUnit.class);
                    int derivedUnitCount = CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator);
                    configurator.setClazz(FieldUnit.class);
@@ -191,33 +183,33 @@ public class SearchManager {
                        configurator.setClazz(FieldUnit.class);
                        records.addAll(CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords());
                    }
-                   return records;
 
                }
-               if(checkLargeResult(CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator))){
-                       return CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords();
+               else if(checkLargeResult(CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator))){
+                       records = CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords();
                }
-               return NO_RESULTS;
+               addUuidSearchResults(records, configurator, IOccurrenceService.class);
+               return records;
        }
 
        public List<User> findUsers(IIdentifiableEntityServiceConfigurator configurator){
                String userNameSearchString = sqlizeTitleSearchString(configurator);
                // TODO why are users not identifiable entities?
-               return CdmStore.getService(IUserService.class).listByUsername(userNameSearchString, null, null, null, null, null, null);
+               List<User> records = CdmStore.getService(IUserService.class).listByUsername(userNameSearchString, null, null, null, null, null, null);
+               addUuidSearchResults(records, configurator, IUserService.class);
+        return records;
        }
 
 
        public List<Group> findGroups(IIdentifiableEntityServiceConfigurator configurator){
                String groupNameSearchString = sqlizeTitleSearchString(configurator);
                // TODO why are groups not identifiable entities?
-               return CdmStore.getService(IGroupService.class).listByName(groupNameSearchString, null, null, null, null, null, null);
+               List<Group> records = CdmStore.getService(IGroupService.class).listByName(groupNameSearchString, null, null, null, null, null, null);
+               addUuidSearchResults(records, configurator, IGroupService.class);
+        return records;
        }
 
 
-       /**
-        * @param count
-        * @return
-        */
        private boolean checkLargeResult(int count) {
                if(count > MAX_RESULTS_BEFORE_WARNING){
                        return MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Large result expected",
@@ -228,18 +220,15 @@ public class SearchManager {
                }
        }
 
-       /**
-        *
-        * @param configurator
-        * @return
-        */
        private String sqlizeTitleSearchString(IIdentifiableEntityServiceConfigurator configurator){
                return configurator.getTitleSearchString().replace(WILDCARD, "%");
        }
 
        public List findTaxa(IIdentifiableEntityServiceConfigurator configurator) {
                if(checkLargeResult(CdmStore.getService(ITaxonService.class).countByTitle(configurator))){
-                       return CdmStore.getService(ITaxonService.class).findByTitle(configurator).getRecords();
+                       List<TaxonBase> records = CdmStore.getService(ITaxonService.class).findByTitle(configurator).getRecords();
+                       addUuidSearchResults(records, configurator, ITaxonService.class);
+            return records;
                }
                return NO_RESULTS;
        }
index eb36edac26f314ac4853c445ef28331754b62449..647addd10ccaea42b89725ac4b201456b51c25e5 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
 
 /**
  * Abstract subclass of MessageDialog providing the functionality to configure
@@ -49,7 +50,10 @@ public class DeleteConfiguratorDialog extends MessageDialog{
         }
         else if(configurator instanceof SpecimenDeleteConfigurator){
             composite.addConfiguratorComposite(new DeleteSpecimenConfiguratorComposite((SpecimenDeleteConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
+        } else if(configurator instanceof TaxonNodeDeletionConfigurator){
+            composite.addConfiguratorComposite(new DeleteNodeConfiguratorComposite((TaxonNodeDeletionConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
         }
+        
         return composite;
     }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteNodeConfiguratorComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteNodeConfiguratorComposite.java
new file mode 100644 (file)
index 0000000..4901526
--- /dev/null
@@ -0,0 +1,76 @@
+package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+/**
+* 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.
+*/
+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.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.layout.RowLayout;
+
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
+/**
+ * @author kluther
+ * @date Jul 13, 2015
+ *
+ */
+public class DeleteNodeConfiguratorComposite extends Composite {
+       // $Id$
+       
+       private final DataBindingContext m_bindingContext;
+
+       private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
+       private final TaxonNodeDeletionConfigurator configurator;
+       private final Button btnDeleteTaxon;
+
+
+           /**
+            * Create the composite.
+            * @param parent
+            * @param style
+            */
+           public DeleteNodeConfiguratorComposite(TaxonNodeDeletionConfigurator configurator, Composite parent, int style) {
+               super(parent, style);
+               this.configurator = configurator;
+               addDisposeListener(new DisposeListener() {
+                   @Override
+                   public void widgetDisposed(DisposeEvent e) {
+                       toolkit.dispose();
+                   }
+               });
+               toolkit.paintBordersFor(this);
+               setLayout(new RowLayout(SWT.VERTICAL));
+               setBackground(getBackground());
+
+               btnDeleteTaxon = new Button(this, SWT.CHECK);
+               btnDeleteTaxon.setText("Delete taxon if possible");
+            
+               m_bindingContext = initDataBindings();
+
+           }
+
+           protected DataBindingContext initDataBindings() {
+               DataBindingContext bindingContext = new DataBindingContext();
+               //
+               IObservableValue observeSelectionBtnDeleteTaxonObserveWidget = WidgetProperties.selection().observe(btnDeleteTaxon);
+               IObservableValue deleteTaxonIfPossibleConfiguratorObserveValue = PojoProperties.value("deleteTaxon").observe(configurator);
+               bindingContext.bindValue(observeSelectionBtnDeleteTaxonObserveWidget, deleteTaxonIfPossibleConfiguratorObserveValue, null, null);
+               //
+               return bindingContext;
+           }
+       }
+
+
index e2e864bceb5333cfeadf8bea5f2734f12d3accff..a5a3ba167148fc74c4b2b8f07fdfc31fc3fcba42 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
@@ -31,8 +31,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @author p.ciardelli
  * @version $Id: $
  */
-public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonNode> implements SelectionListener{      
-       
+public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<TaxonNode> implements SelectionListener{
+
        /**
         * <p>select</p>
         *
@@ -44,7 +44,7 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
         * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
         */
        public static TaxonNode select(Shell shell, ConversationHolder conversation, String title, List<UUID> excludeTaxa, TaxonNode node, Classification classification) {
-               TaxonNodeSelectionDialog dialog = new TaxonNodeSelectionDialog(shell, 
+               TaxonNodeSelectionDialog dialog = new TaxonNodeSelectionDialog(shell,
                                conversation,
                                title,
                                excludeTaxa,
@@ -57,8 +57,8 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
        private Combo classificationSelectionCombo;
 
        private List<Classification> classifications;
-       
-       private Classification selectedClassification;  
+
+       private Classification selectedClassification;
 
        /**
         * <p>Constructor for FilteredTaxonNodeSelectionDialog.</p>
@@ -72,12 +72,12 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
         */
        protected TaxonNodeSelectionDialog(Shell shell, ConversationHolder conversation, String title, List<UUID> excludeTaxa, boolean multi, TaxonNode node, Classification classification) {
                super(shell, conversation, title, multi, TaxonNodeSelectionDialog.class.getCanonicalName(), node);
-               
+
                ILabelProvider labelProvider = new FilteredCdmResourceLabelProvider();
 
                setListLabelProvider(labelProvider);
                setDetailsLabelProvider(labelProvider);
-               
+
                if(classification != null){
                        selectedClassification = classification;
                }
@@ -92,36 +92,37 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
        protected Control createExtendedContentArea(Composite parent) {
                return createClassificationSelectionCombo(parent);
        }
-       
+
        /*
         * currently disabled tree selection composite
         */
        private Control createClassificationSelectionCombo(Composite parent){
 //             classifications = CdmStore.getTaxonTreeService().list(null, null, null, null, null);
-               
+
                Composite classificationSelection = new Composite(parent, SWT.NULL);
                classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-               
+
                GridLayout layout = new GridLayout();
                classificationSelection.setLayout(layout);
-               
+
                Label label = new Label(classificationSelection, SWT.NULL);
                // TODO not working is not really true but leave it here to remind everyone that this is under construction
-               label.setText("Select Classification (experimental)");
+               label.setText("Select Classification");
                classificationSelectionCombo = new Combo(classificationSelection, SWT.BORDER | SWT.READ_ONLY);
                classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
-               
+
                for(Classification tree : classifications){
                        classificationSelectionCombo.add(tree.getName().getText(), classifications.indexOf(tree));
+
                }
-               
+
                classificationSelectionCombo.select(classifications.indexOf(selectedClassification));
-               
+
                // TODO remember last selection
                classificationSelectionCombo.addSelectionListener(this);
-               
-               
-               
+
+
+
                return classificationSelection;
        }
 
@@ -131,10 +132,10 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                if(taxonNode != null && taxonNode.getTaxon() != null){
                        return taxonNode.getTaxon().getTitleCache();
                }
-               
+
                return "";
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
         */
@@ -150,15 +151,15 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
        /** {@inheritDoc} */
        @Override
        protected void initModel() {
-               // default to first tree 
-               // TODO this will be problematic and can only be seen as workaround 
-               
-               
+               // default to first tree
+               // TODO this will be problematic and can only be seen as workaround
+
+
                if(classifications == null){
                        classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
                        selectedClassification = classifications.iterator().next();
                }
-               
+
                model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification);
        }
 
@@ -173,17 +174,19 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
        protected String getNewWizardLinkText() {
                return null;
        }
-       
+
        /** {@inheritDoc} */
-       public void widgetSelected(SelectionEvent e) {
+       @Override
+    public void widgetSelected(SelectionEvent e) {
                selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex());
-               
+
 //             refresh();
                setPattern(null);
        }
 
        /** {@inheritDoc} */
-       public void widgetDefaultSelected(SelectionEvent e) {}
+       @Override
+    public void widgetDefaultSelected(SelectionEvent e) {}
 
 
 }
index 6afa2b7bff3931051f4dad493bc4a9231b920c7a..a50561e501a82bb5de8d37b8de0b2fb76dfdcc85 100644 (file)
@@ -52,6 +52,11 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 //TODO shouldn't ENTITY be bound with super class ICdmBase for example (AbstractFormSection<ENTITY extends ICdmBase>)?
 public abstract class AbstractFormSection<ENTITY> extends Section implements ISelectionChangedListener, IEntityElement<ENTITY>, IConversationEnabled {
 
+    /**
+     * The default number of columns in detail sections
+     */
+    public static final int DEFAULT_NUM_COLUMNS = 2;
+
        private ISelectionProvider selectionProvider;
 
        private ENTITY entity;
index d5f7b310542dc1212a42e43036f53a09078d8417..039b54c0d7826c31c25ce617e039b2e4ae892e80 100644 (file)
@@ -9,6 +9,7 @@ import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
@@ -19,10 +20,6 @@ import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
 /**
- * <p>
- * TextWithLabelElement class.
- * </p>
- *
  * @author n.hoffmann
  * @version $Id: $
  */
@@ -34,11 +31,14 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
 
     private final boolean isMultiLine;
 
-    /** Constant <code>MAX_HEIGHT=0</code> */
     public static final int MAX_HEIGHT = 0;
-    /** Constant <code>SINGLE=-1</code> */
     public static final int SINGLE = -1;
 
+    protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, boolean isMultiLine) {
+        super(formFactory, parentElement);
+        this.isMultiLine = isMultiLine;
+    }
+
     protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
             String initialText, Integer textHeight, int style) {
         this(formFactory, parentElement, labelString, initialText, textHeight, null, false, style);
@@ -54,45 +54,19 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         this(formFactory, parentElement, labelString, initialText, textHeight, textLimit, false, style);
     }
 
-    /**
-     * <p>
-     * Constructor for TextWithLabelElement.
-     * </p>
-     *
-     * @param formFactory
-     *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-     *            object.
-     * @param parentElement
-     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-     *            object.
-     * @param labelString
-     *            a {@link java.lang.String} object.
-     * @param initialText
-     *            a {@link java.lang.String} object.
-     * @param textHeight
-     *            a {@link java.lang.Integer} object.
-     *            @param textLimit max characters allowed to enter
-     * @param style
-     *            a int.
-     * @wbp.parser.entryPoint
-     */
     protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
             String initialText, Integer textHeight, Integer textLimit, boolean isMultiLine, int style) {
         super(formFactory, parentElement);
 
         this.isMultiLine = isMultiLine;
 
-        if (labelString != null) {
-            label = formFactory.createLabel(getLayoutComposite(), CdmUtils.Nz(labelString), SWT.NULL);
-            addControl(label);
-            if(isMultiLine){
-                label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-            }
-            else{
-                label.setLayoutData(LayoutConstants.LEFT());
-            }
-        }
+        initLabel(formFactory, labelString, isMultiLine, getLayoutComposite());
 
+        initText(formFactory, initialText, textHeight, textLimit, isMultiLine, style, getLayoutComposite());
+    }
+
+    protected void initText(CdmFormFactory formFactory, String initialText, Integer textHeight, Integer textLimit,
+            boolean isMultiLine, int style, Composite layoutComposite) {
         int scrollStyle = textHeight == null ? SWT.NULL : (SWT.V_SCROLL | SWT.MULTI);
 
         int combinedStyle = style | SWT.BORDER | scrollStyle;
@@ -102,7 +76,7 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
             combinedStyle = combinedStyle | SWT.WRAP;
         }
 
-        text = formFactory.createText(getLayoutComposite(), "", combinedStyle);
+        text = formFactory.createText(layoutComposite, "", combinedStyle);
         text.setTextLimit(textLimit!=null?textLimit:Text.LIMIT);
 
         addControl(text);
@@ -145,6 +119,19 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         setText(initialText);
     }
 
+    protected void initLabel(CdmFormFactory formFactory, String labelString, boolean isMultiLine, Composite layoutComposite) {
+        if (labelString != null) {
+            label = formFactory.createLabel(layoutComposite, CdmUtils.Nz(labelString), SWT.NULL);
+            addControl(label);
+            if(isMultiLine){
+                label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+            }
+            else{
+                label.setLayoutData(LayoutConstants.LEFT());
+            }
+        }
+    }
+
     /**
      * Get the text of this composites text composite
      *
@@ -174,13 +161,6 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         }
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events
-     * .ModifyEvent)
-     */
     /** {@inheritDoc} */
     @Override
     public void modifyText(ModifyEvent e) {
@@ -211,9 +191,6 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         text.setForeground(getColor(symbolicName));
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#isEnabled()
-     */
     @Override
     public boolean isEnabled() {
         return text.isEnabled();
@@ -241,36 +218,16 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         setBackground(selected ? SELECTED : getPersistentBackground());
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#setFocus()
-     */
     /** {@inheritDoc} */
     @Override
     public void setFocus() {
         text.setFocus();
     }
 
-    /**
-     * <p>
-     * getMainControl
-     * </p>
-     *
-     * @return a {@link org.eclipse.swt.widgets.Control} object.
-     */
     public Control getMainControl() {
         return text;
     }
 
-    /**
-     * <p>
-     * setTextLimit
-     * </p>
-     *
-     * @param limit
-     *            a int.
-     */
     public void setTextLimit(int limit) {
         text.setTextLimit(limit);
     }
index ee6867db2b3a57827f7e4f552affc3713903b1bc..b9d6300ecb985131e868427f47e5c4db8bf4a330 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.element;
 
+import java.net.MalformedURLException;
 import java.net.URI;
 
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.model.ImageResources;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
  * @author n.hoffmann
@@ -23,14 +40,60 @@ import org.eclipse.swt.widgets.Label;
 public class UriWithLabelElement extends TextWithLabelElement {
 
     private final Label labelException;
+    private final Button btnOpenBrowser;
 
        protected UriWithLabelElement(CdmFormFactory formFactory,
                        ICdmFormElement parentElement, String labelString,
                        URI initialUri, Integer textHeight, int style) {
-               super(formFactory, parentElement, labelString, null, textHeight, style);
+               super(formFactory, parentElement, false);
+
+               //label
+        initLabel(formFactory, labelString, false, getLayoutComposite());
+
+        //composite(uri + button)
+        Composite textAndButton = formFactory.createComposite(getLayoutComposite(), style);
+        addControl(textAndButton);
+        textAndButton.setLayout(LayoutConstants.LAYOUT(2, false));
+        textAndButton.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+
+        //uri text
+        initText(formFactory, null, textHeight, null, false, style, textAndButton);
 
-               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP);
-               labelException.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+        //button
+               btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE); //$NON-NLS-1$
+               btnOpenBrowser.setImage(ImageResources.getImage(ImageResources.WEB));
+               btnOpenBrowser.setToolTipText(Messages.UriWithLabelElement_OPEN_EXTERNAL_BROWSER);
+               btnOpenBrowser.addSelectionListener(new SelectionAdapter() {
+                   @Override
+                   public void widgetSelected(SelectionEvent e) {
+                       String errorTitle = Messages.UriWithLabelElement_INVALID_URL;
+                       String errorText = Messages.UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
+
+                       URI uri = getUri();
+                       if(uri!=null){
+                           try {
+                        PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(uri.toURL());
+                    } catch (PartInitException pie) {
+                        MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, pie));
+                    } catch (MalformedURLException mue) {
+                        MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, mue));
+                    } catch (IllegalArgumentException iae) {
+                        MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, iae));
+                    }
+                       }
+                       else{
+                           MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, null));
+                       }
+                   }
+        });
+               btnOpenBrowser.setLayoutData(LayoutConstants.RIGHT());
+
+               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP); //$NON-NLS-1$
+               int numColumns = AbstractFormSection.DEFAULT_NUM_COLUMNS;
+               if(getLayoutComposite().getLayout() instanceof TableWrapLayout){
+                   numColumns = ((TableWrapLayout)getLayoutComposite().getLayout()).numColumns;
+               }
+        labelException.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(numColumns, 1));
                addControl(labelException);
                setUri(initialUri);
        }
@@ -43,10 +106,14 @@ public class UriWithLabelElement extends TextWithLabelElement {
 
        public URI getUri(){
         try {
-            labelException.setText("");
+            labelException.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
+            labelException.setForeground(getPersistentBackground());
+            labelException.setText(""); //$NON-NLS-1$
             return new URI(super.getText());
         } catch (Exception e) {
-            labelException.setText(e.getMessage());
+            labelException.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
+            labelException.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
+            labelException.setText(Messages.UriWithLabelElement_URL_NOT_SAVED+e.getLocalizedMessage());
             return null;
         }
        }
index 07f08c70463ac355736b0020b1c02f99efb5c5fa..cf2a786c869a2fd781942d8c52231af1900b5fea 100644 (file)
@@ -42,27 +42,6 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
 
        protected ICdmDetailElement<ENTITY> detailElement;
 
-       /**
-        * <p>
-        * Constructor for AbstractCdmDetailSection.
-        * </p>
-        *
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param selectionProvider
-        *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        * @param style
-        *            a int.
-        * @param <ENTITY>
-        *            a ENTITY object.
-        */
        public AbstractCdmDetailSection(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
                        ISelectionProvider selectionProvider, int style) {
@@ -88,15 +67,10 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
         }
        }
 
-       /**
-        * @param abstractCdmDetailSection
-        * @param definedTermClass
-        * @param null1
-        */
        protected void createControlsByType(AbstractCdmDetailSection<ENTITY> formElement, Class<ENTITY> entityClass, int style) {
            TableWrapLayout layout = (TableWrapLayout) getLayoutComposite().getLayout();
            layout.topMargin = 10;
-           layout.numColumns = 2;
+           layout.numColumns = DEFAULT_NUM_COLUMNS;
 
            getLayoutComposite().setLayout(layout);
            if(entityClass==null){
@@ -107,19 +81,6 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
            }
        }
 
-
-       /**
-        * <p>
-        * createControls
-        * </p>
-        *
-        * @param formElement
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection}
-        *            object.
-        * @param style
-        *            a int.
-        */
        protected void createControls(AbstractCdmDetailSection<ENTITY> formElement, int style) {
            createControlsByType(formElement, null, style);
        }
@@ -130,13 +91,6 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
            return createCdmDetailElement(parentElement, style);
        }
 
-       /**
-        * <p>
-        * getHeading
-        * </p>
-        *
-        * @return the heading for this section
-        */
        public abstract String getHeading();
 
        /** {@inheritDoc} */
@@ -152,13 +106,6 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                super.dispose();
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.forms.section.AbstractEditorFormSection#setBackground
-        * (org.eclipse.swt.graphics.Color)
-        */
        /** {@inheritDoc} */
        @Override
        public void setBackground(Color color) {
@@ -168,14 +115,6 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                super.setBackground(color);
        }
 
-       /**
-        * <p>
-        * setEntity
-        * </p>
-        *
-        * @param entity
-        *            a ENTITY object.
-        */
        @Override
        public void setEntity(ENTITY entity) {
                if (detailElement != null) {
@@ -186,33 +125,24 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends AbstractFormSecti
                layout();
        }
 
-       /**
-        * <p>
-        * setSectionTitle
-        * </p>
-        */
        protected void setSectionTitle() {
                String title = "";
                if (getEntity() != null && (getEntity() instanceof IdentifiableEntity) && !(getEntity() instanceof SpecimenOrObservationBase)) {
                        title = ": " + ((IdentifiableEntity) getEntity()).getTitleCache();
+                       // we have to duplicate ampersands otherwise they are treated as
+                       // mnenomic (see Label.setText() documentation)
+                       // see also #4302
+                       title = title.replace("&", "&&");
                }
                this.setText(String.format("%s%s", getHeading(), title));
                setTextClient(createToolbar());
        }
 
-       /**
-        * @return
-        */
        protected Control createToolbar() {
                ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
                return toolBarManager.createControl(this);
        }
 
-       /**
-        * <p>
-        * updateTitle
-        * </p>
-        */
        public void updateTitle() {
                if (!isDisposed()) {
                        setSectionTitle();
index c76a96279b295e40e4cf90c1fb2ba1a7cacac40c..cce5f0c6eccfe395abb85cddb5c3c46a383e345f 100644 (file)
@@ -51,9 +51,12 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
        private ITaxonTreeNode parentTreeNode;
 
        private EntitySelectionElement<Taxon> selection_reuseExistingTaxon;
+       private EntitySelectionElement<Reference> selection_SecRef;
 
        private Taxon taxon;
 
+       private Reference secReference;
+
        private TextWithLabelElement textNewTaxonName;
 
        private CheckboxElement checkbox_openInEditor;
@@ -92,6 +95,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                selection_parentTaxonNode = formFactory
                                .createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", null,
                                                EntitySelectionElement.DELETABLE, style);
+               selection_SecRef = formFactory
+                               .createSelectionElement(Reference.class,getConversationHolder(), formElement, "Secundum Reference", null,
+                                               EntitySelectionElement.DELETABLE, style);
                selection_reuseExistingTaxon = formFactory
                                .createSelectionElement(Taxon.class,
                                                getConversationHolder(), formElement,
@@ -150,20 +156,27 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                        setClassification(selection_classification.getEntity());
                } else if (eventSource == selection_parentTaxonNode) {
                        setParentTreeNode(selection_parentTaxonNode.getEntity());
+               } else if (eventSource == selection_SecRef) {
+                       setSecReference(selection_SecRef.getEntity());
                } else if (eventSource == selection_reuseExistingTaxon) {
-                       boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
-                       selection_reuseExistingName.setEnabled(enabled);
-                       textNewTaxonName.setEnabled(enabled);
+                               boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
+                               selection_reuseExistingName.setEnabled(enabled);
+                               textNewTaxonName.setEnabled(enabled);
+                               if (!enabled){
+                                       setTaxon(selection_reuseExistingTaxon.getEntity());
+                               }
+                               complete = !textNewTaxonName.getText().isEmpty();
+
 
-                       setTaxon(selection_reuseExistingTaxon.getEntity());
                } else if (eventSource == selection_reuseExistingName) {
                        boolean enabled = selection_reuseExistingName.getEntity() == null;
                        selection_reuseExistingTaxon.setEnabled(enabled);
                        textNewTaxonName.setEnabled(enabled);
 
                        setTaxon(selection_reuseExistingName.getEntity());
+                       complete = !textNewTaxonName.getText().isEmpty();
                } else if (eventSource == textNewTaxonName) {
-                       boolean enabled = CdmUtils.isEmpty(textNewTaxonName.getText());
+                       boolean enabled = CdmUtils.isBlank(textNewTaxonName.getText());
                        selection_reuseExistingTaxon.setEnabled(enabled);
                        selection_reuseExistingName.setEnabled(enabled);
 
@@ -235,8 +248,15 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                }
        }
 
+       private void setSecReference(Reference secRef){
+               this.secReference = secRef;
+               setTaxon(textNewTaxonName.getText());
+       }
+
        private void setTaxon(Taxon taxon) {
                this.taxon = taxon;
+               textNewTaxonName.setText(taxon.getName().getTitleCache());
+               this.secReference = taxon.getSec();
        }
 
        private void setTaxon(String taxonNameString) {
@@ -248,7 +268,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
        private void setTaxon(TaxonNameBase taxonName) {
                Reference secundum = null;
                if (getParentTreeNode() != null) {
-                       if (getParentTreeNode() instanceof Classification) {
+                       if (this.secReference != null){
+                               secundum = this.secReference;
+                       } else if (getParentTreeNode() instanceof Classification) {
                                secundum = ((Classification) getParentTreeNode())
                                                .getReference();
                        } else if (getParentTreeNode() instanceof TaxonNode) {
index aff1fbea835495ffde973dd6c9cd5b5761e9d2bd..a38087669e82241c416a132ebe80b281ef625ae9 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * 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,14 +23,10 @@ import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElem
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>
- * DescriptionElementSourceElement class.
- * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Nov 16, 2009
  * @version 1.0
- * @param <T>
  */
 public class DescriptionElementSourceElement extends
                AbstractOriginalSourceElement<DescriptionElementSource> implements
@@ -38,26 +34,6 @@ public class DescriptionElementSourceElement extends
 
        private EntitySelectionElement<TaxonNameBase> selection_name;
 
-       /**
-        * <p>
-        * Constructor for DescriptionElementSourceElement.
-        * </p>
-        * 
-        * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param element
-        *            a
-        *            {@link eu.etaxonomy.cdm.model.common.DescriptionElementSource}
-        *            object.
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        */
        public DescriptionElementSourceElement(CdmFormFactory cdmFormFactory,
                        AbstractFormSection formElement, DescriptionElementSource element,
                        SelectionListener removeListener, int style) {
@@ -65,12 +41,6 @@ public class DescriptionElementSourceElement extends
                formFactory.createSelectionArbitrator(this);
        }
 
-       /*
-        * (non-Javadoc)
-        * 
-        * @see eu.etaxonomy.taxeditor.forms.entitysections.OriginalSourceComposite#
-        * createControls(org.eclipse.swt.widgets.Composite, int)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
@@ -81,13 +51,6 @@ public class DescriptionElementSourceElement extends
                                                null, EntitySelectionElement.ALL, SWT.NULL);
        }
 
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.forms.section.cdmdetail.AbstractOriginalSourceElement
-        * #setElement(eu.etaxonomy.cdm.model.common.OriginalSourceBase)
-        */
        /** {@inheritDoc} */
        @Override
        public void setEntity(DescriptionElementSource entity) {
@@ -108,13 +71,6 @@ public class DescriptionElementSourceElement extends
 
        }
 
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent
-        * (java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
index 7da47bb4c2b0742ac5ffbe3a10ee30c48c7f726e..8e4dcea681aa717b96cf72ccf715eb49efc4d571 100644 (file)
@@ -113,7 +113,7 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                                getTaxonDescriptions(),
                 false, 
                 false, 
-                null,
+               
                 null,
                 presenceAbsenceTermColors, 
                 languages);
index b11a177a5c0b2dc1e137b3d51692c9012709bbf2..46c95c83d6c2a41313356e78855b29ded5eeaa1a 100644 (file)
@@ -64,13 +64,19 @@ public class PolytomousKeyNodeDetailElement extends
                element_statement = formFactory.createKeyStatementElement(formElement,
                                "State(ment)", entity.getStatement(), 50, style);
 
-               //if (entity.isLeaf()) {
+               if (entity.isLeaf()) {
                        selection_taxon = formFactory
                                        .createSelectionElement(Taxon.class,
                                                        getConversationHolder(), formElement, "Taxon",
                                                        entity.getTaxon(), EntitySelectionElement.NOTHING,
                                                        style);
-               //}
+               } else{
+                       selection_taxon = formFactory
+                                       .createSelectionElement(Taxon.class,
+                                                       getConversationHolder(), formElement, "Taxon",
+                                                       entity.getTaxon(), EntitySelectionElement.DELETABLE,
+                                                       style);
+               }
 
                selection_subkey = formFactory
                                .createSelectionElement(PolytomousKey.class,
index fbde0b7e0ed056e51d0b6d809db9aa24e4a535ac..9d016cb3175be5d881d8eb238c4c495ff5b1410d 100644 (file)
@@ -119,7 +119,13 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
                        try {
                            URI uri = text_uri.getUri();
                                getEntity().setUri(uri);
-
+                               if(uri==null){
+                                   //buffer URI if parsing error occurred
+                                   MediaDetailElement parentMediaDetailElement = getParentMediaDetailElement();
+                                   if(parentMediaDetailElement!=null){
+                                       parentMediaDetailElement.setUriBuffer(text_uri.getText());
+                                   }
+                               }
 
                                loadImage(getEntity().getUri(), true);
 
index e05ed4064260e68d770df99dec3a5c11e950a8bd..1c27665647713fdd53c267767588114f683fb708 100644 (file)
@@ -9,6 +9,7 @@
 */
 package eu.etaxonomy.taxeditor.ui.section.media;
 
+import java.net.URI;
 import java.util.List;
 import java.util.Set;
 
@@ -16,6 +17,7 @@ import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.cdm.model.media.MediaUtils;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -39,6 +41,11 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
     private ICdmFormElement parentFormElement;
     private int style;
 
+    /**
+     * Used to store the URI even if it is invalid and thus cannot be stored in CDM
+     */
+    private String uriBuffer;
+
     public MediaDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
         super(formFactory, formElement);
     }
@@ -63,11 +70,25 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
     public void handleEvent(Object eventSource){
         if(eventSource==textUri){
             textUri.setBackground(getPersistentBackground());
-            singleMediaRepresentationPart.setUri(textUri.getUri());
+            URI uri = textUri.getUri();
+            singleMediaRepresentationPart.setUri(uri);
+            if(uri==null){
+                uriBuffer=textUri.getText();
+            }
         }
     }
 
-    public void toggleAdvancedMediaView(){
+    public void toggleAdvancedMediaView() {
+        if (getEntity().getRepresentations() != null
+                && (getEntity().getRepresentations().size() > 1 ||
+                        (getEntity().getRepresentations().size() == 1
+                        && getEntity().getRepresentations().iterator().next().getParts().size() > 1))) {
+            MessagingUtils.informationDialog("Toggling not possible",
+                    "Media has consists of multiple representations or representatio parts");
+            // toggling is only possible if there are no more than one
+            // MediaRepresentation resp. MediaRepresentationParts
+            return;
+        }
         isAdvancedMediaView = !isAdvancedMediaView;
         showAdvancedView();
         reflowParentScrolledForm(true);
@@ -81,13 +102,23 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
             section_mediaRepresentation = formFactory.createMediaRepresentationSection(getConversationHolder(), parentFormElement, style);
             section_mediaRepresentation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
             section_mediaRepresentation.setEntity(getEntity());
+            //set buffered uri as text if uri had parsing problems in simple view
+            if(uriBuffer!=null){
+                section_mediaRepresentation.getLayoutComposite().getChildren();
+            }
         }
         else{
             if(section_mediaRepresentation!=null){
                 removeElementsAndControls(section_mediaRepresentation);
             }
             textUri = formFactory.createUriWithLabelElement(parentFormElement, "Media URI", null, style);
-            textUri.setUri(singleMediaRepresentationPart.getUri());
+            URI uri = singleMediaRepresentationPart.getUri();
+            textUri.setUri(uri);
+            //set buffered uri as text if uri had parsing problems in advanced view
+            if(uri==null && uriBuffer!=null){
+                textUri.setText(uriBuffer);
+                textUri.getUri();
+            }
             textUri.getLayoutComposite().layout();
         }
     }
@@ -116,4 +147,12 @@ public class MediaDetailElement extends AbstractCdmDetailElement<Media>{
         return isAdvancedMediaView;
     }
 
+    public void setUriBuffer(String uriBuffer) {
+        this.uriBuffer = uriBuffer;
+    }
+
+    public String getUriBuffer() {
+        return uriBuffer;
+    }
+
 }
index 5a295254788c851528ec31c0a1eb5e141f4d2b17..663848da419d2bef3ba02e2b78c73f4c0911f147 100644 (file)
@@ -58,8 +58,14 @@ public class MediaRepresentationPartElement<T extends MediaRepresentationPart> e
                        text_size.setText(FileUtils.byteCountToDisplaySize(entity.getSize()));
                }
                if(entity.getUri() != null){
-                       text_uri.setText(entity.getUri().toString());
-               }
+                       text_uri.setUri(entity.getUri());
+               } else {
+            String uriBuffer = getParentMediaDetailElement().getUriBuffer();
+            if(uriBuffer!=null){
+                text_uri.setText(uriBuffer);
+                text_uri.getUri();//just to update the error label
+            }
+        }
        }
 
        @Override
@@ -67,8 +73,27 @@ public class MediaRepresentationPartElement<T extends MediaRepresentationPart> e
                if(eventSource == text_uri){
                    URI uri = text_uri.getUri();
                    getEntity().setUri(uri);
+                   if(uri==null){
+                //buffer URI if parsing error occurred
+                MediaDetailElement parentMediaDetailElement = getParentMediaDetailElement();
+                if(parentMediaDetailElement!=null){
+                    parentMediaDetailElement.setUriBuffer(text_uri.getText());
+                }
+            }
+
                    firePropertyChangeEvent(this);
                }
        }
 
+    protected MediaDetailElement getParentMediaDetailElement() {
+        ICdmFormElement parentElement = getParentElement();
+        while(parentElement!=null){
+            parentElement = parentElement.getParentElement();
+            if(parentElement instanceof MediaDetailElement){
+                return (MediaDetailElement) parentElement;
+            }
+        }
+        return null;
+    }
+
 }
index 44aa277454c44f4cf9c4a43b6ab2543971fa4ad6..e6f79398c3e3c097d7a93c9efdb0fb66c855d044 100644 (file)
@@ -23,8 +23,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
 /**
- * <p>AuthorshipDetailSection class.</p>
- *
  * @author n.hoffmann
  * @created 05.06.2009
  * @version 1.0
@@ -33,38 +31,11 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
 
        private TaxonBase taxonBase;
 
-       /**
-        * <p>Constructor for AuthorshipDetailSection.</p>
-        *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
-        * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        */
        public AuthorshipDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement,
                        ISelectionProvider selectionProvider, int style) {
                super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
        }
 
-       /**
-        * {@inheritDoc}
-        *
-        * Author title is not in titleCache field
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#setSectionTitle()
-        */
-       @Override
-       protected void setSectionTitle() {
-               if(getEntity() != null){
-                       String title = getHeading() + ": " + getEntity().getAuthorshipCache();
-               // we have to duplicate ampersands otherwise they are treated as
-               // mnenomic (see Label.setText() documentation)
-            // see also #4302
-               title = title.replace("&", "&&");
-            this.setText(title);
-               }
-       }
-
        /** {@inheritDoc} */
        @Override
     public void setTaxonBase(TaxonBase entity) {
@@ -73,27 +44,17 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
                setEntity(name);
        }
 
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.section.cdmdetail.AbstractCdmDetailSection#getHeading()
-        */
        /** {@inheritDoc} */
        @Override
        public String getHeading() {
                return "Authorship";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
-        */
        @Override
        public TaxonBase getTaxonBase() {
                return taxonBase;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
-        */
        @Override
        protected AbstractCdmDetailElement<NonViralName> createCdmDetailElement(AbstractCdmDetailSection<NonViralName> parentElement, int style) {
            return formFactory.createAuthorshipDetailElement(parentElement, style);
index bacf0fd933146bfb7bd5c13a91d57ac6fc8dc075..291694aae6920ff9f6584ae48dbe4f4cd3eff82a 100644 (file)
@@ -25,9 +25,6 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>
- * NameTypeDesignationElement class.
- * </p>
  *
  * @author n.hoffmann
  * @created May 17, 2010
@@ -41,25 +38,6 @@ public class NameTypeDesignationElement extends
        private EntitySelectionElement<TaxonNameBase> selection_typeName;
        private TermComboElement<NameTypeDesignationStatus> combo_typeStatus;
 
-       /**
-        * <p>
-        * Constructor for NameTypeDesignationElement.
-        * </p>
-        *
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.name.NameTypeDesignation}
-        *            object.
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        */
        public NameTypeDesignationElement(CdmFormFactory formFactory,
                        AbstractFormSection section, NameTypeDesignation entity,
                        SelectionListener removeListener, int style) {
@@ -116,9 +94,6 @@ public class NameTypeDesignationElement extends
                } else if (eventSource == text_referenceDetail) {
                        getEntity().setCitationMicroReference(
                                        text_referenceDetail.getText());
-               } else if (eventSource == text_originaleNameString) {
-                       getEntity().setOriginalNameString(
-                                       text_originaleNameString.getText());
                }
        }
 }
index a3ce82144d9449614dd6f8dc09dede3e0d14bf52..37ade07a042cf480027e466b601cb53bd18a76e4 100644 (file)
@@ -26,8 +26,6 @@ import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
 
 /**
- * <p>NomenclaturalStatusElement class.</p>
- *
  * @author n.hoffmann
  * @created Nov 5, 2009
  * @version 1.0
@@ -40,24 +38,12 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
 
        private final SelectionArbitrator selectionArbitrator;
 
-       /**
-        * <p>Constructor for NomenclaturalStatusElement.</p>
-        *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
-        * @param element a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatus} object.
-        * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-        */
        public NomenclaturalStatusElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement,
                        NomenclaturalStatus element, SelectionListener removeListener, int style) {
                super(cdmFormFactory, formElement, element, removeListener, style);
                selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#createControls(org.eclipse.swt.widgets.Composite, int)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
@@ -67,9 +53,6 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
                super.createControls(element, style);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#setElement(eu.etaxonomy.cdm.model.common.VersionableEntity)
-        */
        /** {@inheritDoc} */
        @Override
        public void setEntity(NomenclaturalStatus entity) {
@@ -88,10 +71,6 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
                return selectionArbitrator;
        }
 
-       /*
-        * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent(java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
@@ -107,8 +86,5 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
                else if(eventSource == text_referenceDetail){
                        getEntity().setCitationMicroReference(text_referenceDetail.getText());
                }
-               else if(eventSource == text_originaleNameString){
-                       getEntity().setOriginalNameString(text_originaleNameString.getText());
-               }
        }
 }
index d913442dbe169b9969b31c31ad15e9a16dbd782f..1213418a592094bbbe9977831a7c19553513e8a0 100644 (file)
@@ -26,10 +26,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 
 /**
- * <p>
- * NonViralNameDetailElement class.
- * </p>
- *
  * @author n.hoffmann
  * @created May 20, 2010
  * @version 1.0
@@ -42,67 +38,40 @@ public class NonViralNameDetailElement extends
        private EnumComboElement<NomenclaturalCode> combo_nomenclaturalCode;
        private HybridDetailSection section_hybrid;
 
-       /**
-        * <p>
-        * Constructor for NonViralNameDetailElement.
-        * </p>
-        *
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        */
        public NonViralNameDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
                super(formFactory, formElement);
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
-        * (eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement,
-        * eu.etaxonomy.cdm.model.common.AnnotatableEntity, int)
-        */
        /** {@inheritDoc} */
        @Override
     protected void createControls(ICdmFormElement formElement, final NonViralName entity, int style) {
-           //name can be null in rare cases. Temporary solution for #4221. May be obsolete when
-           //#4393 (Make changing name of a taxon possible in details view) is implemented.
-           if(entity==null){
-               formFactory.createEmptyElement(formElement, "No name associated with this taxon.");
+           toggleable_cache = formFactory.createToggleableTextField(formElement, "Cache", entity.getTitleCache(), entity.isProtectedTitleCache() || entity.isProtectedFullTitleCache(), style);
+
+           combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
+           combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
+
+           //TODO RL
+           if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
+               toggleable_cache.setVisible(false);
+               combo_nomenclaturalCode.setVisible(false);
            }
-           else {
-               toggleable_cache = formFactory.createToggleableTextField(formElement, "Cache", entity.getTitleCache(), entity.isProtectedTitleCache() || entity.isProtectedFullTitleCache(), style);
-
-               combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
-               combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
-
-               //TODO RL
-               if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
-                   toggleable_cache.setVisible(false);
-                   combo_nomenclaturalCode.setVisible(false);
-               }
-
-               section_name = formFactory.createNameDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-               addControl(section_name);
-               addElement(section_name);
-               section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-               addControl(section_author);
-               addElement(section_author);
-
-               //TODO RL
-               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_name = formFactory.createNameDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+           section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+           addControl(section_name);
+           addElement(section_name);
+           section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+           section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+           addControl(section_author);
+           addElement(section_author);
+
+           //TODO RL
+           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);
            }
     }
 
@@ -156,13 +125,6 @@ public class NonViralNameDetailElement extends
                }
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
-        * .lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
index a44b2e7b7008e984bcb26ff1c00c38d9067b598b..4f4c09e06ef72de7927395d69682a0d90195c6d6 100644 (file)
@@ -36,8 +36,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
 /**
- * <p>NonViralNameDetailSection class.</p>
- *
  * @author n.hoffmann
  * @created May 20, 2010
  * @version 1.0
@@ -61,9 +59,6 @@ public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViral
                super(formFactory, conversation, parentElement, selectionProvider, style);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#createToolbar()
-        */
        @Override
        protected Control createToolbar() {
                ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
@@ -122,26 +117,16 @@ public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViral
        }
 
 
-       /**
-        * @param nonViralName
-        *
-        */
        private boolean checkForMultipleNameUsages(NonViralName nonViralName) {
                return nonViralName.getTaxonBases().size() != 1;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
-        */
        /** {@inheritDoc} */
        @Override
        public String getHeading() {
                return "Name";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
-        */
        /** {@inheritDoc} */
        @Override
     public void setTaxonBase(TaxonBase taxon) {
@@ -150,32 +135,11 @@ public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViral
                setEntity(name);
        }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#setSectionTitle()
-     */
-    @Override
-    protected void setSectionTitle() {
-        super.setSectionTitle();
-        String title = getText();
-        // we have to duplicate ampersands otherwise they are treated as
-        // mnenomic (see Label.setText() documentation)
-        // see also #4302
-        title = title.replace("&", "&&");
-        setText(title);
-    }
-
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
-        */
        @Override
        public TaxonBase getTaxonBase() {
                return taxonBase;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
-        */
        @Override
        protected AbstractCdmDetailElement<NonViralName> createCdmDetailElement(AbstractCdmDetailSection<NonViralName> parentElement, int style) {
            return formFactory.createNonViralNameDetailElement(parentElement);
index 8a6a13fdc7915f430784fa0157957e2e92781b54..9c8d8014b5761ce5898ac4f7e690211ca31885f0 100644 (file)
@@ -26,10 +26,6 @@ import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>
- * SpecimenTypeDesignationElement class.
- * </p>
- *
  * @author n.hoffmann
  * @created May 17, 2010
  * @version 1.0
@@ -41,25 +37,6 @@ public class SpecimenTypeDesignationElement extends
        private EntitySelectionElement<DerivedUnit> selection_typeSpecimen;
        private TextWithLabelElement text_specimenTypeText;
 
-       /**
-        * <p>
-        * Constructor for SpecimenTypeDesignationElement.
-        * </p>
-        *
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation}
-        *            object.
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        */
        public SpecimenTypeDesignationElement(CdmFormFactory formFactory,
                        AbstractFormSection section, SpecimenTypeDesignation entity,
                        SelectionListener removeListener, int style) {
@@ -116,9 +93,6 @@ public class SpecimenTypeDesignationElement extends
                } else if (eventSource == text_referenceDetail) {
                        getEntity().setCitationMicroReference(
                                        text_referenceDetail.getText());
-               } else if (eventSource == text_originaleNameString) {
-                       getEntity().setOriginalNameString(
-                                       text_originaleNameString.getText());
                }
        }
 }
index 6681bfb8bf7a2e903ce7c4ff51dc817691ab1947..b84e3534d809c90838a13e5fcdc053d82910e558 100644 (file)
@@ -10,6 +10,7 @@
 
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
@@ -21,8 +22,6 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 
 /**
- * <p>Abstract AbstractOriginalSourceElement class.</p>
- *
  * @author n.hoffmann
  * @created Mar 16, 2010
  * @version 1.0
@@ -31,17 +30,8 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
        protected EnumComboElement<OriginalSourceType> combo_origsourcetype;
        protected TextWithLabelElement text_idInSource;
        protected TextWithLabelElement text_idNamespace;
+    protected TextWithLabelElement text_originaleNameString;
 
-       /**
-        * <p>Constructor for AbstractOriginalSourceElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
-        * @param element a T object.
-        * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style a int.
-        * @param <T> a T object.
-        */
        public AbstractOriginalSourceElement(CdmFormFactory formFactory,
                        AbstractFormSection section,
                        T element, SelectionListener removeListener,
@@ -49,11 +39,13 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
                super(formFactory, section, element, removeListener, style);
        }
 
-       /** {@inheritDoc} */
+       /**
+        * {@inheritDoc}
+        */
        @Override
-       public void init() {
-               super.init();
-               setHasOriginalNameString(true);
+       public void setEntity(T entity) {
+           super.setEntity(entity);
+        text_originaleNameString.setText(entity.getOriginalNameString());
        }
 
        /** {@inheritDoc} */
@@ -62,8 +54,10 @@ public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase
                combo_origsourcetype = formFactory
                                .createEnumComboElement(OriginalSourceType.class,
                                                formElement, style);
+               super.createControls(formElement, style);
                text_idInSource = formFactory.createTextWithLabelElement(formElement, "Id In Source", null, style);
                text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", null, style);
-               super.createControls(formElement, style);
+               text_originaleNameString = formFactory.createTextWithLabelElement(
+                       formElement, "Original Name", null, SWT.NULL);
        }
 }
index c77b5379e1ee2abed1c92d242b0a76eb25bc2a72..aea6e2da11ed2a136bcfafe9e08b43648ab7eb52 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * 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,10 +23,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>
- * Abstract AbstractReferencedEntityElement class.
- * </p>
- * 
  * @author n.hoffmann
  * @created Mar 25, 2010
  * @version 1.0
@@ -37,43 +33,12 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
        protected EntitySelectionElement<Reference> selection_reference;
        protected TextWithLabelElement text_referenceDetail;
 
-       protected TextWithLabelElement text_originaleNameString;
-
-       private boolean hasOriginalNameString = false;
-
-       /**
-        * <p>
-        * Constructor for AbstractReferencedEntityElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param entity
-        *            a T object.
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        * @param <T>
-        *            a T object.
-        */
        public AbstractReferencedEntityElement(CdmFormFactory formFactory,
                        AbstractFormSection section, T entity,
                        SelectionListener removeListener, int style) {
                super(formFactory, section, entity, removeListener, null, style);
        }
 
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.forms.section.AbstractEntityCollectionElement#
-        * createControls(eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
@@ -83,69 +48,14 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
                                                null, EntitySelectionElement.ALL, style);
                text_referenceDetail = formFactory.createTextWithLabelElement(
                                formElement, "Reference Detail", null, SWT.NULL);
-               if (hasOriginalNameString)
-                       text_originaleNameString = formFactory.createTextWithLabelElement(
-                                       formElement, "Original Name", null, SWT.NULL);
        }
 
-       /**
-        * <p>
-        * setEntity
-        * </p>
-        * 
-        * @param entity
-        *            a T object.
-        */
        @Override
        public void setEntity(T entity) {
                this.entity = entity;
 
                selection_reference.setEntity(entity.getCitation());
                text_referenceDetail.setText(entity.getCitationMicroReference());
-               if (hasOriginalNameString)
-                       text_originaleNameString.setText(entity.getOriginalNameString());
-               // // remove old listeners
-               // clearEditButtonSelectionListener();
-               //
-               // addEditButtonSelectionListener(new
-               // BulkEditorOpeningSelectionListener(entity.getCitation()));
-               //
-       };
-
-       //
-       // public void addEditButtonSelectionListener(SelectionListener listener){
-       // selection_reference.addEditButtonSelectionListener(listener);
-       // }
-       //
-       // public void removeEditButtonSelectionListener(SelectionListener
-       // listener){
-       // selection_reference.removeEditorButtonSelectionListener(listener);
-       // }
-       //
-       // public void clearEditButtonSelectionListener(){
-       // selection_reference.clearEditButtonSelectionListener();
-       // }
-
-       /**
-        * <p>
-        * Setter for the field <code>hasOriginalNameString</code>.
-        * </p>
-        * 
-        * @param hasOriginalNameString
-        *            a boolean.
-        */
-       public void setHasOriginalNameString(boolean hasOriginalNameString) {
-               this.hasOriginalNameString = hasOriginalNameString;
        }
 
-       /**
-        * <p>
-        * hasOriginalNameString
-        * </p>
-        * 
-        * @return a boolean.
-        */
-       public boolean hasOriginalNameString() {
-               return hasOriginalNameString;
-       }
 }
index f28b943e7f48bdbf483976a766934144a48d7a56..a5f50e18a83869b54a2c8273976ff7babfde94c8 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
@@ -11,41 +11,23 @@ import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
- * <p>IdentifiableSourceElement class.</p>
- *
  * @author n.hoffmann
  * @created Nov 16, 2009
  * @version 1.0
  */
 public class IdentifiableSourceElement extends AbstractOriginalSourceElement<IdentifiableSource>{
-       
-       /**
-        * <p>Constructor for IdentifiableSourceElement.</p>
-        *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
-        * @param element a {@link eu.etaxonomy.cdm.model.common.IdentifiableSource} object.
-        * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-        */
+
        public IdentifiableSourceElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, IdentifiableSource element,
                        SelectionListener removeListener, int style) {
                super(cdmFormFactory, formElement, element, removeListener, style);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#createControls(org.eclipse.swt.widgets.Composite, int)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
                super.createControls(formElement, style);
        }
 
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite#setElement(eu.etaxonomy.cdm.model.common.VersionableEntity)
-        */
        /** {@inheritDoc} */
        @Override
        public void setEntity(IdentifiableSource entity) {
@@ -56,9 +38,9 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
                selection_reference.setEntity(entity.getCitation());
                text_referenceDetail.setText(entity.getCitationMicroReference());
                combo_origsourcetype.setSelection(entity.getType());
-               if(hasOriginalNameString()) text_originaleNameString.setText(entity.getOriginalNameString());
-       }       
-       
+               text_originaleNameString.setText(entity.getOriginalNameString());
+       }
+
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
index 3a3a1fad749460a9188a67ec606f7a17133a628b..86c1dece7916dc76482224e46c07f284b75192d2 100644 (file)
@@ -20,23 +20,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
- * <p>TaxonBaseDetailSection class.</p>
- *
  * @author n.hoffmann
  * @created Nov 4, 2009
  * @version 1.0
  */
 public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase> {
 
-       /**
-        * <p>Constructor for TaxonBaseDetailSection.</p>
-        *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
-        * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        */
        public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
                super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
        }
@@ -47,26 +36,9 @@ public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase>
                return getEntity() != null ? getEntity().getClass().getSimpleName() : "TaxonBase";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
-        */
        @Override
        protected AbstractCdmDetailElement<TaxonBase> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase> parentElement, int style) {
            return formFactory.createTaxonBaseDetailElement(parentElement, style);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#setSectionTitle()
-        */
-       @Override
-       protected void setSectionTitle() {
-           super.setSectionTitle();
-           String title = getText();
-        // we have to duplicate ampersands otherwise they are treated as
-        // mnenomic (see Label.setText() documentation)
-        // see also #4302
-        title = title.replace("&", "&&");
-        setText(title);
-       }
-
 }
index 9f950fa3fbffe21c7aedfb871b02b86ab3cd00b1..93c229adfd2e2cfda5114ab9c7f341b36b3aa86b 100644 (file)
@@ -39,9 +39,6 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         CdmStore.getContextManager().addContextListener(this);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
-     */
     @Override
     public void createPartControl(Composite parent) {
         derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this);
@@ -56,9 +53,6 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         control.setMenu(menu);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
-     */
     @Override
     public void setFocus() {
         derivateSearchCompositeController.setFocus();
@@ -68,33 +62,21 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         }
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void contextStop(IMemento memento, IProgressMonitor monitor) {
         derivateSearchCompositeController.setEnabled(false);
         derivateSearchCompositeController.reset();
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void contextStart(IMemento memento, IProgressMonitor monitor) {
         derivateSearchCompositeController.setEnabled(true);
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextRefresh(org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void contextRefresh(IProgressMonitor monitor) {
         initConversation();
@@ -107,20 +89,24 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
         }
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#workbenchShutdown(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
     }
 
-    /**
-     * @return the conversationHolder
-     */
     public ConversationHolder getConversationHolder() {
         if(CdmStore.isActive() && conversationHolder==null){
             initConversation();
         }
         return conversationHolder;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void dispose() {
+        if(conversationHolder!=null){
+            conversationHolder.close();
+        }
+    }
 }
index 04bb9207f815a4499f01a543ce4c244d61ee157c..4856e3ff7f3ef99b55c64f1914f782c6273d5368 100644 (file)
@@ -204,7 +204,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         destroySections();
         if (input instanceof TaxonBase) {
-            createTaxonSections(rootElement);
+            if(((TaxonBase) input).getName()==null){
+                createEmptySection(rootElement);
+            }
+            else{
+                createTaxonSections(rootElement);
+            }
 
         } else if (input instanceof NonViralName) {
             createNameSections(rootElement);
index f65fba05d158bb55de81932bda291750ba3c554f..68228dae9e302ac6518aec5e6205f09b92b3bdf5 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="3.7.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="3.8.0">
   <aboutInfo>
     <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
     <text>
diff --git a/eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre b/eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre
new file mode 100644 (file)
index 0000000..7998db3
--- /dev/null
@@ -0,0 +1,66 @@
+<?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="3.8.0.qualifier" useFeatures="true" includeLaunchers="true">
+
+   <aboutInfo>
+      <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
+      <text>
+         %productBlurb
+      </text>
+   </aboutInfo>
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080
+      </programArgs>
+      <programArgsLin>-vm jre/bin
+      </programArgsLin>
+      <programArgsMac>-vm ../../../jre/Contents/Home/jre/lib/jli/libjli.dylib
+      </programArgsMac>
+      <programArgsSol>-vm jre/bin
+      </programArgsSol>
+      <programArgsWin>-vm jre/bin
+      </programArgsWin>
+      <vmArgs>-Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
+      </vmArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
+      </vmArgsMac>
+   </launcherArgs>
+
+   <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
+
+   <splash
+      location="eu.etaxonomy.taxeditor.application"
+      startupProgressRect="5,447,366,15"
+      startupMessageRect="7,432,360,20"
+      startupForegroundColor="000000" />
+   <launcher name="TaxonomicEditor">
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+   </vm>
+
+   <plugins>
+   </plugins>
+
+   <features>
+      <feature id="eu.etaxonomy.taxeditor.feature"/>
+   </features>
+
+   <configurations>
+      <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="5" />
+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.p2.transport.ecf" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+   </configurations>
+
+</product>
index fc92919c541c7e971b60c9a8b95c3708992126d9..090a3d22497d2a81dd85b99602c0aee8002788e2 100644 (file)
@@ -2,7 +2,7 @@
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.7.1</version>
+    <version>3.8.0</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
     </profile>
   </profiles>
 
-</project>
\ No newline at end of file
+</project>
index 7f4ff50a288107431b864d2422441790a2c8318a..f01bba3f6dd65d2f0a926478271edc218b458b37 100644 (file)
@@ -20,6 +20,7 @@
 <unit id="org.eclipse.rcp.sdk.id" version="3.7.2.M20120208-0800"/>
 <unit id="org.eclipse.equinox.sdk.feature.group" version="3.7.1.R37x_v20110907-7M7W8i8eNV4WsRkue-4Vq4J6pCyW"/>
 <unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C18COMPIAKSVKGQaRTQTiSN8WP"/>
+<unit id="org.eclipse.pde.feature.group" version="3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0"/>
 <repository location="http://download.eclipse.org/releases/indigo"/>
 </location>
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
diff --git a/pom.xml b/pom.xml
index 5fa3888e4a2cfc6bb66f5afce783a6572f61b14b..47a3120df3321312dbc267a2940e2c16e9ffb8e8 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
   </prerequisites>
   <groupId>eu.etaxonomy</groupId>
   <artifactId>taxeditor-parent</artifactId>
-  <version>3.7.1</version>
+  <version>3.8.0</version>
   <name>EDIT Taxonomic Editor</name>
   <description>The Taxonomic Editor for EDIT's platform for
     cybertaxonomy
   <properties>
     <java.codelevel>1.6</java.codelevel>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <cdmlib.version>3.7.0</cdmlib.version>
+    <cdmlib.version>3.8.0</cdmlib.version>
+    <!-- TODO can we use project.version ????? -->
     <tycho.version>0.22.0</tycho.version>
-    <taxeditor.version>3.7.0</taxeditor.version>
+    <taxeditor.version>3.8.0</taxeditor.version>
     <update.dir>snapshot</update.dir>
   </properties>
   <modules>
@@ -31,6 +32,8 @@
     <module>eu.etaxonomy.taxeditor.bulkeditor</module>
     <module>eu.etaxonomy.taxeditor.printpublisher</module>
     <module>eu.etaxonomy.taxeditor.help</module>
+    <module>eu.etaxonomy.taxeditor.molecular</module>
+    <module>eu.etaxonomy.taxeditor.molecular.lib</module>
     <module>eu.etaxonomy.taxeditor.application</module>
     <module>eu.etaxonomy.taxeditor.feature.platform</module>
     <module>eu.etaxonomy.taxeditor.feature</module>