ref #8136: move sources to supplemental data
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / supplemental / IdentifiableSourceElement.java
index a5f50e18a83869b54a2c8273976ff7babfde94c8..a56c6b575b627366cee482ecbf0768d629a6fe71 100644 (file)
@@ -3,12 +3,16 @@
  */
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * @author n.hoffmann
@@ -26,6 +30,8 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
                super.createControls(formElement, style);
+               externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+        externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
        }
 
        /** {@inheritDoc} */
@@ -52,6 +58,8 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
                }
                if(eventSource == selection_reference){
                        getEntity().setCitation(selection_reference.getSelection());
+                       AbstractUtility.getDetailsView(this.formFactory.getContext().get(EPartService.class)).
+                       refreshSelection();
                }
                else if(eventSource == text_referenceDetail){
                        getEntity().setCitationMicroReference(text_referenceDetail.getText());