Merge branch 'develop' into remoting-4.0
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 24 Aug 2015 09:34:25 +0000 (11:34 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 24 Aug 2015 09:34:25 +0000 (11:34 +0200)
Conflicts:
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java

13 files changed:
1  2 
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/KeyEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionToOtherTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
pom.xml

@@@ -107,8 -83,8 +107,9 @@@ public class KeyEditor extends FormEdit
  
        @Override
        public void setFocus() {
+               getConversationHolder().commit(true);
                getConversationHolder().bind();
 +              polytomousKeyEditorInput.bind();
                super.setFocus();
        }
        /*
@@@ -9,10 -9,15 +9,13 @@@ import org.eclipse.core.runtime.IAdapta
  import org.eclipse.core.runtime.IProgressMonitor;
  import org.eclipse.core.runtime.IStatus;
  import org.eclipse.jface.dialogs.MessageDialog;
 -import org.eclipse.ui.handlers.HandlerUtil;
  
  import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+ import eu.etaxonomy.cdm.api.service.DeleteResult;
  import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
 -import eu.etaxonomy.cdm.api.service.ITaxonService;
  import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+ import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+ import eu.etaxonomy.taxeditor.model.MessagingUtils;
  import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
  import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  import eu.etaxonomy.taxeditor.store.CdmStore;
@@@ -43,22 -48,34 +46,34 @@@ public class DeleteNodeOperation extend
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
 -              
 +
                //parent.removeChild(node);
                ICdmApplicationConfiguration controller;
 -              
 -              controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
 -              
 +
 +              controller = CdmStore.getCurrentApplicationConfiguration();
 +
                IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
-               
+               DeleteResult result;
                if (node.getChildren().size()>0){
                        if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) {
-                               service.delete(node.getUuid(), false);
+                               result = service.delete(node.getUuid(), false);
                        } else{
-                               service.delete(node.getUuid(), true);
+                               result = service.delete(node.getUuid(), true);
                        }
                } else{
-                       service.delete(node.getUuid(), true);
+                       result = service.delete(node.getUuid(), true);
+               }
+               
+               if (!result.isOk() || result.getExceptions().size() > 0){
+                       Exception t = new Exception();
+                       if (result.getExceptions().size() >1){
+                               for (Exception e:result.getExceptions()){
+                                       t.addSuppressed(e);
+                               }
+                       }else {
+                               t = result.getExceptions().iterator().next();
+                       }
+                       MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
                }
                return postExecute(null);
        }
@@@ -1514,13 -1523,4 +1514,14 @@@ public class TransientTaxonService impl
              String arg4) {
          return defaultService.changeSynonymToRelatedTaxon(arg0, arg1, arg2, arg3, arg4);
      }
 +
 +    /* (non-Javadoc)
 +     * @see eu.etaxonomy.cdm.api.service.ITaxonService#changeRelatedTaxonToSynonym(java.util.UUID, java.util.UUID, eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType, eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType)
 +     */
 +    @Override
 +    public UpdateResult changeRelatedTaxonToSynonym(UUID arg0, UUID arg1, TaxonRelationshipType arg2,
 +            SynonymRelationshipType arg3) throws DataChangeNoRollbackException {
 +        return defaultService.changeRelatedTaxonToSynonym(arg0, arg1, arg2, arg3);
 +    }
++
  }
@@@ -28,9 -29,9 +29,10 @@@ import eu.etaxonomy.taxeditor.editor.Pa
  import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
  import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionToOtherTaxonOperation;
  import eu.etaxonomy.taxeditor.model.AbstractUtility;
+ import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
  import eu.etaxonomy.taxeditor.model.MessagingUtils;
  import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 +import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
  import eu.etaxonomy.taxeditor.store.CdmStore;
  import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
  
@@@ -111,10 -111,11 +111,10 @@@ public class FeatureDistributionDetailE
  
                String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
--                false, 
--                false, 
 -               
++                false,
++                false,
                  null,
--                presenceAbsenceTermColors, 
++                presenceAbsenceTermColors,
                  languages);
  
                String mapUriString = String.format("%s?%s&ms=1000&bbox=-180,-90,180,90&l=earth", accessPoint, parameter);
diff --cc pom.xml
Simple merge