.
authorn.hoffmann <n.hoffmann@localhost>
Wed, 10 Jun 2009 13:09:46 +0000 (13:09 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 10 Jun 2009 13:09:46 +0000 (13:09 +0000)
74 files changed:
.gitattributes
taxeditor-editor/META-INF/MANIFEST.MF
taxeditor-editor/plugin.xml
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/AbstractTaxonEditor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/ErrorAnnotation.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/GroupComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/GroupedComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditorDataChangeBehaviour.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/CommonNameComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/DescriptionElementComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/DescriptionLabelComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/DynamicFeatureMenu.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/LanguageDialog.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/handler/CreateDescriptionElementHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/description/handler/DeleteDescriptionElementHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/ShowTabbedPropertiesViewHandler.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/GalleryLabelComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/ImageComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/TaxonImageEditor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/handler/CreateImageHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/handler/DeleteImageHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/MisappliedNameComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/NameComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/NameSelectComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/NameViewer.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/SynonymComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeConceptRelationshipTypeHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToConceptRelationHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToMisapplicationHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeToSynonymHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateConceptRelationHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHeterotypicSynonymHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHomotypicSynonymHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateMisapplicationHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateSynonymInHomotypicalGroupHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/RemoveBasionymHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SetBasionymHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/reference/ReferenceSelectComposite.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/TimePeriodPropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/YearValidator.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/description/CommonNamePropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/description/DescriptionElementPropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/NameRelationsPropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/NonViralNamePropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/ScientificNamePropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/SynonymPropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/name/TaxonBasePropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/namerelations/wizard/ChooseRelationWizardPage.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/namerelations/wizard/ListNameRelationsWizardPage.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/ReferencePropertySource.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/ReferenceSearchDescriptor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AbstractNamePropertySection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AnnotationSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AuthorSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/CreatedSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameOverviewSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NamePropertySection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameRelationsSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NomRefPropertySection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/SecundumSection.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyPageLabelProvider.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyView.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TaxonTypeMapper.java [new file with mode: 0644]
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/TypePropertyDescriptor.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/wizard/ChooseNameTypeWizardPage.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/wizard/ListTypeWizardPage.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/wizard/TypeDesignationWizard.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/wizard/TypeListWizard.java

index 4c081c31675c1a0eb620f23cf0b101995abc9761..a3fd018080251eb2f60461e36ea7ec0a1fe3c636 100644 (file)
@@ -694,6 +694,7 @@ taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/PreviousMem
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SaveAllHandler.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SaveTaxonHandler.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/ShowPropertySheetHandler.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/ShowTabbedPropertiesViewHandler.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/GalleryLabelComposite.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/ImageComposite.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/images/ImagesGroupComposite.java -text
@@ -787,6 +788,18 @@ taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/Re
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/ReferenceSearchDescriptor.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/ReferenceSearchDialog.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/reference/SingleRefTypePropertySource.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AbstractNamePropertySection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AnnotationSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AuthorSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/CreatedSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameOverviewSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NamePropertySection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameRelationsSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NomRefPropertySection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/SecundumSection.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyPageLabelProvider.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyView.java -text
+taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TaxonTypeMapper.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/TypeCollectionPropertySource.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/TypeDesignationPropertySource.java -text
 taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/type/TypePropertyDescriptor.java -text
index 13b7759d0f20ccaaceb35c19baf0a1b48316f210..9a44896de2a8483eb43e857d08f3e3c7d601e6b7 100644 (file)
@@ -1,40 +1,45 @@
-Manifest-Version: 1.0\r
-Bundle-ManifestVersion: 2\r
-Bundle-Name: %Bundle-Name.0\r
-Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true\r
-Bundle-Version: 1.1.0\r
-Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin\r
-Bundle-Vendor: %Bundle-Vendor.0\r
-Export-Package: eu.etaxonomy.taxeditor.editor,\r
- eu.etaxonomy.taxeditor.editor.description,\r
- eu.etaxonomy.taxeditor.editor.handler,\r
- eu.etaxonomy.taxeditor.editor.images,\r
- eu.etaxonomy.taxeditor.editor.internal,\r
- eu.etaxonomy.taxeditor.editor.name,\r
- eu.etaxonomy.taxeditor.propertysheet,\r
- eu.etaxonomy.taxeditor.propertysheet.description,\r
- eu.etaxonomy.taxeditor.propertysheet.images,\r
- eu.etaxonomy.taxeditor.propertysheet.name,\r
- eu.etaxonomy.taxeditor.propertysheet.namerelations.wizard,\r
- eu.etaxonomy.taxeditor.propertysheet.reference,\r
- eu.etaxonomy.taxeditor.propertysheet.type,\r
- eu.etaxonomy.taxeditor.propertysheet.type.wizard\r
-Require-Bundle: org.eclipse.ui;bundle-version="3.4.1",\r
- org.eclipse.core.runtime;bundle-version="3.4.0",\r
- org.eclipse.core.databinding;bundle-version="1.1.1",\r
- org.eclipse.core.databinding.beans;bundle-version="1.1.1",\r
- org.eclipse.ui.editors;bundle-version="3.4.0",\r
- org.eclipse.jface;bundle-version="3.4.1",\r
- org.eclipse.jface.databinding;bundle-version="1.2.1",\r
- org.eclipse.ui.ide;bundle-version="3.4.1",\r
- org.eclipse.core.resources;bundle-version="3.4.1",\r
- org.eclipse.core.filesystem;bundle-version="1.2.0",\r
- org.eclipse.core.expressions;bundle-version="3.4.0",\r
- org.eclipse.ui.forms;bundle-version="3.3.101",\r
- org.eclipse.jface.text;bundle-version="3.4.1",\r
- eu.etaxonomy.cdmLibrary;bundle-version="2.1.0",\r
- eu.etaxonomy.taxeditor.store;bundle-version="1.0.0"\r
-Bundle-ActivationPolicy: lazy\r
-Bundle-Localization: plugin\r
-Bundle-ClassPath: .,\r
- icons/\r
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
+Bundle-Version: 2.0.0.v20090603_1756
+Bundle-ClassPath: .,icons/
+Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Export-Package: eu.etaxonomy.taxeditor.editor,
+ eu.etaxonomy.taxeditor.editor.description,
+ eu.etaxonomy.taxeditor.editor.description.handler,
+ eu.etaxonomy.taxeditor.editor.handler,
+ eu.etaxonomy.taxeditor.editor.images,
+ eu.etaxonomy.taxeditor.editor.images.handler,
+ eu.etaxonomy.taxeditor.editor.internal,
+ eu.etaxonomy.taxeditor.editor.name,
+ eu.etaxonomy.taxeditor.editor.name.handler,
+ eu.etaxonomy.taxeditor.editor.reference,
+ eu.etaxonomy.taxeditor.propertysheet,
+ eu.etaxonomy.taxeditor.propertysheet.description,
+ eu.etaxonomy.taxeditor.propertysheet.images,
+ eu.etaxonomy.taxeditor.propertysheet.name,
+ eu.etaxonomy.taxeditor.propertysheet.namerelations.wizard,
+ eu.etaxonomy.taxeditor.propertysheet.reference,
+ eu.etaxonomy.taxeditor.propertysheet.type,
+ eu.etaxonomy.taxeditor.propertysheet.type.wizard
+Require-Bundle: org.eclipse.ui;bundle-version="3.4.1",
+ org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.core.databinding;bundle-version="1.1.1",
+ org.eclipse.core.databinding.beans;bundle-version="1.1.1",
+ org.eclipse.ui.editors;bundle-version="3.4.0",
+ org.eclipse.jface;bundle-version="3.4.1",
+ org.eclipse.jface.databinding;bundle-version="1.2.1",
+ org.eclipse.ui.ide;bundle-version="3.4.1",
+ org.eclipse.core.resources;bundle-version="3.4.1",
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.core.expressions;bundle-version="3.4.0",
+ org.eclipse.ui.forms;bundle-version="3.3.101",
+ org.eclipse.jface.text;bundle-version="3.4.1",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.4.2",
+ eu.etaxonomy.cdmLibrary;bundle-version="2.0.0",
+ eu.etaxonomy.taxeditor.store;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
index 7d7737631854bfad0711d52f676c96b005753205..044eb7f127435165e6d8e6759ecfe3b1885a4ea7 100644 (file)
                label="Property Sheet"
                style="push">
          </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.commands.showTabbedPropertiesView"
+               label="Tabbed Properties"
+               style="push">
+         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.navigate">
             name="Open Parent">
       </command>
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.ShowTabbedPropertiesViewHandler"
+            id="eu.etaxonomy.taxeditor.editor.commands.showTabbedPropertiesView"
+            name="Tabbed Properties">
+      </command>
+   </extension>
    <extension
          point="org.eclipse.ui.elementFactories">
       <factory
             name="Taxonomic Editor Default Key Bindings">
       </scheme>
    </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+      <propertyContributor
+            contributorId="eu.etaxonomy.taxeditor.taxonNameEditor"
+            labelProvider="eu.etaxonomy.taxeditor.propertysheet.tabbed.TabbedPropertyPageLabelProvider"
+            typeMapper="eu.etaxonomy.taxeditor.propertysheet.tabbed.TaxonTypeMapper">
+         <propertyCategory
+               category="taxonBase"></propertyCategory>
+      </propertyContributor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+      <propertyTabs
+            contributorId="eu.etaxonomy.taxeditor.taxonNameEditor">
+         <propertyTab
+               category="taxonBase"
+               id="taxonNameEditor.nameTab"
+               label="Name">
+         </propertyTab>
+         <propertyTab
+               afterTab="taxonNameEditor.nomRefTab"
+               category="taxonBase"
+               id="taxonNameEditor.nameRelationsTab"
+               label="Name Relations">
+         </propertyTab>
+         <propertyTab
+               afterTab="taxonNameEditor.nameRelationsfTab"
+               category="taxonBase"
+               id="taxonNameEditor.secundumTab"
+               label="Secundum">
+         </propertyTab>
+         <propertyTab
+               afterTab="taxonNameEditor.secundumTab"
+               category="taxonBase"
+               id="taxonNameEditor.annotationsTab"
+               label="Annotations">
+         </propertyTab>
+         <propertyTab
+               afterTab="taxonNameEditor.annotationsTab"
+               category="taxonBase"
+               id="taxonNameEditor.generalTab"
+               label="General">
+         </propertyTab>
+      </propertyTabs>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertySections">
+      <propertySections
+            contributorId="eu.etaxonomy.taxeditor.taxonNameEditor">
+         <propertySection
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.NameOverviewSection"
+               id="taxonNameEditor.overview.name"
+               tab="taxonNameEditor.nameTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               afterSection="taxonNameEditor.overview.name"
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.NamePropertySection"
+               id="taxonNameEditor.nameSection"
+               tab="taxonNameEditor.nameTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               afterSection="taxonNameEditor.nameSection"
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.AuthorSection"
+               id="taxonNameEditor.authorSection"
+               tab="taxonNameEditor.nameTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               afterSection="taxonNameEditor.authorSection"
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.NomRefPropertySection"
+               id="taxonNameEditor.nomRefSection"
+               tab="taxonNameEditor.nameTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.CreatedSection"
+               id="taxonNameEditor.createdSection"
+               tab="taxonNameEditor.generalTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.AnnotationSection"
+               id="taxonNameEditor.annotationSection"
+               tab="taxonNameEditor.annotationsTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.NameRelationsSection"
+               id="taxonNameEditor.nameRelationSection"
+               tab="taxonNameEditor.nameRelationsTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+         <propertySection
+               class="eu.etaxonomy.taxeditor.propertysheet.tabbed.SecundumSection"
+               id="taxonNameEditor.secundumSection"
+               tab="taxonNameEditor.secundumTab">
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Taxon">
+            </input>
+            <input
+                  type="eu.etaxonomy.cdm.model.taxon.Synonym">
+            </input>
+         </propertySection>
+      </propertySections>
+   </extension>
 </plugin>
index 44b0f8a70c28f6f2390a0a70d42891f920348774..ad05aa4aeecd849e7470ee1d30b0db40eb9a0f21 100644 (file)
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.editor;\r
 \r
 import java.util.ArrayList;\r
-import java.util.HashSet;\r
 import java.util.List;\r
 \r
 import org.apache.log4j.Logger;\r
@@ -41,16 +40,17 @@ import org.eclipse.ui.views.properties.IPropertySheetPage;
 import org.eclipse.ui.views.properties.IPropertySource;\r
 import org.eclipse.ui.views.properties.PropertySheetPage;\r
 import org.eclipse.ui.views.properties.PropertySheetSorter;\r
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;\r
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;\r
 \r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
 import eu.etaxonomy.cdm.model.common.CdmBase;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
-import eu.etaxonomy.taxeditor.propertysheet.EditorPropertySheetEntry;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.operations.IPostOperationEnabled;\r
 import eu.etaxonomy.taxeditor.propertysheet.PropertySheetUtil;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled;\r
 \r
 /**\r
  * The abstract editor for displaying a category of <code>Taxon</code> data, corresponding\r
@@ -66,7 +66,7 @@ import eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled;
  * @created 10.09.2008\r
  * @version 1.0\r
  */\r
-public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptable, IConversationEnabled, IPostOperationEnabled  {\r
+public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptable, IConversationEnabled, IPostOperationEnabled, ITabbedPropertySheetPageContributor  {\r
        private static final Logger logger = Logger\r
                        .getLogger(AbstractTaxonEditor.class);\r
 \r
@@ -140,8 +140,8 @@ public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptab
                setSite(site);\r
                setInput(input);\r
                \r
-               this.provider = new SimpleSelectionProvider();\r
-               this.getSite().setSelectionProvider(provider);\r
+               provider = new SimpleSelectionProvider();\r
+               getSite().setSelectionProvider(provider);\r
                \r
                \r
                logger.trace("New Editor instance created.");\r
@@ -179,16 +179,19 @@ public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptab
                        this.selectedData = ((Composite) selectedObject).getData();\r
                }\r
                \r
-               // Get the selection's property source, pass it to the selection provider\r
-               IPropertySource propertySource = null;\r
-               if (selectedObject != null) {\r
-                       propertySource = selectedObject.getPropertySource();\r
-               }\r
-               if (propertySource == null) {\r
-                       provider.setSelection(new StructuredSelection());\r
-               } else {\r
-                       provider.setSelection(new StructuredSelection(propertySource));\r
-               }\r
+//             // Get the selection's property source, pass it to the selection provider\r
+//             IPropertySource propertySource = null;\r
+//             if (selectedObject != null) {\r
+//                     propertySource = selectedObject.getPropertySource();\r
+//             }\r
+//             if (propertySource == null) {\r
+//                     provider.setSelection(new StructuredSelection());\r
+//             } else {\r
+//                     provider.setSelection(new StructuredSelection(propertySource));\r
+//             }\r
+               \r
+\r
+               provider.setSelection(new StructuredSelection(this.selectedData));\r
                \r
        }\r
        \r
@@ -229,6 +232,7 @@ public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptab
                                return super.setInput(input); \r
                        } \r
                };\r
+               \r
                scrolledForm = managedForm.getForm();\r
                parent = scrolledForm.getBody();\r
                \r
@@ -249,17 +253,24 @@ public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptab
        @SuppressWarnings("unchecked")\r
        public Object getAdapter(Class type) {\r
            if (type == IPropertySheetPage.class) {\r
+//             \r
+//             PropertySheetPage page = new EditorPropertySheetPage();\r
+//             \r
+//             PropertySheetUtil.setPropertySheetPage(page);\r
+//             \r
+//             EditorPropertySheetEntry entry = new EditorPropertySheetEntry(taxon, this);\r
+//             page.setRootEntry(entry);\r
+//             page.refresh();\r
+//             \r
+//             return page;\r
+               \r
+               TabbedPropertySheetPage page = new TabbedPropertySheetPage(this);\r
+\r
+               \r
+               return page;\r
                \r
-               PropertySheetPage page = new EditorPropertySheetPage();\r
-               \r
-               PropertySheetUtil.setPropertySheetPage(page);\r
-               \r
-               EditorPropertySheetEntry entry = new EditorPropertySheetEntry(taxon, this);\r
-               page.setRootEntry(entry);\r
-               page.refresh();\r
-               \r
-               return page;\r
            }\r
+           \r
            return super.getAdapter(type);\r
        }\r
        \r
@@ -529,4 +540,13 @@ public abstract class AbstractTaxonEditor extends EditorPart implements IAdaptab
                        setFocus();\r
                }catch(IndexOutOfBoundsException e){}\r
        }\r
+       \r
+       /**\r
+        * Used by ITabbedPropertySheet...\r
+        */\r
+    public String getContributorId() {\r
+       String id = getID();\r
+        return id;\r
+    }\r
+\r
 }\r
index 8df96a7ea99925fe9ab51e8b843bbb5af6963abf..81f18acc2520573310371c90dd27fae3bd63a2fb 100644 (file)
@@ -31,7 +31,7 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;\r
 \r
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;\r
-import eu.etaxonomy.taxeditor.store.model.AbstractUtility;\r
+import eu.etaxonomy.taxeditor.model.AbstractUtility;\r
 \r
 /**\r
  * @author n.hoffmann\r
index 949b7979f655c2c68ba8771588c39fe7ff7b6f2d..f79a1b679cf7dd7723b65f296b5c95b58321a1d2 100644 (file)
@@ -11,7 +11,7 @@ import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.graphics.Rectangle;\r
 import org.eclipse.swt.widgets.Canvas;\r
 \r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
 \r
 public class ErrorAnnotation extends Annotation implements IAnnotationPresentation {\r
     private IMarker marker;\r
index 2021172001b2fcf13730e085d2b8198db14834fe..1d089311ddc4765a2bf6315b485eaf46f1988236 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.ui.forms.widgets.TableWrapData;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;\r
 \r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 62af930af830870354b3b94e02ae7f8d78da081a..c84935422d1e9b0af159822d63c78764fa7a904a 100644 (file)
@@ -45,7 +45,7 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
 \r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.taxeditor.editor.name.NameViewer;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 \r
 /** \r
  * Formats <code>GroupedComposite</code> with cosmetic and layout properties specific to the\r
index 8f8529e0fde19dedb4ffc486e67cf4cf69755c65..93575de9c67c97e638f0a9a0ed4d19763722c704 100644 (file)
@@ -32,9 +32,9 @@ import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.description.TaxonDescriptionEditor;\r
 import eu.etaxonomy.taxeditor.editor.images.TaxonImageEditor;\r
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
-import eu.etaxonomy.taxeditor.store.model.DataChangeBridge;\r
-import eu.etaxonomy.taxeditor.store.model.IDataChangeBehavior;\r
-import eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.model.DataChangeBridge;\r
+import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;\r
+import eu.etaxonomy.taxeditor.operations.IPostOperationEnabled;\r
 \r
 /**\r
  * \r
index 886f82ea45bb393fb7ce1c716cd04b7cf29787c7..fb42f6a3d5587df150083c4acae3a98ff8db4c21 100644 (file)
@@ -18,8 +18,8 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
-import eu.etaxonomy.taxeditor.store.model.AbstractDataChangeBehaviour;
-import eu.etaxonomy.taxeditor.store.model.IDataChangeBehavior;
+import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
+import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 
 /**
  * Implementation if {@link eu.etaxonomy.taxeditor.store.model.IDataChangeBehaviour} 
index af04f81b591ff47082752aacad6be95b0a2b6a8b..ecc5c29589f6d334a933332785aa77fd76f63639 100644 (file)
-/**\r
-* Copyright (C) 2007 EDIT\r
-* European Distributed Institute of Taxonomy \r
-* http://www.e-taxonomy.eu\r
-* \r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-\r
-package eu.etaxonomy.taxeditor.editor;\r
-\r
-import java.util.Set;\r
-import java.util.UUID;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.eclipse.jface.dialogs.MessageDialog;\r
-import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.ui.IEditorInput;\r
-import org.eclipse.ui.IMemento;\r
-import org.eclipse.ui.IPersistableElement;\r
-\r
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
-import eu.etaxonomy.cdm.model.taxon.Synonym;\r
-import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
-import eu.etaxonomy.taxeditor.store.CdmStore;\r
-import eu.etaxonomy.taxeditor.store.preference.PreferencesUtil;\r
-\r
-/**\r
- * @author n.hoffmann\r
- * @created 19.03.2009\r
- * @version 1.0\r
- */\r
-public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPersistableElement {\r
-       private static final Logger logger = Logger\r
-                       .getLogger(TaxonEditorInput.class);\r
-\r
-       private Taxon taxon;\r
-       private ConversationHolder conversation;\r
-       \r
-       private TaxonEditorInput(Taxon taxon, ConversationHolder conversation){\r
-               this.taxon = taxon;\r
-               this.conversation = conversation;\r
-       }\r
-       \r
-    /**\r
-     * \r
-     * @param uuid\r
-     * @param conversation\r
-     * @return\r
-     */\r
-    public static TaxonEditorInput NewInstance(UUID uuid){\r
-       ConversationHolder conversation = CdmStore.NewTransactionalConversation();\r
-       \r
-               TaxonBase<?> taxonBase = CdmStore.getTaxonService().getTaxonByUuid(uuid);\r
-               \r
-               if(taxonBase == null){\r
-                       MessageDialog.openWarning(EditorUtil.getShell(), "Not yet implemented", "Selected element is not if type TaxonBase.");\r
-                       return null;\r
-               }\r
-               \r
-               Taxon taxon;\r
-               \r
-               if (taxonBase instanceof Synonym) {\r
-                       // TODO: in case of pro parte synonym or any other where we might have multiple\r
-                       // accepted taxa we have to provide a mechanism that can deal with that\r
-                       // TODO set focus to the synonym\r
-                       Set<Taxon> acceptedTaxa = ((Synonym) taxonBase).getAcceptedTaxa();\r
-                       if(acceptedTaxa.size() != 1){\r
-                               String message;\r
-                               if(acceptedTaxa.size() == 0){\r
-                                       message = "There is no accepted taxon for the chosen synonym. ";\r
-                               }else{\r
-                                       message = "Multiple taxa found for the chosen synonym.";\r
-                               }\r
-                               MessageDialog.openWarning(EditorUtil.getShell(), "Not yet implemented", message);\r
-                               return null;\r
-                       }else{\r
-                               taxon = acceptedTaxa.toArray(new Taxon[0])[0];\r
-                       }\r
-               } else {\r
-                       taxon = (Taxon) taxonBase;\r
-               }       \r
-       \r
-       return new TaxonEditorInput(taxon, conversation);\r
-    }\r
-    \r
-    public static TaxonEditorInput NewEmptyInstance(UUID parentTaxonUuid){\r
-       ConversationHolder conversation = CdmStore.NewTransactionalConversation();\r
-               \r
-               TaxonNameBase name = PreferencesUtil.getInstanceOfPreferredNameClass();\r
-               \r
-               Taxon newTaxon = null;\r
-               if(parentTaxonUuid == null){\r
-                       newTaxon = Taxon.NewInstance(name, CdmStore.getDefault().getDefaultSec());\r
-               }else{\r
-                       Taxon parentTaxon = (Taxon) CdmStore.getTaxonService().getTaxonByUuid(parentTaxonUuid);\r
-                       newTaxon = Taxon.NewInstance(name, parentTaxon.getSec());\r
-                       parentTaxon.addTaxonomicChild(newTaxon, null, null);\r
-               }\r
-               // add the new taxon to the editors persistence context\r
-               CdmStore.getTaxonService().save(newTaxon);\r
-               \r
-               return new TaxonEditorInput(newTaxon, conversation);\r
-    }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IEditorInput#exists()\r
-        */\r
-       public boolean exists() {\r
-               return taxon != null;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IEditorInput#getImageDescriptor()\r
-        */\r
-       public ImageDescriptor getImageDescriptor() {\r
-               return null;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IEditorInput#getName()\r
-        */\r
-       public String getName() {\r
-               TaxonNameBase name = taxon.getName();\r
-               if (name == null || name.getTitleCache() == null) {\r
-                       return "New taxon";\r
-               } else {\r
-                       return name.getTitleCache();\r
-               }       \r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IEditorInput#getPersistable()\r
-        */\r
-       public IPersistableElement getPersistable() {\r
-               return this;\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IEditorInput#getToolTipText()\r
-        */\r
-       public String getToolTipText() {\r
-               return getName();\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)\r
-        */\r
-       public Object getAdapter(Class adapter) {\r
-\r
-               if (adapter == Taxon.class) {\r
-                       return taxon;\r
-               }\r
-               \r
-               return null;\r
-       }\r
-       \r
-    /**\r
-     * Overrides equals to ensure that a taxon can only be edited by\r
-     * one editor at a time.\r
-     * \r
-     * @return boolean\r
-     */        \r
-       public boolean equals(Object obj) {\r
-               if (obj.getClass().equals(TaxonEditorInput.class) \r
-                               && taxon.equals(((TaxonEditorInput) obj).taxon))\r
-                       return true;\r
-               return false;\r
-       }\r
-\r
-       public Taxon getTaxon(){\r
-               return taxon;\r
-       }\r
-       \r
-       /*\r
-        * (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()\r
-        */\r
-       public ConversationHolder getConversationHolder() {\r
-               return conversation;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)\r
-        */\r
-       public void update(CdmDataChangeMap events) {\r
-               // FIXME update the editor input\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IPersistableElement#getFactoryId()\r
-        */\r
-       public String getFactoryId() {\r
-               return TaxonEditorInputFactory.getFactoryId();\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)\r
-        */\r
-       public void saveState(IMemento memento) {\r
-               TaxonEditorInputFactory.saveState(memento, this);\r
-       }\r
-}\r
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.editor;
+
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created 19.03.2009
+ * @version 1.0
+ */
+public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPersistableElement {
+       private static final Logger logger = Logger
+                       .getLogger(TaxonEditorInput.class);
+
+       private Taxon taxon;
+       private ConversationHolder conversation;
+       
+       private TaxonEditorInput(Taxon taxon, ConversationHolder conversation){
+               this.taxon = taxon;
+               this.conversation = conversation;
+       }
+       
+    /**
+     * 
+     * @param uuid
+     * @param conversation
+     * @return
+     */
+    public static TaxonEditorInput NewInstance(UUID uuid){
+       ConversationHolder conversation = CdmStore.NewTransactionalConversation();
+       
+               TaxonBase<?> taxonBase = CdmStore.getTaxonService().getTaxonByUuid(uuid);
+               
+               if(taxonBase == null){
+                       MessageDialog.openWarning(EditorUtil.getShell(), "Not yet implemented", "Selected element is not if type TaxonBase.");
+                       return null;
+               }
+               
+               Taxon taxon;
+               
+               if (taxonBase instanceof Synonym) {
+                       // TODO: in case of pro parte synonym or any other where we might have multiple
+                       // accepted taxa we have to provide a mechanism that can deal with that
+                       // TODO set focus to the synonym
+                       Set<Taxon> acceptedTaxa = ((Synonym) taxonBase).getAcceptedTaxa();
+                       if(acceptedTaxa.size() != 1){
+                               String message;
+                               if(acceptedTaxa.size() == 0){
+                                       message = "There is no accepted taxon for the chosen synonym. ";
+                               }else{
+                                       message = "Multiple taxa found for the chosen synonym.";
+                               }
+                               MessageDialog.openWarning(EditorUtil.getShell(), "Not yet implemented", message);
+                               return null;
+                       }else{
+                               taxon = acceptedTaxa.toArray(new Taxon[0])[0];
+                       }
+               } else {
+                       taxon = (Taxon) taxonBase;
+               }       
+       
+               logger.trace(TaxonEditorInput.class.getSimpleName() + " created");
+               
+       return new TaxonEditorInput(taxon, conversation);
+    }
+    
+    public static TaxonEditorInput NewEmptyInstance(UUID parentTaxonUuid){
+       ConversationHolder conversation = CdmStore.NewTransactionalConversation();
+               
+               TaxonNameBase<?, ?> name = PreferencesUtil.getInstanceOfPreferredNameClass();
+               
+               Taxon newTaxon = null;
+               if(parentTaxonUuid == null){
+                       newTaxon = Taxon.NewInstance(name, CdmStore.getDefault().getDefaultSec());
+               }else{
+                       Taxon parentTaxon = (Taxon) CdmStore.getTaxonService().getTaxonByUuid(parentTaxonUuid);
+                       newTaxon = Taxon.NewInstance(name, parentTaxon.getSec());
+                       parentTaxon.addTaxonomicChild(newTaxon, null, null);
+               }
+               // add the new taxon to the editors persistence context
+               CdmStore.getTaxonService().save(newTaxon);
+               
+               return new TaxonEditorInput(newTaxon, conversation);
+    }
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#exists()
+        */
+       public boolean exists() {
+               return taxon != null;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+        */
+       public ImageDescriptor getImageDescriptor() {
+               return null;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getName()
+        */
+       public String getName() {
+               TaxonNameBase<?, ?> name = taxon.getName();
+               if (name == null || name.getTitleCache() == null) {
+                       return "New taxon";
+               } else {
+                       return name.getTitleCache();
+               }       
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getPersistable()
+        */
+       public IPersistableElement getPersistable() {
+               return this;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getToolTipText()
+        */
+       public String getToolTipText() {
+               return getName();
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+        */
+       public Object getAdapter(Class adapter) {
+
+               if (adapter == Taxon.class) {
+                       return taxon;
+               }
+               
+               return null;
+       }
+       
+    /**
+     * Overrides equals to ensure that a taxon can only be edited by
+     * one editor at a time.
+     * 
+     * @return boolean
+     */        
+       public boolean equals(Object obj) {
+               if (obj.getClass().equals(TaxonEditorInput.class) 
+                               && taxon.equals(((TaxonEditorInput) obj).taxon))
+                       return true;
+               return false;
+       }
+
+       public Taxon getTaxon(){
+               return taxon;
+       }
+       
+       /*
+        * (non-Javadoc)
+        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
+        */
+       public ConversationHolder getConversationHolder() {
+               return conversation;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
+        */
+       public void update(CdmDataChangeMap events) {
+               // FIXME update the editor input
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IPersistableElement#getFactoryId()
+        */
+       public String getFactoryId() {
+               return TaxonEditorInputFactory.getFactoryId();
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
+        */
+       public void saveState(IMemento memento) {
+               TaxonEditorInputFactory.saveState(memento, this);
+       }
+}
index a26244e025a58ef8f08d045e8d9e4d27ac8ed77d..b774e764e3db597cdc6b054aff70a22ec896fe65 100644 (file)
@@ -15,8 +15,8 @@ import org.eclipse.ui.views.properties.IPropertySource;
 \r
 import eu.etaxonomy.cdm.model.common.Language;\r
 import eu.etaxonomy.cdm.model.description.CommonTaxonName;\r
+import eu.etaxonomy.taxeditor.model.LanguageUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.description.CommonNamePropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.LanguageUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 02f14e337b1ef5dfb1a3e9a31575e10b0a4cabea..7cda59bb1a5e603096886e5dccaf729bf2308925 100644 (file)
@@ -16,10 +16,10 @@ import org.eclipse.ui.views.properties.IPropertySource;
 \r
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
+import eu.etaxonomy.taxeditor.model.DescriptionUtil;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 import eu.etaxonomy.taxeditor.propertysheet.description.DescriptionElementPropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.DescriptionUtil;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 941bb4b6dc69f87fd5cd085c3ba51922c1e8daeb..d4eaa06fad49ed4cf1bef3fac3ade585d3fa0514 100644 (file)
@@ -18,9 +18,9 @@ import org.eclipse.ui.views.properties.IPropertySource;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
 import eu.etaxonomy.taxeditor.editor.AbstractTaxonEditor;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 import eu.etaxonomy.taxeditor.propertysheet.description.TaxonDescriptionPropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
 \r
 /**\r
  * Composite for editing a description's label / Title Cache information.\r
index 9c9079700fabf8863da7b3f1f9c2bbba5214ee06..041a77289dbd0a788e8475b27cbf2878b5faa2d4 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.ui.handlers.IHandlerService;
 
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
-import eu.etaxonomy.taxeditor.store.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
 /**
  * @author n.hoffmann
index d85e16f05f6982606b7615eff5447ac93eddbb08..6c7328ee38dc52d982f2dce4713a6da879ec70f0 100644 (file)
@@ -31,8 +31,8 @@ import org.eclipse.swt.widgets.Shell;
 \r
 import eu.etaxonomy.cdm.model.common.Language;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.model.LanguageUtil;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
-import eu.etaxonomy.taxeditor.store.model.LanguageUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 936765e5a22c440299121b824c6a7194dec01d95..50a5ab3fea146baa2f77b985c772c27e6c3b3406 100644 (file)
@@ -31,7 +31,7 @@ import eu.etaxonomy.taxeditor.editor.description.DescriptionLabelComposite;
 import eu.etaxonomy.taxeditor.editor.description.DistributionDialog;
 import eu.etaxonomy.taxeditor.editor.description.LanguageDialog;
 import eu.etaxonomy.taxeditor.editor.description.TaxonDescriptionEditor;
-import eu.etaxonomy.taxeditor.store.operations.CreateDescriptionElementOperation;
+import eu.etaxonomy.taxeditor.operations.CreateDescriptionElementOperation;
 
 /**
  * @author n.hoffmann
index 90174b69f4d4258d9824da5a7f2d97b29cec2b47..ba663cfa94af808c2cf96baeaadb66c1e522fdc8 100644 (file)
@@ -24,8 +24,8 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.operations.DeleteDescriptionElementOperation;
 import eu.etaxonomy.taxeditor.propertysheet.description.DescriptionElementPropertySource;
-import eu.etaxonomy.taxeditor.store.operations.DeleteDescriptionElementOperation;
 
 /**
  * @author n.hoffmann
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/ShowTabbedPropertiesViewHandler.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/ShowTabbedPropertiesViewHandler.java
new file mode 100644 (file)
index 0000000..0103be5
--- /dev/null
@@ -0,0 +1,47 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.editor.handler;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.taxeditor.propertysheet.tabbed.TabbedPropertyView;
+import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class ShowTabbedPropertiesViewHandler extends AbstractHandler implements
+               IHandler {
+       private static final Logger logger = Logger
+                       .getLogger(ShowTabbedPropertiesViewHandler.class);
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+        */
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               try {
+                       TaxeditorStorePlugin.getDefault().getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage().showView(TabbedPropertyView.ID, 
+                                       null, IWorkbenchPage.VIEW_VISIBLE);
+               } catch (PartInitException e) {
+                       logger.error("Error opening taxonomic tree view.", e);
+               }
+               return null;
+       }
+}
index c53de7dc2605e85614136b877dec67fcfe12f60a..5e70a2e647c253b09f7cf4b3049605c53979f1f1 100644 (file)
@@ -18,9 +18,9 @@ import org.eclipse.ui.views.properties.IPropertySource;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
 import eu.etaxonomy.taxeditor.editor.AbstractTaxonEditor;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 import eu.etaxonomy.taxeditor.propertysheet.description.TaxonDescriptionPropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
 \r
 /**\r
  * Composite for editing a description's label / Title Cache information.\r
index b6c98cad3a4e4252a31ce464609c2b76f93b819d..bff2834fd14592efedc1a736efc386a708005917 100644 (file)
@@ -30,8 +30,8 @@ import eu.etaxonomy.taxeditor.editor.CompositeBorderDecorator;
 import eu.etaxonomy.taxeditor.editor.GroupComposite;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
 import eu.etaxonomy.taxeditor.editor.name.AcceptedNameComposite;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
 import eu.etaxonomy.taxeditor.propertysheet.images.ImagePropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 3facda2d10a67b32cb6a117672c4d15b813b2a2a..1a182bed771c5c735467eccbbb94dffd6cc8bee1 100644 (file)
@@ -26,7 +26,7 @@ import eu.etaxonomy.taxeditor.editor.FreeTextElementFactory;
 import eu.etaxonomy.taxeditor.editor.GroupComposite;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;\r
-import eu.etaxonomy.taxeditor.store.model.ImagesUtil;\r
+import eu.etaxonomy.taxeditor.model.ImagesUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 956542d2cf1c5b70486583c6fe9402f4e1e9a4e0..4898cc685f2e85e45ae3bb298daf8880c9d1b253 100644 (file)
@@ -26,13 +26,13 @@ import org.eclipse.ui.handlers.HandlerUtil;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.dialogs.UriDialog;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.images.GalleryLabelComposite;
 import eu.etaxonomy.taxeditor.editor.images.TaxonImageEditor;
-import eu.etaxonomy.taxeditor.store.model.UriDialog;
-import eu.etaxonomy.taxeditor.store.operations.CreateImageOperation;
+import eu.etaxonomy.taxeditor.operations.CreateImageOperation;
 
 /**
  * @author n.hoffmann
index b25a6adf30d9326064d62affb46b069262c6c6f5..ccba09aa93d7d658b2aa80a712c0056f455a1b34 100644 (file)
@@ -28,8 +28,8 @@ import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.images.GalleryLabelComposite;
 import eu.etaxonomy.taxeditor.editor.images.TaxonImageEditor;
+import eu.etaxonomy.taxeditor.operations.DeleteImageOperation;
 import eu.etaxonomy.taxeditor.propertysheet.images.ImagePropertySource;
-import eu.etaxonomy.taxeditor.store.operations.DeleteImageOperation;
 
 /**
  * @author n.hoffmann
index fdb03fe4045332afacda1b0ba97623cee043f15d..34f6e731c6ab31f6f3ce5238430f73e2f81deeb2 100644 (file)
@@ -18,8 +18,8 @@ import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.operations.ChangeConceptToSynonymOperation;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.MisapplicationPropertySource;\r
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptToSynonymOperation;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 552a6a001958032c9d553e2849e1cbdfa76575da..49d7cfff0589f618f9bc40891fd99cda80eb4e60 100644 (file)
@@ -27,14 +27,14 @@ import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.editor.AbstractTaxonEditor;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.NameRelationsUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.operations.CreateSynonymInNewGroupOperation;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.BotanicalNamePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.NonViralNamePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.ZoologicalNamePropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
-import eu.etaxonomy.taxeditor.store.model.NameRelationsUtil;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.operations.CreateSynonymInNewGroupOperation;\r
 \r
 /**\r
  * Formats an <code>GroupedComposite</code> to display <code>TaxonNameBase</code> elements\r
index cf5f1f11cb70f157acc652920a734cc3b09e5e20..c4f6bd0cfff68f28962c0be2712a7d94dca2e3c8 100644 (file)
@@ -27,8 +27,8 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;\r
 \r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 024e626e10b43a7a025a478888691b09fc17dd48..39d1204dd1caeb0064b1c60cb9e9431a1788d89f 100644 (file)
@@ -49,7 +49,7 @@ import eu.etaxonomy.taxeditor.editor.ErrorAnnotation;
 import eu.etaxonomy.taxeditor.editor.LineWrapSquigglesStrategy;\r
 import eu.etaxonomy.taxeditor.editor.ViewerConfiguration;\r
 import eu.etaxonomy.taxeditor.editor.WarningAnnotation;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 \r
 /**\r
  * SourceViewer implementation called by NameComposite.\r
index 8052078e0c54964e0b6828ca457b01666c434720..e5031dcde9c1f4e5e2d304db777d33d11f0c6bfa 100644 (file)
@@ -19,10 +19,10 @@ import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.operations.ChangeHomotypicGroupOperation;\r
+import eu.etaxonomy.taxeditor.operations.ChangeSynonymToMisapplicationOperation;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
-import eu.etaxonomy.taxeditor.store.operations.ChangeHomotypicGroupOperation;\r
-import eu.etaxonomy.taxeditor.store.operations.ChangeSynonymToMisapplicationOperation;\r
 \r
 /**\r
  * @author p.ciardelli\r
index f9d56800ad96f6d32bc086e6f12f3f90f2feac5e..fc21e2b9455d3d499da9f6998524a96ed8f3d28e 100644 (file)
@@ -40,9 +40,9 @@ import eu.etaxonomy.taxeditor.editor.FreeTextElementFactory;
 import eu.etaxonomy.taxeditor.editor.GroupedComposite;\r
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;\r
 import eu.etaxonomy.taxeditor.editor.WidgetTransfer;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptToSynonymOperation;\r
-import eu.etaxonomy.taxeditor.store.operations.ChangeHomotypicGroupOperation;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.operations.ChangeConceptToSynonymOperation;\r
+import eu.etaxonomy.taxeditor.operations.ChangeHomotypicGroupOperation;\r
 \r
 /**\r
  * @author p.ciardelli\r
@@ -274,4 +274,6 @@ public class TaxonNameEditor extends AbstractTaxonEditor
        public String getID() {\r
                return TaxonNameEditor.ID;\r
        }\r
+       \r
+       \r
 }
\ No newline at end of file
index e7b179c66519540d4dd7f6b2dc82b6a2cec37edd..261b9d9f4dc4bdad3cc2093822b66cd2dbe3267f 100644 (file)
@@ -27,8 +27,8 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.ChangeConceptRelationshipTypeOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.TaxonBasePropertySource;
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptRelationshipTypeOperation;
 
 /**
  * @author n.hoffmann
index 013c18a8b613c0f14313c1f9f0e905c52b312d16..1a71fc9e3588ed85fc0f36560dd0b0e3da3cae24 100644 (file)
@@ -28,11 +28,11 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.ChangeConceptRelationshipTypeOperation;
+import eu.etaxonomy.taxeditor.operations.ChangeSynonymToConceptOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.MisapplicationPropertySource;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
 import eu.etaxonomy.taxeditor.propertysheet.name.TaxonBasePropertySource;
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptRelationshipTypeOperation;
-import eu.etaxonomy.taxeditor.store.operations.ChangeSynonymToConceptOperation;
 
 /**
  * @author n.hoffmann
index e39cafb5adb1b03c38052fadc5dc96043da02612..e432790a50cda8f9c1c39cf8ead1964d5bdd62c7 100644 (file)
@@ -27,11 +27,11 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.ChangeConceptRelationshipTypeOperation;
+import eu.etaxonomy.taxeditor.operations.ChangeSynonymToMisapplicationOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.ConceptPropertySource;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
 import eu.etaxonomy.taxeditor.propertysheet.name.TaxonBasePropertySource;
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptRelationshipTypeOperation;
-import eu.etaxonomy.taxeditor.store.operations.ChangeSynonymToMisapplicationOperation;
 
 /**
  * @author n.hoffmann
index 81a7614504f87c1cc3113e2155f134e250908e18..640efdaa5025bd8376a2c550b5a43f7999174f3d 100644 (file)
@@ -25,8 +25,8 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.ChangeConceptToSynonymOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.TaxonBasePropertySource;
-import eu.etaxonomy.taxeditor.store.operations.ChangeConceptToSynonymOperation;
 
 /**
  * @author n.hoffmann
index 61b00368e9b393000d5d3820c75c58a1d37432e9..18aa91f9891667d85199d13aaef915be664b3036 100644 (file)
@@ -22,7 +22,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
-import eu.etaxonomy.taxeditor.store.operations.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.operations.CreateConceptRelationOperation;
 
 /**
  * @author n.hoffmann
index df11275c93e8819c7dd457f2338b092f98f2f06d..898fe56099831c2d7718e556118d0fd77e0b36d3 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.core.commands.operations.IUndoableOperation;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.editor.Page;\r
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
-import eu.etaxonomy.taxeditor.store.operations.CreateSynonymInNewGroupOperation;\r
+import eu.etaxonomy.taxeditor.operations.CreateSynonymInNewGroupOperation;\r
 \r
 /**\r
  * @author n.hoffmann\r
index 7e4e5c8a6c7a3854d4ee09a654ff40d658f85d87..aa45d63b29bceb025b79ab018c4567620deea8ee 100644 (file)
@@ -22,7 +22,7 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.editor.Page;\r
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
-import eu.etaxonomy.taxeditor.store.operations.CreateSynonymInExisitingHomotypicalGroupOperation;\r
+import eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation;\r
 \r
 /**\r
  * @author n.hoffmann\r
index da2947b0b22647e11686d093d26d68c49a966ee7..db63bd241165ec5989639b6e4196154c3e23dfd1 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.core.commands.operations.IUndoableOperation;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
-import eu.etaxonomy.taxeditor.store.operations.CreateMisapplicationOperation;
+import eu.etaxonomy.taxeditor.operations.CreateMisapplicationOperation;
 
 /**
  * @author n.hoffmann
index df057554febeb90bbd05145efcb6a8a29233d724..e4ad62e953a36db92de92c066b438c6cee3ea37b 100644 (file)
@@ -26,8 +26,8 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.CreateSynonymInExisitingHomotypicalGroupOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
-import eu.etaxonomy.taxeditor.store.operations.CreateSynonymInExisitingHomotypicalGroupOperation;
 
 /**
  * @author n.hoffmann
index 678f767556f4660f59e89e7fac9feea95bfeb799..66ec080a8ab46976285b31c1d71e8bb12cfd2809 100644 (file)
@@ -24,13 +24,13 @@ import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
 import eu.etaxonomy.taxeditor.editor.Page;\r
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
+import eu.etaxonomy.taxeditor.operations.DeleteConceptRelationOperation;\r
+import eu.etaxonomy.taxeditor.operations.DeleteMisapplicationOperation;\r
+import eu.etaxonomy.taxeditor.operations.DeleteSynonymOperation;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.ConceptPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.MisapplicationPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.name.TaxonBasePropertySource;\r
-import eu.etaxonomy.taxeditor.store.operations.DeleteConceptRelationOperation;\r
-import eu.etaxonomy.taxeditor.store.operations.DeleteMisapplicationOperation;\r
-import eu.etaxonomy.taxeditor.store.operations.DeleteSynonymOperation;\r
 \r
 /**\r
  * \r
index 6643b55f3048a0b53e2a49695bc1035d0e9aebb3..fab630ce6244a150896d3b22711445a503d1c52f 100644 (file)
@@ -25,8 +25,8 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.RemoveHomotypicalGroupBasionymOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
-import eu.etaxonomy.taxeditor.store.operations.RemoveHomotypicalGroupBasionymOperation;
 
 /**
  * @author n.hoffmann
index ec7428d7152de67f4c0733b5015908947b4a996d..b9e93244c1b28c1ccf00bfef67d42d85fca57e15 100644 (file)
@@ -25,8 +25,8 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.ChangeHomotypicalGroupBasionymOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
-import eu.etaxonomy.taxeditor.store.operations.ChangeHomotypicalGroupBasionymOperation;
 
 /**
  * @author n.hoffmann
index 64ba1d33db92b51edfcd82c8dc29dce2894139f3..37dca191c0426116abb562311039abf312cc9c5d 100644 (file)
@@ -29,9 +29,9 @@ import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.operations.SwapSynonymAndAcceptedOperation;
 import eu.etaxonomy.taxeditor.propertysheet.name.SynonymPropertySource;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.operations.SwapSynonymAndAcceptedOperation;
 
 /**
  * @author n.hoffmann
index c979906c7641a4572c3414f4d766800052326d16..0ca73550d771bb06558130a221c922d7e5e86e49 100644 (file)
@@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Text;
 import eu.etaxonomy.cdm.common.CdmUtils;\r
 import eu.etaxonomy.cdm.model.reference.Generic;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index fc82508fe2ec3adac5e499e21746b1ba6105e1ad..60f39b1fc1d6a8f78eb97ca0d52f3f08280fe555 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;\r
 \r
 import eu.etaxonomy.cdm.model.common.TimePeriod;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index c11298180c8b9aa97b3abc02973f6bf52429ca31..e8afbefa13ad294526e06fe2d73ea8746782ee5f 100644 (file)
@@ -11,7 +11,7 @@ package eu.etaxonomy.taxeditor.propertysheet;
 \r
 import org.eclipse.jface.viewers.ICellEditorValidator;\r
 \r
-import eu.etaxonomy.taxeditor.store.model.TimeUtil;\r
+import eu.etaxonomy.taxeditor.model.TimeUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 3c2ac1f1700f4ab484c8912a6678d01cbebea0a9..08e81f60a4db829fc2f79dd7525a0f280fca891b 100644 (file)
@@ -17,8 +17,8 @@ import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor;
 \r
 import eu.etaxonomy.cdm.model.common.Language;\r
 import eu.etaxonomy.cdm.model.description.CommonTaxonName;\r
+import eu.etaxonomy.taxeditor.model.LanguageUtil;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
-import eu.etaxonomy.taxeditor.store.model.LanguageUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 001a52e861d85182a9a59731c227761694a2e18c..626af71b633da10c9e956059c9828bddde7f2bb2 100644 (file)
@@ -30,9 +30,9 @@ import eu.etaxonomy.cdm.model.description.QuantitativeData;
 import eu.etaxonomy.cdm.model.description.TaxonInteraction;\r
 import eu.etaxonomy.cdm.model.description.TextData;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
+import eu.etaxonomy.taxeditor.model.DescriptionUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.ICdmBasePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.ReferencePropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.DescriptionUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index cb442252276982533a32bb9c8b67f09ed328eb6d..e2836ee5bc4a373978861f99c07b3ac64981f123 100644 (file)
@@ -15,8 +15,8 @@ import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.NameRelationshipType;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
+import eu.etaxonomy.taxeditor.model.NameRelationsUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.CollectionPropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.NameRelationsUtil;\r
 \r
 public class NameRelationsPropertySource extends CollectionPropertySource {\r
        \r
index 5c99878508364d3026a6f07e963fb5d9fef3bee9..e0be8cb4680eea5d5f03658610ba42fa2384e06d 100644 (file)
@@ -33,13 +33,13 @@ import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.reference.Generic;\r
 import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.AnnotationsPropertyDescriptor;\r
 import eu.etaxonomy.taxeditor.propertysheet.ICdmBasePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.MarkersPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.NomenclaturalReferencePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.ReferencePropertySource;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
-import eu.etaxonomy.taxeditor.store.preference.PreferencesUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
@@ -143,8 +143,7 @@ public class NonViralNamePropertySource implements ICdmBasePropertySource {
                \r
                // Get terms from nom status vocabulary\r
                List<NomenclaturalStatusType> nomStatusTypesList = new ArrayList<NomenclaturalStatusType>();\r
-               TermVocabulary<NomenclaturalStatusType> statusVocab = \r
-                               CdmStore.getDefault().getNomStatus();\r
+                Set<NomenclaturalStatusType> statusVocab = CdmStore.getNomenclaturalStatusTypes();\r
                \r
                // If there is no status vocabulary, init type and status w empty arrays and return\r
                if (statusVocab == null) {\r
@@ -153,7 +152,7 @@ public class NonViralNamePropertySource implements ICdmBasePropertySource {
                        return;\r
                }\r
                \r
-               nomStatusTypesList.addAll(statusVocab.getTerms());\r
+               nomStatusTypesList.addAll(statusVocab);\r
                \r
                // Populate nom status type menu labels \r
                List<String> nomStatusTypesMenuList = new ArrayList<String>();\r
index 787280404324d87128a31212b89cecc707efa47e..46bc9f16efe9b9cfeb1db5b009e0475717165155 100644 (file)
@@ -23,8 +23,8 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 \r
 import eu.etaxonomy.cdm.common.CdmUtils;\r
 import eu.etaxonomy.cdm.model.name.NonViralName;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
 import eu.etaxonomy.taxeditor.propertysheet.ICdmBasePropertySource;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 1610ed0e3a5fbfd64dfab9462290797ef349c719..6f3a0d888b94afc85272e0afa50b21e85f597ae8 100644 (file)
@@ -5,7 +5,7 @@ package eu.etaxonomy.taxeditor.propertysheet.name;
 \r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index a34d2d2dea6eabe4cfbad304a3a3b92d508a067f..c39bb3f905f2a70dfa243320b5e6140533f61177 100644 (file)
@@ -26,13 +26,13 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.ICdmBasePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.IReferenceSearch;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.ReferencePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.reference.ReferenceSearchDescriptor;\r
 import eu.etaxonomy.taxeditor.propertysheet.type.TypeCollectionPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.type.TypePropertyDescriptor;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 0005597f3e461f7e86f71b2473c4d674ae7569af..8b4d9466cfd44d629b3cfb4e513f33687155e91b 100644 (file)
@@ -35,9 +35,9 @@ import eu.etaxonomy.cdm.model.name.ZoologicalName;
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
 import eu.etaxonomy.taxeditor.editor.name.NameSelectComposite;\r
 import eu.etaxonomy.taxeditor.editor.reference.ReferenceSelectComposite;\r
+import eu.etaxonomy.taxeditor.model.NameRelationsUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
-import eu.etaxonomy.taxeditor.store.model.NameRelationsUtil;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
 \r
 /**\r
  * An all-in-one relation wizard page where the user chooses a related name, a\r
index dc28d8c2ee434d7f2d34b2231790874dc96b91df..c55ed80d0b4c43de9a4c4c0496859000421fa7d7 100644 (file)
@@ -36,9 +36,9 @@ import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.name.ZoologicalName;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
-import eu.etaxonomy.taxeditor.store.model.ImageResources;\r
-import eu.etaxonomy.taxeditor.store.model.NameRelationsUtil;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.ImageResources;\r
+import eu.etaxonomy.taxeditor.model.NameRelationsUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index 813a652e51239638df4322f61ed7607c70f7abd1..31ebf16e90d79ffc59fb30c5fb8ba4ad5fae3b44 100644 (file)
@@ -54,11 +54,11 @@ import eu.etaxonomy.cdm.model.reference.SectionBase;
 import eu.etaxonomy.cdm.model.reference.StrictReferenceBase;\r
 import eu.etaxonomy.cdm.model.reference.Thesis;\r
 import eu.etaxonomy.cdm.model.reference.WebPage;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.model.TimeUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.ICdmBasePropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.TimePeriodPropertySource;\r
 import eu.etaxonomy.taxeditor.propertysheet.YearValidator;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.model.TimeUtil;\r
 \r
 /**\r
  * Supplies the properties of a <code>ReferenceBase</code> object for display by\r
index b566f6db560677193bac50c028f2b1dbe44da962..dbb002de278bbb6cb9a20e220b1ca73e4fbdce1b 100644 (file)
@@ -37,7 +37,8 @@ abstract public class ReferenceSearchDescriptor extends PropertyDescriptor {
         CellEditor editor = new DialogCellEditor(parent) {\r
 \r
                        protected Object openDialogBox(\r
-                                       Control cellEditorWindow) {\r
+                                       Control cellEditorWindow) {                     \r
+                               \r
                        Dialog dialog = new ReferenceSearchDialog(cellEditorWindow.getShell(), \r
                                        searchType);\r
                        Object value = ((ReferenceSearchDialog) dialog).open();\r
@@ -48,6 +49,18 @@ abstract public class ReferenceSearchDescriptor extends PropertyDescriptor {
                                        return new ReferencePropertySource(reference);\r
                                }\r
                                return null;\r
+                               \r
+                               // FIXME  FilteredReferenceSelectionDialog implementation has session problems\r
+//                             FilteredReferenceSelectionDialog dialog = new FilteredReferenceSelectionDialog(cellEditorWindow.getShell());\r
+//                             \r
+//                             \r
+//                             if (dialog.open() == Status.OK) {                                       \r
+//                                     ReferenceBase<?> reference = (ReferenceBase<?>) dialog.getFirstResult();\r
+//                                     saveReference(reference);\r
+//                                     return new ReferencePropertySource(reference);\r
+//                             }\r
+//                             return null;\r
+                               \r
                        }\r
         };\r
         if (getValidator() != null) {\r
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AbstractNamePropertySection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AbstractNamePropertySection.java
new file mode 100644 (file)
index 0000000..3a871d6
--- /dev/null
@@ -0,0 +1,131 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 09.06.2009
+ * @version 1.0
+ */
+public abstract class AbstractNamePropertySection extends
+               AbstractPropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(AbstractNamePropertySection.class);
+       
+       protected TaxonBase<?> taxonBase;
+       protected NonViralName<?> name;
+       
+       protected Section section;
+       
+       protected Text cacheText;
+       protected Button editCacheButton;
+
+       protected Composite composite;
+
+       protected GridData layoutData;
+
+
+
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent,
+                       TabbedPropertySheetPage tabbedPropertySheetPage) {
+               super.createControls(parent, tabbedPropertySheetPage);
+               
+               layoutData = new GridData(SWT.FILL, SWT.TOP, true, false);
+               
+               section = getWidgetFactory().createSection(parent, ExpandableComposite.EXPANDED | ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
+
+        composite = getWidgetFactory().createComposite(section);
+        section.setClient(composite);
+        
+        composite.setLayout(new GridLayout(2, false));
+               
+               CLabel cacheLabel = getWidgetFactory().createCLabel(composite, "Cache");
+               cacheText = getWidgetFactory().createText(composite, "");
+               cacheText.setEditable(false);
+               cacheText.setLayoutData(layoutData);
+               
+               CLabel editCacheButtonLabel = getWidgetFactory().createCLabel(composite, "Make Cache Editable");
+               editCacheButton = getWidgetFactory().createButton(composite, "Make Cache Editable", SWT.TOGGLE);
+               
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               
+               
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        taxonBase = (TaxonBase) input;
+        name = HibernateProxyHelper.deproxy( taxonBase.getName(), NonViralName.class); 
+       }
+
+       protected Button createSearchButton(Composite parent){
+               
+               Button button = getWidgetFactory().createButton(parent, "Browse", SWT.PUSH); 
+               
+               button.addMouseListener( new SearchButtonListener());
+               
+               return button;
+       }
+       
+       class SearchButtonListener extends MouseAdapter{
+
+               /* (non-Javadoc)
+                * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
+                */
+               public void mouseUp(MouseEvent e) {
+                       logger.warn("Open search dialog");
+               }
+
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AnnotationSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AnnotationSection.java
new file mode 100644 (file)
index 0000000..97aeb30
--- /dev/null
@@ -0,0 +1,118 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class AnnotationSection extends AbstractPropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(AnnotationSection.class);
+
+       private TaxonBase taxonBase;
+
+       private Text labelText;
+       
+       /**
+        * 
+        */
+       public AnnotationSection() {
+               // TODO Auto-generated constructor stub
+       }
+       
+    private ModifyListener listener = new ModifyListener() {
+        
+        public void modifyText(ModifyEvent arg0) {
+//             TaxonBasePropertySource properties = (TaxonBasePropertySource) taxonBase
+//                .getAdapter(IPropertySource.class);
+//            properties.setPropertyValue(TaxonBasePropertySource.P_ID_TAXONNAME,
+//                labelText.getText());
+        }
+    };
+
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+        super.createControls(parent, tabbedPropertySheetPage);
+        Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+        FormData data;
+   
+        labelText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
+   
+               data = new FormData();
+               data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+               data.right = new FormAttachment(100, 0);
+               data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+               labelText.setLayoutData(data);
+               labelText.addModifyListener(listener);          
+               
+               CLabel labelLabel = getWidgetFactory()
+                              .createCLabel(composite, "Label:"); //$NON-NLS-1$
+               
+               data = new FormData();
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(labelText,
+                      -ITabbedPropertyConstants.HSPACE);
+               data.top = new FormAttachment(labelText, 0, SWT.CENTER);
+               labelLabel.setLayoutData(data);
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               labelText.setText(taxonBase.getName().getTitleCache());
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+               
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        this.taxonBase = (TaxonBase) input;
+
+               
+//             super.setInput(part, selection);
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AuthorSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/AuthorSection.java
new file mode 100644 (file)
index 0000000..b8790ab
--- /dev/null
@@ -0,0 +1,131 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class AuthorSection extends AbstractNamePropertySection {
+       private static final Logger logger = Logger.getLogger(AuthorSection.class);
+
+       private Section authorship;
+       private Composite authorshipComposite;
+       
+       private Section exAuthorship;
+       
+       private Section basionymAuthorship;
+       
+       private Section exBasionymAuthorship;
+
+       private INomenclaturalAuthor combinationAuthorTeam;
+
+       private INomenclaturalAuthor basionymAuthorTeam;
+
+       private INomenclaturalAuthor exCombinationAuthorTeam;
+
+       private INomenclaturalAuthor exBasionymAuthorTeam;
+
+       private Composite exAuthorshipComposite;
+
+       private Composite basionymAuthorshipComposite;
+
+       private Composite exBasionymAuthorshipComposite;
+
+       private Object sectionLayoutData;
+
+
+       
+       /**
+        * 
+        */
+       public AuthorSection() {}
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent,
+                       TabbedPropertySheetPage tabbedPropertySheetPage) {
+               super.createControls(parent, tabbedPropertySheetPage);
+
+               sectionLayoutData = new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1);
+               
+               authorship = getWidgetFactory().createSection(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
+               authorshipComposite = getWidgetFactory().createComposite(authorship);
+               authorship.setClient(authorshipComposite);
+               authorship.setLayoutData(sectionLayoutData);
+               
+               exAuthorship = getWidgetFactory().createSection(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
+               exAuthorshipComposite = getWidgetFactory().createComposite(exAuthorship);
+               exAuthorship.setClient(exAuthorshipComposite);
+               exAuthorship.setLayoutData(sectionLayoutData);
+               
+               basionymAuthorship = getWidgetFactory().createSection(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
+               basionymAuthorshipComposite = getWidgetFactory().createComposite(basionymAuthorship);
+               basionymAuthorship.setClient(basionymAuthorshipComposite);
+               basionymAuthorship.setLayoutData(sectionLayoutData);
+               
+               exBasionymAuthorship = getWidgetFactory().createSection(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
+               exBasionymAuthorshipComposite = getWidgetFactory().createComposite(exBasionymAuthorship);
+               exBasionymAuthorship.setClient(exBasionymAuthorshipComposite);
+               exBasionymAuthorship.setLayoutData(sectionLayoutData);
+       }
+
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               
+               section.setText("Author");
+               
+               cacheText.setText(name.getAuthorshipCache());
+               editCacheButton.setSelection(name.isProtectedAuthorshipCache());
+               
+               authorship.setText("Authorship");
+               exAuthorship.setText("Ex-Authorship");
+               basionymAuthorship.setText("Basionym Authorship");
+               exBasionymAuthorship.setText("Ex-Basionym Authorship");
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.propertysheet.tabbed.AbstractNamePropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+               super.setInput(part, selection);
+               
+               combinationAuthorTeam = name.getCombinationAuthorTeam();
+               exCombinationAuthorTeam = name.getExCombinationAuthorTeam();
+               basionymAuthorTeam = name.getBasionymAuthorTeam();
+               exBasionymAuthorTeam = name.getExBasionymAuthorTeam();
+       }
+
+       
+       
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/CreatedSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/CreatedSection.java
new file mode 100644 (file)
index 0000000..a070731
--- /dev/null
@@ -0,0 +1,142 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class CreatedSection extends AbstractPropertySection {
+       private static final Logger logger = Logger.getLogger(CreatedSection.class);
+
+       private TaxonBase taxonBase;
+
+       private Text createdText;
+       private Text createdByText;
+       
+       /**
+        * 
+        */
+       public CreatedSection() {
+               // TODO Auto-generated constructor stub
+       }
+       
+
+    private ModifyListener listener = new ModifyListener() {
+        
+        public void modifyText(ModifyEvent arg0) {
+//             TaxonBasePropertySource properties = (TaxonBasePropertySource) taxonBase
+//                .getAdapter(IPropertySource.class);
+//            properties.setPropertyValue(TaxonBasePropertySource.P_ID_TAXONNAME,
+//                labelText.getText());
+        }
+    };
+
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+        super.createControls(parent, tabbedPropertySheetPage);
+        Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+        FormData data;
+   
+        // created
+        createdText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
+   
+               data = new FormData();
+               data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+               data.right = new FormAttachment(100, 0);
+               data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+               createdText.setLayoutData(data);
+               createdText.addModifyListener(listener);                
+               
+               CLabel createdLabel = getWidgetFactory()
+                              .createCLabel(composite, "Created:");
+               
+               data = new FormData();
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(createdText,
+                      -ITabbedPropertyConstants.HSPACE);
+               data.top = new FormAttachment(createdText, 0, SWT.CENTER);
+               createdLabel.setLayoutData(data);
+               
+               // createdBy
+               createdByText = getWidgetFactory().createText(composite, ""); 
+        
+               data = new FormData();
+               data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+               data.right = new FormAttachment(100, 0);
+               data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+               createdByText.setLayoutData(data);
+               createdByText.addModifyListener(listener);              
+               
+               CLabel createdByLabel = getWidgetFactory()
+                              .createCLabel(composite, "Created By:");
+               
+               data = new FormData();
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(createdByText,
+                      -ITabbedPropertyConstants.HSPACE);
+               data.top = new FormAttachment(createdByText, 0, SWT.CENTER);
+               createdByLabel.setLayoutData(data);
+               
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               createdText.setText(taxonBase.getCreated().toString());
+               createdByText.setText(taxonBase.getCreatedBy() != null ? taxonBase.getCreatedBy().getUsername() : "");
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+               
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        this.taxonBase = (TaxonBase) input;
+
+               
+//             super.setInput(part, selection);
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameOverviewSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameOverviewSection.java
new file mode 100644 (file)
index 0000000..922b16d
--- /dev/null
@@ -0,0 +1,92 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 09.06.2009
+ * @version 1.0
+ */
+public class NameOverviewSection extends AbstractPropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(NameOverviewSection.class);
+       private TaxonBase<?> taxonBase;
+       private NonViralName<?> name;
+       private CLabel title;
+       
+       private CLabel parsingStatus;
+       private Composite composite;
+
+       /**
+        * 
+        */
+       public NameOverviewSection() {}
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent,
+                       TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+               super.createControls(parent, tabbedPropertySheetPage);
+               
+               composite = getWidgetFactory().createComposite(parent);
+               composite.setLayout(new GridLayout(1, false));
+               
+               title = getWidgetFactory().createCLabel(composite, "", SWT.WRAP);
+               parsingStatus = getWidgetFactory().createCLabel(composite, "");
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               
+               title.setText(name.getFullTitleCache());
+               
+               parsingStatus.setText(name.hasProblem() ? "Name has problems" : "Name was succesfully parsed");
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        taxonBase = (TaxonBase) input;
+        name = HibernateProxyHelper.deproxy( taxonBase.getName(), NonViralName.class); 
+       }
+
+       
+       
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NamePropertySection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NamePropertySection.java
new file mode 100644 (file)
index 0000000..7f1c3f9
--- /dev/null
@@ -0,0 +1,152 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.common.CdmUtils;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
+import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class NamePropertySection extends AbstractNamePropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(NamePropertySection.class);
+
+
+       private CCombo rankCombo;
+       
+       private Text uninomialText;
+       private Text infragenericEpithetText;
+       private Text specificEpithetText;
+       private Text infraSpecificEpithetText;
+       private Text appendedPhraseText;
+
+       private CCombo nomenclaturalStatusCombo;
+
+       
+
+       /**
+        * 
+        */
+       public NamePropertySection() {}
+
+    private ModifyListener listener = new ModifyListener() {
+        
+        public void modifyText(ModifyEvent arg0) {
+//             TaxonBasePropertySource properties = (TaxonBasePropertySource) taxonBase
+//                .getAdapter(IPropertySource.class);
+//            properties.setPropertyValue(TaxonBasePropertySource.P_ID_TAXONNAME,
+//                labelText.getText());
+//             labelText.setText(taxonBase.getName().getTitleCache());
+        }
+    };
+
+
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage){
+               super.createControls(parent, tabbedPropertySheetPage);
+               
+
+               // rank
+               CLabel rankComboLabel = getWidgetFactory().createCLabel(composite, "Rank:");
+               rankCombo = getWidgetFactory().createCCombo(composite);
+               rankCombo.setLayoutData(layoutData);
+               
+               for (Rank rank : CdmStore.getRanks()){
+                       rankCombo.add(rank.getLabel(CdmStore.getDefaultLanguage())); 
+               }
+
+               // uninomial
+               CLabel uninomialLabel = getWidgetFactory().createCLabel(composite, "Uninomial");
+               uninomialText = getWidgetFactory().createText(composite, "");
+               uninomialText.setLayoutData(layoutData);
+               
+               // infrageneric epithet
+               CLabel  infragenericEpithetLabel = getWidgetFactory().createCLabel(composite, "Infrageneric Epithet");
+               infragenericEpithetText = getWidgetFactory().createText(composite, "");
+               infragenericEpithetText.setLayoutData(layoutData);
+               
+               // specific epithet
+               CLabel  specificEpithetLabel = getWidgetFactory().createCLabel(composite, "Specific Epithet");
+               specificEpithetText = getWidgetFactory().createText(composite, "");
+               specificEpithetText.setLayoutData(layoutData);
+               
+               // infraspecific epithet
+               CLabel  infraspecificEpithetLabel = getWidgetFactory().createCLabel(composite, "Infraspecific Epithet");
+               infraSpecificEpithetText = getWidgetFactory().createText(composite, "");
+               infraSpecificEpithetText.setLayoutData(layoutData);
+               
+               // appended phrase
+               CLabel  appendedPhraseLabel = getWidgetFactory().createCLabel(composite, "Appended Phrase");
+               appendedPhraseText = getWidgetFactory().createText(composite, "");
+               appendedPhraseText.setLayoutData(layoutData);
+               
+               // nomenclatural status
+               CLabel nomenclaturalStatusLabel = getWidgetFactory().createCLabel(composite, "Nomenclatural Status", SWT.NO_BACKGROUND);
+               nomenclaturalStatusCombo = getWidgetFactory().createCCombo(composite);
+               nomenclaturalStatusCombo.setLayoutData(layoutData);
+               
+               for(NomenclaturalStatusType nomenclaturalStatusType : CdmStore.getNomenclaturalStatusTypes()){
+                       nomenclaturalStatusCombo.add(nomenclaturalStatusType.getLabel(CdmStore.getDefaultLanguage()));
+               }
+        
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               
+               section.setText("Name");
+               
+               cacheText.setText(name.getNameCache());
+               
+               editCacheButton.setSelection(name.isProtectedNameCache());
+               
+               uninomialText.setText(CdmUtils.Nz(name.getGenusOrUninomial()));
+               infragenericEpithetText.setText(CdmUtils.Nz(name.getInfraGenericEpithet()));
+               specificEpithetText.setText(CdmUtils.Nz(name.getSpecificEpithet()));
+               infraSpecificEpithetText.setText(CdmUtils.Nz(name.getInfraSpecificEpithet()));
+               
+               appendedPhraseText.setText(CdmUtils.Nz(name.getAppendedPhrase()));
+               
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameRelationsSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NameRelationsSection.java
new file mode 100644 (file)
index 0000000..8396685
--- /dev/null
@@ -0,0 +1,118 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class NameRelationsSection extends AbstractPropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(NameRelationsSection.class);
+
+       private TaxonBase taxonBase;
+
+       private Text labelText;
+       
+       /**
+        * 
+        */
+       public NameRelationsSection() {
+               // TODO Auto-generated constructor stub
+       }
+       
+    private ModifyListener listener = new ModifyListener() {
+        
+        public void modifyText(ModifyEvent arg0) {
+//             TaxonBasePropertySource properties = (TaxonBasePropertySource) taxonBase
+//                .getAdapter(IPropertySource.class);
+//            properties.setPropertyValue(TaxonBasePropertySource.P_ID_TAXONNAME,
+//                labelText.getText());
+        }
+    };
+
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+        super.createControls(parent, tabbedPropertySheetPage);
+        Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+        FormData data;
+   
+        labelText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
+   
+               data = new FormData();
+               data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+               data.right = new FormAttachment(100, 0);
+               data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+               labelText.setLayoutData(data);
+               labelText.addModifyListener(listener);          
+               
+               CLabel labelLabel = getWidgetFactory()
+                              .createCLabel(composite, "Label:"); //$NON-NLS-1$
+               
+               data = new FormData();
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(labelText,
+                      -ITabbedPropertyConstants.HSPACE);
+               data.top = new FormAttachment(labelText, 0, SWT.CENTER);
+               labelLabel.setLayoutData(data);
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               labelText.setText(taxonBase.getName().getTitleCache());
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+               
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        this.taxonBase = (TaxonBase) input;
+
+               
+//             super.setInput(part, selection);
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NomRefPropertySection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/NomRefPropertySection.java
new file mode 100644 (file)
index 0000000..3596aa3
--- /dev/null
@@ -0,0 +1,160 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.reference.ReferenceBase;
+import eu.etaxonomy.taxeditor.propertysheet.name.ScientificNamePropertySource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class NomRefPropertySection extends AbstractNamePropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(NomRefPropertySection.class);
+       
+       private ReferenceBase<?> reference;
+       private String microReference;
+
+       
+       private CCombo referenceTypeCombo;
+       
+       private Text titleText;
+       private Text placePublishedText;
+       private Text datePublishedText;
+       private Text editorText;
+       private Text publisherText;
+       private Text inSeriesText;
+       private Text pagesText;
+       private Text seriesPartText;
+       private Text volumeText;
+       private Text isbnText;
+       private Text editionText;
+       
+       
+       private Text microReferenceText;
+
+       private Button searchButton;
+       
+       /**
+        * 
+        */
+       public NomRefPropertySection() {}
+
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+        super.createControls(parent, tabbedPropertySheetPage);
+        
+        CLabel empty = getWidgetFactory().createCLabel(composite, "");
+        searchButton = createSearchButton(composite);
+        
+        
+        CLabel referenceTypeLabel = getWidgetFactory().createCLabel(composite, "Reference Type");
+        referenceTypeCombo = getWidgetFactory().createCCombo(composite);
+        referenceTypeCombo.setLayoutData(layoutData);
+        
+        for (Class clazz : CdmStore.getReferenceTypes().keySet()){
+               referenceTypeCombo.add(CdmStore.getReferenceTypes().get(clazz));
+        }
+        
+        CLabel titleLabel = getWidgetFactory().createCLabel(composite, "Title");
+        titleText = getWidgetFactory().createText(composite, "");
+        titleText.setLayoutData(layoutData);
+        
+        CLabel placePublishedLabel = getWidgetFactory().createCLabel(composite, "Place Published");
+        placePublishedText = getWidgetFactory().createText(composite, "");
+        placePublishedText.setLayoutData(layoutData);
+        
+        CLabel datePublishedLabel = getWidgetFactory().createCLabel(composite, "Date Published");
+        datePublishedText = getWidgetFactory().createText(composite, "");
+        datePublishedText.setLayoutData(layoutData);
+        
+        CLabel editorLabel = getWidgetFactory().createCLabel(composite, "Editor");
+        editorText = getWidgetFactory().createText(composite, "");
+        editorText.setLayoutData(layoutData);
+        
+        CLabel publisherLabel = getWidgetFactory().createCLabel(composite, "Publisher");
+        publisherText = getWidgetFactory().createText(composite, "");
+        publisherText.setLayoutData(layoutData);
+        
+        CLabel inSeriesLabel = getWidgetFactory().createCLabel(composite, "In Series");
+        inSeriesText = getWidgetFactory().createText(composite, "");
+        inSeriesText.setLayoutData(layoutData);
+        
+        CLabel pagesLabel = getWidgetFactory().createCLabel(composite, "Pages");
+        pagesText = getWidgetFactory().createText(composite, "");
+        pagesText.setLayoutData(layoutData);
+        
+        CLabel seriesPartLabel = getWidgetFactory().createCLabel(composite, "Series Part");
+        seriesPartText = getWidgetFactory().createText(composite, "");
+        seriesPartText.setLayoutData(layoutData);
+        
+        CLabel volumeLabel = getWidgetFactory().createCLabel(composite, "Volume");
+        volumeText = getWidgetFactory().createText(composite, "");
+        volumeText.setLayoutData(layoutData);
+        
+        CLabel isbnLabel = getWidgetFactory().createCLabel(composite, "ISBN");
+        isbnText = getWidgetFactory().createText(composite, "");
+        isbnText.setLayoutData(layoutData);
+        
+        CLabel editionLabel = getWidgetFactory().createCLabel(composite, "Edition");
+        editionText = getWidgetFactory().createText(composite, "");
+        editionText.setLayoutData(layoutData);
+        
+        CLabel microReferenceLabel = getWidgetFactory().createCLabel(composite, "Reference Detail");
+        microReferenceText = getWidgetFactory().createText(composite, "");
+        microReferenceText.setLayoutData(layoutData);
+        
+        
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               
+               section.setText("Nomenclatural Reference");
+               
+               cacheText.setText(reference.getTitleCache());
+               editCacheButton.setSelection(reference.isProtectedTitleCache());
+               
+               microReferenceText.setText(microReference);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+        super.setInput(part, selection);
+        reference = name.getNomenclaturalReference();
+        microReference = name.getNomenclaturalMicroReference();
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/SecundumSection.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/SecundumSection.java
new file mode 100644 (file)
index 0000000..302e009
--- /dev/null
@@ -0,0 +1,121 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class SecundumSection extends AbstractPropertySection {
+       private static final Logger logger = Logger
+                       .getLogger(SecundumSection.class);
+
+       private TaxonBase taxonBase;
+
+       private Text labelText;
+
+       
+       /**
+        * 
+        */
+       public SecundumSection() {
+               // TODO Auto-generated constructor stub
+       }
+       
+
+
+    private ModifyListener listener = new ModifyListener() {
+        
+        public void modifyText(ModifyEvent arg0) {
+//             TaxonBasePropertySource properties = (TaxonBasePropertySource) taxonBase
+//                .getAdapter(IPropertySource.class);
+//            properties.setPropertyValue(TaxonBasePropertySource.P_ID_TAXONNAME,
+//                labelText.getText());
+        }
+    };
+
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+        */
+       @Override
+       public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
+               
+        super.createControls(parent, tabbedPropertySheetPage);
+        Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+        FormData data;
+   
+        labelText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
+   
+               data = new FormData();
+               data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+               data.right = new FormAttachment(100, 0);
+               data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+               labelText.setLayoutData(data);
+               labelText.addModifyListener(listener);          
+               
+               CLabel labelLabel = getWidgetFactory()
+                              .createCLabel(composite, "Label:"); //$NON-NLS-1$
+               
+               data = new FormData();
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(labelText,
+                      -ITabbedPropertyConstants.HSPACE);
+               data.top = new FormAttachment(labelText, 0, SWT.CENTER);
+               labelLabel.setLayoutData(data);
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+        */
+       @Override
+       public void refresh() {
+               super.refresh();
+               labelText.setText(taxonBase.getName().getTitleCache());
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void setInput(IWorkbenchPart part, ISelection selection) {
+               
+        super.setInput(part, selection);
+        Assert.isTrue(selection instanceof IStructuredSelection);
+        Object input = ((IStructuredSelection) selection).getFirstElement();
+        Assert.isTrue(input instanceof TaxonBase);
+        this.taxonBase = (TaxonBase) input;
+
+               
+//             super.setInput(part, selection);
+       }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyPageLabelProvider.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyPageLabelProvider.java
new file mode 100644 (file)
index 0000000..0c8fd82
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class TabbedPropertyPageLabelProvider extends LabelProvider implements
+               ILabelProvider {
+       private static final Logger logger = Logger
+                       .getLogger(TabbedPropertyPageLabelProvider.class);
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+        */
+       @Override
+       public String getText(Object element) {
+               return super.getText(element);
+       }
+       
+       
+       
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyView.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TabbedPropertyView.java
new file mode 100644 (file)
index 0000000..9b897a6
--- /dev/null
@@ -0,0 +1,68 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class TabbedPropertyView extends ViewPart implements ITabbedPropertySheetPageContributor {
+       private static final Logger logger = Logger
+                       .getLogger(TabbedPropertyView.class);
+
+       public static final String ID = "eu.etaxonomy.taxeditor.views.tabbedPropertiesView";
+       
+       /**
+        * 
+        */
+       public TabbedPropertyView() {
+               // TODO Auto-generated constructor stub
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+        */
+       @Override
+       public void createPartControl(Composite parent) {
+               // TODO Auto-generated method stub
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+        */
+       @Override
+       public void setFocus() {
+               // TODO Auto-generated method stub
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId()
+        */
+       public String getContributorId() {
+               return getSite().getId();
+       }
+       
+    public Object getAdapter(Class adapter) {
+        if (adapter == IPropertySheetPage.class)
+            return new TabbedPropertySheetPage(this);
+        return super.getAdapter(adapter);
+    }
+}
diff --git a/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TaxonTypeMapper.java b/taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/propertysheet/tabbed/TaxonTypeMapper.java
new file mode 100644 (file)
index 0000000..2133a6b
--- /dev/null
@@ -0,0 +1,36 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.propertysheet.tabbed;
+
+import org.apache.log4j.Logger;
+import org.eclipse.ui.views.properties.tabbed.AbstractTypeMapper;
+
+import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+
+/**
+ * @author n.hoffmann
+ * @created 05.06.2009
+ * @version 1.0
+ */
+public class TaxonTypeMapper extends AbstractTypeMapper {
+       private static final Logger logger = Logger
+                       .getLogger(TaxonTypeMapper.class);
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.views.properties.tabbed.ITypeMapper#mapType(java.lang.Object)
+        */
+       public Class mapType(Object object) {
+               if(object instanceof TaxonNameEditor){
+                       return ((TaxonNameEditor)object).getTaxon().getClass();
+               }
+               return super.mapType(object);
+       }
+}
index 8b518af44cf48ccc67c3d04a9d57e61dd75cc889..392364072299bcd8ddad7dd9d0d387b11011b90f 100644 (file)
@@ -20,8 +20,8 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
 \r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 import eu.etaxonomy.taxeditor.propertysheet.type.wizard.TypeListWizard;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
 \r
 /**\r
  * Property sheet descriptor that pops up a dialog window\r
index 9cd3db9f20c22d3ce3201a34c14b8ac19200edad..7571f6a93ffc024ba6b490ea9c3bd447b309aa96 100644 (file)
@@ -31,8 +31,8 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;\r
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
 import eu.etaxonomy.taxeditor.editor.reference.ReferenceSelectComposite;\r
-import eu.etaxonomy.taxeditor.store.model.Resources;\r
-import eu.etaxonomy.taxeditor.store.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.model.Resources;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index e31910e3e938daf0356a4d2c327f648ba6055123..22a320768b21aaedb0a1ce984f16f87b85a3e286 100644 (file)
@@ -36,7 +36,7 @@ import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;\r
 import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r
index c745eecf5b640b9f5a3e10822d19f4b3e7ccb70e..2917181f421d34eecfdc20c5eaaa063b2cf931a2 100644 (file)
@@ -15,7 +15,7 @@ import org.eclipse.jface.wizard.WizardPage;
 \r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 \r
 \r
 /**\r
index 029b6893a91b1f6a81eb5a876366d1f43df2a60f..88e5cb77c04429d86b91cc07d51c736e62c9211e 100644 (file)
@@ -19,7 +19,7 @@ import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.occurrence.Specimen;\r
-import eu.etaxonomy.taxeditor.store.model.NameUtil;\r
+import eu.etaxonomy.taxeditor.model.NameUtil;\r
 \r
 /**\r
  * @author p.ciardelli\r