Merge branch 'hotfix/3.12.4' into develop
authorjenkins <jenkins-int@bgbm.org>
Mon, 15 Feb 2016 09:31:03 +0000 (10:31 +0100)
committerjenkins <jenkins-int@bgbm.org>
Mon, 15 Feb 2016 09:31:03 +0000 (10:31 +0100)
Conflicts:
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java - resolved
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java - UNRESOLVED!!!!!

1  2 
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java

index daf03e1dfdce2502b5cfd2f1bd5a100571c2dfc9,977e85389a04130827d54638543b695b25ba70fb..dcfff9f24c6ce8ad71b32bbab38ca1125394aa88
@@@ -10,6 -10,7 +10,7 @@@ import org.springframework.stereotype.C
  import eu.etaxonomy.cdm.api.application.CdmApplicationState;
  import eu.etaxonomy.cdm.model.common.CdmBase;
  import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+ import eu.etaxonomy.cdm.model.common.TermBase;
  import eu.etaxonomy.taxeditor.remoting.cache.CacheLoader;
  import eu.etaxonomy.taxeditor.remoting.cache.CdmEntityCacheKey;
  import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
@@@ -22,7 -23,7 +23,7 @@@ import eu.etaxonomy.taxeditor.session.I
  /**
   * Class which uses CDM services to cache cdm entities
   *
 - * FIXME: Currently only handles terms entities. It would be
 + * FIXME: Currently only handles term entities. It would be
   *        interesting to have a generic method which finds the
   *        correct service to load / cache the entity.
   *
@@@ -74,9 -75,13 +75,10 @@@ public class CdmServiceCacher extends C
          return load(term);
      }
  
 -    /* (non-Javadoc)
 -     * @see eu.etaxonomy.cdm.model.ICdmCacher#isCachable(eu.etaxonomy.cdm.model.common.CdmBase)
 -     */
      @Override
      public boolean isCachable(CdmBase cdmEntity) {
-         if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+      //   if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+          if(cdmEntity != null && cdmEntity instanceof TermBase) {
              return true;
          }
          return false;
index 1795b73afead863711963eec6cdb9840b23b379b,dee02e05f54c0f811794ce51f6d58a26c76ce02d..eb5070d240c4b7d07f9e684db1852bc657e7df43
                          <reference
                                definitionId="isMisapplication">
                          </reference>
+                         <reference
+                               definitionId="isHomotypicSynonymOfAcceptedTaxon">
+                         </reference>
                       </or>
                    </not>
                 </visibleWhen>
        </menuContribution>
        <menuContribution
              locationURI="popup:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
 +         <separator
 +               name="eu.etaxonomy.taxeditor.editor.separator4"
 +               visible="true">
 +         </separator>
 +         <dynamic
 +               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
 +               id="eu.etaxonomy.taxeditor.editor.derivativeEditor.CdmViewerContextMenu">
 +         </dynamic>
 +         <dynamic
 +               class="eu.etaxonomy.taxeditor.editor.view.derivate.contextMenu.DerivateViewContextMenu"
 +               id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateContextMenu">
 +         </dynamic>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.toggleLinkWithTaxonSelection"
 +               label="Link with taxon selection"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <not>
 +                  <reference
 +                        definitionId="isDerivativeEditorLinkedToTaxonSelection">
 +                  </reference>
 +               </not>
 +            </visibleWhen>
 +         </command>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.toggleLinkWithTaxonSelection"
 +               label="Unlink from taxon selection"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isDerivativeEditorLinkedToTaxonSelection">
 +               </reference>
 +            </visibleWhen>
 +         </command>
 +         <separator
 +               name="eu.etaxonomy.taxeditor.editor.separator3"
 +               visible="true">
 +         </separator>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead"
 +               id="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleReadMenuItem"
 +               label="Reuse single read here"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isSingleReadReusableHere">
 +               </reference>
 +            </visibleWhen>
 +         </command>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard"
 +               label="Reuse for other sequence"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isSingleRead">
 +               </reference>
 +            </visibleWhen>
 +         </command>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence"
 +               label="Remove from this sequence"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isSingleReadReused">
 +               </reference>
 +            </visibleWhen>
 +         </command>
 +         <separator
 +               name="eu.etaxonomy.taxeditor.editor.separator7"
 +               visible="true">
 +         </separator>
           <command
 -               commandId="eu.etaxonomy.taxeditor.editor.derivate.delete"
 +               commandId="org.eclipse.ui.edit.delete"
                 label="%command.label.52"
                 style="push">
           </command>
                 label="%command.label.54"
                 style="push">
           </command>
 -         <dynamic
 -               class="eu.etaxonomy.taxeditor.editor.view.derivate.contextMenu.DerivateViewContextMenu"
 -               id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateContextMenu">
 -         </dynamic>
        </menuContribution>
        <menuContribution
              locationURI="popup:eu.etaxonomy.taxeditor.editor.view.dataimport.SpecimenImportEditor">
        </handler>
        <handler
              class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.DeleteDerivateHandler"
 -            commandId="eu.etaxonomy.taxeditor.editor.view.derivate.command.delete">
 +            commandId="org.eclipse.ui.edit.delete">
           <activeWhen>
              <with
                    variable="activePartId">
              </reference>
           </activeWhen>
        </handler>
 +      <handler
 +            class="eu.etaxonomy.taxeditor.handler.defaultHandler.OpenReferencingObjectsView"
 +            commandId="eu.etaxonomy.taxeditor.openReferencingObjectsView">
 +         <activeWhen>
 +            <with
 +                  variable="activePartId">
 +               <equals
 +                     value="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
 +               </equals>
 +            </with>
 +         </activeWhen>
 +      </handler>
     </extension>
     <extension
           name="%extension.name"
              name="%command.name.41">
        </command>
        <command
 -            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenTaxonEditorHandler"
 -            id="eu.etaxonomy.taxeditor.editor.openTaxonEditor"
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenTaxonEditorForTaxonHandler"
 +            id="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxon"
              name="%command.name.42">
           <commandParameter
 -               id="eu.etaxonomy.taxeditor.editor.taxonParameter"
 +               id="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxon.uuid"
                 name="%commandParameter.name"
                 optional="false"
 -               typeId="eu.etaxonomy.taxeditor.editor.taxonParameterType">
 +               typeId="eu.etaxonomy.taxeditor.uuidParameterType">
 +         </commandParameter>
 +      </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenTaxonEditorForTaxonNodeHandler"
 +            id="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxonNode"
 +            name="Open Taxon Editor for taxonnode">
 +         <commandParameter
 +               id="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxonNode.uuid"
 +               name="taxon node uuid"
 +               optional="true"
 +               typeId="eu.etaxonomy.taxeditor.uuidParameterType">
           </commandParameter>
        </command>
 -      <commandParameterType
 -            converter="eu.etaxonomy.taxeditor.editor.handler.TaxonParameterConverter"
 -            id="eu.etaxonomy.taxeditor.editor.taxonParameterType"
 -            type="eu.etaxonomy.cdm.model.taxon.TaxonBase">
 -      </commandParameterType>
        <command
              defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.DeleteDerivateHandler"
              id="eu.etaxonomy.taxeditor.editor.derivate.deepDelete"
              defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler"
              id="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
              name="Open Derivative Editor">
 -         <commandParameter
 -               id="eu.etaxonomy.taxeditor.specimenUuidParameter"
 -               name="Specimen UUID parameter"
 -               optional="true"
 -               typeId="eu.etaxonomy.taxeditor.specimenUuidParameterType">
 -         </commandParameter>
        </command>
        <command
              defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.ListenToSelectionChangeHandler"
              id="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
              name="Link with taxon selection">
        </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
 +            id="eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard"
 +            name="Copy SingleRead to clipboard">
 +      </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
 +            id="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead"
 +            name="Reuse SingleRead">
 +      </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
 +            id="eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence"
 +            name="Remove SingleRead from sequence">
 +      </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.ToggleLinkWithTaxonSelectionHandler"
 +            id="eu.etaxonomy.taxeditor.editor.derivative.toggleLinkWithTaxonSelection"
 +            name="Toggle link with taxon selection">
 +      </command>
          
     </extension>
 -   <extension
 -         point="org.eclipse.ui.commands">
 -      <commandParameterType
 -            converter="eu.etaxonomy.taxeditor.handler.UuidParameterConverter"
 -            id="eu.etaxonomy.taxeditor.specimenUuidParameterType"
 -            type="java.util.UUID">
 -      </commandParameterType>
 -   </extension>
     <extension
           point="org.eclipse.core.expressions.definitions">
        <definition
              </test>
           </with>
        </definition>
+       <definition
+             id="isNotHomotypicSynonymOfAcceptedTaxon">
+          <with
+                variable="selection">
+             <test
+                   property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isHomotypicSynonymOfAcceptedTaxon">
+             </test>
+          </with>
+       </definition>
        <definition
              id="isSynonym">
           <with
              </test>
           </with>
        </definition>
 +      <definition
 +            id="isSingleReadReusableHere">
 +         <with
 +               variable="selection">
 +            <test
 +                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleReadReusableHere">
 +            </test>
 +         </with>
 +      </definition>
 +      <definition
 +            id="isSingleReadReused">
 +         <with
 +               variable="selection">
 +            <test
 +                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleReadReused">
 +            </test>
 +         </with>
 +      </definition>
 +      <definition
 +            id="isDerivativeEditorLinkedToTaxonSelection">
 +         <with
 +               variable="activeEditor">
 +            <test
 +                  property="eu.etaxonomy.taxeditor.editor.view.derivate.DerivativeEditorPropertyTester.isLinkedWithTaxonSelection">
 +            </test>
 +         </with>
 +      </definition>
     </extension>
     <extension
           point="org.eclipse.core.expressions.propertyTesters">
              class="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
              id="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
              namespace="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
 -            properties="isSequence,isSingleRead"
 +            properties="isSequence,isSingleRead,isSingleReadReusableHere,isSingleReadReused"
              type="org.eclipse.jface.viewers.IStructuredSelection">
        </propertyTester>
 +      <propertyTester
 +            class="eu.etaxonomy.taxeditor.editor.view.derivate.DerivativeEditorPropertyTester"
 +            id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivativeEditorPropertyTester"
 +            namespace="eu.etaxonomy.taxeditor.editor.view.derivate.DerivativeEditorPropertyTester"
 +            properties="isLinkedWithTaxonSelection"
 +            type="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
 +      </propertyTester>
     </extension>
     <extension
           point="org.eclipse.ui.bindings">   
              name="%scheme.name">
        </scheme>
     </extension>
-     <extension
+     <!--extension
           point="org.eclipse.ui.importWizards">
        <wizard
              category="eu.etaxonomy.taxeditor.import.category.cdm"
              %wizard.description
           </description>
        </wizard>
-    </extension>
+    </extension-->
     <extension
            point="eu.etaxonomy.taxeditor.store.cdmViewer">
 -       <cdmViewer
 -             class="eu.etaxonomy.taxeditor.editor.EditorCdmViewer">
 -       </cdmViewer>
 +      <viewCommandMapping
 +            commandId="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxonNode"
 +            selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
 +            viewerName="Taxon Editor">
 +      </viewCommandMapping>
 +      <viewCommandMapping
 +            commandId="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxon"
 +            selection="eu.etaxonomy.cdm.model.taxon.TaxonBase"
 +            viewerName="TaxonEditor">
 +      </viewCommandMapping>
      </extension>
  </plugin>
index bc26d72abac1b5b2c325ea397283678bc8d9f2a6,2478bf5a125b6429af38ecd63c1312672728065f..1418de783873e8b328ecf9fb06852c57daf1899f
@@@ -56,8 -56,15 +56,20 @@@ public class NewTaxonNodeWizard extend
              Reference sec = taxon.getSec();
              taxon.setSec(null);
              try{
++<<<<<<< HEAD
 +              UpdateResult result = CdmStore.getService(ITaxonNodeService.class).createNewTaxonNode(parent.getUuid(), taxon, parent.getReference(), parent.getMicroReference());
 +                      
++=======
+               UUID parentNodeUuid;
+               if(parent instanceof Classification){
+                   parentNodeUuid = ((Classification) parent).getRootNode().getUuid();
+               }
+               else{
+                   parentNodeUuid = parent.getUuid();
+               }
+                 UpdateResult result = CdmStore.getService(ITaxonNodeService.class).createNewTaxonNode(parentNodeUuid, taxon, parent.getReference(), parent.getMicroReference());
++>>>>>>> hotfix/3.12.4
                  //TaxonNode taxonNode = parent.addChildTaxon(taxon, parent.getReference(), parent.getMicroReference());
  
                /*  if(CdmStore.getCurrentSessionManager().isRemoting()) {
                generatedTaxonNodeUuid = result.getCdmEntity().getUuid();
                TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(generatedTaxonNodeUuid);
                taxonNode.getTaxon().setSec(sec);
++<<<<<<< HEAD
 +              CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
++=======
+               CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
++>>>>>>> hotfix/3.12.4
                  Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
                  if (result.getUpdatedObjects().iterator().hasNext()){
                        TaxonNode parentNode = (TaxonNode)result.getUpdatedObjects().iterator().next();
                          affectedObjects.add(parentNode);
                      }
                  }
++<<<<<<< HEAD
 +                
  
 +                
++=======
++>>>>>>> hotfix/3.12.4
 +
                  if(CdmStore.getCurrentSessionManager().isRemoting()) {
                      CdmApplicationState.getCurrentDataChangeService()
                          .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);