merge-update from trunk
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 14 Jan 2014 16:15:13 +0000 (16:15 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 14 Jan 2014 16:15:13 +0000 (16:15 +0000)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
eu.etaxonomy.taxeditor.help/original_document/Taxonomic_Editor_User_Manual_Version_4.doc
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java

index 4aa081d5c94a35a9dae38bad8ba35ba95d9dabec..ebebe817afdb9cef1fb6e6ec70e316b44004877b 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.
 */
@@ -29,6 +29,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
 
 /**
@@ -36,12 +37,12 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
  * @created Jan 24, 2011
  * @version 1.0
  */
-public class ConceptViewPart extends AbstractCdmEditorViewPart {
+public class ConceptViewPart extends AbstractCdmEditorViewPart implements IPartContentHasDetails{
 
        public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept";
-       
+
        private ListViewer viewer;
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
         */
@@ -51,17 +52,17 @@ public class ConceptViewPart extends AbstractCdmEditorViewPart {
                        showEmptyPage();
                        return;
                }
-               
+
                if(part instanceof BulkEditor){
                        showEmptyPage();
                        return;
                }
-               
+
                if(part instanceof AbstractGraphKeyEditor){
                        showEmptyPage();
                        return;
                }
-               
+
                if(part instanceof MultiPageTaxonEditor){
                        if(! part.equals(this.part)){
                                IEditorInput input = ((IEditorPart) part).getEditorInput();
@@ -94,39 +95,39 @@ public class ConceptViewPart extends AbstractCdmEditorViewPart {
        @Override
        public void createViewer(Composite parent) {
                viewer = new ListViewer(parent);
-               
+
                viewer.setContentProvider(new ConceptContentProvider());
                viewer.setLabelProvider(new ConceptLabelProvider());
-               
-               
+
+
                viewer.setSorter(new ConceptViewerSorter());
-               
+
                getSite().setSelectionProvider(viewer);
-               
+
                createMenu();
-               
+
                createToolbar();
        }
-       
+
        private void createMenu(){
                MenuManager menuManager = new MenuManager();
                menuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-               
+
                getSite().registerContextMenu(menuManager, viewer);
-               
+
                Control control = viewer.getControl();
                Menu menu = menuManager.createContextMenu(control);
-               
-               control.setMenu(menu);  
+
+               control.setMenu(menu);
        }
-       
+
        private void createToolbar() {
                IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
 //             toolBarManager.add();
 //             toolBarManager.add();
        }
 
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.editor.view.AbstractCdmEditorViewPart#changed(java.lang.Object)
         */
index 310daf830ebbccddc7faebfdab874a8e24d4e31c..666434a4ecce04a6f691d5aaaa66a2233112531f 100644 (file)
Binary files a/eu.etaxonomy.taxeditor.help/original_document/Taxonomic_Editor_User_Manual_Version_4.doc and b/eu.etaxonomy.taxeditor.help/original_document/Taxonomic_Editor_User_Manual_Version_4.doc differ
index 5f6122b99416e7b4f7203283ec2444b64435df22..fec238815d0f770d2353a1c274d0a9bdeb0be151 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.
 */
@@ -32,7 +32,7 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
        private NormalExplicitImportConfigurator configurator;
 
        private ImportFromFileDataSourceWizardPage dataSourcePage;
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.io.wizard.AbstractImportWizard#getConfigurator()
         */
@@ -51,9 +51,9 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
                URI source = dataSourcePage.getUri();
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-               
+
                CdmStore.getImportManager().run(configurator);
-               
+
                return true;
        }
 
@@ -61,7 +61,8 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
         * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
         */
        /** {@inheritDoc} */
-       public void init(IWorkbench workbench, IStructuredSelection selection) {
+       @Override
+    public void init(IWorkbench workbench, IStructuredSelection selection) {
                super.init(workbench, selection);
                configurator =  CdmStore.getImportManager().NormalExplicitConfigurator();
        }
@@ -73,9 +74,9 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
        @Override
        public void addPages() {
                super.addPages();
-               
-               dataSourcePage = new ImportFromFileDataSourceWizardPage("Choose NormalExplicit", 
-                               "Please choose an xls file in the NormalExplicit format.", new String[]{"*.xls"});
+
+               dataSourcePage = new ImportFromFileDataSourceWizardPage("Choose NormalExplicit",
+                               "Please choose an xls file in the NormalExplicit format.", new String[]{"*.xls" ,"*.xlsx", "*.*"});
                addPage(dataSourcePage);
        }
 }
index 627c140aa66ba82c4ee7a7e43bc10504268833b0..0d8f350763b87d9a357878f8893d44a74d810b11 100644 (file)
@@ -85,7 +85,7 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
         } else {
             if (SpecimenOrObservationType.Media.equals(specOrObsType)
                     || ((specOrObsType.getKindOf() != null) && specOrObsType.getKindOf().equals(SpecimenOrObservationType.Media))) {
-                return MediaSpecimen.NewInstance(SpecimenOrObservationType.Media);
+                   return MediaSpecimen.NewInstance(specOrObsType);
             } else if (specOrObsType.equals(SpecimenOrObservationType.FieldUnit)) {
                 return FieldUnit.NewInstance();
             } else {
index 33769922285dd5ec2618d78ceca1325efeb18478..3eec36ec209fcd64034b4a86045f643bcd51506f 100644 (file)
@@ -421,7 +421,9 @@ public class PreferencesUtil implements IPreferenceKeys {
         * @return a boolean.
         */
        public static boolean shouldConnectAtStartUp() {
-               return getPreferenceStore().getBoolean(SHOULD_CONNECT_AT_STARTUP);
+               //FIXME :  force SHOULD_CONNECT_AT_STARTUP to false (ticket 3828) until resolution
+               //return getPreferenceStore().getBoolean(SHOULD_CONNECT_AT_STARTUP);
+               return false;
        }
 
        /**
index ddb0bf7904c32fb4ce0ad3d46cfbbd1734585c9e..717fd4f0da85cd90a09308d152402ab4b9c22ce9 100644 (file)
@@ -19,6 +19,7 @@ import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
@@ -33,6 +34,8 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
        
        private EntitySelectionElement<Taxon> selection_relatedTaxon;
        
+       private CheckboxElement checkBoxDoubtful;
+
        public TaxonRelationshipDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
                super(formFactory, formElement);
@@ -50,6 +53,7 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
                                Taxon.class, getConversationHolder(), 
                                formElement, "Related Taxon", getRelatedTaxon(), 
                                EntitySelectionElement.SELECTABLE, style);
+               checkBoxDoubtful = formFactory.createCheckbox(formElement, "Relation is doubtful", entity.isDoubtful(), style);
        }
        
        private Taxon getRelatedTaxon() {
@@ -76,6 +80,9 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
                                getEntity().setToTaxon(relatedTaxon);
                        }
                }
+               else if(eventSource==checkBoxDoubtful){
+                   getEntity().setDoubtful(checkBoxDoubtful.getSelection());
+               }
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
        }
 }