merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 19 Aug 2014 13:35:40 +0000 (13:35 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 19 Aug 2014 13:35:40 +0000 (13:35 +0000)
26 files changed:
.gitattributes
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/DataImportEditorContextMenu.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/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.store/.classpath
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/icons/character_data_derivate-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.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/OriginalLabelDataElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataController.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataField.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/OriginalLabelDataSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SequenceGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchCompositeController.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
pom.xml

index cc961909e087de205ee9102fa406fba862bd8d5a..d822f63715b7616c00fbcfb0db104cf0df8d568b 100644 (file)
@@ -1036,6 +1036,7 @@ eu.etaxonomy.taxeditor.store/icons/binary.gif -text
 eu.etaxonomy.taxeditor.store/icons/bookmark.gif -text
 eu.etaxonomy.taxeditor.store/icons/category.gif -text
 eu.etaxonomy.taxeditor.store/icons/change.gif -text
+eu.etaxonomy.taxeditor.store/icons/character_data_derivate-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/clear.gif -text
 eu.etaxonomy.taxeditor.store/icons/close.gif -text
 eu.etaxonomy.taxeditor.store/icons/close_view.gif -text
@@ -1424,6 +1425,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/Lay
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MinMaxTextSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/OriginalLabelDataElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RootElement.java -text
@@ -1441,8 +1443,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/group/grant
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/AbstractCdmComposite.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/DerivedUnitGeneralDetailElementMVC.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/GeographicPointElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataController.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataField.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/combo/EnumTermCombo.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/combo/EnumTermComboController.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/element/DateElement.java -text
index aa65cdca82536139c78aaec3dc25ca665a37febd..ad6b2164196f143203a991a032968e4eba5d6723 100644 (file)
@@ -2,10 +2,9 @@
 <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 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 kind="src" path="src/main/java/"/>
+       <classpathentry kind="src" path="src/main/resources/"/>
+       <classpathentry kind="src" path="src/test/java/"/>
        <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.2.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-commons-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-ext-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-io-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-model-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-persistence-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-print-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-remote-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.3.7-SNAPSHOT-sources.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.3.7-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.3.7-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-commons-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-ext-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-io-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-model-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-persistence-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-print-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-remote-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.4.0-SNAPSHOT.jar" sourcepath="lib/cdmlib-services-3.4.0-SNAPSHOT-sources.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.2.2.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.3.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/commons-codec-20041127.091804.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar" 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/odfdom-0.8.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>
-       <classpathentry kind="output" path="target/classes"/>
+       <classpathentry kind="output" path="bin"/>
 </classpath>
index bd8e72267e0acf841e47c62a7ee2a28790d89596..2b387a4545cc7a0b0e06567ee3bdf42716b24695 100644 (file)
@@ -431,22 +431,6 @@ Bundle-ClassPath: .,
  lib/batik-util-1.7.jar,
  lib/batik-xml-1.7.jar,
  lib/c3p0-0.9.2.jar,
- lib/cdmlib-commons-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-commons-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-ext-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-ext-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-io-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-io-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-model-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-model-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-persistence-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-print-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-print-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-remote-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-remote-3.3.7-SNAPSHOT.jar,
- lib/cdmlib-services-3.3.7-SNAPSHOT-sources.jar,
- lib/cdmlib-services-3.3.7-SNAPSHOT.jar,
  lib/cglib-nodep-2.2.2.jar,
  lib/com.springsource.org.aopalliance-1.0.0.jar,
  lib/com.springsource.org.apache.commons.logging-1.1.1.jar,
@@ -610,5 +594,21 @@ Bundle-ClassPath: .,
  lib/google-api-translate-java-0.92.jar,
  lib/odfdom-0.8.jar,
  lib/h2mig_pagestore_addon.jar,
- lib/spring-security-remoting-3.1.3.RELEASE.jar
+ lib/spring-security-remoting-3.1.3.RELEASE.jar,
+ lib/cdmlib-commons-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-commons-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-ext-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-io-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-io-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-model-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-model-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-persistence-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-print-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-print-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-remote-3.4.0-SNAPSHOT.jar,
+ lib/cdmlib-services-3.4.0-SNAPSHOT-sources.jar,
+ lib/cdmlib-services-3.4.0-SNAPSHOT.jar
 Import-Package: eu.etaxonomy.cdm.api.application
index ec0b624f71a3a8059c95238846ca0f882435fc4e..69211ff4d6c842ec6d8c0ae6ea8dad4d7c1e8cdc 100644 (file)
@@ -23,22 +23,6 @@ bin.includes = META-INF/,\
                lib/batik-util-1.7.jar,\\r
                lib/batik-xml-1.7.jar,\\r
                lib/c3p0-0.9.2.jar,\\r
-               lib/cdmlib-commons-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-commons-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-ext-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-io-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-io-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-model-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-model-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-persistence-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-persistence-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-print-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-print-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-remote-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-remote-3.3.7-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.3.7-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-services-3.3.7-SNAPSHOT.jar,\\r
                lib/cglib-nodep-2.2.2.jar,\\r
                lib/com.springsource.org.aopalliance-1.0.0.jar,\\r
                lib/com.springsource.org.apache.commons.logging-1.1.1.jar,\\r
@@ -202,7 +186,23 @@ bin.includes = META-INF/,\
                lib/google-api-translate-java-0.92.jar,\\r
                lib/odfdom-0.8.jar,\\r
                lib/h2mig_pagestore_addon.jar,\\r
-               lib/spring-security-remoting-3.1.3.RELEASE.jar\r
+               lib/spring-security-remoting-3.1.3.RELEASE.jar,\\r
+               lib/cdmlib-commons-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-commons-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-ext-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-ext-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-io-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-io-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-model-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-model-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-persistence-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-persistence-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-print-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-print-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-remote-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-remote-3.4.0-SNAPSHOT.jar,\\r
+               lib/cdmlib-services-3.4.0-SNAPSHOT-sources.jar,\\r
+               lib/cdmlib-services-3.4.0-SNAPSHOT.jar\r
 jars.compile.order = .\r
 output.. = bin/\r
 source.. = src/main/java/,\\r
index d556221c8047671c0d13d992bea81a35e6644b08..4c2735fc52620dc6847b40af8def4416b37f497e 100644 (file)
@@ -31,6 +31,7 @@ import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper;
 import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 public class DataImportEditorContextMenu extends CompoundContributionItem {
@@ -47,7 +48,7 @@ public class DataImportEditorContextMenu extends CompoundContributionItem {
                     @Override
                     public void fill(Menu menu, int index) {
                         final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                        final IEditorPart activeEditor = window.getActivePage().getActiveEditor();
+                        final IEditorPart activeEditor = AbstractUtility.getActiveEditor();
                         final ISelection selection = window.getActivePage().getSelection();
                         if(selection instanceof StructuredSelection){
                             final StructuredSelection structuredSelection = (StructuredSelection)selection;
index 0a0fea8517eccce946e4e51449b635ad2c57735b..0d4cdafc7d7703dc338d0b8d62ece251500a40d8 100644 (file)
@@ -31,6 +31,7 @@ import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
+import eu.etaxonomy.cdm.api.service.dto.DerivateHierarchyDTO;
 import eu.etaxonomy.cdm.api.service.pager.Pager;
 import eu.etaxonomy.cdm.api.service.search.SearchResult;
 import eu.etaxonomy.cdm.api.service.util.TaxonRelationshipEdge;
@@ -914,4 +915,22 @@ public class TransientOccurenceService implements IOccurrenceService {
                return defaultService.findWithoutFlush(uuid);
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#listFieldUnitsByAssociatedTaxon(java.util.Set, eu.etaxonomy.cdm.model.taxon.Taxon, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.util.List, java.util.List)
+     */
+    @Override
+    public Collection<FieldUnit> listFieldUnitsByAssociatedTaxon(Set<TaxonRelationshipEdge> includeRelationships,
+            Taxon associatedTaxon, Integer maxDepth, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints,
+            List<String> propertyPaths) {
+        return defaultService.listFieldUnitsByAssociatedTaxon(includeRelationships, associatedTaxon, maxDepth, pageSize, pageNumber, orderHints, propertyPaths);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.service.IOccurrenceService#assembleDerivateHierarchyDTO(eu.etaxonomy.cdm.model.occurrence.FieldUnit, java.util.UUID)
+     */
+    @Override
+    public DerivateHierarchyDTO assembleDerivateHierarchyDTO(FieldUnit fieldUnit, UUID associatedTaxonUuid) {
+        return defaultService.assembleDerivateHierarchyDTO(fieldUnit, associatedTaxonUuid);
+    }
+
 }
index 90fc97eeb9c9f4fdb5297f5594529e3a05556bff..e5452371b59cafe2dcaaff6cca943916f4d8c27e 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TreeNode;
+import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.dnd.DND;
@@ -22,7 +23,6 @@ import org.eclipse.swt.widgets.Tree;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IMemento;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.part.EditorPart;
 
@@ -34,7 +34,6 @@ import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
@@ -47,7 +46,7 @@ import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
  *
  */
 public class DerivateView extends EditorPart implements IPartContentHasFactualData, IDirtyMarkableSelectionProvider,
-        IConversationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IContextListener {
+        IConversationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData {
 
        /**
      * Key used for storing a single DerivateView in a memento
@@ -77,7 +76,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
      * Default constructor
      */
     public DerivateView() {
-        CdmStore.getContextManager().addContextListener(this);
     }
 
     /* (non-Javadoc)
@@ -234,6 +232,19 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.refresh();
     }
 
+    /**
+     * Refreshes the derivate hierarchy tree and expands the tree
+     * to show and select the given object.
+     *
+     * @param expandTo the object to which the tree should be expanded
+     */
+    public void refreshTree(Object expandTo){
+        refreshTree();
+        TreeSelection selection = (TreeSelection) viewer.getSelection();
+        viewer.expandToLevel(selection.getFirstElement(), 1);
+        viewer.setSelection(new StructuredSelection(new TreeNode(expandTo)));
+    }
+
     /**
      * Refreshes the derivate hierarchy tree
      */
@@ -243,6 +254,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         viewer.refresh();
     }
 
+
     private void generateMultiLinkSingleReads() {
         Set<SingleRead> multiLinkSingleReads = new HashSet<SingleRead>();
         for(Entry<SingleRead, Collection<Sequence>> entry:CdmStore.getService(ISequenceService.class).getSingleReadSequencesMap().entrySet()){
@@ -260,62 +272,4 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         return this.multiLinkSingleReads;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
-    @Override
-    public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
-    @Override
-    public void contextStop(IMemento memento, IProgressMonitor monitor) {
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-     */
-    @Override
-    public void contextStart(IMemento memento, IProgressMonitor monitor) {
-//        if(memento == null){
-//            return;
-//        }
-//        IMemento editorMementos = memento.getChild(DERIVATE_VIEW_MEMENTO_KEY);
-//            DerivateViewEditorInput input = new DerivateViewEditorInput(UUID.fromString(editorInput.getString(DerivateViewEditorInput.UUID_MEMENTO_KEY)));
-//                try {
-//                    EditorUtil.open(input);
-//                } catch (PartInitException e) {
-//                    AbstractUtility.error(getClass(), "Error opening an editor window", e);
-//                }
-    }
-
-    /* (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)
-     */
-    @Override
-    public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
-//        if (!conversation.isBound()) {
-//            conversation.bind();
-//        }
-//        conversation.close();
-//        if(memento == null){
-//            return;
-//        }
-//
-//        IEditorInput input = getEditorInput();
-//        if(input instanceof IPersistable){
-//            memento.createChild(DERIVATE_VIEW_MEMENTO_KEY);
-//            ((IPersistable) input).saveState(memento);
-//        }
-    }
-
 }
index b956e86c779337c9dc9e6335f021c44b07749fe0..b2d6da8bcbfe59f3106467702fa9563068742fa2 100644 (file)
@@ -71,10 +71,12 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                             //context menu for TissueSample
                             else if(selectedTreeNode.getValue() instanceof DerivedUnit && ((DerivedUnit)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
                                createMenuItem(addMenu, "DnaSample", selectedTreeNode, DnaSample.class, null);
+                               createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media);
                             }
                             //context menu for DnaSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample){
                                 createMenuItem(addMenu, "Consensus Sequence", selectedTreeNode, Sequence.class, null);
+                                createMenuItem(addMenu, "Media Specimen", selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media);
                             }
                             //context menu for Sequence
                             else if(selectedTreeNode.getValue() instanceof Sequence){
@@ -123,15 +125,20 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
          */
         @Override
         public void widgetSelected(SelectionEvent e) {
+            Object createdElement = null;
             Object selectedDerivate = selectedNode.getValue();
             if(selectedDerivate instanceof DnaSample){
                 DnaSample dnaSample = (DnaSample)selectedDerivate;
                 if(childClass.equals(Sequence.class)){
-                    dnaSample.addSequence(Sequence.NewInstance(""));//why does this not have DnaSample as constructor parameter?
+                    Sequence newInstance = Sequence.NewInstance("");
+                    dnaSample.addSequence(newInstance);//why does this not have DnaSample as constructor parameter?
+                    createdElement = newInstance;
                 }
             }
             else if(selectedDerivate instanceof Sequence){
-                ((Sequence) selectedDerivate).addSingleRead(SingleRead.NewInstance());
+                SingleRead newInstance = SingleRead.NewInstance();
+                ((Sequence) selectedDerivate).addSingleRead(newInstance);
+                createdElement = newInstance;
             }
             else if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
@@ -150,6 +157,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, derivedUnit, DerivationEventType.GATHERING_IN_SITU()));
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
+                createdElement = derivedUnit;
             }
 
             //refresh view
@@ -157,7 +165,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
             if(activePart instanceof DerivateView){
                 DerivateView derivateView = (DerivateView)activePart;
                 derivateView.changed(null);
-                derivateView.refreshTree();
+                derivateView.refreshTree(createdElement);
             }
         }
     }
index ee4c1eaf51a36033492cb5045bdfeef04799db80..753a09f69dd49e88d13a9a38663f801af121a6b5 100644 (file)
@@ -1,10 +1,10 @@
 <?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 including="**/*.java" kind="src" path="src/test/java"/>
        <classpathentry kind="src" path="src/main/resources"/>
        <classpathentry including="**/*.java" kind="src" path="src/test/resources"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 07a0fb8de23f3ad92b63f84242c1034fa6d81c12..1b0623422e1ee9d218cb4327373c85cb7db94d35 100644 (file)
@@ -58,7 +58,12 @@ Require-Bundle: org.eclipse.osgi,
  org.eclipse.jface.text,
  org.eclipse.ui.forms,
  eu.etaxonomy.taxeditor.cdmlib,
- org.eclipse.nebula.widgets.compositetable;bundle-version="1.0.0"
+ org.eclipse.nebula.widgets.compositetable;bundle-version="1.0.0",
+ org.eclipse.core.databinding,
+ org.eclipse.core.databinding.beans,
+ org.eclipse.core.databinding.observable,
+ org.eclipse.core.databinding.property,
+ org.eclipse.jface.databinding
 Import-Package: org.eclipse.core.commands,
  org.eclipse.core.commands.operations,
  org.eclipse.core.expressions,
diff --git a/eu.etaxonomy.taxeditor.store/icons/character_data_derivate-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/character_data_derivate-16x16-32.png
new file mode 100644 (file)
index 0000000..b9dd5ef
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/character_data_derivate-16x16-32.png differ
index 81947acc6f825c1f27784eb3654ca83bdcb10c10..d1d90b90b6448072f2e5723f9c8eec196f4671a5 100644 (file)
@@ -147,6 +147,8 @@ public class ImageResources {
     public static final String SINGLE_READ_DERIVATE = "single_read_derivate";
     public static final String SINGLE_READ_DERIVATE_MULTILINK = "single_read_derivate_multilink";
 
+    public static final String CHARACTER_DATA_DERIVATE = "character_data_derivate";
+
 
 
        /***************************************************************************
@@ -347,6 +349,9 @@ public class ImageResources {
                        "single_read_derivate-16x16-32.png");
                registerImage(registry, SINGLE_READ_DERIVATE_MULTILINK,
                        "single_read_derivate_multilink-16x16-32.png");
+               registerImage(registry, CHARACTER_DATA_DERIVATE,
+                       "character_data_derivate-16x16-32.png");
+
        }
 
        private void registerImage(ImageRegistry registry, String key,
index 123f5f564a0822e5305b57a4c0fbc2e31b1fecd2..d92cfb38bc2f5f148cf922060ee287bd03a30c8c 100644 (file)
@@ -100,8 +100,6 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
-import eu.etaxonomy.taxeditor.ui.mvc.OriginalLabelDataController;
-import eu.etaxonomy.taxeditor.ui.mvc.OriginalLabelDataElement;
 import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
 import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
 import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
@@ -2188,6 +2186,12 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    public OriginalLabelDataElement createOriginalLabelDataElement(ICdmFormElement parentElement) {
+        OriginalLabelDataElement element = new OriginalLabelDataElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
     public PreservedSpecimenDetailElement createPreservedSpecimenDetailElement(ICdmFormElement parentElement) {
         PreservedSpecimenDetailElement element = new PreservedSpecimenDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
@@ -2760,14 +2764,4 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    /**
-     * @param parentElement
-     * @return
-     */
-    public OriginalLabelDataController createOriginalLabelDataController(AbstractCdmDetailSection<DerivedUnitFacade> parentElement) {
-        OriginalLabelDataElement originalLabelDataElement = new OriginalLabelDataElement(parentElement.getLayoutComposite(), SWT.NONE);
-        originalLabelDataElement.initController(this, parentElement);
-        return originalLabelDataElement.getController();
-    }
-
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/OriginalLabelDataElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/OriginalLabelDataElement.java
new file mode 100644 (file)
index 0000000..e5753d1
--- /dev/null
@@ -0,0 +1,63 @@
+// $Id$
+/**
+ * Copyright (C) 2014 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.ui.element;
+
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.taxeditor.ui.mvc.OriginalLabelDataField;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+
+/**
+ * @author pplitzner
+ * @date 17.06.2014
+ *
+ */
+public class OriginalLabelDataElement extends AbstractCdmDetailElement<DerivedUnitFacade> {
+
+    private TextWithLabelElement textOriginalLabelData;
+
+    /**
+     * @param formFactory
+     * @param formElement
+     */
+    public OriginalLabelDataElement(CdmFormFactory formFactory,
+            ICdmFormElement formElement) {
+        super(formFactory, formElement);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
+     * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
+     */
+    @Override
+    protected void createControls(ICdmFormElement formElement,
+            DerivedUnitFacade entity, int style) {
+        new OriginalLabelDataField(formElement.getLayoutComposite(), style, entity.innerDerivedUnit(), getFormFactory());
+//        textOriginalLabelData = formFactory.createTextWithLabelElement(formElement,
+//                "Original Label Data", entity.innerDerivedUnit().getOriginalLabelInfo(), SWT.MULTI);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
+     * .lang.Object)
+     */
+    @Override
+    public void handleEvent(Object eventSource) {
+        if (eventSource == textOriginalLabelData) {
+            getEntity().innerDerivedUnit().setOriginalLabelInfo(textOriginalLabelData.getText());
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataController.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataController.java
deleted file mode 100644 (file)
index d085ec3..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.ui.mvc;
-
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.mvc.interfaces.CdmCompositeController;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-
-/**
- * @author pplitzner
- * @date 17.06.2014
- *
- */
-public class OriginalLabelDataController extends AbstractCdmDetailElement<DerivedUnitFacade> implements CdmCompositeController{
-
-    private final OriginalLabelDataElement originalLabelDataElement;
-
-    /**
-     * @param dateTimeElement
-     * @param formFactory
-     * @param parentElement
-     * @param initialDateTime
-     * @param none
-     */
-    public OriginalLabelDataController(CdmFormFactory formFactory, ICdmFormElement parentElement, OriginalLabelDataElement originalLabelDataElement, int style) {
-        super(formFactory, parentElement);
-        this.originalLabelDataElement = originalLabelDataElement;
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.element.IRelevantFormElement#setIrrelevant(boolean)
-     */
-    @Override
-    public void setIrrelevant(boolean irrelevant) {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#setEnabled(boolean)
-     */
-    @Override
-    public void setEnabled(boolean enabled) {
-        originalLabelDataElement.setEnabled(enabled);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#isEnabled()
-     */
-    @Override
-    public boolean isEnabled() {
-        return originalLabelDataElement.isEnabled();
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.element.ICdmFormElement, java.lang.Object, int)
-     */
-    @Override
-    protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
-        originalLabelDataElement.getText().setText(entity.getTitleCache());
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
-     */
-    @Override
-    public void handleEvent(Object eventSource) {
-    }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataElement.java
deleted file mode 100644 (file)
index d064f6d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// $Id$
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.ui.mvc;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-
-/**
- * @author pplitzner
- * @date 17.06.2014
- *
- */
-public class OriginalLabelDataElement extends AbstractCdmComposite<OriginalLabelDataController>{
-    private final Text text;
-
-    /**
-     * @param parent
-     * @param style
-     */
-    public OriginalLabelDataElement(Composite parent, int style) {
-        super(parent, style);
-        {
-            TableWrapLayout tableWrapLayout = new TableWrapLayout();
-            tableWrapLayout.verticalSpacing = 0;
-            tableWrapLayout.topMargin = 0;
-            tableWrapLayout.rightMargin = 0;
-            tableWrapLayout.leftMargin = 0;
-            tableWrapLayout.horizontalSpacing = 0;
-            tableWrapLayout.bottomMargin = 0;
-            tableWrapLayout.numColumns = 3;
-            setLayout(tableWrapLayout);
-        }
-
-        Label lblOriginalLabelData = new Label(this, SWT.NONE);
-        lblOriginalLabelData.setLayoutData(new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP, 1, 1));
-        lblOriginalLabelData.setText("Original Label Data");
-
-        text = new Text(this, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
-        text.setEditable(false);
-        text.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
-        new Label(this, SWT.NONE);
-
-        // TODO Auto-generated constructor stub
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.ui.mvc.AbstractCdmComposite#initInternalController(eu.etaxonomy.taxeditor.ui.element.CdmFormFactory, eu.etaxonomy.taxeditor.ui.element.ICdmFormElement)
-     */
-    @Override
-    protected void initInternalController(CdmFormFactory formFactory, ICdmFormElement parentElement) {
-        controller = new OriginalLabelDataController(formFactory, parentElement, this, SWT.NONE);
-    }
-
-    public Text getText() {
-        return text;
-    }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataField.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/mvc/OriginalLabelDataField.java
new file mode 100644 (file)
index 0000000..3603e4d
--- /dev/null
@@ -0,0 +1,113 @@
+// $Id$
+/**
+* Copyright (C) 2014 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.mvc;
+
+import java.util.List;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.BeansObservables;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.SWTObservables;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+
+/**
+ * @author pplitzner
+ * @date 23.06.2014
+ *
+ */
+public class OriginalLabelDataField extends Composite {
+
+    private DataBindingContext m_bindingContext;
+    private DerivedUnit derivedUnit = null;
+    private final Text originalLabelInfoText;
+    private CdmFormFactory formFactory;
+
+    public OriginalLabelDataField(Composite parent, int style, DerivedUnit newDerivedUnit, CdmFormFactory formFactory) {
+        this(parent, style);
+        setDerivedUnit(newDerivedUnit);
+        this.formFactory = formFactory;
+    }
+
+    public OriginalLabelDataField(Composite parent, int style) {
+        super(parent, style);
+        setLayout(new GridLayout(2, false));
+
+        new Label(this, SWT.NONE).setText("Original Label Data");
+
+        originalLabelInfoText = new Text(this, SWT.BORDER | SWT.WRAP | SWT.MULTI);
+        originalLabelInfoText.addModifyListener(new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                if(formFactory!=null){
+                    List<IPropertyChangeListener> propertyChangeListeners = formFactory.getPropertyChangeListeners();
+                    for (IPropertyChangeListener iPropertyChangeListener : propertyChangeListeners) {
+                        iPropertyChangeListener.propertyChange(new CdmPropertyChangeEvent(OriginalLabelDataField.this, e));
+                    }
+                }
+            }
+        });
+        originalLabelInfoText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        if (derivedUnit != null) {
+            m_bindingContext = initDataBindings();
+        }
+    }
+
+    @Override
+    protected void checkSubclass() {
+        // Disable the check that prevents subclassing of SWT components
+    }
+
+    private DataBindingContext initDataBindings() {
+        IObservableValue originalLabelInfoObserveWidget = SWTObservables.observeText(originalLabelInfoText, SWT.Modify);
+        IObservableValue originalLabelInfoObserveValue = BeansObservables
+                .observeValue(derivedUnit, "originalLabelInfo");
+        //
+        DataBindingContext bindingContext = new DataBindingContext();
+        //
+        bindingContext.bindValue(originalLabelInfoObserveWidget, originalLabelInfoObserveValue, null, null);
+        //
+        return bindingContext;
+    }
+
+    public DerivedUnit getDerivedUnit() {
+        return derivedUnit;
+    }
+
+    public void setDerivedUnit(DerivedUnit newDerivedUnit) {
+        setDerivedUnit(newDerivedUnit, true);
+    }
+
+    public void setDerivedUnit(DerivedUnit newDerivedUnit, boolean update) {
+        derivedUnit = newDerivedUnit;
+        if (update) {
+            if (m_bindingContext != null) {
+                m_bindingContext.dispose();
+                m_bindingContext = null;
+            }
+            if (derivedUnit != null) {
+                m_bindingContext = initDataBindings();
+            }
+        }
+    }
+
+}
index 00c732c4d3d3be9796a19b4c0228801778c11c67..45eec3ef23ff560ba8b206ee017c1c7cb4345b1d 100644 (file)
@@ -16,6 +16,8 @@ import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
@@ -51,7 +53,7 @@ public class DerivedUnitGeneralDetailElement extends
        private TextWithLabelElement text_accessionNumber;
        private GatheringEventUnitElement element_elevation;
 
-       
+
 
        /**
         * @param formFactory
@@ -75,10 +77,12 @@ public class DerivedUnitGeneralDetailElement extends
                toggleableText_titleCache = formFactory.createToggleableTextField(
                                formElement, "Title Cache", entity.getTitleCache(),
                                entity.isProtectedTitleCache(), style);
-               combo_specorobstype = formFactory
-                               .createEnumComboElement(SpecimenOrObservationType.class,
-                                               formElement, style);
-               combo_specorobstype.setSelection(entity.getType());
+
+        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+            combo_specorobstype = formFactory.createEnumComboElement(SpecimenOrObservationType.class, formElement,
+                    style);
+            combo_specorobstype.setSelection(entity.getType());
+        }
                selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
                                formElement, "Country",
                                entity.getCountry(), EntitySelectionElement.NOTHING, style);
@@ -89,7 +93,7 @@ public class DerivedUnitGeneralDetailElement extends
                                entity.getExactLocation(), style);
                element_elevation = formFactory.createGatheringEventUnitElement(
                                formElement, "Elevation : ", entity, MinMaxTextSection.UnitType.ELEVATION,  style);
-               
+
                element_date = formFactory.createTimePeriodElement(formElement, "Date",
                                entity.getGatheringPeriod(), style);
                selection_collector = formFactory
index d73d9ae5c5d1e7dc0b3ff06ce1a89bb45beb5e8b..622e8b7f954eb16a433dcc6d3a72d3fc9d3edd5f 100644 (file)
@@ -14,6 +14,8 @@ import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
@@ -65,8 +67,11 @@ public class FieldUnitGeneralDetailElement extends AbstractCdmDetailElement<Deri
     protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
         toggleableText_titleCache = formFactory.createToggleableTextField(formElement, "Title Cache",
                 entity.getTitleCache(), entity.isProtectedTitleCache(), style);
-        combo_specorobstype = formFactory.createEnumComboElement(SpecimenOrObservationType.class, formElement, style);
-        combo_specorobstype.setSelection(entity.getType());
+
+        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+            combo_specorobstype = formFactory.createEnumComboElement(SpecimenOrObservationType.class, formElement, style);
+            combo_specorobstype.setSelection(entity.getType());
+        }
         selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(), formElement,
                 "Country", entity.getCountry(), EntitySelectionElement.NOTHING, style);
         languageText_locality = formFactory.createLanguageStringWithLabelElement(formElement, "Locality",
@@ -74,7 +79,7 @@ public class FieldUnitGeneralDetailElement extends AbstractCdmDetailElement<Deri
         element_point = formFactory.createPointElement(formElement, entity.getExactLocation(), style);
         element_elevation = formFactory.createGatheringEventUnitElement(
                                formElement, "Elevation : ", entity, MinMaxTextSection.UnitType.ELEVATION,  style);
-               
+
         element_date = formFactory.createTimePeriodElement(formElement, "Date", entity.getGatheringPeriod(), style);
         selection_collector = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement,
                 "Collector", entity.getCollector(), EntitySelectionElement.ALL, style);
index 635dfd4226ed0bead42cbf829bcacc6fb284af7e..e4c1602b27a5eaa2319885d334bf5a6e3fd4eb38 100644 (file)
@@ -43,26 +43,7 @@ public class OriginalLabelDataSection extends AbstractCdmDetailSection<DerivedUn
      */
     @Override
     public String getHeading() {
-        return "Original Label Data: ";
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.forms.widgets.ExpandableComposite#setText(java.lang.String)
-     */
-    @Override
-    public void setText(String title) {
-        String text = getHeading();
-        if(getEntity()!=null){// && getEntity().getOriginalLabelData!=null){
-            String titleCache = getEntity().getTitleCache();
-            text += titleCache.substring(0, Math.min(10, titleCache.length()));
-            text += "...";
-        }
-        if(text!=null){
-            super.setText(text);
-        }
-        else{
-            super.setText(title);
-        }
+        return "Original Label Data";
     }
 
     /* (non-Javadoc)
@@ -70,7 +51,7 @@ public class OriginalLabelDataSection extends AbstractCdmDetailSection<DerivedUn
      */
     @Override
     protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
-        return formFactory.createOriginalLabelDataController(parentElement);
+        return formFactory.createOriginalLabelDataElement(parentElement);
     }
 
 }
index f03ea461d12c6aaedcf52fd31a41dfb45c268c87..fa019eabde18ce590b3a8bdeb42dd340e0ee4638 100644 (file)
@@ -9,6 +9,8 @@
 */
 package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
 
+import org.eclipse.swt.widgets.Text;
+
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
@@ -33,6 +35,9 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
     private NumberWithLabelElement textConsensusSequenceLength;
     private TextWithLabelElement textBarcodeSequence;
     private TextWithLabelElement textGeneticAccessNo;
+    private UriWithLabelElement textNCBIUri;
+    private UriWithLabelElement textENAUri;
+    private UriWithLabelElement textDDBJUri;
     private TextWithLabelElement textBoldProcessID;
     private UriWithLabelElement textBoldUri;
 
@@ -54,16 +59,22 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
     @Override
     protected void createControls(ICdmFormElement formElement, Sequence entity, int style) {
         comboMarker = formFactory.createDefinedTermComboElement(TermType.DnaMarker, formElement, "DNA Marker", entity.getDnaMarker(), style);
-        textConsensusSequence = formFactory.createTextWithLabelElement(formElement, "Consensus Sequence 5'->3'", entity.getConsensusSequence().getString(), style);
-        textConsensusSequenceLength = formFactory.createNumberTextWithLabelElement(formElement, "Consensus Seq. Length", entity.getConsensusSequence().getLength(), style);
-        textConsensusSequenceLength.setEnabled(false);
+//        textConsensusSequence = formFactory.createTextWithLabelElement(formElement, "Consensus Sequence 5'->3'", entity.getConsensusSequence().getString(), style);
+//        textConsensusSequenceLength = formFactory.createNumberTextWithLabelElement(formElement, "Consensus Seq. Length", entity.getConsensusSequence().getLength(), style);
+//        ((Text) textConsensusSequenceLength.getMainControl()).setEditable(false);
         textBarcodeSequence = formFactory.createTextWithLabelElement(formElement, "Barcode Sequence 5'->3'", entity.getBarcodeSequencePart()==null?"":entity.getBarcodeSequencePart().getString(), style);
 
         textGeneticAccessNo = formFactory.createTextWithLabelElement(formElement, "Genetic Acc. No.", entity.getGeneticAccessionNumber(), style);
+        textNCBIUri = formFactory.createUriWithLabelElement(formElement, "NCBI URI", entity.getGenBankUri(), style);
+        ((Text) textNCBIUri.getMainControl()).setEditable(false);
+        textENAUri = formFactory.createUriWithLabelElement(formElement, "ENA URI", entity.getEmblUri(), style);
+        ((Text) textENAUri.getMainControl()).setEditable(false);
+        textDDBJUri = formFactory.createUriWithLabelElement(formElement, "DDBJ URI", entity.getDdbjUri(), style);
+        ((Text) textDDBJUri.getMainControl()).setEditable(false);
         textBoldProcessID = formFactory.createTextWithLabelElement(formElement, "BOLD Process ID", entity.getBoldProcessId(), style);
         textBoldUri = formFactory.createUriWithLabelElement(formElement, "BOLD URI", entity.getBoldUri(), style);
-        textBoldUri.setEnabled(false);
-
+        ((Text) textBoldUri.getMainControl()).setEditable(false);
+        ((Text) textBoldUri.getMainControl()).setToolTipText("Query BOLD");
     }
 
     /*
@@ -87,9 +98,6 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
             getEntity().setConsensusSequence(consensusSequence);
             textConsensusSequenceLength.setNumber(consensusSequence.getLength());
         }
-        else if(eventSource==textConsensusSequenceLength){
-            // this is a derived value and should not be edited
-        }
         else if(eventSource==textBarcodeSequence){
             SequenceString barcodeSequencePart = getEntity().getBarcodeSequencePart();
             if(barcodeSequencePart==null){
@@ -100,6 +108,16 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
         }
         else if(eventSource==textGeneticAccessNo){
             getEntity().setGeneticAccessionNumber(textGeneticAccessNo.getText());
+            if(textGeneticAccessNo.getText()!=null && !textGeneticAccessNo.getText().isEmpty()){
+                textNCBIUri.setUri(getEntity().getGenBankUri());
+                textENAUri.setUri(getEntity().getEmblUri());
+                textDDBJUri.setUri(getEntity().getDdbjUri());
+            }
+            else{
+                textNCBIUri.setText("");
+                textENAUri.setText("");
+                textDDBJUri.setText("");
+            }
         }
         else if(eventSource==textBoldProcessID){
             getEntity().setBoldProcessId(textBoldProcessID.getText());
@@ -110,9 +128,6 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
                 textBoldUri.setText("");
             }
         }
-        else if(eventSource==textBoldUri){
-            //cannot be set because it is generated from the genetic access number and a base URI
-        }
     }
 
 }
index d628deaaac6e025d30594b0895c2e23e9fb64beb..fc1be090d1e87a86f08ac33b6157af6a5bd60430 100644 (file)
@@ -24,7 +24,6 @@ import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
@@ -116,7 +115,9 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
      * @return
      */
     public static String getDerivateText(Object element){
+        TreeNode parentNode = null;
         if(element instanceof TreeNode){
+            parentNode = ((TreeNode) element).getParent();
             //unwrap specimen from TreeNode
             element = ((TreeNode) element).getValue();
         }
@@ -137,17 +138,17 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             MediaSpecimen mediaSpecimen = (MediaSpecimen)element;
             label += mediaSpecimen.getMediaSpecimen().getTitle()!=null?mediaSpecimen.getMediaSpecimen().getTitle().getText()+", ":"[no motif]";
             label += mediaSpecimen.getMediaSpecimen().getArtist()!=null?mediaSpecimen.getMediaSpecimen().getArtist()+", ":"";
-            label += mediaSpecimen.getAccessionNumber()!=null?mediaSpecimen.getAccessionNumber()+", ":"";
-            Collection collection = mediaSpecimen.getCollection();
+            eu.etaxonomy.cdm.model.occurrence.Collection collection = mediaSpecimen.getCollection();
             if(collection!=null){
                 label += collection.getName()!=null?collection.getName()+" ":"";
+                label += collection.getCode()!=null?"("+collection.getCode()+"), ":"";
             }
+            label += mediaSpecimen.getAccessionNumber()!=null?mediaSpecimen.getAccessionNumber()+", ":"";
         }
         else if(element instanceof DnaSample
                 || (element instanceof DerivedUnit
                         && ((SpecimenOrObservationBase<?>) element).getRecordBasis()==SpecimenOrObservationType.DnaSample)){
-            //TODO implement
-            label += element.toString();
+            label += "[no sample designation]";
 
         }
         else if(element instanceof DerivedUnit){
@@ -157,12 +158,13 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                 if(fieldUnits!=null && !fieldUnits.isEmpty()){
                     FieldUnit fieldUnit = fieldUnits.iterator().next();
                     GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent();
+//                    gatheringEvent = HibernateProxyHelper.deproxy(gatheringEvent, GatheringEvent.class);
                     if(gatheringEvent!=null){
                         label += gatheringEvent.getCollector()!=null?gatheringEvent.getCollector()+", ":"";
                     }
                     label += fieldUnit.getFieldNumber()!=null?fieldUnit.getFieldNumber()+", ":"";
                 }
-                Collection collection = derivedUnit.getCollection();
+                eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnit.getCollection();
                 if(collection!=null){
                     label += collection.getName()!=null?collection.getName()+" ":"";
                     label += collection.getCode()!=null?"("+collection.getCode()+"), ":"";
@@ -172,18 +174,22 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
             }
             else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.TissueSample){
                 //TODO: implement
-//                kindofTissue + SampleDesignation
+                label += "kindofTissue? + [no sample designation]";
             }
         }
         else if(element instanceof Sequence){
             Sequence sequence = (Sequence)element;
-            label += "SampleDesignation?"+", ";
+            label += "[no sample designation]"+", ";
             label += sequence.getDnaMarker()!=null?sequence.getDnaMarker():"";
         }
         else if(element instanceof SingleRead){
             SingleRead singleRead = (SingleRead)element;
+            label += "[no sample designation]"+", ";
             label += singleRead.getPrimer()!=null?singleRead.getPrimer().getLabel()+", ":"";
-            label += "Marker?";
+            if(parentNode!=null && parentNode.getValue() instanceof Sequence){
+                Sequence sequence = (Sequence) parentNode.getValue();
+                label += sequence.getDnaMarker()!=null?sequence.getDnaMarker():"";
+            }
         }
         else if(element instanceof SpecimenOrObservationBase){
             SpecimenOrObservationBase<?> derivate = (SpecimenOrObservationBase<?>) element;
index ff7cb73f53ffdf67d466b997700437b9475bc2c2..a3d77a8eee3075896714b7fe691b4d15dfe9fa53 100644 (file)
@@ -51,12 +51,15 @@ public class DerivateSearchCompositeController implements Listener{
     private final DerivateSearchComposite derivateSearchComposite;
     private IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase<DerivedUnitFacadeCacheStrategy>> configurator;
     private EnumTermComboController<SpecimenOrObservationType> enumTermComboController;
+    private final DerivateSearchView derivateSearchView;
 
     /**
      * @param parent
+     * @param derivateSearchView
      */
-    public DerivateSearchCompositeController(Composite parent) {
+    public DerivateSearchCompositeController(Composite parent, DerivateSearchView derivateSearchView) {
         this.derivateSearchComposite = new DerivateSearchComposite(parent, SWT.NONE);
+        this.derivateSearchView = derivateSearchView;
         init();
     }
 
@@ -103,6 +106,10 @@ public class DerivateSearchCompositeController implements Listener{
     }
 
     private void searchDerivates(){
+        if(!derivateSearchView.getConversationHolder().isBound()){
+            derivateSearchView.setFocus(); //rebind the conversation
+        }
+
         configurator.setTitleSearchString(derivateSearchComposite.getSearchField().getText());
         SpecimenOrObservationType type = enumTermComboController.getSelection();
         //filter by specimen type
@@ -148,6 +155,7 @@ public class DerivateSearchCompositeController implements Listener{
     public void reset(){
         derivateSearchComposite.getResultViewer().setInput(null);
         derivateSearchComposite.getSearchField().setText("");
+        enumTermComboController.setSelection(SpecimenOrObservationType.Unknown);
         derivateSearchComposite.getComboDerivateType().deselectAll();
     }
 
index ddd4b1a20dba1cd3283da47aa4fa965e6d88c98b..c3e973ef0b0024613450489f2a34dd6ff14111f6 100644 (file)
@@ -41,7 +41,7 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
      */
     @Override
     public void createPartControl(Composite parent) {
-        derivateSearchCompositeController = new DerivateSearchCompositeController(parent);
+        derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this);
         getSite().setSelectionProvider(derivateSearchCompositeController.getResultViewer());
         derivateSearchCompositeController.setEnabled(CdmStore.isActive());
     }
index 207e1e5edb7636da4a668fd9d9e6f4dcf049f5ab..697991efdbebbcf119dc32e4a928f1340be6d6eb 100644 (file)
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.view.detail;
 
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.forms.SectionPart;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
@@ -120,15 +121,23 @@ public class CdmSectionPart<T> extends SectionPart implements
                if (event != null) {
 
                        Object eventSource = event.getSource();
+                       Control[] children = formSection.getLayoutComposite().getChildren();
+                       boolean containsElement = false;
+                       for (Control control : children) {
+                           if(eventSource.equals(control)){
+                               containsElement = true;
+                               break;
+                           }
+            }
+                       if(containsElement){
+                           markDirty();
+                       }
 
-                       if (formSection.equals(eventSource)){
+                       else if (formSection.equals(eventSource)){
                                markDirty();
                        }
-                       if((
-                                               (eventSource instanceof ICdmFormElement)
-                                               && formSection.containsFormElement((ICdmFormElement) eventSource))
-                                               ) {
-                               markDirty();
+                       else if(((eventSource instanceof ICdmFormElement)&& formSection.containsFormElement((ICdmFormElement) eventSource))) {
+                           markDirty();
                        }
                }
        }
diff --git a/pom.xml b/pom.xml
index ea4c44cfa8b3a4ae00e86328e4b7802455264c6f..86e67931cbccc11ccfdf70844a392d3183bf51f4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -15,7 +15,7 @@
   <properties>
     <java.codelevel>1.6</java.codelevel>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <cdmlib.version>3.3.7-SNAPSHOT</cdmlib.version>
+    <cdmlib.version>3.4.0-SNAPSHOT</cdmlib.version>
     <!-- TODO can we use project.version ????? -->
     <tycho.version>0.14.0</tycho.version>
     <taxeditor.version>3.3.7-SNAPSHOT</taxeditor.version>