merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 4 Nov 2014 09:41:17 +0000 (09:41 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 4 Nov 2014 09:41:17 +0000 (09:41 +0000)
18 files changed:
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationUtil.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
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/DerivateDropListener.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultView.java
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MinMaxTextSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.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/DerivateSearchView.java
eu.etaxonomy.taxeditor/pom.xml
eu.etaxonomy.taxeditor/rcp.target
pom.xml

index 105be8f47d934e6c023f96f3ed106ca83e6a5912..9d80b139ca1f9133fc06dbe7791a89a0af6bc847 100644 (file)
@@ -45,7 +45,7 @@ public class ApplicationUtil extends AbstractUtility {
             // this is a stable version
             return version;
         } else {
-            return BETA_PREFIX + version;
+            return BETA_PREFIX + " " + version;
         }
 
     }
index 73c2c8022f83bfbfbd5d787b32e93904dcb666d5..bbf96039323bb7d7fa31456058cd8b135a7a3ecd 100644 (file)
@@ -87,6 +87,7 @@ public class DeleteHandler extends AbstractHandler {
                                        
                                        LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);
                                        DeleteResult result = new DeleteResult();       
+                                       result.setError();
                                        try {
                                                ICdmApplicationConfiguration controller;
                                                controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
@@ -94,21 +95,27 @@ public class DeleteHandler extends AbstractHandler {
                                                if (object instanceof SpecimenOrObservationBase){
                                                        
                                                        IOccurrenceService service = controller.getOccurrenceService();
+                                                       service.load(((SpecimenOrObservationBase) object).getUuid());
                                                        result = service.delete((SpecimenOrObservationBase)object);
                                                } else if (object instanceof Reference){
                                                        IReferenceService service = controller.getReferenceService();
+                                                       service.load(((Reference) object).getUuid());
                                                        result = service.delete((Reference)object);
                                                } else if (object instanceof Group){
                                                        IGroupService service = controller.getGroupService();
+                                                       service.load(((Group) object).getUuid());
                                                        result = service.delete((Group) object);
                                                }else if (object instanceof User){
                                                        IUserService service = controller.getUserService();
+                                                       service.load(((User) object).getUuid());
                                                        result = service.delete((User) object);
                                                } else if (object instanceof TaxonNameBase){
                                                        INameService service = controller.getNameService();
+                                                       service.load(((TaxonNameBase) object).getUuid());
                                                        result = service.delete((TaxonNameBase)object);
                                                } else if (object instanceof TaxonBase){
                                                        ITaxonService service = controller.getTaxonService();
+                                                       service.load(((TaxonBase) object).getUuid());
                                                        if (object instanceof Taxon){
                                                                result = service.deleteTaxon((Taxon)object, null, null);
                                                        }else{
@@ -116,16 +123,18 @@ public class DeleteHandler extends AbstractHandler {
                                                        }
                                                } else if (object instanceof TeamOrPersonBase){
                                                        IAgentService service = controller.getAgentService();
+                                                       object = service.load(((TeamOrPersonBase) object).getUuid());
                                                        result = service.delete((TeamOrPersonBase)object);
                                                }
                                        } catch (Exception e){
-                                               MessagingUtils.messageDialog("Could not delete", getClass(), e.getMessage(), null);
+                                               MessagingUtils.messageDialog("Exception occured. Could not delete", getClass(), e.getMessage(), null);
                                        }
                                        if (result.isError()){
                                                MessagingUtils.messageDialog("Could not delete", getClass(), result.getExceptions().get(0).getMessage(), null);
                                        }
-                                       ((BulkEditor) editor).removeAnnotatedLine(annotation);
-                                       
+                                       if (result.isOk()){
+                                               ((BulkEditor) editor).removeAnnotatedLine(annotation);
+                                       }
                                }                               
                        }
                }else{
index 739f5c0c43daed330952a1a7e4e386f929085e72..9bbc0cb9b273fb8fd4157e2bd089a1ddfd15d221 100644 (file)
@@ -1,21 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <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"/>
-       <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"/>
-       <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"/>
-       <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"/>
-       <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"/>
-       <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"/>
-       <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"/>
-       <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"/>
        <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 exported="true" kind="lib" path="lib/spring-security-remoting-3.1.3.RELEASE.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/jena-core-2.11.2.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.0.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.4.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.4.0-SNAPSHOT.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"/>
+       <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"/>
+       <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"/>
+       <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"/>
+       <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"/>
+       <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"/>
+       <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"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index e5cf609ec1f1b0107d1390e490281e41dfe9a094..bf2c7ae39f6725469fe2a9c1496ad9f5510ca9fd 100644 (file)
@@ -83,6 +83,7 @@ import eu.etaxonomy.cdm.persistence.query.OrderHint;
 import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
 import eu.etaxonomy.cdm.strategy.match.IMatchStrategy;
 import eu.etaxonomy.cdm.strategy.merge.IMergeStrategy;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
 
 /**
  * @author pplitzner
@@ -1314,7 +1315,7 @@ public class TransientTaxonService implements ITaxonService {
      * @see eu.etaxonomy.cdm.api.service.ITaxonService#findTaxaAndNamesForEditor(eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator)
      */
     @Override
-    public List<UuidAndTitleCache<TaxonBase>> findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator configurator) {
+    public List<UuidAndTitleCache<IdentifiableEntity>> findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator configurator) {
         return defaultTaxonService.findTaxaAndNamesForEditor(configurator);
     }
 
index 6f6967c038f948167626c97871efeac87f0ddfe3..d9a10fe892d5c6bd67b694dbbe61e315cde7a395 100644 (file)
@@ -131,7 +131,7 @@ public class DerivateDropListener extends ViewerDropAdapter {
         // drag'n'drop for Sequence
         else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
             Sequence sequence = (Sequence)draggedNodeValue;
-            if(fromParentSpecimen instanceof DnaSample){
+            if(fromParentSpecimen instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
                 return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence);
             }
         }
index 1542fb204a105f217549ea9b62585074240c008a..7f8cc9be4ccb609c35e9b123337b0dd8488a510f 100644 (file)
@@ -61,7 +61,7 @@ public class DeleteDerivateHandler extends AbstractHandler {
                     TreeNode treeNode = (TreeNode)object;
                     Object value = ((TreeNode) object).getValue();
                     if(value instanceof SpecimenOrObservationBase<?> || value instanceof Sequence || value instanceof SingleRead){
-                        DeleteDerivateOperation deleteDerivateOperation = new DeleteDerivateOperation(label, undoContext, (CdmBase) object, postOperationEnabled);
+                        DeleteDerivateOperation deleteDerivateOperation = new DeleteDerivateOperation(label, undoContext, (CdmBase) value, postOperationEnabled);
                         AbstractUtility.executeOperation(deleteDerivateOperation);
                     }
                 }
index 905e4b847568bf7edc58557f9681f3cfd6f07284..8a1ca9d9a74d824624a923cac844ab97719d6e36 100644 (file)
@@ -38,6 +38,7 @@ import org.eclipse.ui.part.ViewPart;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;
+import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
@@ -209,7 +210,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
         *
         * @param result a {@link java.util.List} object.
         */
-       protected void displaySearchResult(List<UuidAndTitleCache<TaxonBase>> result) {
+       protected void displaySearchResult(List<UuidAndTitleCache<IdentifiableEntity>> result) {
                if(result.size() > 0){
                        resultViewer.setInput(result);
                        status.setText(result.size() + " entities found");
@@ -297,7 +298,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                        monitor.beginTask("", 100);
                        monitor.worked(20);
 
-                       final List<UuidAndTitleCache<TaxonBase>> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
+                       final List<UuidAndTitleCache<IdentifiableEntity>> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
                        monitor.worked(40);
 
                        if(! monitor.isCanceled()){
index 1b00e9df37b028566922eaecfdf9cd80d6d9ca7d..9b30b76b8d26907629b46460ec24e243daa10ba1 100644 (file)
@@ -58,7 +58,7 @@ 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,
  org.eclipse.core.databinding,
  org.eclipse.core.databinding.beans,
  org.eclipse.core.databinding.observable,
index acf22fdb817f525016477f62757f37e0720a723f..c8a7fc5b2fd1cfe72070784482bc38c0b2756e31 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -44,11 +44,11 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermType;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
@@ -63,17 +63,17 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
 
        private Button toggleButton;
        protected HashMap<DefinedTermBase<T>, Button> menuButtons;
-       
+
        protected Button newButton;
        protected Button editButton;
        protected Button removeButton;
-               
+
        protected CheckboxTableViewer tableViewer;
-       
+
        private boolean state = true;
-       private boolean vocabularyIsEditable;
+       private final boolean vocabularyIsEditable;
        private ConversationHolder conversation;
-       
+
        /**
         * Constructs a new menu preference page.
         *
@@ -93,7 +93,7 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                vocabularyIsEditable = editable;
                setDescription(description);
        }
-       
+
        protected List<T> getTerms(){
                return TermStore.getTerms(getTermClass());
        }
@@ -105,38 +105,40 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
         */
        @Override
        public Control createContents(Composite parent) {
-               
+
                Composite container = new Composite(parent, SWT.NULL);
                final GridLayout gridLayout = new GridLayout();
                gridLayout.numColumns = 2;
                container.setLayout(gridLayout);
-       
+
                tableViewer = CheckboxTableViewer.newCheckList(container, SWT.NULL);
                GridData tableLayoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
                tableLayoutData.heightHint = 300;
                tableViewer.getTable().setLayoutData(tableLayoutData);
-               
+
                tableViewer.setContentProvider(new DefinedTermBaseContentProvider());
                tableViewer.setLabelProvider(new DefinedTermBaseLabelProvider());
 
                refresh(getTerms());
-               
+
                tableViewer.addCheckStateListener(new ICheckStateListener() {
-                       
+
                        @Override
                        public void checkStateChanged(CheckStateChangedEvent arg0) {
                                checkNoneChecked();
                        }
                });
-               
+
                Composite buttonContainer = new Composite(container, SWT.NULL);
                GridData buttonContainerLayoutData = new GridData();
                buttonContainerLayoutData.verticalAlignment = SWT.TOP;
                buttonContainer.setLayoutData(buttonContainerLayoutData);
                buttonContainer.setLayout(new GridLayout());
-               
-               if(vocabularyIsEditable) createEditButtons(buttonContainer);
-               
+
+               if(vocabularyIsEditable) {
+            createEditButtons(buttonContainer);
+        }
+
                toggleButton = new Button(buttonContainer, SWT.PUSH);
                toggleButton.setText("Toggle");
                toggleButton.addSelectionListener(new SelectionAdapter(){
@@ -150,9 +152,9 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                                checkNoneChecked();
                        }
                });
-               
+
                createAdditionalContent(container);
-               
+
                return container;
        }
 
@@ -175,7 +177,7 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
         * @param container a {@link org.eclipse.swt.widgets.Composite} object.
         */
        protected void createAdditionalContent(Composite container) {
-               // implement where needed               
+               // implement where needed
        }
 
        /* (non-Javadoc)
@@ -206,18 +208,18 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                         */
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               VocabularyTermWizard<T> wizard = new VocabularyTermWizard<T>(getTermClass(), getConversationHolder()); 
-                               
-                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+                               VocabularyTermWizard<T> wizard = new VocabularyTermWizard<T>(getTermClass(), getConversationHolder());
+
+                               WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(), wizard);
                            if(dialog.open() == IStatus.OK){
                                tableViewer.setInput(getTerms());
                            }
                        }
 
-                       
+
                });
        }
-       
+
        /**
         * Implement this method in MenuPreference Pages where the vocabulary should be editable, editable flag
         * is set.
@@ -229,23 +231,23 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                         */
                        @Override
                        public void widgetSelected(SelectionEvent event) {
-                               
-                               ICommandService commandService = (ICommandService)  StoreUtil.getService(ICommandService.class);
+
+                               ICommandService commandService = (ICommandService)  AbstractUtility.getService(ICommandService.class);
 
                                Command command = commandService.getCommand(DefinedTermEditor.OPEN_COMMAND_ID);
-                               
+
                                IParameter parameter;
                                try {
                                        parameter = command.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.termTypeUuid");
-                               
+
                                        Parameterization[] parameterizations = new Parameterization[]{
                                                        new Parameterization(parameter, TermType.valueOf(getTermClass().getSimpleName()).getUuid().toString())
                                        };
-                                       
+
                                        ParameterizedCommand pCommand = new ParameterizedCommand(command, parameterizations);
-                                       
+
                                        if (command.isEnabled()) {
-                                               IHandlerService handlerService = (IHandlerService) StoreUtil.getService(IHandlerService.class);
+                                               IHandlerService handlerService = (IHandlerService) AbstractUtility.getService(IHandlerService.class);
                                                try {
                                                        handlerService.executeCommand(pCommand, null);
                                                } catch (NotDefinedException e) {
@@ -264,13 +266,14 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                                                        "An exception occured while trying to open the Term Editor",
                                                        e);
                                }
-                               
+
                        }
                });
        }
 
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench) {
+       @Override
+    public void init(IWorkbench workbench) {
                setPreferenceStore(PreferencesUtil.getPreferenceStore());
                getConversationHolder().bind();
        }
@@ -282,7 +285,8 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
        /**
         * <p>performDefaults</p>
         */
-       protected void performDefaults() {
+       @Override
+    protected void performDefaults() {
                tableViewer.setAllChecked(true);
        }
 
@@ -304,23 +308,23 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                if(checkNoneChecked()){
                        return false;
                }
-               
+
                getConversationHolder().commit(true);
-               
+
                List<T> preferredTerms = new ArrayList<T>();
                for (Object element : getTableViewer().getCheckedElements()){
                        preferredTerms.add((T) element);
                }
-               
+
                CdmStore.getTermManager().setPreferredTerms(preferredTerms, getTerms());
-               
+
                PreferencesUtil.firePreferencesChanged(this.getClass());
-               
+
                return true;
        }
-       
+
        private boolean checkNoneChecked(){
-               
+
                if(tableViewer.getCheckedElements().length == 0){
                        setMessage("Please check at least one item", WARNING);
                        return true;
@@ -329,14 +333,14 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                        return false;
                }
        }
-       
+
        /**
         * <p>getTermClass</p>
         *
         * @return a {@link java.lang.Class} object.
         */
        protected abstract Class<T> getTermClass();
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
         */
@@ -347,7 +351,7 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                }
                return conversation;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
         */
index 91316ef4295e71f11807aabf8da11734c480e39e..5aab63bc8e094599ba57b38e9a5f651e7c4686e7 100644 (file)
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
@@ -97,7 +98,7 @@ public class SearchManager {
         * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator} object.
         * @return a {@link java.util.List} object.
         */
-       public List<UuidAndTitleCache<TaxonBase>> findTaxaAndNames(IFindTaxaAndNamesConfigurator<TaxonBase> configurator){
+       public List<UuidAndTitleCache<IdentifiableEntity>> findTaxaAndNames(IFindTaxaAndNamesConfigurator<TaxonBase> configurator){
                return CdmStore.getService(ITaxonService.class).findTaxaAndNamesForEditor(configurator);
        }
 
index bd16aa177bad08711ced3edfd7773859ac7d8276..a3b2e3e6b4979f1b8e72ce1041b2ae719ec418e5 100644 (file)
@@ -62,12 +62,12 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
                switch(unitType) {
                        case ELEVATION:
                                text_minVal = formFactory.createNumberTextWithLabelElement(this, "Min [m] : ", getMinimum(), style);
-                               text_maxVal = formFactory.createNumberTextWithLabelElement(this, "Max [m] : ", getMaximum(), style);    
+                               text_maxVal = formFactory.createNumberTextWithLabelElement(this, "Max [m] : ", getMaximum(), style);
                                break;
                        default:
                                text_minVal = formFactory.createNumberTextWithLabelElement(this, "Min [m] : ", getMinimum(), style);
-                               text_maxVal = formFactory.createNumberTextWithLabelElement(this, "Max [m] : ", getMaximum(), style);                                                            
-                               break;                  
+                               text_maxVal = formFactory.createNumberTextWithLabelElement(this, "Max [m] : ", getMaximum(), style);
+                               break;
                }
                text_freeText = formFactory.createTextWithLabelElement(this,
                                "Freetext : ", getFreetext(), style);
@@ -87,6 +87,7 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
        public void setEntity(DerivedUnitFacade gatheringEvent) {
                super.setEntity(gatheringEvent);
                updateValues();
+               updateTitle();
        }
 
        private void updateValues() {
@@ -166,10 +167,26 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
                } else if (eventSource == text_freeText) {
                        updateFreetext();
                }
+        updateTitle();
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
        }
 
-
+    private void updateTitle(){
+        String title = "";
+        if(text_minVal.getText()!=null){
+            title += text_minVal.getText();
+        }
+        if(text_maxVal.getText()!=null && !text_maxVal.getText().equals("")){
+            if(!title.equals("")){
+                title += " - "+text_maxVal.getText();
+            }
+        }
+        if(title.equals("") && text_freeText.getText()!=null){
+            title = text_freeText.getText();
+        }
+        this.setText(title);
+        layout();
+    }
 
        /*
         * (non-Javadoc)
@@ -186,7 +203,7 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
        private void updateMinimum() {
                switch(unitType) {
                case ELEVATION:
-                       getEntity().setAbsoluteElevation(text_minVal.getDouble().intValue());
+                       getEntity().setAbsoluteElevation(text_minVal.getDouble()!=null?text_minVal.getDouble().intValue():null);
                        break;
                case DIST_TO_GROUND:
                        getEntity().setDistanceToGround(text_minVal.getDouble());
@@ -215,7 +232,7 @@ public class MinMaxTextSection extends AbstractFormSection<DerivedUnitFacade> {
        private void updateMaximum() {
                switch(unitType) {
                case ELEVATION:
-                       getEntity().setAbsoluteElevationMax(text_maxVal.getDouble().intValue());
+                       getEntity().setAbsoluteElevationMax(text_maxVal.getDouble()!=null?text_maxVal.getDouble().intValue():null);
                        break;
                case DIST_TO_GROUND:
                        getEntity().setDistanceToGroundMax(text_maxVal.getDouble());
index 83e229bd4272bfeab55ed24bfa02f51964cc156c..57fade3d9416c81b3dc0ac9d1918352cee360288 100644 (file)
@@ -114,6 +114,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
                String value = text.getText();
                if(StringUtils.isBlank(value)){
                        text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+                       super.modifyText(event);
                        return;
                }
 
index 0ab1de2142a43c7884e9058a9116b6b3a3fc10dd..8bddaab5e42f44228c3f58cf3863e34bc5a43abd 100644 (file)
@@ -76,7 +76,8 @@ public class PasswordWizard extends Wizard implements IConversationEnabled{
                    internalConversation.close();
                        return true;
                }catch(Exception e){
-                       MessagingUtils.messageDialog("Error while changing password", getClass(), "There was a problem changing the password.", e);
+                       MessagingUtils.warningDialog("Could not change password", this, "The old password is not correct.");
+                       
                        return false;
                }finally{
                    if(conversation != null){
index fa019eabde18ce590b3a8bdeb42dd340e0ee4638..10fb8e3c5259781dc118b01a65c00ec48964dd17 100644 (file)
@@ -9,12 +9,16 @@
 */
 package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
 
+import java.net.URI;
+import java.net.URISyntaxException;
+
 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;
 import eu.etaxonomy.cdm.model.molecular.SequenceString;
+import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -64,15 +68,28 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
 //        ((Text) textConsensusSequenceLength.getMainControl()).setEditable(false);
         textBarcodeSequence = formFactory.createTextWithLabelElement(formElement, "Barcode Sequence 5'->3'", entity.getBarcodeSequencePart()==null?"":entity.getBarcodeSequencePart().getString(), style);
 
+        URI genBankUri = null;
+        URI emblUri = null;
+        URI ddbjUri = null;
+        URI boldUri = null;
+        try{
+            genBankUri = entity.getGenBankUri();
+            emblUri = entity.getEmblUri();
+            ddbjUri = entity.getDdbjUri();
+            boldUri = entity.getBoldUri();
+        }
+        catch(URISyntaxException e){
+
+        }
         textGeneticAccessNo = formFactory.createTextWithLabelElement(formElement, "Genetic Acc. No.", entity.getGeneticAccessionNumber(), style);
-        textNCBIUri = formFactory.createUriWithLabelElement(formElement, "NCBI URI", entity.getGenBankUri(), style);
+        textNCBIUri = formFactory.createUriWithLabelElement(formElement, "NCBI URI", genBankUri, style);
         ((Text) textNCBIUri.getMainControl()).setEditable(false);
-        textENAUri = formFactory.createUriWithLabelElement(formElement, "ENA URI", entity.getEmblUri(), style);
+        textENAUri = formFactory.createUriWithLabelElement(formElement, "ENA URI", emblUri, style);
         ((Text) textENAUri.getMainControl()).setEditable(false);
-        textDDBJUri = formFactory.createUriWithLabelElement(formElement, "DDBJ URI", entity.getDdbjUri(), style);
+        textDDBJUri = formFactory.createUriWithLabelElement(formElement, "DDBJ URI", ddbjUri, 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 = formFactory.createUriWithLabelElement(formElement, "BOLD URI", boldUri, style);
         ((Text) textBoldUri.getMainControl()).setEditable(false);
         ((Text) textBoldUri.getMainControl()).setToolTipText("Query BOLD");
     }
@@ -107,11 +124,16 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
             getEntity().setBarcodeSequencePart(barcodeSequencePart);
         }
         else if(eventSource==textGeneticAccessNo){
+            textGeneticAccessNo.setBackground(getPersistentBackground());
             getEntity().setGeneticAccessionNumber(textGeneticAccessNo.getText());
             if(textGeneticAccessNo.getText()!=null && !textGeneticAccessNo.getText().isEmpty()){
-                textNCBIUri.setUri(getEntity().getGenBankUri());
-                textENAUri.setUri(getEntity().getEmblUri());
-                textDDBJUri.setUri(getEntity().getDdbjUri());
+                try {
+                    textNCBIUri.setUri(getEntity().getGenBankUri());
+                    textENAUri.setUri(getEntity().getEmblUri());
+                    textDDBJUri.setUri(getEntity().getDdbjUri());
+                } catch (URISyntaxException e) {
+                    textGeneticAccessNo.setBackground(getColor(Resources.COLOR_PARSE_ERROR));
+                }
             }
             else{
                 textNCBIUri.setText("");
@@ -120,9 +142,14 @@ public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Seque
             }
         }
         else if(eventSource==textBoldProcessID){
+            textBoldProcessID.setBackground(getPersistentBackground());
             getEntity().setBoldProcessId(textBoldProcessID.getText());
             if(textBoldProcessID.getText()!=null && !textBoldProcessID.getText().isEmpty()){
-                textBoldUri.setUri(getEntity().getBoldUri());
+                try {
+                    textBoldUri.setUri(getEntity().getBoldUri());
+                } catch (URISyntaxException e) {
+                    textBoldProcessID.setBackground(getColor(Resources.COLOR_PARSE_ERROR));
+                }
             }
             else{
                 textBoldUri.setText("");
index 7189a81df0b558398b385b18551152241be5cf45..399eb80d3cff51048799f51e31a76403a763d456 100644 (file)
@@ -53,7 +53,7 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
     public void setFocus() {
         derivateSearchCompositeController.setFocus();
         //make sure to bind again if maybe in another view the conversation was unbound
-        if(getConversationHolder()!=null && !getConversationHolder().isBound()){
+        if(!getConversationHolder().isClosed() && getConversationHolder()!=null && !getConversationHolder().isBound()){
             getConversationHolder().bind();
         }
     }
index 9ab80b1d52a950ed76981c18b6adc45cee49944f..d767dac9d594704c6ad67304616fad55dc311a17 100644 (file)
             <configuration>
               <fromDir>${project.build.directory}/repository</fromDir>
               <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/update/${update.dir}</url>
-              <includes>binary/*,content.jar,artifacts.jar,**/eu.etaxonomy.*.jar</includes>
+              <includes>
+                binary/*,content.jar,artifacts.jar,**/eu.etaxonomy.*.jar
+              </includes>
               <!-- Comment out the above and uncomment the below to upload 
                 all jars -->
               <!-- <includes>**/*</includes> -->
index 89e83ad7837c1895a1fd7bb6f452afc17101a4a6..c929cd0de4fb7d2936c32700d5795d171d85e50f 100644 (file)
@@ -23,8 +23,8 @@
 <repository location="http://download.eclipse.org/releases/indigo"/>
 </location>
 <location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.nebula.widgets.compositetable.feature.feature.group" version="1.0.0.201304110956"/>
-<repository location="http://download.eclipse.org/technology/nebula/snapshot"/>
+<unit id="org.eclipse.nebula.widgets.compositetable.feature" version="1.0.0.201409040043"/>
+<repository location="http://download.eclipse.org/technology/nebula/archives/Q32014/release/"/>
 </location>
 </locations>
 </target>
diff --git a/pom.xml b/pom.xml
index 3b7ab00e59512949606756d7c9dd688075c681d1..fa6f9ffa10d1a5030592ca982d5c351ac93a1098 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <layout>p2</layout>
       <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/</url>
     </repository>
+    <!-- The nebula repository (retention period 2 years starting Q32014) set here is an archived one  
+         so as to have a stable version of the jar when building the editor . Refer to #4452 for details -->
     <repository>
       <id>eclipse-nebula</id>
       <layout>p2</layout>
-      <url>http://download.eclipse.org/technology/nebula/snapshot/</url>
+      <url>http://download.eclipse.org/technology/nebula/archives/Q32014/release/</url>
     </repository>
     <repository>
       <id>eclipse-swtbot</id>