fix #5646
authorKatja Luther <k.luther@bgbm.org>
Mon, 21 Mar 2016 12:52:37 +0000 (13:52 +0100)
committerKatja Luther <k.luther@bgbm.org>
Mon, 21 Mar 2016 12:52:37 +0000 (13:52 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java

index ae2a122fdbd738146306917a4517ee62aeac7cab..29cbc0a89badace6e2d06ca906ae5c9d50ed064a 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * 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.
 */
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.preference.Resources;
  * @version 1.0
  */
 public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
-       
+
        /**
         * <p>Constructor for MisapplicationContainer.</p>
         *
@@ -34,7 +34,7 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        public MisapplicationContainer(AbstractGroup group, Taxon misappliedName) {
                super(misappliedName);
        }
-       
+
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.name.NameComposite#initializeComposite()
@@ -44,9 +44,9 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        protected void initializeComposite() {
                setIsDraggable(true);
                setFont(getViewerFont());
-               
-               showSec();              
-               
+
+               showSec();
+
                initTextViewer();
        }
 
@@ -54,20 +54,21 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        protected void updateIcon() {
                setIcon(MISAPPLIEDNAME_ICON);
        }
-       
+
        private void showSec() {
                if (getMisappliedName() == null) {
                        return;
                }
-               
+
                if (getMisappliedName().getSec() == null) {
                        setNonEditableInfo("sec. ???", false);
                } else {
                        String title = getMisappliedName().getSec().getTitleCache();
+                       title = title.replace("&", "&&");
                        setNonEditableInfo("sec. " + title, false);
                }
        }
-       
+
        /**
         * <p>getMisappliedName</p>
         *
@@ -82,7 +83,7 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        protected Font getViewerFont() {
                return EditorUtil.getFont(Resources.MISAPPLIEDNAME_FONT);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer#showAnnotations()
         */
@@ -94,7 +95,7 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
                }
                super.showAnnotations();
        }
-       
+
 
        /** {@inheritDoc} */
        @Override