merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 8 Jun 2015 11:57:53 +0000 (11:57 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 8 Jun 2015 11:57:53 +0000 (11:57 +0000)
114 files changed:
.gitattributes
.gitignore
eu.etaxonomy.taxeditor.application/.classpath
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/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties
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/command/BulkEditorPropertyTester.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/AgentCreator.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/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorCdmViewer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewSpecimenHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/DeleteNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientAgentService.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/TransientCollectionService.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/TransientNameService.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/TransientReferenceService.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/dataimport/transientServices/TransientTermService.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/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationCdmViewer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NewTaxonNodeHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultLabelProvider.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultView.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/plugin.xml
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ContextListenerAdapter.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AbstractNewEntityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/IWizardPageListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DescriptionPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamMemberElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamMemberSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamOrPersonBaseDetailSection.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/classification/TaxonNodeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateDataElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/AbstractUnboundEntityCollectionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/MeasurementUnitCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/RecommendedModifierVocabulariesCollectionSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StateModifierCollectionSection.java with 88% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/RecommendedModifierVocabulariesElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateModifierElement.java with 70% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StateVocabularyCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StatisticalMeasureCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerChooser.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/ICdmViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchCompositeController.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/pom.xml
pom.xml
src/site/apt/getting-started.apt

index 1f8c325ff4b9e402f4f318c596dcefc2b5b33320..18d46484697e899bc3d71385e7d2af7e4f6b7a74 100644 (file)
@@ -977,6 +977,7 @@ eu.etaxonomy.taxeditor.navigation/icons/tree_icon.jpg -text
 eu.etaxonomy.taxeditor.navigation/p2.inf -text
 eu.etaxonomy.taxeditor.navigation/plugin.xml -text
 eu.etaxonomy.taxeditor.navigation/pom.xml -text
+eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationCdmViewer.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigatorStateManager.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/RecentNamesContributionItem.java -text
@@ -1289,6 +1290,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/Op
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDistributionEditorWizardHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenPasswordWizzardHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/identificationkey/AbstractIdentificaitonKeyWizard.java -text
@@ -1363,6 +1365,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TimeHelp
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AbstractNewEntityWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AmplificationGeneralWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/ExternalReferenceServiceWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/IWizardPageListener.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewAmplificationWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java -text
@@ -1608,7 +1611,6 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/des
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateDataElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateDataSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateModifierElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/AbstractDetailedDescriptionDetailElement.java -text
@@ -1800,7 +1802,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/voc
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StateModifierCollectionSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/RecommendedModifierVocabulariesCollectionSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/RecommendedModifierVocabulariesElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StateVocabularyCollectionElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StateVocabularyCollectionSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/StatisticalMeasureCollectionElement.java -text
index 5c8b928b8e9810e6ba3615b0efdeead665c5c54d..074683469e08c4a0d5b4632b9a11b4499d953467 100644 (file)
@@ -5,14 +5,43 @@ eu.etaxonomy.taxeditor.bulkeditor/.settings
 eu.etaxonomy.taxeditor.bulkeditor/target
 eu.etaxonomy.taxeditor.cdmlib/.directory
 eu.etaxonomy.taxeditor.cdmlib/.settings
+eu.etaxonomy.taxeditor.cdmlib/META-INF/bin
+eu.etaxonomy.taxeditor.cdmlib/bin
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
 eu.etaxonomy.taxeditor.cdmlib/dist
+eu.etaxonomy.taxeditor.cdmlib/lib/bin
 eu.etaxonomy.taxeditor.cdmlib/lib/cdmlib*
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.servletbridge.extensionbundle-1.2.0.v20100503.jar
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.transforms.hook-1.0.300.v20100719.jar
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.weaving.hook-1.0.100.v20110502.jar
 eu.etaxonomy.taxeditor.cdmlib/log4j-1.2.14src.zip
+eu.etaxonomy.taxeditor.cdmlib/src/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/lazyloading/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/proxy/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/bin
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/resources/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/bin
+eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/bin
 eu.etaxonomy.taxeditor.cdmlib/target
 eu.etaxonomy.taxeditor.editor/.settings
 eu.etaxonomy.taxeditor.editor/target
index bfb7a7aeb276f5a38d22964832ea9bcb905ac7a0..53dbdc7801b5019e5530b50d2e88e1f666fa8f39 100644 (file)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\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 including="**/*.java" kind="src" path="src/main/java"/>\r
-       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>\r
-       <classpathentry kind="src" path="src/main/resources"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="src" path="src/test/java/"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index c09b585b2936916a6db623a6360e9f6fe56cc5b8..daf34dcf4e7128ccfbde9922eb05a6aee1b2e05c 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: OSGI-INF/l10n/plugin
index 0fa305e9164eecb0198554ddcd620b5be979060d..0cd37ec0219de631759c3ca9f2c418247bcd115a 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+    <version>3.6.1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index 97cae721128ccc3d6bd9ec381a3b3bdef9685658..7b539d270151d639d41640d4dbcd53ad58b441df 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
index 00a528b7d3e2b6c09fd64d2300179a39dca4f169..816633c1755ba03a9e51dcf117952e161ddb20e5 100644 (file)
@@ -1,8 +1,8 @@
-BulkEditorInputType_0=Person and Team\r
-BulkEditorInputType_1=Reference\r
-BulkEditorInputType_2=Name\r
-BulkEditorInputType_3=Name Relationship\r
-BulkEditorInputType_4=Specimen and Observation\r
-BulkEditorInputType_5=User\r
-BulkEditorInputType_6=Group\r
-BulkEditorInputType_7=Taxon\r
+BulkEditorInputType_0=Persons and Teams\r
+BulkEditorInputType_1=References\r
+BulkEditorInputType_2=Names\r
+BulkEditorInputType_3=Name Relationships\r
+BulkEditorInputType_4=Specimen and Observations\r
+BulkEditorInputType_5=Users\r
+BulkEditorInputType_6=Groups\r
+BulkEditorInputType_7=Taxa\r
index 98b93441ef326a418f4e822058a4c5a5ada15a7e..56a3c86fcbdf9e5c9b2e8d8249b68fee61ccd16b 100644 (file)
@@ -1,8 +1,8 @@
-BulkEditorInputType_0=Person und Team \r
-BulkEditorInputType_1=Referenz\r
-BulkEditorInputType_2=Name\r
-BulkEditorInputType_3=Namensbeziehung\r
-BulkEditorInputType_4=Beleg und Beobachtung\r
+BulkEditorInputType_0=Personen und Teams \r
+BulkEditorInputType_1=Referenzen\r
+BulkEditorInputType_2=Namen\r
+BulkEditorInputType_3=Namensbeziehungen\r
+BulkEditorInputType_4=Belege und Beobachtungen\r
 BulkEditorInputType_5=Nutzer\r
-BulkEditorInputType_6=Nutzergruppe\r
-BulkEditorInputType_7=Taxon\r
+BulkEditorInputType_6=Nutzergruppen\r
+BulkEditorInputType_7=Taxa\r
index 7d2ff5418da2b7b052929d387eea1207c6686191..8e0ee968ad06de90bbeba73587df41da1c86646f 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+               <version>3.6.1-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
@@ -12,7 +11,7 @@
        <packaging>eclipse-plugin</packaging>
 
        <name>Bulkeditor Bundle</name>
-       <description></description>
+       <description />
        <url>http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorBulkeditorBundle</url>
 
 </project>
index bbd7e4d2025753158b41e538665acdcb46c50013..c2978874b1a990ce1ac9e37636fe71b87580c3c0 100644 (file)
@@ -288,7 +288,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
            isDirty = false;
           
            super.doSave(progressMonitor);
-
+           
            selectFirstItem();
           
                getSourceViewer().getTextWidget().setFocus();
@@ -321,7 +321,9 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                                        return;
                                }
                        }
-
+                       conversation.commit();
+                       conversation.clear();
+                       
                        getEditorInput().performSearch(query);
 
                        refresh();
index 7368adc1d835f5dbfda890534210eee434e8af07..bd8494c00e191d78ae57d11ed21123cd58d5c243 100644 (file)
@@ -12,7 +12,6 @@ package eu.etaxonomy.taxeditor.bulkeditor.command;
 
 import org.apache.log4j.Logger;
 import org.eclipse.core.expressions.PropertyTester;
-
 import org.eclipse.ui.IEditorInput;
 
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
@@ -36,7 +35,7 @@ public class BulkEditorPropertyTester extends PropertyTester {
 
        private static final String IS_MERGING_ENABLED = "isMergingEnabled";
 
-       private static final String IS_GROUP_EDITOR = "isGroupEditor";
+       public static final String IS_GROUP_EDITOR = "isGroupEditor";
     public static final String IS_DERIVED_UNIT_EDITOR = "isDerivedUnitEditor";
     public static final String IS_TAXON_EDITOR = "isTaxonEditor";
     public static final String IS_CONVERT_ENABLED = "isConvertingEnabled";
@@ -50,8 +49,8 @@ public class BulkEditorPropertyTester extends PropertyTester {
     public boolean test(Object receiver, String property, Object[] args,
                        Object expectedValue) {
                BulkEditor bulkEditor = null;
-               
-               
+
+
                bulkEditor = (BulkEditor) receiver;
                if (IS_MERGING_ENABLED.equals(property)) {
                        IEditorInput input = bulkEditor.getEditorInput();
@@ -74,7 +73,7 @@ public class BulkEditorPropertyTester extends PropertyTester {
         else if(IS_TAXON_EDITOR.equals(property)){
             return bulkEditor.getEditorInput() instanceof TaxonEditorInput;
         }
-               
+
 //             if (("isPublishFlagEditingEnabled").equals(property)) {
 //                     IEditorInput input = bulkEditor.getEditorInput();
 //                     if (input instanceof NameEditorInput) {
index efb0bdc10b977a0771474284eee127449662b0f2..8337af379ca612c9c808b046a313ca97970f4634 100644 (file)
@@ -15,7 +15,6 @@ import java.util.Map;
 
 import org.apache.log4j.Logger;
 
-import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
@@ -31,9 +30,7 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 public class AgentCreator implements IEntityCreator<TeamOrPersonBase> {
        private static final Logger logger = Logger.getLogger(AgentCreator.class);
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
-        */
+
        /** {@inheritDoc} */
        public TeamOrPersonBase createEntity(String text) {
                // FIXME
@@ -43,9 +40,6 @@ public class AgentCreator implements IEntityCreator<TeamOrPersonBase> {
                return createEntity(Person.class, text);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Class, java.lang.String)
-        */
        /** {@inheritDoc} */
        public TeamOrPersonBase createEntity(Object key, String text) {
                TeamOrPersonBase teamOrPerson = null;
@@ -61,9 +55,6 @@ public class AgentCreator implements IEntityCreator<TeamOrPersonBase> {
                return teamOrPerson;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getClassLabelPairs()
-        */
        /**
         * <p>getKeyLabelPairs</p>
         *
@@ -71,8 +62,8 @@ public class AgentCreator implements IEntityCreator<TeamOrPersonBase> {
         */
        public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new HashMap<Object, String>();
-               result.put(Team.class, "Author Team");
-               result.put(Person.class, "Author");
+               result.put(Team.class, "Team");
+               result.put(Person.class, "Person");
                return result;
        }
 
index 404f901086ce8d2433dfd54167ef7ec54e016387..452894c9af5aa77b41a5bab6fd16a48df7366359 100644 (file)
@@ -3,9 +3,7 @@
        <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/test/java"/>
        <classpathentry kind="src" path="src/main/resources"/>
-       <classpathentry kind="src" path="src/test/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"/>
@@ -35,7 +33,7 @@
        <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" sourcepath="lib/commons-dbcp-1.4-sources.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/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" sourcepath="lib/org.springframework.jdbc-3.2.2.RELEASE-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.2.2.RELEASE.jar" sourcepath="lib/org.springframework.orm-3.2.2.RELEASE-sources.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" sourcepath="lib/org.springframework.transaction-3.2.2.RELEASE-sources.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/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/cdmlib-commons-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.5.2-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.5.2-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.6.1-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.6.1-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.6.1-SNAPSHOT.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"/>
+       <classpathentry kind="output" path="bin"/>
 </classpath>
index a1f584654a8e6045c67fb8596890414f5d357434..3a8274a3d5c918bbb978933d67e17c2757c4db20 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
@@ -195,6 +195,7 @@ Export-Package: com.google.api,
  org.apache.commons.collections;uses:="org.apache.commons.collections.keyvalue,new org.apache.commons.collections",
  org.apache.commons.io;uses:="org.apache.commons.io.filefilter",
  org.apache.commons.lang;uses:="org.apache.commons.lang.exception",
+ org.apache.commons.lang.exception,
  org.apache.fop.apps,
  org.apache.http,
  org.apache.http.client,
@@ -604,22 +605,22 @@ Bundle-ClassPath: .,
  lib/spring-security-remoting-3.1.3.RELEASE.jar,
  lib/jena-core-2.11.2.jar,
  lib/jena-iri-1.0.2.jar,
- lib/cdmlib-commons-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-commons-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-ext-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-ext-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-io-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-model-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-persistence-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-print-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-print-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-remote-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-remote-3.5.2-SNAPSHOT.jar,
- lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar,
- lib/cdmlib-services-3.5.2-SNAPSHOT.jar,
+ lib/cdmlib-commons-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-commons-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-ext-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-io-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-io-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-model-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-model-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-persistence-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-print-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-print-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-remote-3.6.1-SNAPSHOT.jar,
+ lib/cdmlib-services-3.6.1-SNAPSHOT-sources.jar,
+ lib/cdmlib-services-3.6.1-SNAPSHOT.jar,
  lib/poi-3.10-FINAL.jar,
  lib/poi-ooxml-3.10-FINAL.jar,
  lib/xmlbeans-2.3.0.jar,
index d2c2e69526e79ae5148e726bea803f40ea17c153..e4b3cee83275367360bf150d123a09c0f356a025 100644 (file)
@@ -193,22 +193,22 @@ bin.includes = META-INF/,\
                lib/poi-ooxml-3.10-FINAL.jar,\\r
                lib/poi-ooxml-schemas-3.10-FINAL.jar,\\r
                lib/xmlbeans-2.3.0.jar,\\r
-               lib/cdmlib-commons-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-commons-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-ext-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-io-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-io-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-model-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-model-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-persistence-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-persistence-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-print-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-print-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-remote-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-remote-3.5.2-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.5.2-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-services-3.5.2-SNAPSHOT.jar,\\r
+               lib/cdmlib-commons-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-commons-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-ext-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-ext-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-io-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-io-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-model-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-model-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-persistence-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-persistence-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-print-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-print-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-remote-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-remote-3.6.1-SNAPSHOT.jar,\\r
+               lib/cdmlib-services-3.6.1-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-services-3.6.1-SNAPSHOT.jar,\\r
                lib/swagger-annotations-1.3.5.jar\r
 \r
 jars.compile.order = .\r
index 66aade0ae266737ac5879776f8950d470a628004..ee212fc83ca1b5591a792aae18f05fdfbf2e3861 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<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">\r
-  <parent>\r
-    <groupId>eu.etaxonomy</groupId>\r
-    <artifactId>taxeditor-parent</artifactId>\r
-    <version>3.5.2-SNAPSHOT</version>\r
-  </parent>\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
-  <packaging>eclipse-plugin</packaging>\r
-  <name>CDM Library Dependencies Plugin</name>\r
-  <description>CDM Library and dependencies as a plugin</description>\r
-  <build>\r
-    <plugins>      \r
-      <plugin>\r
-       <groupId>org.apache.maven.plugins</groupId>\r
-       <artifactId>maven-dependency-plugin</artifactId>\r
-       <version>2.4</version>\r
-       <executions>\r
-         <execution>\r
-           <id>copy-dependencies</id>\r
-           <phase>validate</phase>\r
-           <goals>\r
-             <goal>copy-dependencies</goal>\r
-           </goals>\r
-           <configuration>\r
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>\r
-             <outputDirectory>lib</outputDirectory>\r
-             <overWriteReleases>true</overWriteReleases>\r
-             <overWriteSnapshots>true</overWriteSnapshots>\r
-             <excludeTransitive>true</excludeTransitive>             \r
-           </configuration>\r
-         </execution>\r
-         <execution>\r
-           <id>copy-dependencies-sources</id>\r
-           <phase>validate</phase>\r
-           <goals>\r
-             <goal>copy-dependencies</goal>\r
-           </goals>\r
-           <configuration>\r
-             <classifier>sources</classifier>\r
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>\r
-             <outputDirectory>lib</outputDirectory>\r
-             <overWriteReleases>true</overWriteReleases>\r
-             <overWriteSnapshots>true</overWriteSnapshots>\r
-             <excludeTransitive>true</excludeTransitive>\r
-             <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>\r
-           </configuration>\r
-         </execution>\r
-       </executions>\r
-      </plugin>\r
-      <plugin>\r
-       <groupId>org.apache.maven.plugins</groupId>\r
-       <artifactId>maven-antrun-plugin</artifactId>\r
-       <version>1.7</version>\r
-       <executions>\r
-         <execution>\r
-           <id>remove-existing-jars</id>\r
-           <phase>clean</phase>\r
-           <goals>\r
-             <goal>run</goal>\r
-           </goals>\r
-           <configuration>\r
-             <target>\r
-               <echo>Remove all cdmlib jars</echo>\r
-               <delete>\r
-                 <fileset dir="./lib" includes="cdmlib-*"/>\r
-               </delete>\r
-             </target> \r
-           </configuration>\r
-         </execution>\r
-         <execution>\r
-           <id>update-snapshot-jar-names</id>\r
-           <phase>validate</phase>\r
-           <goals>\r
-             <goal>run</goal>\r
-           </goals>\r
-           <configuration>           \r
-             <target>\r
-               <echo>Update cdmlib jars to SNAPSHOT when build with timestamp</echo>\r
-               <move todir="./lib">\r
-                 <fileset dir="./lib" />\r
-                 <mapper type="regexp"\r
-                         from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />\r
-               </move>                           \r
-               <move todir="./lib">\r
-                 <fileset dir="./lib" />\r
-                 <mapper type="regexp"\r
-                         from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\-sources\.jar)" to="\1SNAPSHOT\2" />\r
-               </move>                           \r
-             </target> \r
-           </configuration>\r
-         </execution>\r
-       </executions>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
-  <dependencies>\r
-    <dependency>\r
-      <groupId>identificationKeyAPI</groupId>\r
-      <artifactId>identificationKeyAPI</artifactId>\r
-      <version>1.0-SNAPSHOT</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-commons</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-model</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-persistence</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-remote</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-print</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-services</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-io</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>eu.etaxonomy</groupId>\r
-      <artifactId>cdmlib-ext</artifactId>\r
-      <version>${cdmlib.version}</version>\r
-    </dependency>\r
-       <dependency>\r
-      <groupId>org.aspectj</groupId>\r
-      <artifactId>aspectjrt</artifactId>\r
-         <version>1.7.1</version>\r
-       </dependency>\r
-         <dependency>\r
-         <groupId>org.aspectj</groupId>\r
-         <artifactId>aspectjweaver</artifactId>\r
-         <version>1.7.1</version>\r
-        </dependency>\r
-        \r
-    <!--  for ikey-plus \r
-        TODO this should not be needed but the utils class contained  in this jar \r
-        seems to be loaded as bean by spring\r
-    -->\r
-  </dependencies>\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<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.6.1-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>
+  <packaging>eclipse-plugin</packaging>
+  <name>CDM Library Dependencies Plugin</name>
+  <description>CDM Library and dependencies as a plugin</description>
+  <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>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>             
+           </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 cdmlib jars</echo>
+               <delete>
+                 <fileset dir="./lib" includes="cdmlib-*" />
+               </delete>
+             </target> 
+           </configuration>
+         </execution>
+         <execution>
+           <id>update-snapshot-jar-names</id>
+           <phase>validate</phase>
+           <goals>
+             <goal>run</goal>
+           </goals>
+           <configuration>           
+             <target>
+               <echo>Update cdmlib jars to SNAPSHOT when build with timestamp</echo>
+               <move todir="./lib">
+                 <fileset dir="./lib" />
+                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
+               </move>                           
+               <move todir="./lib">
+                 <fileset dir="./lib" />
+                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\-sources\.jar)" to="\1SNAPSHOT\2" />
+               </move>                           
+             </target> 
+           </configuration>
+         </execution>
+       </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>identificationKeyAPI</groupId>
+      <artifactId>identificationKeyAPI</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-commons</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-model</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-persistence</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-remote</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-print</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-services</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-io</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-ext</artifactId>
+      <version>${cdmlib.version}</version>
+    </dependency>
+       <dependency>
+      <groupId>org.aspectj</groupId>
+      <artifactId>aspectjrt</artifactId>
+         <version>1.7.1</version>
+       </dependency>
+         <dependency>
+         <groupId>org.aspectj</groupId>
+         <artifactId>aspectjweaver</artifactId>
+         <version>1.7.1</version>
+        </dependency>
+        
+    <!--  for ikey-plus 
+        TODO this should not be needed but the utils class contained  in this jar 
+        seems to be loaded as bean by spring
+    -->
+  </dependencies>
+</project>
index 854759021135d5a6652f588293e363a84552cd91..14bdc8315c9b1d84a042e31a2e268a2c45a740c9 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: OSGI-INF/l10n/plugin
@@ -25,7 +25,7 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.zest.core,
  org.eclipse.zest.layouts,
  eu.etaxonomy.taxeditor.cdmlib,
- org.eclipse.ui.ide;bundle-version="3.7.0"
+ org.eclipse.ui.ide
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.core.databinding.beans,
index e46102db4785b68872e5256e712aa934eb8c6183..8c098c37d1ef2755eed2653be8f0e0114b075ec4 100644 (file)
@@ -147,7 +147,7 @@ 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 zugehrige Specimens
+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
index 9c171a2137d2e1a25755a48885d8bf1b87fc6a66..ed687ff8531d18b08f56b8ad3e58cc0ccf77fd65 100644 (file)
                style="push">
             <visibleWhen>
                <reference
-                     definitionId="isGroup">
+                     definitionId="isGroupEditor">
                </reference>
             </visibleWhen>
          </command>
          </with>
       </definition>
       <definition
-            id="isGroup">
+            id="isGroupEditor">
          <with
                variable="activeEditor">
             <test
-                  property="taxeditor-bulkeditor.propertyTester.isGroup">
+                  property="taxeditor-bulkeditor.propertyTester.isGroupEditor">
             </test>
          </with>
       </definition>
             class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorPropertyTester"
             id="taxeditor-bulkeditor.PropertyTester"
             namespace="taxeditor-bulkeditor.propertyTester"
-            properties="isGroup"
+            properties="isGroupEditor"
             type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">
       </propertyTester>
       <propertyTester
index 01eec8e85549e17620958072806e727770d96537..d8d19205aad54d0a1aeb2b9d9c2915cf5b2674f9 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+    <version>3.6.1-SNAPSHOT</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
@@ -12,7 +11,7 @@
   <packaging>eclipse-plugin</packaging>
   
   <name>Editor Bundle</name>
-  <description></description>
+  <description />
   <url>http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorEditorBundle</url>
   
 </project>
index 877ed28f44530befcf5ce97db7b069ce3947e9c4..4d92e047d995a46409f4df9ea2c85a64db9dbd29 100644 (file)
@@ -13,6 +13,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.ui.PartInitException;
 
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
@@ -34,7 +35,7 @@ public class EditorCdmViewer implements ICdmViewer {
      * @see eu.etaxonomy.taxeditor.view.ICdmViewer#show(java.lang.Object)
      */
     @Override
-    public void show(Object input, Class<?> viewerClass) {
+    public void show(Object input, Class<?> viewerClass, ExecutionEvent event) {
         try {
             if(viewerClass.equals(MultiPageTaxonEditor.class)){
                 if(input instanceof TaxonBase){
index 3f79f3a00a4566070076ad876293795714767a58..5452a0458934f0005106036673d3807183766aed 100644 (file)
@@ -91,7 +91,7 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
        TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, null);
 
                if(taxonNode == null){
-                       MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
+                       MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not of type TaxonNode but [null].");
                        return null;
                }
 
@@ -116,7 +116,7 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
 
                        if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
                                // TODO get accepted taxon
-                               MessagingUtils.info("trying to open Mispplied Name ");
+                               MessagingUtils.info("trying to open misapplied Name ");
 
                                Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
                                Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
index 04747d1916de4ec825045dcac1de02cae91b1340..8ada87fff423fdf3941590273dc5cfac320ffa66 100644 (file)
@@ -1,23 +1,35 @@
 // $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.editor.handler.create;
 
+import java.util.Collections;
+
 import org.apache.log4j.Logger;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.PartInitException;
 
-import eu.etaxonomy.taxeditor.newWizard.NewDerivedUnitBaseWizard;
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy;
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeFieldUnitCacheStrategy;
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
+import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>NewSpecimenHandler class.</p>
@@ -34,11 +46,29 @@ public class NewSpecimenHandler extends AbstractHandler {
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard();
-               wizard.init(null, null);
-               WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
-               dialog.open();
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+           ConversationHolder conversation = CdmStore.createConversation();
+           conversation.bind();
+           FieldUnit fieldUnit = FieldUnit.NewInstance();
+           DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
+           DerivationEvent.NewSimpleInstance(fieldUnit, derivedUnit, DerivationEventType.GATHERING_IN_SITU());
+           fieldUnit.setCacheStrategy(new DerivedUnitFacadeFieldUnitCacheStrategy());
+           derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
+        CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
+        CdmStore.getService(IOccurrenceService.class).save(derivedUnit);
+        conversation.commit();
+        DerivateViewEditorInput input = new DerivateViewEditorInput(Collections.singleton(fieldUnit.getUuid()));
+        try {
+            EditorUtil.open(input);
+        } catch (PartInitException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+//             NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard();
+//             wizard.init(null, null);
+//             WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+//             dialog.open();
                return null;
        }
 }
index f65f3fdc455c9b7e83959049037b0a5af03154e5..4fc42da010535d14387ff4b3c0c0812b3b5c9ac7 100644 (file)
@@ -20,6 +20,9 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
@@ -27,6 +30,7 @@ import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
 import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.DeleteNodeOperation;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
@@ -46,6 +50,15 @@ public class DeleteNodeHandler extends AbstractHandler {
        public Object execute(ExecutionEvent event) throws ExecutionException {
                IEditorPart editor = HandlerUtil.getActiveEditor(event);
 
+               if (editor.isDirty()){
+                       boolean proceed = MessageDialog.openQuestion(null,
+                                       "Save changes", "You have made changes that must be saved before you can delete the node. Would you like to proceed?");
+                       if (!proceed) {
+                               return null;
+                       }else{
+                               editor.doSave(EditorUtil.getMonitor());
+                       }
+               }
                if (editor instanceof KeyEditor) {
                        IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
                                        .getActiveEditor();
@@ -59,8 +72,8 @@ public class DeleteNodeHandler extends AbstractHandler {
                                        IUndoContext undoContext = EditorUtil.getUndoContext();
 
                                        for (Object element : selection.toArray()) {
-                                               PolytomousKeyNode keyNode = (PolytomousKeyNode) element;
-
+                                               PolytomousKeyNode keyNode = HibernateProxyHelper.deproxy(element, PolytomousKeyNode.class);
+                                               
                                                AbstractPostOperation operation = new DeleteNodeOperation(
                                                                label, undoContext, keyNode, editorPage);
                                                EditorUtil.executeOperation(operation);
index c55cff77a96035aaf81e50f9bc0ece33eb28f7a1..3b4ae0d7ab1d1bcad784e2b7d041f4eabee34ad3 100644 (file)
@@ -52,14 +52,15 @@ public class DeleteNodeOperation extends AbstractPostTaxonOperation {
                controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
                
                IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
+               
                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, false);
+                               service.delete(node.getUuid(), false);
                        } else{
-                               service.delete(node, true);
+                               service.delete(node.getUuid(), true);
                        }
                } else{
-                       service.delete(node, true);
+                       service.delete(node.getUuid(), true);
                }
                return postExecute(null);
        }
index 917856013518d8f1c29db6c845420ad5a1cc13a3..e5665f3939705e96af0216a134c8ab16d05bedeb 100644 (file)
@@ -431,7 +431,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
             getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
         }
         if (taxonNode != null) {
-            selectedTaxonNodes = taxonNodeService.loadChildNodesOfTaxonNode(taxonNode, NODE_INIT_STRATEGY, true, false);
+            selectedTaxonNodes = taxonNodeService.loadChildNodesOfTaxonNode(taxonNode, NODE_INIT_STRATEGY, true, null);
             getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
         }
     }
index 1e2cf107f3c7c8c4d1adcf10ee3728d503a91c33..a604e1bbd30c392326a3aec66ba2efcbcf606891 100644 (file)
@@ -40,11 +40,11 @@ import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index 4fa17471a712937ef545ff855023a959ebbd8ffe..5e33668e57a1e86744a9c0a8e23b71c23bab8058 100644 (file)
@@ -36,7 +36,6 @@ import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.name.Rank;
@@ -47,6 +46,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index b490b516cb058ea6a1b0c69ac1cd0bf75c05dc70..310c39c99000755cb7b24caf67d1d33eb5f2c4a6 100644 (file)
@@ -26,7 +26,6 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.ISourceable;
@@ -34,12 +33,12 @@ import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index b418af0a21501343e63e9c93214d2ca6099682c1..f804d48ef6c39bdb59ebd1125ddacd03c987bffa 100644 (file)
@@ -37,7 +37,6 @@ import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.Feature;
@@ -55,6 +54,7 @@ import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index 12d8391562318c227f7dd1fa76114eefd59ecf77..7daa4e43f1a92ff5e3666b1d60bdd32b2f0caf1c 100644 (file)
@@ -35,7 +35,6 @@ import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.api.service.search.DocumentSearchResult;
 import eu.etaxonomy.cdm.api.service.search.SearchResult;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
@@ -48,7 +47,6 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.HybridRelationship;
@@ -64,6 +62,7 @@ import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index 2509f76320aab1a0ace0517828a9ad57b851077f..40a46f02be7eb418a9e4595720f57330cf3f2546 100644 (file)
@@ -49,7 +49,6 @@ import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
@@ -69,6 +68,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index 3fda470fdfd5e82d5c7e3733d7167033fe23f55d..1cb2f4869f65e0377fef7b1dd7c81a9226d9280c 100644 (file)
@@ -27,7 +27,6 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.ISourceable;
@@ -35,13 +34,13 @@ import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.LSID;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index bd3bd711494a32dbd0cc3c05386b4381407c3736..b26a6e84f23db90bdb13fbc18c89311c9cd4e0aa 100644 (file)
@@ -55,7 +55,6 @@ import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
@@ -79,6 +78,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.fetch.CdmFetch;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
index 61b701ecdfd164c28849eff1575a9d7029c6941c..4ade2430575cc4461698e941fb55970045e80384 100644 (file)
@@ -31,7 +31,6 @@ import eu.etaxonomy.cdm.api.service.config.TermDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.dto.FindByIdentifierDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
@@ -45,7 +44,6 @@ import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.Representation;
 import eu.etaxonomy.cdm.model.common.TermType;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
 import eu.etaxonomy.cdm.model.location.NamedAreaType;
@@ -54,6 +52,7 @@ import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.view.AuditEvent;
 import eu.etaxonomy.cdm.model.view.AuditEventRecord;
 import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.Grouping;
 import eu.etaxonomy.cdm.persistence.query.MatchMode;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
index 411530651d92ed753d3f09a7e0dddaf478f340b3..ae9a12fea5044cbeea6eb587eca40910eb3fad42 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature.platform"
       label="Taxeditor Dependencies"
-      version="3.5.2.qualifier"
+      version="3.6.1.qualifier"
       os="linux,macosx,win32"
       ws="cocoa,gtk,win32"
       arch="x86,x86_64">
index 41b31b0198a9f86e53158ccc37bfebe4ec107c0f..f06925b357ee710f8364c1578110fd792235dc2e 100644 (file)
@@ -3,13 +3,13 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.5.2-SNAPSHOT</version>
+               <version>3.6.1-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
        <packaging>eclipse-feature</packaging>
        
        <name>Taxonomic Editor Platform Dependencies</name>
-       <description/>
+       <description />
        <url>http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorEditorBundle</url>
 </project>
index ebaea0fbcc51dc2a5147b761a3a3097adce0f92a..034fb74c1f8ae769e007f85dba72c298663975b1 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="3.5.2.qualifier"
+      version="3.6.1.qualifier"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
index 813a6c3bf6e825dc991021ed78ee51146d9bd7b7..efd295b774e10e5ce49f402885d3370c33762914 100644 (file)
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
+<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/xsd/maven-4.0.0.xsd">
   <parent>
     <groupId>eu.etaxonomy</groupId>
     <artifactId>taxeditor-parent</artifactId>
-    <version>3.5.2-SNAPSHOT</version>
+    <version>3.6.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index 66a9365a2e6ec3f03dd9f95ae603b69a8466bd0a..94e2a28d411ae62f16941d73f83809b58c4bd686 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
index ba665d80cc32b180602253d3cfbf0d24f67b4f37..af3a34fc4c4a0b49b27a01336d664aba4c9c4520 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+               <version>3.6.1-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index fcf2822e5479fd5dbf45d3b831082580c4a74900..9831757ec8e9b0dc867bb15f7fa3998c9a2ef8ff 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
index 5caf3402c685bcb28702864b1a12a66c5b6d29ae..c935307f6a1cef4dabbbdfa329ab016bbc051585 100644 (file)
                </or>
             </visibleWhen>
          </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.open"
+               label="Edit"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <with
+                     variable="selection">
+                  <reference
+                        definitionId="isClassification">
+                  </reference>
+               </with>
+            </visibleWhen>
+         </command>
          <command
                commandId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym"
                label="%command.label.6"
          </with>
       </definition>
    </extension>
+   <extension
+         point="eu.etaxonomy.taxeditor.store.cdmViewer">
+      <cdmViewer
+            class="eu.etaxonomy.taxeditor.navigation.NavigationCdmViewer">
+      </cdmViewer>
+   </extension>
 </plugin>
index a09247ea8c3626c52e8207618887a403af3e6f4d..40a171384fe2e9451ceb161f1667b2c6ff6927cb 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+               <version>3.6.1-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationCdmViewer.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationCdmViewer.java
new file mode 100644 (file)
index 0000000..9784c9a
--- /dev/null
@@ -0,0 +1,50 @@
+package eu.etaxonomy.taxeditor.navigation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard;
+import eu.etaxonomy.taxeditor.view.ICdmViewer;
+
+public class NavigationCdmViewer implements ICdmViewer {
+
+
+    @SuppressWarnings("unused")
+    private final Logger logger = Logger.getLogger(NavigationCdmViewer.class);
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.view.ICdmViewer#show(java.lang.Object)
+     */
+    @Override
+    public void show(Object input, Class<?> viewerClass, ExecutionEvent event) {
+        if(viewerClass.equals(NewClassificationWizard.class)){
+            if(input instanceof Classification){
+                Classification classification = (Classification)input;
+                NewClassificationWizard classificationWizard = new NewClassificationWizard();
+                classificationWizard.init(null, null);
+                classificationWizard.setEntity(classification);
+                WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), classificationWizard);
+                dialog.open();
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.view.ICdmViewer#getViewerClasses(java.lang.Object)
+     */
+    @Override
+    public Map<Class<?>, String> getViewerClasses(Object input) {
+        Map<Class<?>, String> viewerNameMap = new HashMap<Class<?>, String>();
+        if(input instanceof Classification){
+            viewerNameMap.put(NewClassificationWizard.class, "Classification Wizard");
+        }
+        return viewerNameMap;
+    }
+
+}
index ab46175b11a6c98cc0369d4a27a6caa82713945c..7e48f97fcf6066329bdb081c0b236c6e0c17236f 100644 (file)
@@ -29,13 +29,13 @@ import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.navigator.CommonViewer;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
index 7c8b588be75036e4012655907dba6e5ff7cb158b..868116c208841f12714ec1f7265d8557e9e81a2c 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.
 */
@@ -32,7 +32,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class DeleteOperation extends AbstractPersistentPostOperation {
 
-       private PolytomousKey key;
+       private final PolytomousKey key;
 
        /**
         * @param label
@@ -46,37 +46,28 @@ public class DeleteOperation extends AbstractPersistentPostOperation {
                this.key = key;
        }
 
-       /* (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 {
                bind();
-               
+
                DeleteResult result = CdmStore.getService(IPolytomousKeyService.class).delete(key);
-               if (result.isError()){
-                       MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
-                       
+               if (result.isError() && !result.getExceptions().isEmpty()){
+                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+
                }else if(result.isAbort()){
                        MessageDialog.openWarning(null, "Delete abort", "The object could not be deleted, maybe there was no object selected.");
                }
-               
+
                return postExecute(null);
        }
 
-       /* (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 {
                return 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 {
index c022ca4e2debf372e73797e8bb304967bc28da25..936ca55c0a066efe0d1f72738ee3d8e344a59412 100644 (file)
@@ -36,7 +36,6 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  *
  * @author p.ciardelli
  * @created 04.06.2009
- * @version 1.0
  */
 public class TaxonNodeLabelProvider extends ColumnLabelProvider
                implements ILabelProvider, IDescriptionProvider, IStyledLabelProvider {
@@ -76,22 +75,16 @@ public class TaxonNodeLabelProvider extends ColumnLabelProvider
                return new String();
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
     public String getDescription(Object anElement) {
                if (anElement instanceof TaxonNode) {
                        Taxon data = ((TaxonNode) anElement).getTaxon();
-                       return "Taxon: " + data != null ? data.getTitleCache() : ">NO TAXON<";
+                       return "Taxon: " + (data != null ? data.getTitleCache() : ">NO TAXON<");
                }
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
     public StyledString getStyledText(Object element) {
index dc5f39a1b923bcdbfc9aac28e3ff1acf70282a6d..4e928a0cec32e45ad20f2d44f52245b86e732d31 100644 (file)
@@ -2,9 +2,9 @@ package eu.etaxonomy.taxeditor.navigation.navigator.handler;
 // $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.
 */
@@ -13,12 +13,12 @@ package eu.etaxonomy.taxeditor.navigation.navigator.handler;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.newWizard.IWizardPageListener;
 import eu.etaxonomy.taxeditor.newWizard.NewTaxonNodeWizard;
 
 /**
@@ -28,25 +28,31 @@ import eu.etaxonomy.taxeditor.newWizard.NewTaxonNodeWizard;
  * @created Sep 15, 2009
  * @version 1.0
  */
-public class NewTaxonNodeHandler extends AbstractHandler implements IHandler {
+public class NewTaxonNodeHandler extends AbstractHandler {
 
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
        /** {@inheritDoc} */
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               NewTaxonNodeWizard wizard = new NewTaxonNodeWizard();
+       @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+               final NewTaxonNodeWizard wizard = new NewTaxonNodeWizard();
                wizard.init(null, null);
-               WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+               final WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+               wizard.addWizardPageListener(new IWizardPageListener() {
+
+                   @Override
+                   public void close() {
+                       wizard.performFinish();
+                       dialog.close();
+                   }
+               });
                int status = dialog.open();
-               
+
                if(status == IStatus.OK && wizard.openInEditor()){
                        if(wizard.openEmpty()){
                                NavigationUtil.openEmpty(wizard.getParentTreeNode().getUuid());
                        }else if(wizard.getTaxonNode() != null){
                                NavigationUtil.openEditor(wizard.getTaxonNode());
                        }
-               }       
+               }
                return null;
        }
 }
index 4dd1c61dbf3a5e01904d92a7aefe610d489afe79..1f17047020c0cb07cca4806cc6edb94b48364a27 100644 (file)
@@ -16,8 +16,10 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
@@ -73,12 +75,24 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
                bind();
        Taxon oldTaxon = (Taxon) HibernateProxyHelper.deproxy(((TaxonNode) taxonNode).getTaxon());
                try {
-                   CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode((TaxonNode) taxonNode, newAcceptedTaxonNode, null, null, null);
-        } catch (IllegalArgumentException e) {
+                   DeleteResult result = CdmStore.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode((TaxonNode) taxonNode, newAcceptedTaxonNode, null, null, null);
+        
+                   if (!result.getExceptions().isEmpty() && result.isOk()){
+                       String separator = ", ";
+                           String exceptionString = "";
+                           for (Exception exception : result.getExceptions()) {
+                           exceptionString += exception.getLocalizedMessage()+separator;
+                       }
+                               
+                       MessagingUtils.informationDialog("Synonym created but taxon is not deleted.", exceptionString);                 
+                   } else if (result.isAbort() || result.isError()){
+                       MessagingUtils.errorDialog("Synonym could not created", null, result.toString(), null, null, true);
+                   }
+               } catch (IllegalArgumentException e) {
             MessagingUtils.errorDialog("Operation failed", this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
             return Status.CANCEL_STATUS;
         }
-
+               
                monitor.worked(40);
 
                return postExecute(oldTaxon);
index 743cb775ea135bb417ec3f06e82937935740295a..0471420414d1b0506c810a3593dbdb46c45d273a 100644 (file)
@@ -101,9 +101,16 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                element = ((TaxonNode)taxonNode).getTaxon();
 
                                DeleteResult result = service.deleteTaxonNode((TaxonNode)taxonNode, config);
-                               if (result.isError()){
+                               if (result.isError() && !result.getExceptions().isEmpty()){
                                        //TODO:Error message!
-                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
+                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+                               } else if (!result.getExceptions().isEmpty()){
+                                       String separator = ", ";
+                                   String exceptionString = "";
+                                   for (Exception exception : result.getExceptions()) {
+                                   exceptionString += exception.getLocalizedMessage()+separator;
+                               }
+                                       MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString);
                                }
 
 
@@ -114,11 +121,11 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                                return null;
                                        }
                                }*/
-                               
+
                                DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
-                               if (result.isError()){
+                               if (result.isError() && !result.getExceptions().isEmpty()){
                                        //TODO:Error message!
-                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
+                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
                                }
 
                                /*}else{
@@ -129,11 +136,11 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                        }
                                }*/
                        } else {
-                               
+
                                DeleteResult result =service.deleteTaxonNodes(treeNodes, config);
-                               if (result.isError()){
+                               if (result.isError() && !result.getExceptions().isEmpty()){
                                        //TODO:Error message!
-                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
+                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
                                }
                        }
 
index 070687e404d7760f6884886484542c884a2f366d..ade78cbb707dcb79f0b7b555dd53db2b6955216f 100644 (file)
@@ -16,15 +16,13 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
 
-import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>SearchResultLabelProvider class.</p>
index 8a1ca9d9a74d824624a923cac844ab97719d6e36..9e8d5e40d8845d19f02ae27992996dcf78057d17 100644 (file)
@@ -39,8 +39,7 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
index ffc9246363bb503c8faf2d97a66ce2a1382e2a38..79dc7fcbe77157bcf711a528b0db3258b4193b25 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib,
index c95e7652c8b6438404aa13c3f21e3c7e90a295d8..f6b58cb35208115af2e9db5ad30e687e8db4a01b 100644 (file)
@@ -1,10 +1,9 @@
 <?xml version="1.0"?>
-<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">
+<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>
                <artifactId>taxeditor-parent</artifactId>
                <groupId>eu.etaxonomy</groupId>
-               <version>3.5.2-SNAPSHOT</version>
+               <version>3.6.1-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
@@ -13,7 +12,7 @@
        <packaging>eclipse-plugin</packaging>
        
        <name>Printpublisher Bundle</name>
-       <description></description>
+       <description />
        <url>http://wp5.e-taxonomy.eu/printpublisher</url>
 
 </project>
index da17d968031059f26b0f94e893b46165c03d8fb1..6ffffa58816e992bd68fd1aa7b94fb41466627c1 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.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
index 37c33cdfeb15a1690faac784e1c68b90427e895a..41a4ad279bcfe7f014dca98ed5648424dd114637 100644 (file)
             id="eu.etaxonomy.taxeditor.editor.definedTerms.delete"
             name="%command.name.14">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.handler.OpenHandler"
+            id="eu.etaxonomy.taxeditor.store.open"
+            name="Open">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.importWizards">
index aa8bc1fb3a72068492b84d66cf20e153d7ffadd6..179c6cc98af50b566377bbc63a7c2678d159d45c 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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.5.2-SNAPSHOT</version>
+       <version>3.6.1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
index d885f02880ef9bb394893692ed8dbcbadc55425a..42791ec3b89d6c6967cb86041814a7d482ff7619 100644 (file)
@@ -16,7 +16,7 @@
             <meta.element />
          </appInfo>
          <documentation>
-            Extensions must provide and ICdmViewer which maps input elements to viewers which are able to display information for them.
+            Extensions must provide an ICdmViewer which maps input elements to viewers which are able to display information for them.
          </documentation>
       </annotation>
       <complexType>
index 8744410156e8faf0c1182b8758c19fc982a8d25e..7ea235d19d1a2e77b68cd694b2cc32233cb6fc3d 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \r
+*\r
 * The contents of this file are subject to the Mozilla Public License Version 1.1\r
 * See LICENSE.TXT at the top of this package for the full license terms.\r
 */\r
@@ -12,10 +12,14 @@ package eu.etaxonomy.taxeditor.editor.definedterm;
 import java.util.ArrayList;\r
 import java.util.Collection;\r
 \r
+import org.eclipse.jface.viewers.StructuredSelection;\r
 import org.eclipse.jface.viewers.ViewerDropAdapter;\r
+import org.eclipse.swt.dnd.DND;\r
+import org.eclipse.swt.dnd.DropTargetEvent;\r
 import org.eclipse.swt.dnd.TransferData;\r
 \r
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermBase;\r
 import eu.etaxonomy.cdm.model.common.TermBase;\r
 import eu.etaxonomy.taxeditor.editor.definedterm.operation.MoveDefinedTermOperation;\r
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
@@ -28,7 +32,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  */\r
 public class DefinedTermDropAdapter extends ViewerDropAdapter {\r
 \r
-       private DefinedTermEditor editor;\r
+       private final DefinedTermEditor editor;\r
        /**\r
         * @param viewer\r
         */\r
@@ -42,23 +46,32 @@ public class DefinedTermDropAdapter extends ViewerDropAdapter {
         */\r
        @Override\r
        public boolean performDrop(Object data) {\r
-               \r
+\r
                TermBase target = (TermBase) getCurrentTarget();//can be vocab\r
+               int currentLocation = getCurrentLocation();\r
+               System.out.println("current location : " + currentLocation + " , target : " + target.getTitleCache());\r
                //DefinedTermBase[] droppedElements = (DefinedTermBase[]) data;\r
                Object[] droppedTerms = (Object[]) data;\r
                Collection<DefinedTermBase> sourceTerms = new ArrayList<DefinedTermBase>(); //Arrays.asList(droppedElements)\r
-               \r
+\r
                for (Object droppedTerm : droppedTerms) {\r
-                       \r
+\r
                        DefinedTermBase term = (DefinedTermBase) droppedTerm;\r
                        sourceTerms.add(term);\r
-                       \r
+\r
                }\r
-               \r
-               AbstractPostOperation operation = new MoveDefinedTermOperation("Move Descriptions", StoreUtil.getUndoContext(), target, sourceTerms, editor);\r
+\r
+               AbstractPostOperation operation = new MoveDefinedTermOperation("Move Descriptions",\r
+                       StoreUtil.getUndoContext(),\r
+                       target,\r
+                       sourceTerms,\r
+                       editor,\r
+                       currentLocation);\r
                //TODO: implement execute\r
                StoreUtil.executeOperation(operation);\r
-               \r
+               // select the newly moved objects\r
+               editor.getViewer().setSelection(new StructuredSelection(sourceTerms.toArray(new TermBase[sourceTerms.size()])));\r
+\r
                return true;\r
        }\r
 \r
@@ -69,9 +82,23 @@ public class DefinedTermDropAdapter extends ViewerDropAdapter {
        public boolean validateDrop(Object target, int operation,\r
                        TransferData transferType) {\r
                boolean transferDataIsSupported = TermTransfer.getInstance().isSupportedType(transferType);\r
-               System.out.println(target);\r
                // maybe don't need this - they will be all TermBase anyway\r
-               return target instanceof TermBase && transferDataIsSupported; \r
+               return target instanceof TermBase && transferDataIsSupported;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragOver(org.eclipse.swt.dnd.DropTargetEvent)\r
+        */\r
+       @Override\r
+       public void dragOver(DropTargetEvent event) {\r
+           super.dragOver(event);\r
+           TermBase target = (TermBase) getCurrentTarget();\r
+           if(!(target instanceof OrderedTermBase)) {\r
+               // this is to only disable insert between items\r
+               event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL;\r
+           }\r
+\r
+\r
        }\r
 \r
 }\r
index c58e631de4af53a7d9408806ea1a52ca243299ec..8cae931e980bcd485a7b65b85932fae29afce75c 100644 (file)
@@ -15,6 +15,7 @@ import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelection;\r
 import org.eclipse.jface.viewers.StructuredSelection;\r
 import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.jface.viewers.Viewer;\r
 import org.eclipse.jface.viewers.ViewerSorter;\r
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.dnd.DND;\r
@@ -35,6 +36,7 @@ import org.eclipse.ui.part.EditorPart;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermBase;\r
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
 import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;\r
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;\r
@@ -84,7 +86,7 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
                        viewer.getControl().setLayoutData(LayoutConstants.FILL());\r
                        viewer.setContentProvider(new TermContentProvider());\r
                        viewer.setLabelProvider(new TermLabelProvider());\r
-                       viewer.setSorter(new ViewerSorter());\r
+                       viewer.setSorter(new DefinedTermSorter());\r
 \r
                        Transfer[] transfers = new Transfer[] { TermTransfer.getInstance() };\r
                        viewer.addDragSupport(dndOperations, transfers, new DefinedTermDragListener(viewer));\r
@@ -231,6 +233,28 @@ public class DefinedTermEditor extends EditorPart implements IConversationEnable
                return viewer;\r
        }\r
 \r
+       private class DefinedTermSorter extends ViewerSorter {\r
+\r
+           @Override\r
+           public int compare(Viewer viewer, Object e1, Object e2) {\r
+               // the comparison value in this method determines the\r
+               // location <-> add term method used in the MoveDefinedTermOperation\r
+               // execute call\r
+               if(e1 instanceof OrderedTermBase && e2 instanceof OrderedTermBase) {\r
+                   OrderedTermBase otbe1 = (OrderedTermBase)e1;\r
+                   OrderedTermBase otbe2 = (OrderedTermBase)e2;\r
+                   if(otbe1.getOrderIndex() == otbe2.getOrderIndex()) {\r
+                       return 0;\r
+                   } else if(otbe1.isHigher(otbe2)) {\r
+                       return 1;\r
+                   } else {\r
+                       return -1;\r
+                   }\r
+               } else {\r
+                   return super.compare(viewer, e1, e2);\r
+               }\r
+           }\r
+       }\r
 \r
 \r
 }
\ No newline at end of file
index 5096f49ac31c8ad0113b0ec408e4985d31b4ed2d..e6513b9a60912384a7c5cc4ea2f03e1c3d9cf5aa 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \r
+*\r
 * The contents of this file are subject to the Mozilla Public License Version 1.1\r
 * See LICENSE.TXT at the top of this package for the full license terms.\r
 */\r
@@ -17,8 +17,11 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.core.runtime.Status;\r
+import org.eclipse.jface.viewers.ViewerDropAdapter;\r
 \r
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermBase;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;\r
 import eu.etaxonomy.cdm.model.common.TermBase;\r
 import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
 import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
@@ -32,21 +35,27 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  *\r
  */\r
 public class MoveDefinedTermOperation extends AbstractPostTaxonOperation {\r
-       \r
-       private Collection<DefinedTermBase> sourceTerms;// the actual DefinedTermBase(s) we are moving\r
-       private TermBase targetTermOrVocabulary;// the target VOCABULARY or DefinedTerm we are moving these to\r
+\r
+       private final Collection<DefinedTermBase> sourceTerms;// the actual DefinedTermBase(s) we are moving\r
+       private final TermBase targetTermOrVocabulary;// the target VOCABULARY or DefinedTerm we are moving these to\r
+       private final int currentLocation;\r
 \r
        /**\r
         * @param label\r
         * @param undoContext\r
         * @param postOperationEnabled\r
         */\r
-       public MoveDefinedTermOperation(String label, IUndoContext undoContext, TermBase target, Collection<DefinedTermBase> sourceTerms,\r
-                       IPostOperationEnabled postOperationEnabled) {\r
+       public MoveDefinedTermOperation(String label,\r
+               IUndoContext undoContext,\r
+               TermBase target,\r
+               Collection<DefinedTermBase> sourceTerms,\r
+                       IPostOperationEnabled postOperationEnabled,\r
+                       int currentLocation) {\r
                super(label, undoContext, postOperationEnabled);\r
-               \r
+\r
                this.targetTermOrVocabulary = target;\r
                this.sourceTerms = sourceTerms;\r
+               this.currentLocation = currentLocation;\r
        }\r
 \r
        /* (non-Javadoc)\r
@@ -55,61 +64,80 @@ public class MoveDefinedTermOperation extends AbstractPostTaxonOperation {
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-               \r
+\r
                // need to make the moved DefinedTerm part of another DefinedTerm or Vocabulary (target)\r
                // and remove it from old associations\r
-               \r
+\r
                //TODO move to ITermService\r
-               \r
-               for (DefinedTermBase term : sourceTerms){\r
+\r
+               for (DefinedTermBase term : sourceTerms) {\r
                        // do nothing when moving it on itself\r
                        if(targetTermOrVocabulary.equals(term)){\r
                                Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term can not be added to itself");\r
                                MessagingUtils.informationDialog("", status);\r
                                return status;\r
                        }\r
-                       \r
+\r
                        if (targetTermOrVocabulary instanceof TermVocabulary) {\r
                                TermVocabulary termVocabulary = (TermVocabulary)targetTermOrVocabulary;\r
-                               \r
+\r
                                // do nothing when term is top level and gets added to the same vocabulary\r
                                if(term.getPartOf() == null && termVocabulary.equals(term.getVocabulary())){\r
                                        Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term is already in this vocabulary");\r
                                        MessagingUtils.informationDialog("", status);\r
                                        return status;\r
                                }\r
-                               \r
+\r
                                cleanTerm(term);\r
                                termVocabulary.addTerm(term);\r
-                               \r
+\r
                        } else if (targetTermOrVocabulary instanceof DefinedTermBase) {\r
                                cleanTerm(term);\r
                                DefinedTermBase targetDefinedTerm = (DefinedTermBase) targetTermOrVocabulary;\r
-                               targetDefinedTerm.addIncludes(term);\r
-                               targetDefinedTerm.getVocabulary().addTerm(term);                                \r
+\r
+                               if(targetTermOrVocabulary instanceof OrderedTermBase && term instanceof OrderedTermBase) {\r
+                                   TermVocabulary tVoc = ((DefinedTermBase) targetTermOrVocabulary).getVocabulary();\r
+                                   if(tVoc instanceof OrderedTermVocabulary) {\r
+                                       OrderedTermVocabulary otVoc = (OrderedTermVocabulary)tVoc;\r
+                                       // the link between the location and the add term (below / above)\r
+                                       // method is determined by the compare method in the\r
+                                       // DefinedTermEditor's ViewerSorter (DefinedTermSorter) class\r
+                                       if(currentLocation == ViewerDropAdapter.LOCATION_BEFORE) {\r
+                                           otVoc.addTermBelow((OrderedTermBase)term, (OrderedTermBase)targetTermOrVocabulary);\r
+                                       }\r
+\r
+                                       if(currentLocation == ViewerDropAdapter.LOCATION_AFTER) {\r
+                                           otVoc.addTermAbove((OrderedTermBase)term, (OrderedTermBase)targetTermOrVocabulary);\r
+                                       }\r
+                                   }\r
+                               }\r
+                               if(currentLocation == ViewerDropAdapter.LOCATION_ON) {\r
+                                   targetDefinedTerm.addIncludes(term);\r
+                                   targetDefinedTerm.getVocabulary().addTerm(term);\r
+                               }\r
                        }\r
 \r
                }\r
                //return null;\r
-               return postExecute(targetTermOrVocabulary);                     \r
+               return postExecute(targetTermOrVocabulary);\r
        }\r
-       \r
+\r
        private DefinedTermBase cleanTerm(DefinedTermBase term){\r
 \r
                DefinedTermBase partOf = term.getPartOf();\r
                if(partOf != null){\r
                        partOf.removeIncludes(term);\r
                }\r
-       \r
-               \r
+\r
+\r
                TermVocabulary vocabulary = term.getVocabulary();\r
                if(vocabulary != null){\r
                        vocabulary.removeTerm(term);\r
                }\r
-               \r
+\r
                return term;\r
        }\r
-       \r
+\r
 \r
        /* (non-Javadoc)\r
         * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java
new file mode 100644 (file)
index 0000000..eecb24b
--- /dev/null
@@ -0,0 +1,25 @@
+package eu.etaxonomy.taxeditor.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.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.taxeditor.view.CdmViewerChooser;
+
+public class OpenHandler extends AbstractHandler {
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+        if(currentSelection instanceof IStructuredSelection){
+            Object firstElement = ((IStructuredSelection) currentSelection).getFirstElement();
+            CdmViewerChooser viewerChooser = new CdmViewerChooser(HandlerUtil.getActiveShell(event));
+            viewerChooser.chooseViewer(firstElement, event);
+        }
+        return null;
+    }
+
+}
index 3c2e033880cafdd8785edee08ceb53fa163e2827..7e22616d95754191c05111e897525494fb9e5e56 100644 (file)
@@ -22,44 +22,29 @@ import org.eclipse.ui.IMemento;
  */
 public class ContextListenerAdapter implements IContextListener {
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-        */
        /** {@inheritDoc} */
        @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)
-        */
        /** {@inheritDoc} */
        @Override
        public void contextStop(IMemento memento, IProgressMonitor monitor) {
                
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-        */
        /** {@inheritDoc} */
        @Override
        public void contextStart(IMemento memento, IProgressMonitor monitor) {
                
        }
        
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.IContextListener#contextRefresh(org.eclipse.core.runtime.IProgressMonitor)
-        */
        @Override
        public void contextRefresh(IProgressMonitor monitor) {
                
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.model.IContextListener#workbenchShutdown(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-        */
        /** {@inheritDoc} */
        @Override
        public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
index 658b72c31738fee7aafe23666f4bdb09fd9fbdc5..dd393a39dbbf7776a4c9b8dddf8f78fc8d24f16d 100644 (file)
@@ -422,7 +422,7 @@ public class DescriptionHelper {
                }
                else if(element instanceof CategoricalData){
                        String categoricalDataText = getCategoricalDataText((CategoricalData) element);
-                       if(categoricalDataText.isEmpty()){
+                       if(categoricalDataText==null || categoricalDataText.isEmpty()){
                            categoricalDataText = noLabelString;
                        }
             return categoricalDataText;
@@ -438,7 +438,7 @@ public class DescriptionHelper {
                }
                else if (element instanceof QuantitativeData) {
                        String quantitativeDataText = getQuantitativeDataText((QuantitativeData) element);
-                       if(quantitativeDataText.isEmpty()){
+                       if(quantitativeDataText==null || quantitativeDataText.isEmpty()){
                 quantitativeDataText = noLabelString;
                        }
             return quantitativeDataText;
index e44ad8f82ec17ebc7152a31cf7070174096f8df1..54c8d498fcf6fc7592ed088d6e8f3cdd9e6b071f 100644 (file)
@@ -5,6 +5,7 @@ import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.log4j.Logger;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
@@ -293,21 +294,36 @@ public class MessagingUtils {
             throwable = getDefaultThrowable();
         }
 
-        // add main execption
-        for (StackTraceElement ste : throwable.getStackTrace()) {
-            childStatuses.add(new Status(IStatus.ERROR, pluginId, "at " + ste.toString()));
-        }
+        int thCount = 0;
+        int maxTraces = 4;
 
-        // add cause
-        if(throwable.getCause() != null) {
-            childStatuses.add(new Status(IStatus.ERROR, pluginId, ""));
-            childStatuses.add(new Status(IStatus.ERROR, pluginId, "Caused by : " + throwable.getCause().toString()));
-            for (StackTraceElement ste : throwable.getCause().getStackTrace()) {
-                // build & add status
-                childStatuses.add(new Status(IStatus.ERROR, pluginId, "at " + ste.toString()));
+        for(Throwable th : ExceptionUtils.getThrowables(throwable)) {
+            // add main exception
+            if(thCount == 0) {
+                for (StackTraceElement ste : th.getStackTrace()) {
+                    childStatuses.add(new Status(IStatus.ERROR, pluginId, "  at " + ste.toString()));
+                }
+            } else {
+                // add recursive causes
+                if(th != null) {
+                    childStatuses.add(new Status(IStatus.ERROR, pluginId, ""));
+                    String msg = th.toString();
+                    childStatuses.add(new Status(IStatus.ERROR, pluginId, "Caused by : " + msg));
+                    int traceCount = 0;
+                    for (StackTraceElement ste : th.getStackTrace()) {
+                        // add only pre-defined number of trace elements
+                        if(traceCount > maxTraces) {
+                            childStatuses.add(new Status(IStatus.ERROR, pluginId, "  ...."));
+                            break;
+                        }
+                        // build & add status
+                        childStatuses.add(new Status(IStatus.ERROR, pluginId, "  at " + ste.toString()));
+                        traceCount++;
+                    }
+                }
             }
+            thCount++;
         }
-
         String finalMessage = message;
 
         if(finalMessage == null || finalMessage.isEmpty()) {
index f2657aae1f13b8d4400d0e925b477cc3d0f1a9f9..13fefdd17483456b9c1e2b4ffa80b21845e99a25 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.
 */
@@ -20,6 +20,7 @@ import org.eclipse.ui.IWorkbench;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@@ -35,7 +36,7 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
                INewWizard, IConversationEnabled {
 
        private ConversationHolder conversation;
-       
+
        protected CdmFormFactory formFactory;
 
        private T entity;
@@ -43,7 +44,7 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        private IWorkbench workbench;
 
        private IStructuredSelection selection;
-       
+
        /**
         * <p>Constructor for AbstractNewEntityWizard.</p>
         *
@@ -52,10 +53,10 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        public AbstractNewEntityWizard(){
                setWindowTitle(String.format("New %s", getEntityName()));
        }
-       
+
        /**
         * FIXME there might be a smarter way to do this,
-        * 
+        *
         * @return
         */
        protected abstract String getEntityName();
@@ -67,12 +68,12 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        @Override
        public boolean performFinish() {
                saveEntity();
-               
+
                conversation.commit();
                conversation.close();
                return true;
        }
-       
+
        /**
         * <p>Getter for the field <code>entity</code>.</p>
         *
@@ -81,7 +82,7 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        public T getEntity() {
                return entity;
        }
-       
+
        /**
         * <p>Setter for the field <code>entity</code>.</p>
         *
@@ -90,7 +91,7 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        public void setEntity(T entity){
                this.entity = entity;
        }
-       
+
        /**
         * Adds the entity to the current persistence context
         */
@@ -102,40 +103,42 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
        /** {@inheritDoc} */
        @Override
        public void init(IWorkbench workbench, IStructuredSelection selection) {
-               this.workbench = workbench != null ? workbench : StoreUtil.getWorkbench();
-               
+               this.workbench = workbench != null ? workbench : AbstractUtility.getWorkbench();
+
                if(selection == null){
-                       ISelectionService service = (ISelectionService) this.workbench.getActiveWorkbenchWindow().getSelectionService();
+                       ISelectionService service = this.workbench.getActiveWorkbenchWindow().getSelectionService();
                        if(service.getSelection() instanceof IStructuredSelection){
                                selection = (IStructuredSelection) service.getSelection();
                        }
                }
                this.selection = selection;
-               
+
                formFactory = new CdmFormFactory(Display.getCurrent(), null);
                conversation = CdmStore.createConversation();
                entity = createNewEntity();
-               
+
        }
-       
+
        /**
         * <p>createNewEntity</p>
         *
         * @return a T object.
         */
        protected abstract T createNewEntity();
-       
+
        /**
         * <p>getConversationHolder</p>
         *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
-       public ConversationHolder getConversationHolder() {
+       @Override
+    public ConversationHolder getConversationHolder() {
                return conversation;
        }
-       
+
        /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {}
+       @Override
+    public void update(CdmDataChangeMap changeEvents) {}
 
        /**
         * @return the workbench
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/IWizardPageListener.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/IWizardPageListener.java
new file mode 100644 (file)
index 0000000..2f76076
--- /dev/null
@@ -0,0 +1,7 @@
+package eu.etaxonomy.taxeditor.newWizard;
+
+public interface IWizardPageListener {
+
+    public void close();
+
+}
index 07f4c2126855ac80134eb20f2f8ad43ee6caed47..82550414bc3fae12207efa57711d0140b5bf86a0 100644 (file)
@@ -29,10 +29,11 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
        private TaxonNodeWizardPage taxonNodePage;
        private boolean openEmptyEditor;
        private UUID generatedTaxonNodeUuid;
+    private IWizardPageListener wizardPageListener;
 
        @Override
        public void addPages() {
-               taxonNodePage = new TaxonNodeWizardPage(formFactory, getConversationHolder(), getEntity());
+               taxonNodePage = new TaxonNodeWizardPage(formFactory, getConversationHolder(), getEntity(), wizardPageListener);
                addPage(taxonNodePage);
        }
 
@@ -111,4 +112,8 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
                return "Taxon";
        }
 
+       public void addWizardPageListener(IWizardPageListener wizardPageListener){
+           this.wizardPageListener = wizardPageListener;
+       }
+
 }
\ No newline at end of file
index f689bbf5b7222b1efcc96b254171b4ce3e087208..b2af1be68646890fd48074b3f0d2167358444046 100644 (file)
@@ -1,19 +1,16 @@
 /**
 * 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.preference;
 
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
@@ -24,31 +21,23 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
  * @created 20.05.2008
  * @version 1.0
  */
-public class DescriptionPreferences extends PreferencePage implements
+public class DescriptionPreferences extends FieldEditorPreferencePage implements
                IWorkbenchPreferencePage {
 
        /** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.preferences.desc"{trunked}</code> */
        public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.preferences.description";
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
-        */
+
        /** {@inheritDoc} */
        @Override
-       protected Control createContents(Composite parent) {
-               
-               Composite container = new Composite(parent, SWT.NULL);
-               container.setLayout(new GridLayout());
+    public void init(IWorkbench workbench) {
+        setPreferenceStore(PreferencesUtil.getPreferenceStore());
 
-               //
-               return container;
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-        */
-       /** {@inheritDoc} */
-       public void init(IWorkbench workbench) {
-
+       @Override
+       protected void createFieldEditors() {
+           addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_VOCABULARY_ID_FOR_TERM_LABELS,
+                   "Show vocabulary id for term labels.",
+                getFieldEditorParent()));
        }
 }
index c34d4b7e0f3e6ed5f26fdda6f0c443cdaefff8d9..fc2422da97852185043d89dd3254ebce88d9377f 100644 (file)
@@ -50,6 +50,16 @@ public interface IPreferenceKeys {
         */
        public static final String SHOW_DEBUG_INFORMATION = "eu.etaxonomy.taxeditor.showDebugInformation";
 
+       /**
+        * Whether to show database id in the entity selection dialogs.
+        */
+       public static final String SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG = "eu.etaxonomy.taxeditor.showIdInEntitySelectionDiaolog";
+
+       /**
+        * Whether to show vocabulary of the term when displaying it's label.
+        */
+       public static final String SHOW_VOCABULARY_ID_FOR_TERM_LABELS = "eu.etaxonomy.taxeditor.showVocabularyIdForTermLabels";
+
        /**
         *
         */
@@ -91,7 +101,7 @@ public interface IPreferenceKeys {
        public static final String SORT_RANKS_HIERARCHICHALLY = "eu.etaxonomy.taxeditor.menus.sortRanksHierarchichally";
        /** Constant <code>SORT_NODES_NATURALL="eu.etaxonomy.taxeditor.menus.sortNodesN"{trunked}</code> */
        public static final String SORT_NODES_NATURALLY = "eu.etaxonomy.taxeditor.menus.sortNodesNaturally";
-       
+
        /**
         * Whether multilanguage text fields should be editable in multiple languages.
         */
index 08a1a367308c19c7c7334415fbdc312c69a4cb93..cae829782409e61fa6bb5b1322e280d6342512a8 100644 (file)
@@ -40,6 +40,9 @@ public class TaxonomicEditorGeneralPreferences extends
                addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_DEBUG_INFORMATION,
                                "Show UUID and object ID in supplemental data view.",
                                getFieldEditorParent()));
+               addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG,
+                       "Show object id in entity selection dialogs.",
+                       getFieldEditorParent()));
                addField(new BooleanFieldEditor(
                                IPreferenceKeys.SHOULD_EXPAND_SECTION_WHEN_DATA_AVAILABLE,
                                "Should expand sections when data is available (Details View). This might make the Editor slow.",
index e7c5aa0b74c608e7ec35e6b78ce4149637f486af..f174f86773252b951c855dcd41951a105f44c0a9 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.
  */
@@ -64,7 +64,7 @@ class CdmStoreConnector extends Job {
        public IStatus run(final IProgressMonitor monitor) {
 
                monitor.beginTask(getConnectionMessage(), 10);
-               
+
                // check if database is up and running
                checkDatabaseReachable(monitor);
 
@@ -106,8 +106,8 @@ class CdmStoreConnector extends Job {
                                Thread.currentThread().setPriority(oldPriority);
                        }
                }
-               
-               
+
+
 
                if (!monitor.isCanceled()) {
                        CdmStore.setInstance(applicationController, cdmSource);
@@ -115,7 +115,7 @@ class CdmStoreConnector extends Job {
                        display.asyncExec(new Runnable() {
                                /*
                                 * (non-Javadoc)
-                                * 
+                                *
                                 * @see java.lang.Runnable#run()
                                 */
                                @Override
@@ -133,7 +133,7 @@ class CdmStoreConnector extends Job {
                        display.asyncExec(new Runnable() {
                                /*
                                 * (non-Javadoc)
-                                * 
+                                *
                                 * @see java.lang.Runnable#run()
                                 */
                                @Override
@@ -148,14 +148,14 @@ class CdmStoreConnector extends Job {
 
        private ICdmApplicationConfiguration getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
                if(cdmSource instanceof ICdmDataSource) {
-                       return  CdmApplicationController.NewInstance(applicationContextBean, 
-                                       (ICdmDataSource)cdmSource, 
+                       return  CdmApplicationController.NewInstance(applicationContextBean,
+                                       (ICdmDataSource)cdmSource,
                                        dbSchemaValidation,
-                                       false, 
+                                       false,
                                        subprogressMonitor);
                } else if(cdmSource instanceof ICdmRemoteSource) {
-                       return CdmApplicationRemoteController.NewInstance((ICdmRemoteSource)cdmSource,                                  
-                                                       false, 
+                       return CdmApplicationRemoteController.NewInstance((ICdmRemoteSource)cdmSource,
+                                                       false,
                                                        subprogressMonitor,
                                                        null);
                } else {
@@ -185,29 +185,39 @@ class CdmStoreConnector extends Job {
        private void checkDbSchemaVersionCompatibility(IProgressMonitor monitor) {
                monitor.subTask("Checking if datasource is compatible with this editor.");
                String dbSchemaVersion;
-               boolean result = false;
+
+               String message = null;
                try {
                        dbSchemaVersion = cdmSource.getDbSchemaVersion();
                        // we assume that empty dbSchemaVersion means an empty database and
                        // skip version checking
-                       result = dbSchemaVersion == null ? true : CdmMetaData
-                                       .isDbSchemaVersionCompatible(dbSchemaVersion);
+
+                       if(dbSchemaVersion != null) {
+                           int compareVersion = CdmMetaData.compareVersion(dbSchemaVersion, CdmMetaData.getDbSchemaVersion(), 3, null);
+                           // if the datasource version is greater than the taxeditor compatible version then the taxeditor needs to
+                           // be updated else the datasource needs to be updated
+                           if(compareVersion > 0) {
+                               message = "Please update the Taxonomic Editor (Help->Check for Updates) or choose a compatible datasource";
+                           } else if (compareVersion < 0) {
+                               message = "Please update the chosen datasource or choose a new data source to connect to in the Datasource View.";
+                           }
+                       }
                        monitor.worked(1);
                } catch (CdmSourceException e) {
                        //
                }
 
-               if (!result) {
+               if (message != null) {
                        // Show an error message
                        MessagingUtils
                                        .messageDialog(
-                                                       "DatabaseCompatibilityCheck failed",
+                                                       "Datasource Compatibility Check failed",
                                                        this,
                                                        "The database schema for the chosen "
                                                                        + "datasource '"
                                                                        + cdmSource
-                                                                       + "' \n is not valid for this version of the taxonomic editor. \n"
-                                                                       + "Please update the chosen datasource or choose a new data source to connect to in the Datasource View.",
+                                                                       + "' \n is not compatible for this version of the taxonomic editor. \n\n"
+                                                                       + message,
                                                        null);
 
                        monitor.setCanceled(true);
@@ -237,7 +247,7 @@ class CdmStoreConnector extends Job {
                        return causeIsCancelationExceptionRecursive(throwable.getCause());
                }
        }
-       
+
        private void checkDatabaseReachable(IProgressMonitor monitor) {
                try {
                        monitor.subTask("Checking if datasource is reachable.");
@@ -247,6 +257,6 @@ class CdmStoreConnector extends Job {
                        MessagingUtils.messageDialog("Could not connect to chosen datasource",
                                        this, "Reason: " + e.getMessage(), e);
                        monitor.setCanceled(true);
-               } 
+               }
        }
 }
index e9968f0b3ee523c90524ae351f704bb4e600557d..0eb45b3dd42c8ea7d90f6e83f83c7f773928d010 100644 (file)
@@ -32,7 +32,6 @@ import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
@@ -40,6 +39,7 @@ import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
index 38f1fea81b332f054d072085ff5ca243c296bffd..39993d70ae5ac5f48f296bf4ce127131f73e28c1 100644 (file)
@@ -4,6 +4,7 @@
 package eu.etaxonomy.taxeditor.ui.combo;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
@@ -24,6 +25,7 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -69,26 +71,28 @@ public class TermComboElement<T extends DefinedTermBase>
 
        private List<T> customPreferredTerms;
 
+       private boolean addEmptyElement;
+
        public TermComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, TermType termType, String labelString, T selection,
+                       ICdmFormElement parentElement, TermType termType, String labelString, T selection, boolean addEmptyElement,
                        int style) {
-               this(formFactory, parentElement, null, termType, null, labelString, selection, style);
+               this(formFactory, parentElement, null, termType, null, labelString, selection, addEmptyElement, style);
        }
 
        public TermComboElement(CdmFormFactory formFactory,
-               ICdmFormElement parentElement, TermVocabulary<?> termVocabulary, String labelString, T selection,
+               ICdmFormElement parentElement, TermVocabulary<?> termVocabulary, String labelString, T selection, boolean addEmptyElement,
                int style) {
-           this(formFactory, parentElement, null, null, termVocabulary, labelString, selection, style);
+           this(formFactory, parentElement, null, null, termVocabulary, labelString, selection, addEmptyElement, style);
        }
 
     public TermComboElement(CdmFormFactory formFactory,
-            ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection,
+            ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection, boolean addEmptyElement,
             int style) {
-        this(formFactory, parentElement, termClass, null, null, labelString, selection, style);
+        this(formFactory, parentElement, termClass, null, null, labelString, selection, addEmptyElement, style);
     }
 
        private TermComboElement(CdmFormFactory formFactory,
-               ICdmFormElement parentElement, Class<T> termClass, TermType termType, TermVocabulary<?> termVocabulary, String labelString, T selection,
+               ICdmFormElement parentElement, Class<T> termClass, TermType termType, TermVocabulary<?> termVocabulary, String labelString, T selection, boolean addEmptyElement,
                int style) {
         super(formFactory, parentElement);
 
@@ -98,6 +102,7 @@ public class TermComboElement<T extends DefinedTermBase>
         else{
             this.termClass =  (Class<T>) DefinedTerm.class;
         }
+        this.addEmptyElement = addEmptyElement;
 
         if (labelString != null) {
             label = formFactory.createLabel(getLayoutComposite(), labelString);
@@ -152,8 +157,6 @@ public class TermComboElement<T extends DefinedTermBase>
        public void setSelection(T selection) {
                this.selection = selection;
 
-               this.selection = selection;
-
                Listener[] listeners = combo.getListeners(SWT.Selection);
 
                for (Listener listener : listeners) {
@@ -192,9 +195,11 @@ public class TermComboElement<T extends DefinedTermBase>
                int i = 1;
                int index = 0;
 
-               // Add an empty element for when nothing was selected yet
-               combo.add(EMPTY_ELEMENT_LABEL);
-               terms.add(emptyElement);
+               if(addEmptyElement){
+                   // Add an empty element for when nothing was selected yet
+                   combo.add(EMPTY_ELEMENT_LABEL);
+                   terms.add(emptyElement);
+               }
 
                if (termComparator != null) {
                        Collections.sort(preferredTerms, termComparator);
@@ -278,7 +283,12 @@ public class TermComboElement<T extends DefinedTermBase>
                if (term == null){
                        return "";
                }else{
-                       return term.getLabel(CdmStore.getDefaultLanguage());
+                       String termLabel = term.getLabel(CdmStore.getDefaultLanguage());
+                       if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_VOCABULARY_ID_FOR_TERM_LABELS)
+                           && term.getVocabulary()!=null){
+                           termLabel += " ["+term.getVocabulary().getLabel(CdmStore.getDefaultLanguage())+"]";
+                       }
+            return termLabel;
                }
        }
 
@@ -424,4 +434,14 @@ public class TermComboElement<T extends DefinedTermBase>
                populateTerms(customPreferredTerms);
        }
 
+       public void removeEmptyElement(){
+           if(addEmptyElement){
+               if(terms.contains(emptyElement)){
+                   terms.remove(emptyElement);
+               }
+               if(Arrays.asList(combo.getItems()).contains(EMPTY_ELEMENT_LABEL)){
+                   combo.remove(EMPTY_ELEMENT_LABEL);
+               }
+           }
+       }
 }
index 9520de1b44ba894c8770d6b85df47df3aed35f99..bc920ea69b6501b01c33444eb8b5e4d1ea8e4401 100644 (file)
@@ -373,4 +373,9 @@ public class VocabularyComboElement<TERM extends DefinedTermBase<TERM>, VOC exte
                combo.setVisibleItemCount(count);
        }
 
+    public void removeEmptyElement(){
+        terms.remove(emptyElement);
+        combo.remove(EMPTY_ELEMENT_LABEL);
+    }
+
 }
index dcb689d0ef5de5a1a93250d8aaeea96d768468f9..e714485232cb72cfaf0f9f6cc858ffd1a5f90929 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.
 */
@@ -45,10 +45,12 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
 /**
@@ -66,14 +68,14 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        protected List<UuidAndTitleCache<T>> model;
        private final Set<T> transientCdmObjects = new HashSet<T>();
        private final String settings;
-       
+
        protected T cdmBaseToBeFiltered;
-       
+
        /**
         * <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
         *
         * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation 
+        * @param conversation
         * @param title a {@link java.lang.String} object.
         * @param multi a boolean.
         * @param settings a {@link java.lang.String} object.
@@ -85,29 +87,29 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                setTitle(title);
                setMessage("Use * for wildcard, or ? to see all entries");
                this.settings = settings;
-               
+
                this.conversation = conversation;
-               
+
                init();
-               
+
                initModel();
-               
+
                String objectTitle = getTitle(cdmObject);
                if (objectTitle != null) {
                        setInitialPattern(objectTitle);
                }
-               
+
                setListLabelProvider(createListLabelProvider());
                setDetailsLabelProvider(createDetailsLabelProvider());
-               
+
                setSelectionHistory(new ResourceSelectionHistory());
        }
-       
+
        /**
         * By default, we are returning the standard list label provider
-        * 
-        * Override in subclasses if you want different behavior 
-        * 
+        *
+        * Override in subclasses if you want different behavior
+        *
         * @return
         */
        protected ILabelProvider createDetailsLabelProvider() {
@@ -115,7 +117,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        }
 
        /**
-        * 
+        *
         * @return
         */
        protected ILabelProvider createListLabelProvider() {
@@ -127,9 +129,9 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
         * Will run before initModel()
         */
        protected void init() {
-               
+
        }
-       
+
        /**
         * <p>getSelectionFromDialog</p>
         *
@@ -140,18 +142,18 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        protected static <TYPE extends CdmBase> TYPE getSelectionFromDialog(AbstractFilteredCdmResourceSelectionDialog<TYPE> dialog) {
                //dialog.setInitialPattern("");
                int result = dialog.open();
-               
+
                if (result == Window.CANCEL) {
                        return null;
                }
-               
+
                UUID uuid = dialog.getSelectedUuidAndTitleCache().getUuid();
                if(uuid == null){
                        return null;
-               }       
+               }
                return dialog.getCdmObjectByUuid(uuid);
        }
-       
+
        /**
         * Check if object was created during the life of this dialog. If not,
         * retrieve it from the CdmStore.
@@ -167,7 +169,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                }
                return getPersistentObject(cdmUuid);
        }
-       
+
        /**
         * <p>getPersistentObject</p>
         *
@@ -204,16 +206,16 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                if(cdmObject == null){
                        return "";
                }
-               
+
                if (cdmObject instanceof IIdentifiableEntity) {
-                       return ((IIdentifiableEntity) cdmObject).getTitleCache();                       
+                       return ((IIdentifiableEntity) cdmObject).getTitleCache();
                }
-               
+
                throw new IllegalArgumentException("Generic method only" +
                                " supports cdmObject of type IIdentifiableEntity." +
                                " Please implement specific method in subclass.");
        }
-       
+
 
        /** {@inheritDoc} */
        @Override
@@ -222,7 +224,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                filterExcludedObjects();
                super.refresh();
        }
-       
+
        /**
         * <p>initModel</p>
         */
@@ -243,7 +245,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                        public boolean equalsFilter(ItemsFilter filter) {
                                return false;
                        }
-                       
+
                        @Override
                        public boolean isConsistentItem(Object item) {
                                return false;
@@ -259,10 +261,10 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                                }
                                return text != null ? matches(text) : false;
                        }
-                       
+
                };
        }
-       
+
 
        /**
         * Set the filter input to the Agent's title cache
@@ -270,11 +272,11 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
         * @param cdmObject a T object.
         */
        protected void setPattern(T cdmObject) {
-               // FilteredSelection does some very tricky caching to make sure it 
-               // runs with high performance. 
+               // FilteredSelection does some very tricky caching to make sure it
+               // runs with high performance.
                // This works for most use cases, but we want to change the model while the dialog is open
                // and all the clever caching prevents the content provider from knowing that the model has changed
-               // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient 
+               // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
                // way to solve the problem.
                try {
                        Field lastCompletedFilter = this.getClass().getSuperclass().getSuperclass().getDeclaredField("lastCompletedFilter");
@@ -289,14 +291,14 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                } catch (IllegalAccessException e) {
                        MessagingUtils.error(getClass(), e);
                }
-               
-               // this also is not the nicest way to do it. 
+
+               // this also is not the nicest way to do it.
                // I am still amazed, that FilteredSelectionDialog does not offer any methods to change its data
                // once it was opened. Am I doing it wrong?
                String pattern = getTitle(cdmObject);
                ((Text) getPatternControl()).setText(pattern);
        }
-       
+
        /* (non-Javadoc)
        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
        */
@@ -306,7 +308,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
                throws CoreException {
                try {
-                       if(model != null){                              
+                       if(model != null){
                                progressMonitor.beginTask("Looking for entities", model.size());
                                for(UuidAndTitleCache<T> element : model){
                                        contentProvider.add(element, itemsFilter);
@@ -371,7 +373,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        protected IStatus validateItem(Object item) {
                return Status.OK_STATUS;
        }
-       
+
        /**
         * <p>getSelectedUuidAndTitleCache</p>
         *
@@ -381,7 +383,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                Object[] result = getResult();
                return result[0] == null ? null : (UuidAndTitleCache) result[0];
        }
-       
+
        /**
         * <p>Getter for the field <code>settings</code>.</p>
         *
@@ -393,9 +395,9 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                }
                return settings;
        }
-       
+
        /**
-        * 
+        *
         * @author n.hoffmann
         * @created Oct 19, 2009
         * @version 1.0
@@ -417,29 +419,34 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                        element.putString("resource", item.toString()); //$NON-NLS-1$
                }
        }
-       
+
        /**
         * <p>getNewWizardLinkText</p>
         *
         * @return a {@link java.lang.String} object.
         */
        protected abstract String getNewWizardLinkText();
-       
+
        /**
         * <p>getNewEntityWizard</p>
-        * @param parameter 
+        * @param parameter
         * @return a {@link eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard} object.
         */
        protected abstract AbstractNewEntityWizard getNewEntityWizard(String parameter);
-       
+
        public class FilteredCdmResourceLabelProvider extends LabelProvider {
                @Override
                public String getText(Object element) {
                        if (element == null) {
                                return null;
                        }
-                       return ((UuidAndTitleCache) element).getTitleCache();
-               }                       
+                       UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache) element;
+                       String titleCache = uuidAndTitleCache.getTitleCache();
+                       if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG)){
+                           titleCache += " ["+uuidAndTitleCache.getId()+"]";
+                       }
+            return titleCache;
+               }
        };
 
        /* (non-Javadoc)
@@ -457,10 +464,10 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                }
                return null;
        }
-       
+
        protected SelectionListener getNewWizardLinkSelectionListener(){
                return new SelectionAdapter() {
-                       
+
                        /* (non-Javadoc)
                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
                         */
@@ -487,7 +494,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
                        }
                };
        }
-       
+
        /**
         * <p>getConversationHolder</p>
         *
@@ -497,26 +504,26 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        public ConversationHolder getConversationHolder() {
                return conversation;
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void update(CdmDataChangeMap changeEvents) {}
 
        /**
-        * Don't want to add for example a taxon or synonym to itself 
-        * so filter the list to remove the taxon in question 
+        * Don't want to add for example a taxon or synonym to itself
+        * so filter the list to remove the taxon in question
         * (<code>cdmBaseToBeFiltered</code>)
         * so it is not available in the filtered list.
         */
        private void filterExcludedObjects() {
                if (model != null && cdmBaseToBeFiltered != null) {
-                       
+
                        UuidAndTitleCache uuidAndTitleCacheToRemove = null;
-                                               
+
                        for (UuidAndTitleCache uuidAndTitleCache : model){
                                if ((cdmBaseToBeFiltered.getUuid()).equals(uuidAndTitleCache.getUuid())) {
                                        uuidAndTitleCacheToRemove = uuidAndTitleCache;
-                               }                               
+                               }
                        }
                        model.remove(uuidAndTitleCacheToRemove);
                }
index 4bf7c09a5c659617ed1d8c4d24e5cecd0eb3439f..3891c897ea0b493522571b6ea314cc59191e9040 100644 (file)
@@ -20,7 +20,7 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewPersonWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewTeamWizard;
index 240982f87e86c1b711ca9b28f0f4a2dd622278cb..4461574bdc4ebc4ba923e2c9332c8004c243db02 100644 (file)
@@ -19,8 +19,8 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -52,13 +52,10 @@ public class FeatureSelectionDialog extends
                super(shell, conversation, title, multi, settings, cdmObject);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
        @Override
        protected Feature getPersistentObject(UUID uuid) {
                
-               DefinedTermBase term = CdmStore.getService(ITermService.class).load(uuid);
+               DefinedTermBase<?> term = CdmStore.getService(ITermService.class).load(uuid);
                
                if(term instanceof Feature){
                        return (Feature) term;
@@ -67,9 +64,6 @@ public class FeatureSelectionDialog extends
                return null;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
        @Override
        protected void initModel() {
                List<Feature> features = CdmStore.getService(ITermService.class).list(Feature.class, null, null, null, null);
@@ -77,7 +71,7 @@ public class FeatureSelectionDialog extends
                List<UuidAndTitleCache<Feature>> featureUuidAndTitleCache = new ArrayList<UuidAndTitleCache<Feature>>();
                
                for(Feature feature : features){
-                       UuidAndTitleCache<Feature> uuidAndTitleCache = new UuidAndTitleCache<Feature>(Feature.class, feature.getUuid(), feature.getTitleCache());
+                       UuidAndTitleCache<Feature> uuidAndTitleCache = new UuidAndTitleCache<Feature>(Feature.class, feature.getUuid(), feature.getId(), feature.getTitleCache());
                        featureUuidAndTitleCache.add(uuidAndTitleCache);
                }
                
index 813bf0a3d7f77b8dda9230f2a30f71b5b1224a3e..708854d496101dfed35d4c332ce82d7fa1ef68b6 100644 (file)
@@ -26,8 +26,8 @@ import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.featuretree.FeatureTreeEditorWizard;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -94,7 +94,7 @@ public class FeatureTreeSelectionDialog extends
                }
                model.clear();
                for(FeatureTree featureTree : featureTrees){
-                       UuidAndTitleCache<FeatureTree> element = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(), featureTree.getTitleCache());
+                       UuidAndTitleCache<FeatureTree> element = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(),featureTree.getId(), featureTree.getTitleCache());
                        model.add(element);
                }
        }
@@ -123,18 +123,13 @@ public class FeatureTreeSelectionDialog extends
                return link;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
-        */
        /** {@inheritDoc} */
        @Override
        protected String getNewWizardLinkText() {
                return String.format("Create a new <a>%1s</a>" , "Feature tree ");
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard()
-        */
+
        /** {@inheritDoc} */
        @Override
        protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
index 1a42ff8d9b177d27417c4a5db4f7dc48a213ff85..9520fbb73c6901bc33216dd14cdd8a25429537c9 100644 (file)
@@ -20,7 +20,7 @@ import org.springframework.security.core.GrantedAuthority;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewGrantedAuthorityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -66,7 +66,7 @@ public class GrantedAuthoritySelectionDialog extends  AbstractFilteredCdmResource
 
                for(GrantedAuthorityImpl authority : authorities){
                        
-                       model.add(new UuidAndTitleCache<GrantedAuthorityImpl>(GrantedAuthorityImpl.class, authority.getUuid(),String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority))));
+                       model.add(new UuidAndTitleCache<GrantedAuthorityImpl>(GrantedAuthorityImpl.class, authority.getUuid(), authority.getId(), String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority))));
                }
        }
 
@@ -78,17 +78,11 @@ public class GrantedAuthoritySelectionDialog extends        AbstractFilteredCdmResource
                return String.format("Create a new <a>%1s</a>", "GrantedAuthority ");
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard(java.lang.String)
-        */
        @Override
        protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
                return new NewGrantedAuthorityWizard();
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
        @Override
        protected GrantedAuthorityImpl getPersistentObject(UUID uuid) {
                return CdmStore.getService(IGrantedAuthorityService.class).load(uuid);
index 45c9980fc664230c6d6de98e7ba4f30c3df82d0f..667a9c14951606dd23b6b76f9eb726bb10ebdd27 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewGroupWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -62,7 +62,7 @@ public class GroupSelectionDialog extends
                model = new ArrayList<UuidAndTitleCache<Group>>();
 
                for(Group group : groups){
-                       model.add(new UuidAndTitleCache<Group>(Group.class, group.getUuid(),String.format("%s", group.getName())));
+                       model.add(new UuidAndTitleCache<Group>(Group.class, group.getUuid(), group.getId(), String.format("%s", group.getName())));
                }
        }
 
index f2eee39654062951f958317136e902da9a78a13a..b9c1b5c078706fe7163a898c2115659ec29756cf 100644 (file)
@@ -29,9 +29,9 @@ import eu.etaxonomy.cdm.api.service.IVocabularyService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -154,7 +154,7 @@ public class NamedAreaSelectionDialog extends
                model.clear();
                for(Object areaObject : terms){
                        NamedArea area = (NamedArea) HibernateProxyHelper.deproxy(areaObject);
-                       UuidAndTitleCache<NamedArea> element = new UuidAndTitleCache<NamedArea>(NamedArea.class, area.getUuid(), getTitle(area));
+                       UuidAndTitleCache<NamedArea> element = new UuidAndTitleCache<NamedArea>(NamedArea.class, area.getUuid(), area.getId(), getTitle(area));
                        model.add(element);
                }
        }
index a73d9443d726d1f59b7f136accf89f6556988c41..27f1aba2439335b8f4077dc384e1110248cdccd2 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewUserWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -68,7 +68,7 @@ public class UserSelectionDialog extends
                model = new ArrayList<UuidAndTitleCache<User>>();
 
                for(User user : users){
-                       model.add(new UuidAndTitleCache<User>(User.class, user.getUuid(),String.format("%s, %s", user.getUsername(), user.getPerson())));
+                       model.add(new UuidAndTitleCache<User>(User.class, user.getUuid(), user.getId(), String.format("%s, %s", user.getUsername(), user.getPerson())));
                }
        }
 
index 4ee7621855b16adfed95c108413bb2c80ee35872..6373d42ae2170711e3d21cfa675e108057e3efab 100644 (file)
@@ -150,7 +150,6 @@ import eu.etaxonomy.taxeditor.ui.section.description.ScopeElement;
 import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
 import eu.etaxonomy.taxeditor.ui.section.description.StateDataElement;
 import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
-import eu.etaxonomy.taxeditor.ui.section.description.StateModifierElement;
 import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueElement;
 import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueSection;
 import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement;
@@ -313,7 +312,8 @@ import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateModifierCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionElement;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionElement;
@@ -773,105 +773,64 @@ public class CdmFormFactory extends FormToolkit {
         parentElement.addElement(element);
         return element;
     }
-
     /**
-     * <p>
-     * createTermComboElement
-     * </p>
-     *
      * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
-     * @param termComboType
-     *            a
-     *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
-     *            object.
-     * @param parentElement
-     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-     *            object.
-     * @param labelString
-     *            a {@link java.lang.String} object.
-     * @param selection
-     *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
-     *            object.
-     * @param style
-     *            a int.
-     * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
-     *         object.
      */
     @Deprecated
     public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
             ICdmFormElement parentElement, String labelString, T selection, int style) {
         TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString,
-                selection, style);
+                selection, true,  style);
         adapt(element);
         parentElement.addElement(element);
         return element;
     }
 
-       /**
-        * <p>
-        * createTermComboElement
-        * </p>
-        *
-        * @param termComboType
-        *            a
-        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
-        *         object.
-        */
+    public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+            TermType termType,
+            ICdmFormElement parentElement,
+            String labelString,
+            T selection,
+            int style) {
+        TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, true, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+    public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
                        TermType termType,
                        ICdmFormElement parentElement,
                        String labelString,
                        T selection,
+                       boolean addEmptyElement,
                        int style) {
-               TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, style);
+               TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       /**
-        * <p>
-        * createTermComboElement
-        * </p>
-        *
-        * @param termComboType
-        *            a
-        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
-        *         object.
-        */
+    public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+            TermVocabulary<?> termVocabulary,
+            ICdmFormElement parentElement,
+            String labelString,
+            T selection,
+            int style) {
+        TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, true, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
        public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
                TermVocabulary<?> termVocabulary,
                ICdmFormElement parentElement,
                String labelString,
                T selection,
+               boolean addEmptyElement,
                int style) {
-           TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, style);
+           TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, addEmptyElement, style);
            adapt(element);
            parentElement.addElement(element);
            return element;
@@ -2319,8 +2278,8 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    public StateModifierCollectionSection createStateModifierCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
-        StateModifierCollectionSection section = new StateModifierCollectionSection(this, conversation, parentElement, style);
+    public RecommendedModifierVocabulariesCollectionSection createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        RecommendedModifierVocabulariesCollectionSection section = new RecommendedModifierVocabulariesCollectionSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
         return section;
     }
@@ -2573,7 +2532,7 @@ public class CdmFormFactory extends FormToolkit {
                 element = new StateVocabularyCollectionElement(this, parentElement, (TermVocabulary<State>) entity, removeListener, backgroundColor, style);
                 break;
             case Modifier:
-                element = new StateModifierElement(this, parentElement, (TermVocabulary<DefinedTerm>) entity, removeListener, backgroundColor, style);
+                element = new RecommendedModifierVocabulariesElement(this, parentElement, (TermVocabulary<DefinedTerm>) entity, removeListener, backgroundColor, style);
                 break;
             default:
                 break;
index 3581a3d1c080d099c8aaecf5a96cc2b12611829e..08470792f57962863530c4be04533bcf75577b9d 100644 (file)
@@ -149,8 +149,7 @@ public class ToggleableTextElement extends AbstractCdmFormElement implements Sel
        @Override
     public void setEnabled(boolean enabled) {
                text_cache.setEnabled(enabled);
-        button_toggle.setEnabled(enabled);
-               button_toggle.setGrayed(enabled);
+               button_toggle.setGrayed(enabled);
                button_toggle.setSelection(enabled);
                String symbolicName = enabled ? Resources.COLOR_FONT_DEFAULT : Resources.COLOR_TEXT_DISABLED;
                text_cache.setForeground(StoreUtil.getColor(symbolicName));
index f338bc217ba0e62edc1a965b76c18327e838c651..f223d8c896aa5b33c40c5538391dac8f6bf4f236 100644 (file)
@@ -10,6 +10,7 @@
 
 package eu.etaxonomy.taxeditor.ui.section.agent;
 
+import java.awt.Checkbox;
 import java.util.Arrays;
 
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
@@ -17,6 +18,7 @@ import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
@@ -34,6 +36,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement
 public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<Team> {
 
        private ToggleableTextElement toggleable_nomenclaturalTitleCache;
+       private CheckboxElement hasAdditionalMembers;
 
        private TeamMemberSection section_teamMembers;
 
@@ -62,6 +65,7 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<T
 
         toggleable_cache = formFactory.createToggleableTextField(formElement, "Title Cache", entity.getTitleCache(), entity.isProtectedTitleCache(), style);
         toggleable_nomenclaturalTitleCache = formFactory.createToggleableTextField(formElement, "Abbrev. Title", entity.getNomenclaturalTitle(), entity.isProtectedNomenclaturalTitleCache(), style);
+        hasAdditionalMembers = formFactory.createCheckbox(formElement, "Additional Members", false, style);
         section_teamMembers = formFactory.createTeamMemberSection(getConversationHolder(), formElement, ExpandableComposite.EXPANDED);
         section_teamMembers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
     }
@@ -70,15 +74,15 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<T
        @Override
        protected void updateContent() {
                super.updateContent();
-
+               
                toggleable_cache.setEnabled(getEntity().isProtectedTitleCache());
                toggleable_nomenclaturalTitleCache.setEnabled(getEntity()
                                .isProtectedNomenclaturalTitleCache());
                setIrrelevant(
                                toggleable_cache.getState(),
                                Arrays.asList(new Object[] { toggleable_cache,
-                                               toggleable_nomenclaturalTitleCache }));
-
+                                               toggleable_nomenclaturalTitleCache , hasAdditionalMembers}));
+               
                section_teamMembers.setEntity(getEntity());
 
        }
@@ -88,17 +92,23 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<T
        public void handleEvent(Object eventSource) {
                if (eventSource == toggleable_cache) {
                        handleToggleableCacheField();
+                       
                } else if (eventSource == toggleable_nomenclaturalTitleCache) {
                        getEntity().setNomenclaturalTitle(
                                        toggleable_nomenclaturalTitleCache.getText(),
                                        toggleable_nomenclaturalTitleCache.getState());
                        setIrrelevant(
                                        toggleable_nomenclaturalTitleCache.getState(),
-                                       Arrays.asList(new Object[] { toggleable_nomenclaturalTitleCache }));
+                                       Arrays.asList(new Object[] { toggleable_nomenclaturalTitleCache, hasAdditionalMembers }));
                } else if (eventSource == section_teamMembers) {
                        toggleable_cache.setText(getEntity().getTitleCache());
                        toggleable_nomenclaturalTitleCache.setText(getEntity()
                                        .getNomenclaturalTitle());
+               } else if (eventSource == hasAdditionalMembers){
+                       getEntity().setHasMoreMembers(hasAdditionalMembers.getSelection());
+                       updateToggleableCacheField();
+                       toggleable_nomenclaturalTitleCache.setText(getEntity()
+                                       .getNomenclaturalTitle());
                }
 
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
index 103870d0e2bd364a6f444b2ded17adb72c6b8550..ac7bb0494f5d18a91339a5e193e30b65aa6040db 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.
  */
@@ -13,7 +13,6 @@ package eu.etaxonomy.taxeditor.ui.section.agent;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
@@ -25,7 +24,7 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
  * <p>
  * TeamMemberElement class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Apr 30, 2010
  * @version 1.0
@@ -38,7 +37,7 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
         * <p>
         * Constructor for TeamMemberElement.
         * </p>
-        * 
+        *
         * @param cdmFormFactory
         *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
@@ -60,7 +59,7 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls
         * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
@@ -71,13 +70,13 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
                selection_person = formFactory
                                .createSelectionElement(Person.class,
                                                getConversationHolder(), this, "Person", null,
-                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, 
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE,
                                                style);
        }
 
        /*
         * (non-Javadoc)
-        * 
+        *
         * @see
         * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#setEntity
         * (eu.etaxonomy.cdm.model.common.VersionableEntity)
@@ -90,22 +89,15 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
        }
 
        /** {@inheritDoc} */
-       @Override
-       public void handleEvent(Object eventSource) {
-               if (eventSource == selection_person) {
-                       if (getParentElement() instanceof TeamMemberSection) {
-                               TeamMemberSection teamMemberSection = (TeamMemberSection) getParentElement();
-                               Team team = teamMemberSection.getEntity();
-
-                               int index = team.getTeamMembers().indexOf(getEntity());
-
-                               team.removeTeamMember(getEntity());
-                               team.addTeamMember(selection_person.getEntity(), index);
-                               firePropertyChangeEvent(new CdmPropertyChangeEvent(
-                                               teamMemberSection, eventSource));
-                       }
-                       entity = selection_person.getEntity();
-
-               }
-       }
+    @Override
+    public void handleEvent(Object eventSource) {
+        if (eventSource == selection_person) {
+            if (getParentElement() instanceof TeamMemberSection) {
+                TeamMemberSection teamMemberSection = (TeamMemberSection) getParentElement();
+                teamMemberSection.getEntity().addTeamMember(selection_person.getEntity());
+                firePropertyChangeEvent(new CdmPropertyChangeEvent(teamMemberSection, eventSource));
+            }
+            entity = selection_person.getEntity();
+        }
+    }
 }
index 30c64bdaa2bfc9657628f4d51cee3c43d0d264d8..b1acd195bbbc6bede58d77e4912b557a624491e3 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,7 +17,7 @@ import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractUnboundEntityCollectionSection;
 
 /**
  * <p>TeamMemberSection class.</p>
@@ -26,7 +26,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  * @created Apr 30, 2010
  * @version 1.0
  */
-public class TeamMemberSection extends AbstractEntityCollectionSection<Team, Person> {
+public class TeamMemberSection extends AbstractUnboundEntityCollectionSection<Team, Person> {
 
        /**
         * <p>Constructor for TeamMemberSection.</p>
@@ -39,7 +39,7 @@ public class TeamMemberSection extends AbstractEntityCollectionSection<Team, Per
        public TeamMemberSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
                super(cdmFormFactory, conversation, parentElement, null, style);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public String getTitleString() {
@@ -58,12 +58,6 @@ public class TeamMemberSection extends AbstractEntityCollectionSection<Team, Per
                return Person.NewTitledInstance("");
        }
 
-       /** {@inheritDoc} */
-       @Override
-       public Collection<Person> getCollection(Team entity) {
-               return getEntity().getTeamMembers();
-       }
-
        /** {@inheritDoc} */
        @Override
        public String getEmptyString() {
@@ -81,6 +75,11 @@ public class TeamMemberSection extends AbstractEntityCollectionSection<Team, Per
        public void removeElement(Person element) {
                getEntity().removeTeamMember(element);
        }
-       
-       
+
+    @Override
+    protected Collection<Person> getEntityCollection(Team entity) {
+        return getEntity().getTeamMembers();
+    }
+
+
 }
index 47d373fe754bbcf71ec46dba13ab6c82ae6a7fbc..53d63208f6210150ec69c70f33329e64476d54b3 100644 (file)
@@ -49,7 +49,7 @@ public class TeamOrPersonBaseDetailSection extends AbstractCdmDetailSection<Team
        @Override
        public String getHeading() {
                if (getEntity() != null){
-                       if(getEntity() instanceof Team){
+                       if(getEntity().getClass().isAssignableFrom(Team.class)){
                                return "Team";
                        }else if (getEntity().getClass().isAssignableFrom(Person.class)){
                                return "Person";
@@ -58,9 +58,6 @@ public class TeamOrPersonBaseDetailSection extends AbstractCdmDetailSection<Team
                return "Team or Person";
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
-        */
        @Override
        protected AbstractCdmDetailElement<TeamOrPersonBase> createCdmDetailElement(AbstractCdmDetailSection<TeamOrPersonBase> parentElement, int style) {
            MessagingUtils.error(this.getClass(), "Detail element was not created. Seems like the case was not implemented for TeamOrPersonBaseDetailSection", null);
index fde5720fc440b504832d806d40e3b9fb38a158eb..c76a96279b295e40e4cf90c1fb2ba1a7cacac40c 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.swt.widgets.Text;
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Classification;
@@ -55,7 +54,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 
        private Taxon taxon;
 
-       private TextWithLabelElement text_newTaxonName;
+       private TextWithLabelElement textNewTaxonName;
 
        private CheckboxElement checkbox_openInEditor;
 
@@ -82,14 +81,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                super(formFactory, formElement);
        }
 
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
-        * (eu.etaxonomy.taxeditor.forms.ICdmFormElement,
-        * eu.etaxonomy.cdm.model.common.IAnnotatableEntity, int)
-        */
        /** {@inheritDoc} */
        @Override
        protected void createControls(ICdmFormElement formElement,
@@ -113,9 +104,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                                                "Reuse existing name", null,
                                                EntitySelectionElement.DELETABLE, style);
 
-               text_newTaxonName = formFactory.createTextWithLabelElement(formElement,
+               textNewTaxonName = formFactory.createTextWithLabelElement(formElement,
                                "New Taxon", "", style);
-               text_newTaxonName.setFocus();
+               textNewTaxonName.setFocus();
                preFillParentTaxonName();
 
                checkbox_openInEditor = formFactory.createCheckbox(formElement,
@@ -140,10 +131,10 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                             taxonName = CdmUtils.concat(" ", name.getGenusOrUninomial(),name.getSpecificEpithet());
                         }
                         if (StringUtils.isNotBlank(taxonName)){
-                               text_newTaxonName.setText(taxonName + " ");
-                               if(text_newTaxonName.getMainControl() instanceof Text){
-                                       Text text = (Text)text_newTaxonName.getMainControl();
-                                       text.setSelection(text_newTaxonName.getText().length());
+                               textNewTaxonName.setText(taxonName + " ");
+                               if(textNewTaxonName.getMainControl() instanceof Text){
+                                       Text text = (Text)textNewTaxonName.getMainControl();
+                                       text.setSelection(textNewTaxonName.getText().length());
                                }
                         }
                     }
@@ -152,13 +143,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
         }
     }
 
-    /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
-        * .lang.Object)
-        */
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
@@ -169,21 +153,22 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                } else if (eventSource == selection_reuseExistingTaxon) {
                        boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
                        selection_reuseExistingName.setEnabled(enabled);
-                       text_newTaxonName.setEnabled(enabled);
+                       textNewTaxonName.setEnabled(enabled);
 
                        setTaxon(selection_reuseExistingTaxon.getEntity());
                } else if (eventSource == selection_reuseExistingName) {
                        boolean enabled = selection_reuseExistingName.getEntity() == null;
                        selection_reuseExistingTaxon.setEnabled(enabled);
-                       text_newTaxonName.setEnabled(enabled);
+                       textNewTaxonName.setEnabled(enabled);
 
                        setTaxon(selection_reuseExistingName.getEntity());
-               } else if (eventSource == text_newTaxonName) {
-                       boolean enabled = CdmUtils.isEmpty(text_newTaxonName.getText());
+               } else if (eventSource == textNewTaxonName) {
+                       boolean enabled = CdmUtils.isEmpty(textNewTaxonName.getText());
                        selection_reuseExistingTaxon.setEnabled(enabled);
                        selection_reuseExistingName.setEnabled(enabled);
 
-                       setTaxon(text_newTaxonName.getText());
+                       setTaxon(textNewTaxonName.getText());
+                       complete = !textNewTaxonName.getText().isEmpty();
                } else if (eventSource == checkbox_openInEditor) {
                        setOpenInEditor(checkbox_openInEditor.getSelection());
                }
@@ -200,13 +185,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                return classification;
        }
 
-       /**
-        * <p>
-        * isOpenInEditor
-        * </p>
-        *
-        * @return the openInEditor
-        */
        public boolean isOpenInEditor() {
                return openInEditor;
        }
@@ -233,19 +211,11 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                return taxon;
        }
 
-       /**
-        * @param classification
-        *            the classification to set
-        */
        private void setClassification(Classification classification) {
                this.classification = classification;
                setParentTreeNode(classification);
        }
 
-       /**
-        * @param parentTreeNode
-        *            the parentTreeNode to set
-        */
        private void setParentTreeNode(ITaxonTreeNode parentTreeNode) {
                this.parentTreeNode = parentTreeNode;
 
@@ -265,10 +235,6 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                }
        }
 
-       /**
-        * @param reuseExistingTaxon
-        *            the reuseExistingTaxon to set
-        */
        private void setTaxon(Taxon taxon) {
                this.taxon = taxon;
        }
@@ -293,21 +259,14 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                taxon = Taxon.NewInstance(taxonName, secundum);
        }
 
-       /**
-        * @param openInEditor
-        *            the openInEditor to set
-        */
        private void setOpenInEditor(boolean openInEditor) {
                this.openInEditor = openInEditor;
        }
 
-       /**
-        * <p>
-        * isComplete
-        * </p>
-        *
-        * @return the complete
-        */
+       public TextWithLabelElement getTextNewTaxonName() {
+        return textNewTaxonName;
+    }
+
        public boolean isComplete() {
                return complete;
        }
index d78900f3b618bace776f2221ebfbb1d5407a24c1..df24d7c6c3fb97633b1c61a574f927b3f9709100 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.classification;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.newWizard.IWizardPageListener;
 import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -28,9 +32,11 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
  * @created Sep 15, 2009
  * @version 1.0
  */
-public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeNode> {
+public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeNode> implements Listener{
 
-       /**
+    private final IWizardPageListener wizardPageListener;
+
+    /**
         * <p>
         * Constructor for TaxonNodeWizardPage.
         * </p>
@@ -43,10 +49,12 @@ public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeN
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode} object.
+     * @param closeOnEnterListener
         */
        public TaxonNodeWizardPage(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ITaxonTreeNode entity) {
+                       ConversationHolder conversation, ITaxonTreeNode entity, IWizardPageListener closeOnEnterListener) {
                super(formFactory, conversation, entity);
+               this.wizardPageListener = closeOnEnterListener;
                setTitle("Create a new Taxon");
        }
 
@@ -60,10 +68,10 @@ public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeN
        /** {@inheritDoc} */
        @Override
        public TaxonNodeDetailElement createElement(ICdmFormElement rootElement) {
-
-        TaxonNodeDetailElement detailElement = formFactory.createTaxonNodeDetailElement(rootElement);
+           TaxonNodeDetailElement detailElement = formFactory.createTaxonNodeDetailElement(rootElement);
                detailElement.setEntity(entity);
                formFactory.addPropertyChangeListener(this);
+               detailElement.getTextNewTaxonName().getMainControl().addListener(SWT.KeyDown, this);
                return detailElement;
        }
 
@@ -93,16 +101,20 @@ public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeN
                }
        }
 
-       /**
-        *
-        */
        @Override
        protected void checkComplete() {
                TaxonNodeDetailElement detailElement = (TaxonNodeDetailElement) getDetailElement();
 
                if (detailElement.getClassification() == null) {
-                       setMessage("No classification", WARNING);
-               } else {
+                       setMessage("No classification set.", WARNING);
+               }
+               else if(detailElement.getTextNewTaxonName().getText().isEmpty()){
+                   setMessage("No taxon name set.", ERROR);
+               }
+               else if(!detailElement.isComplete()){
+                   setMessage("Not all required fields are filled.", ERROR);
+               }
+               else {
                        setMessage(null);
                        setPageComplete(true);
                        return;
@@ -138,4 +150,14 @@ public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITaxonTreeN
                formFactory.removePropertyChangeListener(this);
                super.dispose();
        }
+
+    @Override
+    public void handleEvent(Event event) {
+        TaxonNodeDetailElement detailElement = (TaxonNodeDetailElement) getDetailElement();
+        if(event.widget == detailElement.getTextNewTaxonName().getMainControl()
+                && event.keyCode == SWT.CR && isPageComplete()){
+            wizardPageListener.close();
+        }
+    }
+
 }
index e5cefa90a8dfeeacfabb1e971033020790f09d2d..f182ca831bd41415e9f39e8aaab596ec3e870a44 100644 (file)
@@ -77,6 +77,7 @@ public class ModifierElement extends AbstractEntityCollectionElement<DefinedTerm
                }
         if(entity.getId()>0){
             combo_modifier.setSelection(entity);
+            combo_modifier.removeEmptyElement();
         }
        }
 
@@ -89,16 +90,24 @@ public class ModifierElement extends AbstractEntityCollectionElement<DefinedTerm
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-           if(eventSource==combo_modifier){
-               if(getParentElement() instanceof ModifierSection){
-                   ModifierSection parentSection = (ModifierSection) getParentElement();
-                   if((parentSection).getEntity() instanceof StateData){
+           if(eventSource==combo_modifier && combo_modifier.getSelection()!=null){
+               combo_modifier.removeEmptyElement();
+               if(getParentElement() instanceof AbstractFormSection){
+                   AbstractFormSection<?> parentSection = (AbstractFormSection<?>) getParentElement();
+                   if(parentSection.getEntity() instanceof StateData){
                        StateData stateData = (StateData) parentSection.getEntity();
                        stateData.removeModifier(entity);
                        DefinedTerm term = combo_modifier.getSelection();
                        stateData.addModifier(term);
                        entity = term;
                    }
+                   else if(parentSection.getEntity() instanceof StatisticalMeasurementValue){
+                       StatisticalMeasurementValue parentEntity = (StatisticalMeasurementValue) parentSection.getEntity();
+                       parentEntity.removeModifier(entity);
+                       DefinedTerm term = combo_modifier.getSelection();
+                       parentEntity.addModifier(term);
+                       entity = term;
+                   }
                }
            }
        }
index 3ee690b7e404b6938aa6be46d8c0f911fe5f54c4..a1b051415875bf5d7a641c7387b0a9e6ef9993ec 100644 (file)
@@ -71,16 +71,20 @@ public class StateDataElement extends AbstractEntityCollectionElement<StateData>
                combo_state.setTerms(stateTerms);
                combo_state.setSelection(entity.getState());
                section_modifiers.setEntity(entity);
+               section_modifiers.setExpanded(!entity.getModifiers().isEmpty());
                if(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {
             text_modifyingText.setText(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()).getText());
         }
+               if(getEntity().getId()>0){
+                   combo_state.removeEmptyElement();
+               }
        }
 
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
                combo_state = formFactory.createDefinedTermComboElement(TermType.State, element, "State", null, style);
-               section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, ExpandableComposite.TWISTIE);
+               section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
                section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                text_modifyingText = formFactory.createTextWithLabelElement(element, "Modifying Text", null, style);
        }
@@ -90,6 +94,7 @@ public class StateDataElement extends AbstractEntityCollectionElement<StateData>
        public void handleEvent(Object eventSource) {
                if(eventSource == combo_state){
                        getEntity().setState(combo_state.getSelection());
+                       combo_state.removeEmptyElement();
                }
                if(eventSource == text_modifyingText){
                        getEntity().putModifyingText(LanguageString.NewInstance(text_modifyingText.getText(), CdmStore.getDefaultLanguage()));
index 921ba50fca997668150532b3e94c1b8e6270afd1..48f02ad77880782246c19913894aa03e1333b5ee 100644 (file)
@@ -90,6 +90,7 @@ public class StatisticalMeasurementValueElement extends
                }
                else if(eventSource == combo_type){
                        getEntity().setType(combo_type.getSelection());
+                       combo_type.removeEmptyElement();
                }
        }
 }
index 0cd3452c522306d7c319de99d321bb1b8a3b36ce..0da2bb3c209f118d01d73293a63d2a9cd3f3cd37 100644 (file)
@@ -58,6 +58,7 @@ public class QuantitativeDataDetailElement extends
        public void handleEvent(Object eventSource) {
                if(eventSource == comboMeasurementUnit){
                        getEntity().setUnit(comboMeasurementUnit.getSelection());
+                       comboMeasurementUnit.removeEmptyElement();
                }else if (eventSource == section_statisticalMeasurementValues){
                        // FIXME
                }
index 7d280ec9598d9dd4502f8cecb86fe888089916df..d48891aa44c43070eb1a4ad766829937f3d7695f 100644 (file)
@@ -73,6 +73,9 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
        /** {@inheritDoc} */
        @Override
        public Collection<TypeDesignationBase> getCollection(TaxonNameBase entity) {
+               if (entity == null){
+                       return null;
+               }
                return entity.getTypeDesignations();
        }
 
index e67aaaf80293886b14adaeddef50f59d5a338a4c..4cca3d1f8d05e77db84beef3749e35a145f427cf 100644 (file)
@@ -24,6 +24,7 @@ import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.OriginalLabelDataElement;
 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
@@ -56,6 +57,8 @@ public class DerivedUnitBaseDetailElement extends
 
        private SourceCollectionDetailSection section_source;
 
+    private OriginalLabelDataElement textOriginalLabel;
+
        /**
         * <p>
         * Constructor for DerivedUnitBaseDetailElement.
@@ -110,9 +113,13 @@ public class DerivedUnitBaseDetailElement extends
 //                             .setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
 //             section_duplicates.setEntity(entity);
 
+               textOriginalLabel = formFactory.createOriginalLabelDataElement(formElement);
+               textOriginalLabel.setEntity(getEntity());
+
         section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
                section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_source.setEntity(entity);
+
        }
 
     /** {@inheritDoc} */
index 7d12d654d17a57606a6be7af634668263e52a60b..99e0951c3d3fe292dac00e8d7baae5c7bfb26328 100644 (file)
@@ -28,12 +28,17 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
- * This class extends the functionality of {@link AbstractEntityCollectionSection}
- * by creating an {@link AbstractEntityCollectionElement} for an 
- * ELEMENT which is not directly added the the model ENTITY.<br>
+ * This class extends the functionality of
+ * {@link AbstractEntityCollectionSection} by creating an
+ * {@link AbstractEntityCollectionElement} for an ELEMENT which is not directly
+ * added the the model ENTITY.<br>
  * <br>
- * This is useful if the ELEMENT is created after the creation of the AbstractEntityCollectionElement itself 
- * and not in this class.
+ * This is useful if the ELEMENT is created after the creation of the
+ * AbstractEntityCollectionElement itself and not in this class and also if you
+ * do not want to create empty elements. <br>
+ * <br>
+ * <b>Note:</b> In sub classes: do <b>not</b> override {@link #getCollection(Object)}. Use
+ * {@link #getEntityCollection(Object)} instead
  *
  * @author pplitzner
  * @date 21.01.2014
index 9bd5d82829f65a3566c10655ab6a39589f067f22..9e254f723a4b9a4283e2579002a3e9909a35fb54 100644 (file)
@@ -46,7 +46,7 @@ public class FeatureDetailElement extends DefinedTermDetailElement<Feature> {
 \r
     private StatisticalMeasureCollectionSection sectionStatisticalMeasures;\r
 \r
-    private StateModifierCollectionSection sectionStateModifiers;;\r
+    private RecommendedModifierVocabulariesCollectionSection sectionModifierVocabularies;\r
 \r
     /**\r
         * @param formFactory\r
@@ -72,27 +72,32 @@ public class FeatureDetailElement extends DefinedTermDetailElement<Feature> {
            supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style);\r
            supportsCommonTaxonName = formFactory.createCheckbox(formElement, "Supports Common Taxon Name", entity.isSupportsCommonTaxonName(), style);\r
 \r
-        if(supportsCategoricalData.getSelection()){\r
-            sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+        if (supportsCategoricalData.getSelection()) {\r
+            sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),\r
+                    parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
             sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
             sectionStateVocabularies.setEntity(getEntity());\r
 \r
         }\r
-        if(supportsQuantitativeData.getSelection()){\r
-            sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+        if (supportsQuantitativeData.getSelection()) {\r
+            sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),\r
+                    parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
             sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
             sectionMeasurementUnits.setEntity(getEntity());\r
 \r
-            sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+            sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(getConversationHolder(),\r
+                    parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
             sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
             sectionStatisticalMeasures.setEntity(getEntity());\r
         }\r
-        if(supportsCategoricalData.getSelection() || supportsQuantitativeData.getSelection()){\r
-            sectionStateModifiers = formFactory.createStateModifierCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-            sectionStateModifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-            sectionStateModifiers.setEntity(getEntity());\r
+        if (supportsCategoricalData.getSelection() || supportsQuantitativeData.getSelection()) {\r
+            sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
+                    getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE\r
+                            | ExpandableComposite.EXPANDED);\r
+            sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+            sectionModifierVocabularies.setEntity(getEntity());\r
         }\r
-       }\r
+    }\r
 \r
        /* (non-Javadoc)\r
         * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement#handleEvent(java.lang.Object)\r
@@ -106,26 +111,30 @@ public class FeatureDetailElement extends DefinedTermDetailElement<Feature> {
            else if(eventSource == supportsQuantitativeData){\r
                getEntity().setSupportsQuantitativeData(supportsQuantitativeData.getSelection());\r
                if(supportsQuantitativeData.getSelection()){\r
-                   sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-                   sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-                   sectionMeasurementUnits.setEntity(getEntity());\r
-\r
-                   sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-                   sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-                   sectionStatisticalMeasures.setEntity(getEntity());\r
-\r
-                   if(!supportsCategoricalData.getSelection()){\r
-                       sectionStateModifiers = formFactory.createStateModifierCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-                       sectionStateModifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-                       sectionStateModifiers.setEntity(getEntity());\r
-                   }\r
+                removeElementsAndControls(supportsDistribution);\r
+                sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),\r
+                        parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
+                sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+                sectionMeasurementUnits.setEntity(getEntity());\r
+\r
+                sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(\r
+                        getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
+                sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+                sectionStatisticalMeasures.setEntity(getEntity());\r
+\r
+                if (!supportsCategoricalData.getSelection()) {\r
+                    sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
+                            getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
+                    sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+                    sectionModifierVocabularies.setEntity(getEntity());\r
+                }\r
                }\r
                else{\r
                    if(sectionMeasurementUnits!=null){\r
                        removeElementsAndControls(sectionMeasurementUnits);\r
                        removeElementsAndControls(sectionStatisticalMeasures);\r
                        if(!supportsCategoricalData.getSelection()){\r
-                           removeElementsAndControls(sectionStateModifiers);\r
+                           removeElementsAndControls(sectionModifierVocabularies);\r
                        }\r
                    }\r
                }\r
@@ -141,22 +150,24 @@ public class FeatureDetailElement extends DefinedTermDetailElement<Feature> {
            }\r
            else if(eventSource == supportsCategoricalData){\r
                getEntity().setSupportsCategoricalData(supportsCategoricalData.getSelection());\r
-               if(supportsCategoricalData.getSelection()){\r
-                   sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-                   sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-                   sectionStateVocabularies.setEntity(getEntity());\r
-\r
-                   if(!supportsQuantitativeData.getSelection()){\r
-                       sectionStateModifiers = formFactory.createStateModifierCollectionSection(getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
-                       sectionStateModifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
-                       sectionStateModifiers.setEntity(getEntity());\r
-                   }\r
-               }\r
+            if (supportsCategoricalData.getSelection()) {\r
+                sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),\r
+                        parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);\r
+                sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+                sectionStateVocabularies.setEntity(getEntity());\r
+\r
+                if (!supportsQuantitativeData.getSelection()) {\r
+                    sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
+                            getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);\r
+                    sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
+                    sectionModifierVocabularies.setEntity(getEntity());\r
+                }\r
+            }\r
                else{\r
                    if(sectionStateVocabularies!=null){\r
                        removeElementsAndControls(sectionStateVocabularies);\r
                        if(!supportsQuantitativeData.getSelection()){\r
-                           removeElementsAndControls(sectionStateModifiers);\r
+                           removeElementsAndControls(sectionModifierVocabularies);\r
                        }\r
                    }\r
                }\r
index 40f1fcc86b044dc3e681272a6cc231418dc6a9eb..26a68223e3ca548854141a8dc4dc16d70f39ae4a 100644 (file)
@@ -56,6 +56,7 @@ public class MeasurementUnitCollectionElement extends AbstractEntityCollectionEl
         this.entity = entity;
         if(entity.getId()!=0){
             comboMeasurementUnit.setSelection(entity);
+            comboMeasurementUnit.removeEmptyElement();
         }
     }
 
@@ -63,11 +64,14 @@ public class MeasurementUnitCollectionElement extends AbstractEntityCollectionEl
     public void handleEvent(Object eventSource) {
         if(eventSource==comboMeasurementUnit && comboMeasurementUnit.getSelection()!=null){
             if(getParentElement() instanceof MeasurementUnitCollectionSection){
-                Feature feature = ((MeasurementUnitCollectionSection) getParentElement()).getEntity();
+                MeasurementUnitCollectionSection parentElement = (MeasurementUnitCollectionSection) getParentElement();
+                Feature feature = parentElement.getEntity();
                 feature.removeRecommendedMeasurementUnit(entity);
                 MeasurementUnit measurementUnit = comboMeasurementUnit.getSelection();
                 feature.addRecommendedMeasurementUnit(measurementUnit);
                 entity = measurementUnit;
+                //update the parent section to re-set the listeners to the persisted measurement unit
+                parentElement.removeElementAndUpdate(null);
             }
         }
     }
@@ -25,11 +25,11 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractUnboundEntityCol
  * @date Apr 27, 2015
  *
  */
-public class StateModifierCollectionSection extends AbstractUnboundEntityCollectionSection<Feature, TermVocabulary<DefinedTerm>> {
+public class RecommendedModifierVocabulariesCollectionSection extends AbstractUnboundEntityCollectionSection<Feature, TermVocabulary<DefinedTerm>> {
 
-    public StateModifierCollectionSection(CdmFormFactory formFactory,
+    public RecommendedModifierVocabulariesCollectionSection(CdmFormFactory formFactory,
             ConversationHolder conversation, ICdmFormElement parentElement, int style) {
-        super(formFactory, conversation, parentElement, "Recommended state modifier", style);
+        super(formFactory, conversation, parentElement, "Recommended modifier vocabularies", style);
     }
 
     /* (non-Javadoc)
@@ -74,7 +74,7 @@ public class StateModifierCollectionSection extends AbstractUnboundEntityCollect
     /** {@inheritDoc} */
     @Override
     public String getEmptyString() {
-        return "No state modifiers yet.";
+        return "No modifiers vocabularies yet.";
     }
 
     /* (non-Javadoc)
@@ -83,7 +83,7 @@ public class StateModifierCollectionSection extends AbstractUnboundEntityCollect
     /** {@inheritDoc} */
     @Override
     protected String getTooltipString() {
-        return "Add a state modifier";
+        return "Add a modifier vocabulary";
     }
 
 
@@ -7,7 +7,7 @@
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
-package eu.etaxonomy.taxeditor.ui.section.description;
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;
 
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
@@ -21,14 +21,13 @@ import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateModifierCollectionSection;
 
 /**
  * @author pplitzner
  * @date Apr 27, 2015
  *
  */
-public class StateModifierElement extends AbstractEntityCollectionElement<TermVocabulary<DefinedTerm>> {
+public class RecommendedModifierVocabulariesElement extends AbstractEntityCollectionElement<TermVocabulary<DefinedTerm>> {
 
 
     private VocabularyComboElement<DefinedTerm, TermVocabulary<DefinedTerm>> comboStateVocabulary;
@@ -42,7 +41,7 @@ public class StateModifierElement extends AbstractEntityCollectionElement<TermVo
      * @param backgroundColor
      * @param style
      */
-    public StateModifierElement(CdmFormFactory formFactory, AbstractFormSection section, TermVocabulary<DefinedTerm> entity,
+    public RecommendedModifierVocabulariesElement(CdmFormFactory formFactory, AbstractFormSection section, TermVocabulary<DefinedTerm> entity,
             SelectionListener removeListener, Color backgroundColor, int style) {
         super(formFactory, section, entity, removeListener, false, backgroundColor, style);
 
@@ -50,7 +49,7 @@ public class StateModifierElement extends AbstractEntityCollectionElement<TermVo
 
     @Override
     public void createControls(ICdmFormElement element, int style) {
-        comboStateVocabulary = formFactory.createVocabularyComboElement(TermType.Modifier, "State modifiers", null, element, style);
+        comboStateVocabulary = formFactory.createVocabularyComboElement(TermType.Modifier, "Modifier Vocabulary", null, element, style);
     }
 
     @Override
@@ -58,18 +57,22 @@ public class StateModifierElement extends AbstractEntityCollectionElement<TermVo
         this.entity = entity;
         if(entity.getId()!=0){
             comboStateVocabulary.setSelection(entity);
+            comboStateVocabulary.removeEmptyElement();
         }
     }
 
     @Override
     public void handleEvent(Object eventSource) {
         if(eventSource==comboStateVocabulary && comboStateVocabulary.getSelection()!=null){
-            if(getParentElement() instanceof StateModifierCollectionSection){
-                Feature feature = ((StateModifierCollectionSection) getParentElement()).getEntity();
+            if(getParentElement() instanceof RecommendedModifierVocabulariesCollectionSection){
+                RecommendedModifierVocabulariesCollectionSection parentElement = (RecommendedModifierVocabulariesCollectionSection) getParentElement();
+                Feature feature = parentElement.getEntity();
                 feature.removeRecommendedModifierEnumeration(entity);
                 TermVocabulary<DefinedTerm> vocabulary = comboStateVocabulary.getSelection();
                 feature.addRecommendedModifierEnumeration(vocabulary);
                 entity = vocabulary;
+                //update the parent section to re-set the listeners to the persisted measurement unit
+                parentElement.removeElementAndUpdate(null);
             }
         }
     }
index a8094ed724620e542d623ad166cc130b794321bf..de856abb9353933f8e6c6e325a21c7463f608ec8 100644 (file)
@@ -49,7 +49,7 @@ public class StateVocabularyCollectionElement extends AbstractEntityCollectionEl
 
     @Override
     public void createControls(ICdmFormElement element, int style) {
-        comboStateVocabulary = formFactory.createVocabularyComboElement(TermType.State, "State vocabularies", null, element, style);
+        comboStateVocabulary = formFactory.createVocabularyComboElement(TermType.State, "State vocabulary", null, element, style);
     }
 
     @Override
@@ -57,6 +57,7 @@ public class StateVocabularyCollectionElement extends AbstractEntityCollectionEl
         this.entity = entity;
         if(entity.getId()!=0){
             comboStateVocabulary.setSelection(entity);
+            comboStateVocabulary.removeEmptyElement();
         }
     }
 
@@ -64,11 +65,14 @@ public class StateVocabularyCollectionElement extends AbstractEntityCollectionEl
     public void handleEvent(Object eventSource) {
         if(eventSource==comboStateVocabulary && comboStateVocabulary.getSelection()!=null){
             if(getParentElement() instanceof StateVocabularyCollectionSection){
-                Feature feature = ((StateVocabularyCollectionSection) getParentElement()).getEntity();
+                StateVocabularyCollectionSection parentElement = (StateVocabularyCollectionSection) getParentElement();
+                Feature feature = parentElement.getEntity();
                 feature.removeSupportedCategoricalEnumeration(entity);
                 TermVocabulary<State> vocabulary = comboStateVocabulary.getSelection();
                 feature.addSupportedCategoricalEnumeration(vocabulary);
                 entity = vocabulary;
+                //update the parent section to re-set the listeners to the persisted measurement unit
+                parentElement.removeElementAndUpdate(null);
             }
         }
     }
index 237a5d369674bae77d505101dcde833a6d3723f3..57ee1dabda08e0a12538e6052aa2d2f257bfa171 100644 (file)
@@ -56,6 +56,7 @@ public class StatisticalMeasureCollectionElement extends AbstractEntityCollectio
         this.entity = entity;
         if(entity.getId()!=0){
             comboStatisticalMeasure.setSelection(entity);
+            comboStatisticalMeasure.removeEmptyElement();
         }
     }
 
@@ -63,11 +64,14 @@ public class StatisticalMeasureCollectionElement extends AbstractEntityCollectio
     public void handleEvent(Object eventSource) {
         if(eventSource==comboStatisticalMeasure && comboStatisticalMeasure.getSelection()!=null){
             if(getParentElement() instanceof StatisticalMeasureCollectionSection){
-                Feature feature = ((StatisticalMeasureCollectionSection) getParentElement()).getEntity();
+                StatisticalMeasureCollectionSection parentElement = (StatisticalMeasureCollectionSection) getParentElement();
+                Feature feature = parentElement.getEntity();
                 feature.removeRecommendedStatisticalMeasure(entity);
                 StatisticalMeasure statisticalMeasure = comboStatisticalMeasure.getSelection();
                 feature.addRecommendedStatisticalMeasure(statisticalMeasure);
                 entity = statisticalMeasure;
+                //update the parent section to re-set the listeners to the persisted measurement unit
+                parentElement.removeElementAndUpdate(null);
             }
         }
     }
index a862b694640103098dda6844f3a2bcb5bb5875d0..3b3909385445adf05e0d0ad3d47bb5aabc711996 100644 (file)
@@ -13,6 +13,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
@@ -50,6 +51,7 @@ public class CdmViewerChooser extends PopupDialog implements ISelectionChangedLi
 
     private Object input;
     private Map<Entry<Class<?>, String>, ICdmViewer> nameViewerMap;
+    private ExecutionEvent executionEvent;
 
     public CdmViewerChooser(Shell parentShell) {
         this(parentShell, SWT.RESIZE | SWT.ON_TOP, true, false, false, false, false, "Open in ...",
@@ -66,9 +68,11 @@ public class CdmViewerChooser extends PopupDialog implements ISelectionChangedLi
     /**
      * Opens a popup dialog with all possible viewers for the given input.
      * @param input the input for which the viewers are listed
+     * @param event the {@link ExecutionEvent} if invoked via command/handler
      */
-    public void chooseViewer(Object input){
+    public void chooseViewer(Object input, ExecutionEvent event){
         this.input = input;
+        this.executionEvent = event;
         this.nameViewerMap = new HashMap<Entry<Class<?>, String>, ICdmViewer>();
 
         IExtensionRegistry reg = Platform.getExtensionRegistry();
@@ -95,7 +99,7 @@ public class CdmViewerChooser extends PopupDialog implements ISelectionChangedLi
         if(nameViewerMap.size()==1){
             Entry<Class<?>, String> next = nameViewerMap.keySet().iterator().next();
             ICdmViewer cdmViewer = nameViewerMap.get(next);
-            cdmViewer.show(input, next.getKey());
+            cdmViewer.show(input, next.getKey(), event);
         }
         else{
             if(nameViewerMap.isEmpty()){
@@ -129,7 +133,7 @@ public class CdmViewerChooser extends PopupDialog implements ISelectionChangedLi
             if(nameViewerMap.containsKey(firstElement)){
                 Entry<Class<?>, String> entry = (Entry<Class<?>, String>)firstElement;
                 ICdmViewer cdmViewer = nameViewerMap.get(entry);
-                cdmViewer.show(input, entry.getKey());
+                cdmViewer.show(input, entry.getKey(), this.executionEvent);
                 this.close();
             }
         }
index 0dd9e9b445e7d74df05c893c5c0ffc4d0220505b..877daa81adc69c3c9822ce4873b1f340515ffd3d 100644 (file)
@@ -11,6 +11,8 @@ package eu.etaxonomy.taxeditor.view;
 
 import java.util.Map;
 
+import org.eclipse.core.commands.ExecutionEvent;
+
 
 /**
  * Implementors of this interface provide a mapping of input elements to views
@@ -38,7 +40,8 @@ public interface ICdmViewer {
      * Opens the viewer defined by the given viewerClass for the given input.
      * @param input the input for which a viewer should be opened
      * @param viewerClass the qualified class name of the viewer
+     * @param event the {@link ExecutionEvent} if invoked via command/handler
      */
-    public void show(Object input, Class<?> viewerClass);
+    public void show(Object input, Class<?> viewerClass, ExecutionEvent event);
 
 }
index a161ed4a88c0cef2d32730787f5ddcb1d8b4073d..dc954df6344194aaafa69bc3acc2642fd423368e 100644 (file)
@@ -149,9 +149,6 @@ public class DerivateSearchCompositeController implements Listener{
         derivateSearchComposite.getResultViewer().setInput(occurrences);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
-     */
     @Override
     public void handleEvent(Event event) {
         Widget eventSource = event.widget;
index 67ec1c0d5a366d4ff2319e6cbbc1d47d0bed94ae..83dca05af10582804131fa3a3d4b33086176f097 100644 (file)
@@ -75,6 +75,7 @@ import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSectio
 import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
@@ -90,7 +91,6 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
@@ -227,7 +227,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             }
             else{
                 Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
-               
+
                 Boolean isUseDescription = false;
                 for (Marker marker : descriptionMarkers) {
                     if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
@@ -246,7 +246,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             }
         } else if (input instanceof DescriptionElementBase) {
             Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
-               
+
             Boolean isUseDescription = false;
             for (Marker marker : descriptionMarkers) {
                 if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
@@ -650,11 +650,6 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(derivedUnitBaseDetailSection);
 
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-        addPart(originalLabelDataSection);
-
         //for editors working with facades
         if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
             formFactory.createHorizontalSeparator(parent, SWT.BORDER);
@@ -676,7 +671,11 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
             addPart(taxonAssociationDetailSection);
         }
-        
+
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        IdentifierDetailSection identifierDetailSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        addPart(identifierDetailSection);
+
     }
 
     private void createFieldUnitSection(RootElement parent) {
index d52b5b19652facf363dc8d581834fb310a3ac39e..4d33cf2f602b5d8a87980dbe33796788f829cb37 100644 (file)
@@ -2,24 +2,24 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.test
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: EDIT
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.apache.log4j,
- org.eclipse.ui;bundle-version="3.6.2",
- org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
  org.eclipse.swtbot.eclipse.core;bundle-version="2.0.5",
  org.eclipse.swtbot.eclipse.finder,
  org.eclipse.swtbot.junit4_x,
  org.eclipse.ui.ide,
- org.junit4,
- eu.etaxonomy.taxeditor.application;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.bulkeditor;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.cdmlib;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.editor;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.help;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.navigation;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.printpublisher;bundle-version="3.0.6",
- eu.etaxonomy.taxeditor.store;bundle-version="3.0.6"
+ eu.etaxonomy.taxeditor.application,
+ eu.etaxonomy.taxeditor.bulkeditor,
+ eu.etaxonomy.taxeditor.cdmlib,
+ eu.etaxonomy.taxeditor.editor,