fix #5766
authorKatja Luther <k.luther@bgbm.org>
Wed, 25 May 2016 09:57:44 +0000 (11:57 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 25 May 2016 10:04:13 +0000 (12:04 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java

index b086a1857fb276d9609687d457804ceb84db5188..171d2d81b069e481ce62d336d39dcaf3a9b68c91 100644 (file)
@@ -50,6 +50,8 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 
        private EntitySelectionElement<Reference> selection_secundum;
 
 
        private EntitySelectionElement<Reference> selection_secundum;
 
+       private TextWithLabelElement text_secundum_microreference;
+
        private TextWithLabelElement text_appendedPhrase;
 
        private CheckboxElement checkbox_excluded;
        private TextWithLabelElement text_appendedPhrase;
 
        private CheckboxElement checkbox_excluded;
@@ -92,30 +94,35 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
                if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
                        text_appendedPhrase = formFactory.createTextWithLabelElement(
                                        formElement, "Appended Phrase", entity.getAppendedPhrase(),
                if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
                        text_appendedPhrase = formFactory.createTextWithLabelElement(
                                        formElement, "Appended Phrase", entity.getAppendedPhrase(),
-                                       SWT.NULL);                      
+                                       SWT.NULL);
                }
 
                selection_secundum = formFactory.createSelectionElement(Reference.class,
                                getConversationHolder(), formElement, "Secundum",
                                entity.getSec(), EntitySelectionElement.ALL,
                                style);
                }
 
                selection_secundum = formFactory.createSelectionElement(Reference.class,
                                getConversationHolder(), formElement, "Secundum",
                                entity.getSec(), EntitySelectionElement.ALL,
                                style);
-               
+
+               text_secundum_microreference = formFactory.createTextWithLabelElement(
+                formElement, "Micro Reference", null,
+           //    entity.getSecundumMicroReference(),
+                SWT.NULL);
+
                // TODO RL
                if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)) {
                        checkbox_useNameCache = formFactory.createCheckbox(formElement,
                                        "Exclude Authorship", entity.isUseNameCache(), style);
                // TODO RL
                if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)) {
                        checkbox_useNameCache = formFactory.createCheckbox(formElement,
                                        "Exclude Authorship", entity.isUseNameCache(), style);
-       
+
                        if (entity instanceof Taxon) {
                                checkbox_excluded = formFactory.createCheckbox(formElement,
                                                "Taxon is excluded", ((Taxon) entity).isExcluded(), style);
                                checkbox_unplaced = formFactory.createCheckbox(formElement,
                                                "Taxon is unplaced", ((Taxon) entity).isUnplaced(), style);
                        }
                        if (entity instanceof Taxon) {
                                checkbox_excluded = formFactory.createCheckbox(formElement,
                                                "Taxon is excluded", ((Taxon) entity).isExcluded(), style);
                                checkbox_unplaced = formFactory.createCheckbox(formElement,
                                                "Taxon is unplaced", ((Taxon) entity).isUnplaced(), style);
                        }
-       
+
                        checkbox_doubtful = formFactory.createCheckbox(formElement,
                                        entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
                }
                        checkbox_doubtful = formFactory.createCheckbox(formElement,
                                        entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
                }
-               
+
                if (entity instanceof Taxon) {
                        checkbox_published = formFactory.createCheckbox(formElement,
                                        "Taxon is published", ((Taxon) entity).isPublish(), style);
                if (entity instanceof Taxon) {
                        checkbox_published = formFactory.createCheckbox(formElement,
                                        "Taxon is published", ((Taxon) entity).isPublish(), style);
@@ -172,7 +179,9 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
                        getEntity().setSec(selection_secundum.getSelection());
                } else if (eventSource == text_appendedPhrase) {
                        getEntity().setAppendedPhrase(text_appendedPhrase.getText());
                        getEntity().setSec(selection_secundum.getSelection());
                } else if (eventSource == text_appendedPhrase) {
                        getEntity().setAppendedPhrase(text_appendedPhrase.getText());
-               } else if (eventSource == checkbox_excluded) {
+               }else if (eventSource == text_secundum_microreference) {
+           // getEntity().setSecundumMicroReference(text_secundum_microreference.getText());
+        }else if (eventSource == checkbox_excluded) {
                        ((Taxon) getEntity()).setExcluded(checkbox_excluded.getSelection());
                } else if (eventSource == checkbox_unplaced) {
                    ((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
                        ((Taxon) getEntity()).setExcluded(checkbox_excluded.getSelection());
                } else if (eventSource == checkbox_unplaced) {
                    ((Taxon) getEntity()).setUnplaced(checkbox_unplaced.getSelection());
@@ -185,7 +194,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
         boolean pushedState = toggleable_cache.getState();
 
         getEntity().setTitleCache(toggleable_cache.getText(), pushedState);
         boolean pushedState = toggleable_cache.getState();
 
         getEntity().setTitleCache(toggleable_cache.getText(), pushedState);
-        setIrrelevant(pushedState, Arrays.asList(new Object[] { toggleable_cache, text_appendedPhrase, checkbox_published, checkbox_unplaced, checkbox_excluded}));
+        setIrrelevant(pushedState, Arrays.asList(new Object[] { toggleable_cache, text_secundum_microreference,text_appendedPhrase, checkbox_published, checkbox_unplaced, checkbox_excluded}));
         updateToggleableCacheField();
     }
 }
         updateToggleableCacheField();
     }
 }