fix #5261 and minor
authorKatja Luther <k.luther@bgbm.org>
Wed, 14 Oct 2015 08:18:06 +0000 (10:18 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 14 Oct 2015 08:18:06 +0000 (10:18 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DeleteResultMessagingUtils.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java

index 7733dfd52805ae37089d6d70b08be14788b5d37a..ce6ff028a2b353521620864c3af847638ff839c6 100644 (file)
@@ -240,6 +240,7 @@ public class TaxonNameEditor extends EditorPart implements
                ContainerFactory.createOrUpdateHeterotypicSynonymyGroups(this);
                ContainerFactory.createOrUpdateMisapplicationsGroup(this);
 
+
                // Redraw composite
                managedForm.reflow(true);
        }
index d06bfba63c176450d12982e12bf6f15a814df443..6d9d0f091393e80123d7535b5952b0759b2895e8 100644 (file)
@@ -91,13 +91,19 @@ public class ChangeAcceptedTaxonToSynonymOperation extends
                    if (!result.getExceptions().isEmpty() && result.isOk()){
                        String separator = ", ";
                            String exceptionString = "";
+                           int count = result.getExceptions().size();
+                           int n = 0;
                            for (Exception exception : result.getExceptions()) {
-                           exceptionString += exception.getLocalizedMessage()+separator;
+                               n++;
+                           exceptionString += exception.getLocalizedMessage();
+                           if (n<count){
+                               exceptionString += separator;
+                           }
                        }
 
-                       MessagingUtils.informationDialog("Synonym created but taxon is not deleted.", exceptionString);
+                       MessagingUtils.informationDialog("Synonym created but taxon deletion not possible.", exceptionString);
                    } else if (result.isAbort() || result.isError()){
-                       MessagingUtils.errorDialog("Synonym could not created", null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
+                       MessagingUtils.errorDialog("Synonym creation not possible", null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
                    }
                } catch (IllegalArgumentException e) {
             MessagingUtils.errorDialog("Operation failed", this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
index 2192e262ecac282e647248d6f7c32133dd60eec8..55854c6bf00fafdd3f4592ed4b73239e3c3e81db 100644 (file)
@@ -57,7 +57,8 @@ public class DeleteResultMessagingUtils extends MessagingUtils {
             while (objects.hasNext()){
                 CdmBase object = objects.next();
                 if (object instanceof IdentifiableEntity){
-                    relatedObjects.add("[" + object.getClass().getSimpleName() + "] " +((IdentifiableEntity)object).getTitleCache() );
+
+                    relatedObjects.add(((IdentifiableEntity)object).getTitleCache() );
                 } else{
                     relatedObjects.add(object.getUserFriendlyTypeName());
                 }
index bbc3a44ab87fb3db18312d94daf1d2313901df55..9661e045877c5354ac46bcd0b59840678b1dbfa0 100644 (file)
@@ -58,7 +58,7 @@ public class NonViralNameDetailElement extends
                toggleable_cache.setVisible(false);
                combo_nomenclaturalCode.setVisible(false);
            }
-
+           textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
            section_name = formFactory.createNameDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
            section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
            addControl(section_name);
@@ -76,7 +76,7 @@ public class NonViralNameDetailElement extends
                addElement(section_hybrid);
            }
 
-           textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
+
     }
 
        /** {@inheritDoc} */