merging in latest changes from trunk
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Wed, 11 Jul 2012 10:35:18 +0000 (10:35 +0000)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Wed, 11 Jul 2012 10:35:18 +0000 (10:35 +0000)
790 files changed:
.gitattributes
.gitignore
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/plugin.xml
eu.etaxonomy.taxeditor.application/pom.xml
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationUtil.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchWindowAdvisor.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Uses.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/build.properties
eu.etaxonomy.taxeditor.bulkeditor/pom.xml
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineDocumentProvider.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/handler/DeleteObjectHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorLineDisplay.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorUtil.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/DynamicMarkerTypeEditingMenu.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/SetMergeTargetHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/NameCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/preference/BulkEditorMarkerPreferencePage.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/SimpleSelectionProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/internal/TaxeditorEditorPlugin.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/AbstractGraphKeyEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListItem.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/CreateNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/DeleteNodeHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/ContainerFactory.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeAcceptedTaxonToSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateSynonymInHomotypicalGroupHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/RemoveBasionymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SetBasionymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphContentProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/AbstractDynamicConceptRelationMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/OpenRelatedConceptHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/operation/CreateConceptRelationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveLabelProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionElementHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DynamicFeatureMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseRecordHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseSummaryHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.feature.platform/.project
eu.etaxonomy.taxeditor.feature.platform/feature.xml
eu.etaxonomy.taxeditor.feature.platform/pom.xml
eu.etaxonomy.taxeditor.feature/.project
eu.etaxonomy.taxeditor.feature/build.properties
eu.etaxonomy.taxeditor.feature/feature.xml
eu.etaxonomy.taxeditor.feature/pom.xml
eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.help/build.properties
eu.etaxonomy.taxeditor.help/html/concepts/maintopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/concepts/subtopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/concepts/subtopic2.html [deleted file]
eu.etaxonomy.taxeditor.help/html/gettingstarted/a_succesful_parsed_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/about_bulk_editing.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/activating_taxon_records_in_the_taxon_name_panel.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_a_description_tree_to_a_taxon.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_a_heterotypic_synonym.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_a_homotypic_synonym.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_a_species_description_to_a_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_annotations_to_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_common_name_descriptive_data_to_a_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_descriptive_data_to_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_media_data_to_a_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_new_options_to_drop-down_menus.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_supplemental_data_to_a_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_taxa_to_your_classification_the_quick_way.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_taxa_to_your_classification_using_the_general_menu.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/adding_the_nomenclatural_status_of_a_name_using_the_details_panel.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/black_text_only.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/building_a_description_tree_by_adding_descriptive_data_types.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/bulk_editing.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/bulk_editing_names.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/changing_a_synonym_to_an_accepted_name.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/changing_an_accepted_name_to_a_synonym.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/closing_taxon_records.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/connecting_to_a_different_datasource.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/create_an_image_gallery.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/creating_a_desktop_shortcut_windows_only.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/creating_a_new_taxonomic_classification_with_reference_details.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/creating_multiple_datasources.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/customising_views_of_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/dealing_with_parsing_problems.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/deleting_a_synonym.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/deleting_a_taxon.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/downloading_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/editing_options_of_drop-down_menus.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/editing_synonyms.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/enabling_unicode_characters.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/extracting_the_contents_of_the_compressed_folder_ff.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/extracting_the_contents_of_the_compressed_folder_ie.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/logging_in.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/managing_taxonomic_relationships.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/mouse_and_keyboard_functionality.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/moving_the_position_of_taxa_within_a_taxonomic_tree.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/navigating_between_taxon_records.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/note_on_terms_and_organisation_withing_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/opening_and_closing_panels.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/opening_the_descriptive_panel_for_a_taxon.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/opening_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/orange_warning_icon_-_parsing_completed_but_checks_are_recommended.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/parts_of_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/rank.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/red_warning_icon_-_parsing_has_been_unsuccesful.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/removing_the_taxonomic_editor.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/saving_synonyms.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/saving_your_work.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/searching_for_a_taxon_record.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/show_hide_options_of_drop-down_menus.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/the_menus.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/the_show_view_menu.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/the_taxon_name_panel.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/types_of_descriptive_data.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/types_of_supplemental_data.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/uninomial_and_specific_epithet.html
eu.etaxonomy.taxeditor.help/html/gettingstarted/windows_vista.html
eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/nameparser/authorship_part.html [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/nameparser/name_part.html [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/nameparser/nomenclatural_status_part.html [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/nameparser/overview.html [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/nameparser/reference_part.html [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/html/reference/maintopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/reference/subtopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/reference/subtopic2.html [deleted file]
eu.etaxonomy.taxeditor.help/html/samples/maintopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/samples/subtopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/samples/subtopic2.html [deleted file]
eu.etaxonomy.taxeditor.help/html/tasks/maintopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/tasks/subtopic.html [deleted file]
eu.etaxonomy.taxeditor.help/html/tasks/subtopic2.html [deleted file]
eu.etaxonomy.taxeditor.help/html/toc.html [deleted file]
eu.etaxonomy.taxeditor.help/p2.inf [new file with mode: 0644]
eu.etaxonomy.taxeditor.help/plugin.xml
eu.etaxonomy.taxeditor.help/pom.xml
eu.etaxonomy.taxeditor.help/toc.xml
eu.etaxonomy.taxeditor.help/tocnameparser.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/p2.inf [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/pom.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.printpublisher/build.properties
eu.etaxonomy.taxeditor.printpublisher/p2.inf [new file with mode: 0644]
eu.etaxonomy.taxeditor.printpublisher/pom.xml
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/icons/leaf_detail.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/pom.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/UsageTermCollection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDragListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermContentProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermTransfer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateDefinedTermHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateTermVocabularyHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermMenu.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/DefinedTermEditorInputFactory.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ExtensionTypeEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/FeatureEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/MarkerTypeEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ModifierEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaLevelEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/StateEditorInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/AvailableFeaturesWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/labels/DefaultLabelStrategy.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CdmProgressMonitorAdapter.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AbstractNewEntityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/ExternalReferenceServiceWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldObservationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGroupWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewInstitutionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPersonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPolytomousKeyWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewReferenceWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTeamWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/PolytomousKeyWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPostOperationEnabled.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguagePreferencePage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/ExtensionTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/FeatureMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/LanguageMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/MarkerTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/MeasurementUnitMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameRelationshipTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NameTypeDesignationStatusMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NamedAreaTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/NomenclaturalStatusTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PresenceAbsenceMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/PreservationMethodMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/RankMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/SpecimenTypeDesignationStatusMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/StageMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/TaxonRelationshipTypeMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/StoreUtil.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractEnumComboElement.java with 53% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractTermComboElement.java with 65% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/UriDialog.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AgentSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ClassificationSelectionDialog.java with 95% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/CollectionSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/DerivedUnitSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureTreeSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FieldObservationSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/GroupSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/InstitutionSelectionDialog.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NameSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NamedAreaSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NomenclaturalAuthorTeamSelectionDialog.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PersonSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PolytomousKeySelectionDialog.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ReferenceSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonBaseSelectionDialog.java with 82% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonNodeSelectionDialog.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TeamSelectionDialog.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/UserSelectionDialog.java with 98% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmEntityWizardPage.java with 93% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElement.java with 92% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElementWithErrors.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElementWithErrors.java with 88% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractFormSection.java with 87% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BrowserElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/BrowserElement.java with 88% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java with 73% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmPropertyChangeEvent.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmPropertyChangeEvent.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CheckboxElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CheckboxElement.java with 91% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/DateDetailSection.java with 93% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ICdmFormElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ICdmFormElement.java with 88% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEnableableFormElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEnableableFormElement.java with 93% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEntityElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEntityElement.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IErrorIntolerableElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IErrorIntolerableElement.java with 71% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IExceptionHandler.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IExceptionHandler.java with 81% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ILabeledElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ILabeledElement.java with 93% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IPropertyChangeEmitter.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IPropertyChangeEmitter.java with 67% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IRelevantFormElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IRelevantFormElement.java with 92% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectable.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectable.java with 95% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectableElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectableElement.java with 81% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyStatementElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyStatementElement.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyValueViewerElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyValueViewerElement.java with 91% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LabelElement.java with 78% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LanguageStringWithLabelElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LanguageStringWithLabelElement.java with 86% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LayoutConstants.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/MultilanguageTextElement.java with 78% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java with 91% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PartialElement.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PointElement.java with 91% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RootElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/RootElement.java with 87% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/SelectionArbitrator.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/SelectionArbitrator.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextActionElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextActionElement.java with 89% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextWithLabelElement.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TimePeriodElement.java with 94% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ToggleableTextElement.java with 93% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/UriWithLabelElement.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlReferencePage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/EditPasswordElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/EditPasswordElement.java with 88% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizard.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizardPage.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizardPage.java with 89% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractIdentifiableEntityDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/EmptyElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/InstitutionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/InstitutionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/InstitutionWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/PersonDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/PersonDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/PersonWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamMemberElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamMemberSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamOrPersonBaseDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/ClassificationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/ClassificationDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/ClassificationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ReferencedEntityDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DerivedUnitElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescribedSpecimenSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementMediaSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionSourceSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/GeoScopeElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/GeoScopeSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/MediaDetailsSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ModifierSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/NaturalLanguageDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/NaturalLanguageSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/ScopeSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateDataElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StateDataSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/AbstractDetailedDescriptionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CategoricalDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CommonNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/DistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/IndividualsAssociationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TaxonInteractionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TextDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/operation/ChangeDescriptionElementType.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GrantedAuthorityDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GrantedAuthorityDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GroupDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GroupDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/GroupDetailWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/MemberDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/MemberDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/GeographicalScopeDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyNodeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyNodeDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/ScopeRestrictionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/TaxonomicScopeSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AbstractTypeDesignationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/HybridDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/HybridDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameTypeDesignationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/ProtologueElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/ProtologueSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SpecimenTypeDesignationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractDeterminationEventDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CurrentDeterminationDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationEventDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationHistoryDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/NamedAreaDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SourceCollectionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenCollectionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenCollectionDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/NomenclaturalReferenceDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/NomenclaturalReferenceDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractOriginalSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractReferencedEntityElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ExtensionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ExtensionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/HeadlineSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/IdentifiableSourceElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MarkerElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MarkerSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/SourceSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/VersionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/VersionSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/ParsingMessageElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/ParsingMessagesSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AgentSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/CollectionSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/DerivedUnitBaseSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElement.java with 79% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureTreeSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/GroupSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/InstitutionSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NamedAreaSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NomenclaturalAuthorTeamSelectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PersonSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeyNodeSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeySelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ReferenceSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/SynonymSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TeamSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/UserSelectionElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AnnotationTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/DeterminationModifierComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/EmptyComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ExtensionTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/LanguageComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MarkerTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MeasurementUnitComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ModifierComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameRelationshipTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameTypeDesignationStatusComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NamedAreaTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalCodeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalStatusTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PresenceAbsenceTermComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PreservationMethodComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RankComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceSystemComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RightsTypeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ScopeComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SexComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SpecimenTypeDesignationStatusComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StageComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StateComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StatisticalMeasureComboElement.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/GoogleLanguageApiWrapper.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationMetaDataWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractAccountViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmEditorViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmMetaDataAwareDataSourceContainer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/AbstractDataSourceHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/ChangeConnectionHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/DataSourceMenuPropertyTester.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/EditDataSourceHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
eu.etaxonomy.taxeditor.test/.classpath
eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.test/build.properties
eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor Tests.launch
eu.etaxonomy.taxeditor.test/pom.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java [moved from eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java with 73% similarity]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java [moved from eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java with 72% similarity]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java [deleted file]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java [deleted file]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product
eu.etaxonomy.taxeditor/pom.xml
eu.etaxonomy.taxeditor/rcp.target
pom.xml
src/site/apt/getting-started.apt

index 29b16e4e571dd2f8d4ae5d00ba764304203b9473..7c4e0033f6ab7ab79d8838605b68cceca7def64a 100644 (file)
@@ -32,6 +32,7 @@ eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspect
 eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java -text
 eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java -text
 eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Taxonomic.java -text
+eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Uses.java -text
 eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.bulkeditor/.classpath -text
 eu.etaxonomy.taxeditor.bulkeditor/.project -text
@@ -227,6 +228,7 @@ eu.etaxonomy.taxeditor.cdmlib/lib/opencsv-1.8.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.apache.commons.codec-1.3.0.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.common-3.6.0.v20100503.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.6.2.R36x_v20110210.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.aop-3.0.4.RELEASE.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.aop-3.0.4.RELEASEsrc.zip -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.asm-3.0.4.RELEASE.jar -text
@@ -255,7 +257,8 @@ eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web-3.0.4.RELEASE.jar -tex
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web-3.0.4.RELEASEsrc.zip -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web.servlet-3.0.4.RELEASE.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip -text
-eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip -text
+eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/postgresql-8.2-504.jdbc4.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/sanselan-0.97-incubator.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/saxon9he.jar -text
@@ -275,6 +278,7 @@ eu.etaxonomy.taxeditor.cdmlib/lib/spring-modules-lucene-0.8a.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/spring-modules-lucene-0.8asrc.zip -text
 eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-config-3.0.5.RELEASE.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-core-3.0.5.RELEASE.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/wsdl4j-1.6.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/wsdl4j-1.6.1src.zip -text
 eu.etaxonomy.taxeditor.cdmlib/lib/xalan-2.7.0.jar -text
@@ -341,6 +345,7 @@ eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Simple
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputDataChangeBehaviour.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputFactory.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/ViewerConfiguration.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/EditNewTaxonHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenParentHandler.java -text
@@ -431,6 +436,9 @@ eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/c
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptLabelProvider.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewerSorter.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphContentProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/AbstractDynamicConceptRelationMenu.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeHandler.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/ChangeConceptRelationshipTypeMenu.java -text
@@ -473,6 +481,15 @@ eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/m
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/DeleteMediaOperation.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/MoveMediaInListOperation.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/RemoveImageFromDescriptionElementOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseRecordHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseSummaryHandler.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java -text
 eu.etaxonomy.taxeditor.editor/src/main/resources/TaonDescriptionEditor.screen -text
 eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/Application.java -text
@@ -509,9 +526,6 @@ eu.etaxonomy.taxeditor.help/.classpath -text
 eu.etaxonomy.taxeditor.help/.project -text
 eu.etaxonomy.taxeditor.help/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.help/build.properties -text
-eu.etaxonomy.taxeditor.help/html/concepts/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/concepts/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/concepts/subtopic2.html -text
 eu.etaxonomy.taxeditor.help/html/gettingstarted/a_succesful_parsed_taxon_record.html -text
 eu.etaxonomy.taxeditor.help/html/gettingstarted/about_bulk_editing.html -text
 eu.etaxonomy.taxeditor.help/html/gettingstarted/about_the_manual.html -text
@@ -589,23 +603,204 @@ eu.etaxonomy.taxeditor.help/html/gettingstarted/types_of_supplemental_data.html
 eu.etaxonomy.taxeditor.help/html/gettingstarted/uninomial_and_specific_epithet.html -text
 eu.etaxonomy.taxeditor.help/html/gettingstarted/windows_vista.html -text
 eu.etaxonomy.taxeditor.help/html/gettingstarted/windows_xp_and_older_systems.html -text
+eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg -text svneol=unset#unset
+eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg -text
 eu.etaxonomy.taxeditor.help/html/img/cybergate.jpg -text
-eu.etaxonomy.taxeditor.help/html/reference/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/reference/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/reference/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/samples/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/samples/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/samples/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/maintopic.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/subtopic.html -text
-eu.etaxonomy.taxeditor.help/html/tasks/subtopic2.html -text
-eu.etaxonomy.taxeditor.help/html/toc.html -text
+eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg -text
+eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg -text
+eu.etaxonomy.taxeditor.help/html/nameparser/authorship_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/name_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/nomenclatural_status_part.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/overview.html -text
+eu.etaxonomy.taxeditor.help/html/nameparser/reference_part.html -text
 eu.etaxonomy.taxeditor.help/original_document/Taxonomic_Editor_User_Manual_Version_4.doc -text
+eu.etaxonomy.taxeditor.help/p2.inf -text
 eu.etaxonomy.taxeditor.help/plugin.xml -text
 eu.etaxonomy.taxeditor.help/pom.xml -text
 eu.etaxonomy.taxeditor.help/src/eu/etaxonomy/taxeditor/help/Activator.java -text
 eu.etaxonomy.taxeditor.help/toc.xml -text
 eu.etaxonomy.taxeditor.help/tocgettingstarted.xml -text
+eu.etaxonomy.taxeditor.help/tocnameparser.xml -text
 eu.etaxonomy.taxeditor.navigation/.classpath -text
 eu.etaxonomy.taxeditor.navigation/.project -text
 eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF -text
@@ -614,6 +809,7 @@ eu.etaxonomy.taxeditor.navigation/icons/edit_16x16.gif -text
 eu.etaxonomy.taxeditor.navigation/icons/preferences-system-windows.png -text
 eu.etaxonomy.taxeditor.navigation/icons/system-search.png -text
 eu.etaxonomy.taxeditor.navigation/icons/tree_icon.jpg -text
+eu.etaxonomy.taxeditor.navigation/p2.inf -text
 eu.etaxonomy.taxeditor.navigation/plugin.xml -text
 eu.etaxonomy.taxeditor.navigation/pom.xml -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java -text
@@ -642,12 +838,14 @@ eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigatio
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeLabelProvider.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodePropertyTester.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java -text
+eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/EditHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NewClassificationHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NewTaxonNodeHandler.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RefreshTreeHandler.java -text
+eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/EditClassificationOperation.java -text
 eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java -text
@@ -671,6 +869,7 @@ eu.etaxonomy.taxeditor.printpublisher/.classpath -text
 eu.etaxonomy.taxeditor.printpublisher/.project -text
 eu.etaxonomy.taxeditor.printpublisher/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.printpublisher/build.properties -text
+eu.etaxonomy.taxeditor.printpublisher/p2.inf -text
 eu.etaxonomy.taxeditor.printpublisher/plugin.xml -text
 eu.etaxonomy.taxeditor.printpublisher/pom.xml -text
 eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/PrintUtil.java -text
@@ -769,6 +968,7 @@ eu.etaxonomy.taxeditor.store/icons/icon.ico -text
 eu.etaxonomy.taxeditor.store/icons/icon.png -text
 eu.etaxonomy.taxeditor.store/icons/import_wiz.gif -text
 eu.etaxonomy.taxeditor.store/icons/large_image.gif -text
+eu.etaxonomy.taxeditor.store/icons/leaf_detail.png -text
 eu.etaxonomy.taxeditor.store/icons/linkto_help.gif -text
 eu.etaxonomy.taxeditor.store/icons/lockedstate.gif -text
 eu.etaxonomy.taxeditor.store/icons/ma_12x12.gif -text
@@ -846,6 +1046,32 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wiz
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceSQLServerWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceTypeSelectionWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/UsageTermCollection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDragListener.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermContentProvider.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermTransfer.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateDefinedTermHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateTermVocabularyHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermMenu.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/DefinedTermEditorInputFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ExtensionTypeEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/FeatureEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/MarkerTypeEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ModifierEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaLevelEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/StateEditorInput.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/AvailableFeaturesWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/AvailableFeaturesWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java -text
@@ -894,6 +1120,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CdmProgr
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CommonHelper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ContextListenerAdapter.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DataChangeBridge.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/FeatureNodeContainer.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/FeatureNodeContainerTree.java -text
@@ -913,6 +1140,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/NameHelp
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/NomenclaturalCodeHelper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/PolytomousKeyRelationship.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxeditorPartService.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonTransfer.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TextHelper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TimeHelper.java -text
@@ -952,6 +1180,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Pre
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/Resources.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicEditorGeneralPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TaxonomicPreferences.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java -text
@@ -987,66 +1216,67 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermMana
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/internal/TaxeditorStorePlugin.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/UriDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AgentSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ClassificationSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/CollectionSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/DerivedUnitSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FeatureTreeSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/FieldObservationSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/GroupSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/InstitutionSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NameSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NamedAreaSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/NomenclaturalAuthorTeamSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PersonSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/PolytomousKeySelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ReferenceSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonBaseSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TaxonNodeSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/TeamSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/UserSelectionDialog.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmEntityWizardPage.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElementWithErrors.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractFormSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/BrowserElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmPropertyChangeEvent.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CheckboxElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/DateDetailSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ICdmFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEnableableFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IEntityElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IErrorIntolerableElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IExceptionHandler.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ILabeledElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IPropertyChangeEmitter.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IRelevantFormElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectable.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectableElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyStatementElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyValueViewerElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LanguageStringWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/MultilanguageTextElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PartialElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PointElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/RootElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/SelectionArbitrator.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextActionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TimePeriodElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ToggleableTextElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/UriWithLabelElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/EditPasswordElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizard.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AgentSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CollectionSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/DerivedUnitSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FieldObservationSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GroupSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NameSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PersonSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PolytomousKeySelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ReferenceSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonBaseSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/UserSelectionDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElementWithErrors.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BrowserElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmPropertyChangeEvent.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CheckboxElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ICdmFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEnableableFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IEntityElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IErrorIntolerableElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IExceptionHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ILabeledElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IPropertyChangeEmitter.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IRelevantFormElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectable.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectableElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyStatementElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyValueViewerElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LanguageStringWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LayoutConstants.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RootElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/SelectionArbitrator.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextActionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/IOpenUrlEnabled.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlContentProvider.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlLabelProvider.java -text
@@ -1054,6 +1284,9 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/Ope
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlResultPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/EditPasswordElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java -text
@@ -1079,6 +1312,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/cla
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeWizardPage.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ReferencedEntityDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DerivedUnitElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescribedSpecimenSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionDetailElement.java -text
@@ -1194,6 +1429,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/sup
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractReferencedEntityElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CreditSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ExtensionElement.java -text
@@ -1212,62 +1449,27 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/tax
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/GroupsByUserDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/user/UserDetailWizardPage.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AgentSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/CollectionSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/DerivedUnitBaseSelectionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureTreeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/GroupSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/InstitutionSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NamedAreaSelectionElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NomenclaturalAuthorTeamSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PersonSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeyNodeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeySelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ReferenceSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/SynonymSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TeamSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/UserSelectionElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractEnumComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractTermComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AnnotationTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/DeterminationModifierComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/EmptyComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ExtensionTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/LanguageComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MarkerTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MeasurementUnitComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ModifierComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameRelationshipTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameTypeDesignationStatusComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NamedAreaTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalCodeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalStatusTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PresenceAbsenceTermComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PreservationMethodComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RankComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceSystemComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RightsTypeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ScopeComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SexComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SpecimenTypeDesignationStatusComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StageComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StateComboElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StatisticalMeasureComboElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/GoogleLanguageApiWrapper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/ITranslationServiceWrapper.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/LanguageNotSupportedException.java -text
@@ -1322,13 +1524,20 @@ eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs -text
 eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.test/build.properties -text
 eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor[!!-~]Tests.launch -text
+eu.etaxonomy.taxeditor.test/pom.xml -text
 eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java -text
-eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java -text
 eu.etaxonomy.taxeditor/.classpath -text
 eu.etaxonomy.taxeditor/.project -text
 eu.etaxonomy.taxeditor/deploy_nightly.sh -text
index 4042679d72517316e9d09373f7e95bbc9f6d0708..71532edf7732609b6990994a576be5adab2b21b9 100644 (file)
@@ -1,3 +1,4 @@
+/.project
 eu.etaxonomy.taxeditor.application/.settings
 eu.etaxonomy.taxeditor.application/target
 eu.etaxonomy.taxeditor.bulkeditor/.settings
@@ -7,11 +8,17 @@ eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
 eu.etaxonomy.taxeditor.cdmlib/dist
 eu.etaxonomy.taxeditor.cdmlib/lib/cdmlib*
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.common-3.6.0.v20110523.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.servletbridge.extensionbundle-1.2.0.v20100503.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.transforms.hook-1.0.300.v20100719.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.weaving.hook-1.0.100.v20110502.jar
+eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar
 eu.etaxonomy.taxeditor.cdmlib/log4j-1.2.14src.zip
 eu.etaxonomy.taxeditor.cdmlib/target
 eu.etaxonomy.taxeditor.editor/.settings
 eu.etaxonomy.taxeditor.editor/target
 eu.etaxonomy.taxeditor.feature.platform/.settings
+eu.etaxonomy.taxeditor.feature.platform/bin
 eu.etaxonomy.taxeditor.feature.platform/target
 eu.etaxonomy.taxeditor.feature/.settings
 eu.etaxonomy.taxeditor.feature/compile.eu.etaxonomy.taxeditor.product.feature.xml
@@ -19,6 +26,7 @@ eu.etaxonomy.taxeditor.feature/plugin_customization.ini
 eu.etaxonomy.taxeditor.feature/target
 eu.etaxonomy.taxeditor.feature/workspace
 eu.etaxonomy.taxeditor.help/.settings
+eu.etaxonomy.taxeditor.help/original_document/~$xonomic_Editor_User_Manual_Version_4.doc
 eu.etaxonomy.taxeditor.help/target
 eu.etaxonomy.taxeditor.navigation/.settings
 eu.etaxonomy.taxeditor.navigation/target
@@ -28,6 +36,7 @@ eu.etaxonomy.taxeditor.store/.settings
 eu.etaxonomy.taxeditor.store/hibernate.log
 eu.etaxonomy.taxeditor.store/target
 eu.etaxonomy.taxeditor.test/screenshots/*.jpeg
+eu.etaxonomy.taxeditor.test/target
 eu.etaxonomy.taxeditor/.settings
 eu.etaxonomy.taxeditor/target
 /runtime-taxeditor.product
index 8047bafc35e1c0c6f945cbbf42598f6b9d78d3fc..5ec49f46ceb472447a666ff8ec2bed10554a43ef 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Application
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
 Bundle-Vendor: EDIT
 Bundle-Localization: plugin
index 61c00707866d224a44f7bcd0a39fbc8f4533d054..61f897c866ce4cf0eb0288cb8a0558c4db4eddd5 100644 (file)
             id="eu.etaxonomy.taxeditor.application.perspective.polytomous"\r
             name="Polytomous Key">\r
       </perspective>\r
+       <perspective\r
+            class="eu.etaxonomy.taxeditor.perspective.Uses"\r
+            id="eu.etaxonomy.taxeditor.application.perspective.uses"\r
+            name="Uses">\r
+      </perspective>\r
+     \r
    </extension>\r
    <!--extension\r
          point="org.eclipse.ui.views">\r
              id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
        </showInPart>\r
     </perspectiveExtension>\r
+    <perspectiveExtension\r
+          targetID="eu.etaxonomy.taxeditor.application.perspective.uses">\r
+       <showInPart\r
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
+       </showInPart>\r
+    </perspectiveExtension>\r
  </extension>\r
    <extension\r
          point="org.eclipse.ui.menus">\r
index 3ddb0afc0741e33b783496abc53681402326acf1..b70e907c21606778ee2197271396747958a17d3e 100644 (file)
@@ -4,7 +4,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 982c8fd988fe19bca2100c5397953a4541c453b0..105f62e2de1d786e91b4c4cded4ba473b8da8790 100644 (file)
@@ -26,7 +26,7 @@ public class ApplicationUtil extends AbstractUtility {
         *
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId(){
+       public static String getPluginId(){
                return TaxonomicEditorPlugin.PLUGIN_ID;
        }
        
index 72ee9adf8745b16ba8e6c9cd280c9f85daed2aa1..f974377c7600ce42ffa95a2d36a0d58f73ddc79a 100644 (file)
@@ -15,7 +15,7 @@ import org.osgi.framework.ServiceReference;
 
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 
 /**
  * <p>ApplicationWorkbenchWindowAdvisor class.</p>
diff --git a/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Uses.java b/eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/perspective/Uses.java
new file mode 100644 (file)
index 0000000..7f7216c
--- /dev/null
@@ -0,0 +1,34 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.perspective;\r
+\r
+import org.eclipse.ui.IPageLayout;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.UsesViewPart;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;\r
+import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;\r
+\r
+/**\r
+ * Uses Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class Uses extends Default {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)\r
+        */\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void createInitialLayout(IPageLayout layout) {\r
+               layout.addView(TaxonNavigator.ID, IPageLayout.LEFT, 0.25f, layout.getEditorArea());\r
+               layout.addView(DetailsViewPart.ID, IPageLayout.RIGHT, 0.25f, layout.getEditorArea());\r
+               layout.addView(UsesViewPart.ID, IPageLayout.BOTTOM, 0.25f, layout.getEditorArea());\r
+               \r
+               createAdditionalFolder(layout, layout.getEditorArea());\r
+       }\r
+       \r
+\r
+}\r
+\r
index bb18a73f37df3451d947946a3e02816c26e235d5..da5914383b9282c755e914b24438a54c27ebd801 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Bulkeditor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,eu.etaxonomy.taxeditor.annotatedlineeditor.handler,eu.etaxonomy.taxeditor.bulkeditor,eu.etaxonomy.taxeditor.bulkeditor.command,eu.etaxonomy.taxeditor.bulkeditor.handler,eu.etaxonomy.taxeditor.bulkeditor.input,eu.etaxonomy.taxeditor.bulkeditor.internal,eu.etaxonomy.taxeditor.bulkeditor.referencingobjects
index a41e228dcfe1d6ffb0e29108af99a9fedef97e60..a78e9b43982761539c4a02f7e1b75d9981143088 100644 (file)
@@ -4,5 +4,4 @@ bin.includes = META-INF/,\
                .,\\r
                icons/,\\r
                plugin.xml,\\r
-               build.properties,\\r
                p2.inf\r
index 1eba534601168fe0444a8d15e2b3a1c1c12c45b0..db7b958d0176da9fbc5c7ea95ea1231d61c0978c 100644 (file)
@@ -4,7 +4,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 0cc8432b989a8195c371404dd5f7808d52b0dd12..2bd124f21bf3a1739cc4428459b651ba34630e63 100644 (file)
@@ -251,7 +251,7 @@ public class AnnotatedLineDocumentProvider extends AbstractDocumentProvider {
                                        persistenceService.merge(annotation.getEntity(), annotation.getMergeTarget()); //  merge                                        
                                } else {
                                        // TODO clarify w AM whether this needs to be executed on merged objects
-                                       persistenceService.delete(annotation.getEntity()); // delete
+                                       //persistenceService.delete(annotation.getEntity()); // delete
                                }
                        }
                        model.clearDeletedAnnotations();
index 86806573103a966ed9fa4e8997b6439a47da0598..dd461e780bf7c76c185069310cbb05b019a5cfd1 100644 (file)
@@ -303,4 +303,5 @@ public class AnnotatedLineEditor extends TextEditor implements IConversationEnab
                // TODO Auto-generated method stub
                return false;
        }
+
 }
index 127ffc81cabb34700e61f509b414452fe4c3ef91..f8014e3a3b29bfe0ab41f255d7f8285d29791498 100644 (file)
@@ -38,7 +38,7 @@ public class DeleteObjectHandler extends AbstractHandler {
                
                if (editor instanceof AnnotatedLineEditor) {
                                                
-                       ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+                       ISelection selection = HandlerUtil.getCurrentSelection(event);
                        if (selection instanceof TextSelection) {
                                
                                // Get current line
index 3cfe8bd2c14cf882bc92110b534b226888ac1bf0..cd53d16cb07990ba7a0d70eae4a6bb8ba04f1016 100644 (file)
@@ -20,13 +20,11 @@ import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Display;
 
-import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
@@ -92,7 +90,7 @@ public class BulkEditorLineDisplay implements ILineDisplayStrategy {
                AbstractBulkEditorInput input = editor.getEditorInput();
                String typeText = input.getTypeText(entity);
                
-               supplementalText += CdmUtils.isEmpty(typeText) ? "" : String.format(" [%s]", typeText);
+               supplementalText += StringUtils.isBlank(typeText) ? "" : String.format(" [%s]", typeText);
                
                if (entity instanceof IAnnotatableEntity) {
                        IAnnotatableEntity annotatableEntity = (IAnnotatableEntity) HibernateProxyHelper.deproxy(entity);
@@ -102,13 +100,14 @@ public class BulkEditorLineDisplay implements ILineDisplayStrategy {
                        String markerText = "";
                        List<String> markers = new ArrayList<String>();
                        for (Marker marker : annotatableEntity.getMarkers()) {
-                               markers.add(String.format("%1s = %2s", marker.getMarkerType().getLabel(), marker.getFlag() ? "yes" : "no"));
+                               String markerLabel = marker.getMarkerType() == null? " unknown marker " : marker.getMarkerType().getLabel();
+                               markers.add(String.format("%1s = %2s", markerLabel, marker.getFlag() ? "yes" : "no"));
                        }
                        if (! markers.isEmpty()) {
                                markerText = StringUtils.join(markers, ", ");
                        }
                        
-                       supplementalText += CdmUtils.isEmpty(markerText) ? "" : String.format(" [%s]", markerText);
+                       supplementalText += StringUtils.isBlank(markerText) ? "" : String.format(" [%s]", markerText);
                }
                
                return supplementalText;
index e6bc27539d7a4f49147ea7a64977c87474ded4e1..77e70cad0ca9de8c9e46bf0f2389d7ffa915486a 100644 (file)
@@ -73,7 +73,7 @@ public class BulkEditorUtil extends AbstractUtility{
         *
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId(){
+       public static String getPluginId(){
                return TaxeditorBulkeditorPlugin.PLUGIN_ID;
        }
        
index 117f32e43a878b9c2369ef2e3cb529d7ede50d59..d244ab961a840973aef747cc764d0413e0585514 100644 (file)
@@ -49,7 +49,7 @@ public class DynamicMarkerTypeEditingMenu extends CompoundContributionItem {
                return new IContributionItem[] {
                                new ContributionItem() {
                                        public void fill(Menu menu, int index){
-                                               for(MarkerType markerType : CdmStore.getTermManager().getPreferredMarkerTypes()){
+                                               for(MarkerType markerType : CdmStore.getTermManager().getPreferredTerms(MarkerType.class)){
                                                        createMenuItem(menu, markerType);
                                                }
                                        }
index 96f73719a000068aead6e0260f51f51d9e3ac72f..3ba11e54d3fc3b85430903f69d198fb35009ed9d 100644 (file)
@@ -63,8 +63,12 @@ public class DeleteHandler extends AbstractHandler {
                                for(Object object : structuredSelection.toList()){
                                        
                                        LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);
-                                                                       
-       //                              persistenceService.delete(object);
+                                                       
+                                       try {
+                                               persistenceService.delete(object);
+                                       } catch (Exception e){
+                                               BulkEditorUtil.errorDialog("Could not delete", getClass(), e.getMessage(), null);
+                                       }
                                        ((BulkEditor) editor).removeAnnotatedLine(annotation);
                                        
                                }                               
index bc11b149bc1ac9d4d2df51f66e414fce1893fd00..98491db149451b2a5e54fa5fefdd4b0a52140d77 100644 (file)
@@ -51,7 +51,7 @@ public class SetMergeTargetHandler extends AbstractHandler {
                                        (LineAnnotationModel) provider.getAnnotationModel(input);
                        IDocument document = provider.getDocument(input);
                        
-                       ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+                       ISelection selection = HandlerUtil.getCurrentSelection(event);
                        if (selection instanceof TextSelection) {
                                Annotation annotation = null;
                                
index b999d4e385eace55026bdecb0c8db139e732b8e1..12fe3a4e3ae52e6c3e42100870410ae1a58512d3 100644 (file)
@@ -57,7 +57,7 @@ public class NameCreator implements IEntityCreator<TaxonNameBase> {
         */
        public Map<Object, String> getKeyLabelPairs() {
                Map<Object, String> result = new HashMap<Object, String>();
-               for (Rank rank : CdmStore.getTermManager().getPreferredRanks()) {
+               for (Rank rank : CdmStore.getTermManager().getPreferredTerms(Rank.class)) {
                        result.put(rank, rank.getLabel());
                }
                return result;
index e677b4d333027dcbd134994dee1913d3b20e61e8..b2fdb3cfb9934c5b7bcb863739e5a36dbf1d87d7 100644 (file)
@@ -56,7 +56,7 @@ public class BulkEditorMarkerPreferencePage extends PreferencePage implements IW
                Composite container = new Composite(parent, SWT.NULL);
                container.setLayout(new GridLayout());
 
-               for (final MarkerType markerType : TermStore.getNonTechnicalMarkerTypes()) {
+               for (final MarkerType markerType : TermStore.getTerms(MarkerType.class)) {
                        final Button button = new Button(container, SWT.CHECK);
                        button.setText(String.format("Edit '%s' markers", markerType.getLabel()));
                
index 0a914bb5ac922f181d43cd2fe188dfead6d699bd..0d65744eea06931023445d9a97ca5da6135541f2 100644 (file)
@@ -1,14 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <classpath>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-8.0.1.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.12-SNAPSHOT.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.12-SNAPSHOT.jar"/>\r
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
        <classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>\r
@@ -41,7 +40,6 @@
        <classpathentry exported="true" kind="lib" path="lib/hibernate-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-commons-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-core-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-core-3.4.0-SNAPSHOTsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-search-3.1.0.GA.jar" sourcepath="lib/hibernate-search-3.1.0.GAsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-tools-3.2.0.ga.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.0.0.CR1.jar" sourcepath="lib/hibernate-validator-4.0.0.CR1src.zip"/>\r
@@ -91,7 +89,7 @@
        <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.0.4.RELEASEsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web-3.0.4.RELEASEsrc.zip"/>\r
        <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.1-FINAL.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.6.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/postgresql-8.2-504.jdbc4.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/saxon9he.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/xsltc.jar"/>\r
        <classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/spring-xml-1.5.6.jar"/>\r
        <classpathentry kind="output" path="target/classes"/>\r
 </classpath>\r
index 25d10cb9fe173a05ca8ad5e2926c1f1b0e4b681f..7ccdcee89d4790832049f03881c12454a5bea11e 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: CDM Library Dependencies Plugin
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
@@ -78,6 +78,7 @@ Export-Package: com.google.api,
    eu.etaxonomy.cdm.persistence.fetch,
    eu.etaxonomy.cdm.model.common",
  eu.etaxonomy.cdm.api.service.config;uses:="eu.etaxonomy.cdm.model.reference,eu.etaxonomy.cdm.model.taxon,eu.etaxonomy.cdm.persistence.query",
+ eu.etaxonomy.cdm.api.service.exception,
  eu.etaxonomy.cdm.api.service.pager,
  eu.etaxonomy.cdm.api.service.pager.impl;uses:="eu.etaxonomy.cdm.api.service.pager",
  eu.etaxonomy.cdm.api.utility;uses:="eu.etaxonomy.cdm.model.taxon,eu.etaxonomy.cdm.model.media,eu.etaxonomy.cdm.model.description",
@@ -88,6 +89,7 @@ Export-Package: com.google.api,
    eu.etaxonomy.cdm.model.common",
  eu.etaxonomy.cdm.common;uses:="org.jdom.output,org.jdom",
  eu.etaxonomy.cdm.common.media,
+ eu.etaxonomy.cdm.common.monitor,
  eu.etaxonomy.cdm.database;
   uses:="org.springframework.transaction,
    org.apache.log4j,
@@ -798,7 +800,6 @@ Bundle-ClassPath: .,
  lib/hibernate-annotations-3.4.0-SNAPSHOT.jar,
  lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar,
  lib/hibernate-core-3.4.0-SNAPSHOT.jar,
- lib/hibernate-envers-3.4.0-SNAPSHOT.jar,
  lib/hibernate-search-3.1.0.GA.jar,
  lib/hibernate-tools-3.2.0.ga.jar,
  lib/hibernate-validator-4.0.0.CR1.jar,
@@ -850,7 +851,7 @@ Bundle-ClassPath: .,
  lib/org.springframework.transaction-3.0.4.RELEASE.jar,
  lib/org.springframework.web-3.0.4.RELEASE.jar,
  lib/org.springframework.web.servlet-3.0.4.RELEASE.jar,
- lib/poi-3.1-FINAL.jar,
+ lib/poi-3.6.jar,
  lib/postgresql-8.2-504.jdbc4.jar,
  lib/sanselan-0.97-incubator.jar,
  lib/saxon9he.jar,
@@ -875,12 +876,13 @@ Bundle-ClassPath: .,
  lib/xom-1.0.jar,
  lib/xsltc.jar,
  lib/xstream-1.3.1.jar,
- lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-io-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-model-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-print-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-services-3.0.8-SNAPSHOT.jar,
- lib/yjp-controller-api-redist-8.0.1.jar
+ lib/hibernate-envers-3.4.0-SNAPSHOT.jar,
+ lib/spring-xml-1.5.6.jar,
+ lib/cdmlib-commons-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-io-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-model-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-print-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.0.12-SNAPSHOT.jar,
+ lib/cdmlib-services-3.0.12-SNAPSHOT.jar
index 8e0cea68953c593871d08b8545485730b20790a6..425f3b3205607be5aee24472e6c82218b7b58c27 100644 (file)
@@ -1,5 +1,4 @@
 bin.includes = META-INF/,\\r
-               lib/,\\r
                lib/junit-4.8.1src.zip,\\r
                lib/org.springframework.aop-3.0.4.RELEASEsrc.zip,\\r
                lib/org.springframework.asm-3.0.4.RELEASEsrc.zip,\\r
@@ -46,7 +45,6 @@ bin.includes = META-INF/,\
                lib/hibernate-annotations-3.4.0-SNAPSHOT.jar,\\r
                lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar,\\r
                lib/hibernate-core-3.4.0-SNAPSHOT.jar,\\r
-               lib/hibernate-envers-3.4.0-SNAPSHOT.jar,\\r
                lib/hibernate-search-3.1.0.GA.jar,\\r
                lib/hibernate-tools-3.2.0.ga.jar,\\r
                lib/hibernate-validator-4.0.0.CR1.jar,\\r
@@ -66,7 +64,6 @@ bin.includes = META-INF/,\
                lib/jsr250-api-1.0.jar,\\r
                lib/jta.jar,\\r
                lib/jtds-1.2.2.jar,\\r
-               lib/junit-4.4.jar,\\r
                lib/junit-4.8.1.jar,\\r
                lib/log4j-1.2.14.jar,\\r
                lib/lsid-client-1.1.2.jar,\\r
@@ -97,7 +94,6 @@ bin.includes = META-INF/,\
                lib/org.springframework.transaction-3.0.4.RELEASE.jar,\\r
                lib/org.springframework.web-3.0.4.RELEASE.jar,\\r
                lib/org.springframework.web.servlet-3.0.4.RELEASE.jar,\\r
-               lib/poi-3.1-FINAL.jar,\\r
                lib/postgresql-8.2-504.jdbc4.jar,\\r
                lib/sanselan-0.97-incubator.jar,\\r
                lib/saxon9he.jar,\\r
@@ -122,28 +118,21 @@ bin.includes = META-INF/,\
                lib/xom-1.0.jar,\\r
                lib/xsltc.jar,\\r
                lib/xstream-1.3.1.jar,\\r
-               lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-io-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-model-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-print-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.0.8-SNAPSHOT.jar,\\r
-               lib/yjp-controller-api-redist-8.0.1.jar\r
+               lib/poi-3.6.jar,\\r
+               lib/hibernate-envers-3.4.0-SNAPSHOT.jar,\\r
+               lib/spring-xml-1.5.6.jar,\\r
+               lib/cdmlib-commons-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-ext-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-io-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-model-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-persistence-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-print-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-remote-3.0.12-SNAPSHOT.jar,\\r
+               lib/cdmlib-services-3.0.12-SNAPSHOT.jar\r
 jars.compile.order = cdmLibrary.jar\r
 src.includes = lib/\r
-jre.compilation.profile = J2SE-1.6\r
 bin.excludes = lib/activation-1.1src.zip,\\r
                lib/c3p0-0.9.1src.zip,\\r
-               lib/cdmlib-commons-3.0-sources.jar,\\r
-               lib/cdmlib-ext-3.0-sources.jar,\\r
-               lib/cdmlib-io-3.0-sources.jar,\\r
-               lib/cdmlib-model-3.0-sources.jar,\\r
-               lib/cdmlib-persistence-3.0-sources.jar,\\r
-               lib/cdmlib-print-3.0-sources.jar,\\r
-               lib/cdmlib-remote-3.0-sources.jar,\\r
-               lib/cdmlib-services-3.0-sources.jar,\\r
                lib/commons-beanutils-1.7.0src.zip,\\r
                lib/commons-collections-3.2src.zip,\\r
                lib/commons-dbcp-1.2.2src.zip,\\r
@@ -189,19 +178,8 @@ bin.excludes = lib/activation-1.1src.zip,\
                lib/slf4j-log4j12-1.5.2src.zip,\\r
                lib/spring-modules-cache-0.7src.zip,\\r
                lib/spring-modules-lucene-0.8asrc.zip,\\r
-               lib/spring-security-core-3.0.0.RELEASEsrc.zip,\\r
                lib/wsdl4j-1.6.1src.zip,\\r
                lib/xml-resolver-1.2src.zip,\\r
                lib/xstream-1.3.1src.zip,\\r
-               lib/junit-4.8.1src.zip,\\r
-               lib/cdmlib-services-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-remote-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-print-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-persistence-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-model-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-io-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-ext-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-commons-3.0.6-SNAPSHOT-sources.jar,\\r
-               lib/cdmlib-commons-3.0.6-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.0.6-SNAPSHOT.jar\r
+               lib/junit-4.8.1src.zip\r
 \r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar
new file mode 100644 (file)
index 0000000..25f1180
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.osgi-3.7.2.v20120110-1415.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar
deleted file mode 100644 (file)
index 9e472a1..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.1-FINAL.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip b/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip
new file mode 100644 (file)
index 0000000..7661e26
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6-src.zip differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar
new file mode 100644 (file)
index 0000000..9972d97
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/poi-3.6.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar
new file mode 100644 (file)
index 0000000..2a95501
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/spring-xml-1.5.6.jar differ
index 58a76073b1e642c34cbdf0719a0b269f38dd5699..13c544b1182e063880bea1b3a26551d7468eda70 100644 (file)
@@ -3,7 +3,7 @@
        <parent>\r
                <groupId>eu.etaxonomy</groupId>\r
                <artifactId>taxeditor-parent</artifactId>\r
-               <version>3.0.6-SNAPSHOT</version>\r
+               <version>3.0.12-SNAPSHOT</version>\r
        </parent>\r
        <modelVersion>4.0.0</modelVersion>\r
        <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
@@ -15,7 +15,7 @@
                        <plugin>\r
                                <groupId>org.apache.maven.plugins</groupId>\r
                                <artifactId>maven-dependency-plugin</artifactId>\r
-                               <version>2.3</version>\r
+                               <version>2.4</version>\r
                                <executions>\r
                                        <execution>\r
                                                <id>copy-dependencies</id>\r
@@ -31,7 +31,7 @@
                                                        <excludeTransitive>true</excludeTransitive>\r
                                                </configuration>\r
                                        </execution>\r
-                                       <!--execution>\r
+                                       <execution>\r
                                    <id>copy-dependencies-sources</id>\r
                                    <phase>validate</phase>\r
                                    <goals>\r
@@ -44,8 +44,9 @@
                                      <overWriteReleases>true</overWriteReleases>\r
                                      <overWriteSnapshots>true</overWriteSnapshots>\r
                                      <excludeTransitive>true</excludeTransitive>\r
+                                     <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>\r
                                    </configuration>\r
-                         </execution-->\r
+                         </execution>\r
                                </executions>\r
                        </plugin>\r
                </plugins>\r
index a8ff4092a6e9c6ed546769275b29fd4cbc714274..65af273551cd1ad26209008134461bd953c30a59 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Editor Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
 Bundle-Vendor: %Bundle-Vendor.0
 Bundle-Localization: plugin
@@ -12,7 +12,8 @@ Export-Package: eu.etaxonomy.taxeditor.editor,
  eu.etaxonomy.taxeditor.editor.name,
  eu.etaxonomy.taxeditor.editor.name.handler,
  eu.etaxonomy.taxeditor.editor.view.descriptive,
- eu.etaxonomy.taxeditor.editor.view.media
+ eu.etaxonomy.taxeditor.editor.view.media,
+ eu.etaxonomy.taxeditor.editor.view.uses
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.core.expressions,
index 99bef4cf7d14692d4be97fafc7c4ec8273780c2b..408559a75b14dc9059d180f1e7cddbd8995cd6d7 100644 (file)
                id="eu.etaxonomy.taxeditor.editor.view.descriptive"
                name="Descriptive"
                restorable="true">
+         </view>
+          <view
+               allowMultiple="false"
+               class="eu.etaxonomy.taxeditor.editor.view.uses.UsesViewPart"
+               icon="icons/leaf.png"
+               id="eu.etaxonomy.taxeditor.editor.view.uses"
+               name="Uses"
+               restorable="true">
          </view>
          <view
                allowMultiple="false"
                name="Concept Relations"
                restorable="true">
          </view>
+         <view
+               class="eu.etaxonomy.taxeditor.editor.view.concept.graph.ConceptGraphView"
+               icon="icons/address-book-new.png"
+               id="eu.etaxonomy.taxeditor.editor.view.concept.graph"
+               name="Concept Graph"
+               restorable="true">
+         </view>
       </extension>
    <extension
          point="org.eclipse.ui.elementFactories">
                   value="eu.etaxonomy.taxeditor.editor.view.concept">
             </parameter>
          </command>
+         <command
+               commandId="org.eclipse.ui.views.showView"
+               label="Concept Graph"
+               style="push">
+            <parameter
+                  name="org.eclipse.ui.views.showView.viewId"
+                  value="eu.etaxonomy.taxeditor.editor.view.concept.graph">
+            </parameter>
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="isShowExperimentalFeatures">
+               </reference>
+            </visibleWhen>
+         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.navigate">
                style="push">
          </command>
       </menuContribution>
+      
+      
+      
+      
+      <menuContribution
+            locationURI="popup:eu.etaxonomy.taxeditor.editor.view.uses">
+         <command
+               commandId="eu.etaxonomy.taxeditor.use.commands.adduse"
+               label="New Use"
+               style="push">
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.use.createUseSummary"
+               label="New Use Summary"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <or>
+                  <reference
+                        definitionId="isDescription">
+                  </reference>
+                  <reference
+                        definitionId="isDescriptionElement">
+                  </reference>
+                  <reference
+                        definitionId="isFeatureNodeContainer">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
+               label="New Use Record"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <or>
+                  <reference
+                        definitionId="isDescription">
+                  </reference>
+                  <reference
+                        definitionId="isDescriptionElement">
+                  </reference>
+                  <reference
+                        definitionId="isFeatureNodeContainer">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.usesEditor.separator3"
+               visible="true">
+         </separator>
+         <separator
+               name="taxeditor-editor.separator1"
+               visible="true">
+         </separator>
+         <separator
+               name="eu.etaxonomy.taxeditor.taxonDescriptionEditor.separator.afterNew"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.edit.delete"
+               label="Delete"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.taxonDescriptionEditor.separator.afterDelete"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.file.save"
+               label="Save"
+               style="push">
+         </command>
+      </menuContribution>
+      
+      
+      
+      
+      
       <menuContribution
             locationURI="popup:eu.etaxonomy.taxeditor.editor.view.media">
          <command
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DeleteHandler"
+            commandId="org.eclipse.ui.edit.delete">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="eu.etaxonomy.taxeditor.editor.view.uses">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="Name Commands"
             id="eu.etaxonomy.taxeditor.description.commands.moveDescriptionElements"
             name="Move Description Elements">
       </command>
+      <category
+            id="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+            name="-- New Uses">
+      </category>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseHandler"
+            id="eu.etaxonomy.taxeditor.use.commands.adduse"
+            name="New Use">
+      </command>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseSummaryHandler"
+            id="eu.etaxonomy.taxeditor.editor.use.createUseSummary"
+            name="New Use Summary">
+      </command>
+      <command
+            categoryId="eu.etaxonomy.taxeditor.editor.view.uses.command.category"
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.uses.handler.CreateUseRecordHandler"
+            id="eu.etaxonomy.taxeditor.editor.use.createUseRecord"
+            name="New Use Record">
+      </command>
       <category
             id="eu.etaxonomy.taxeditor.editor.media.category"
             name="-- Media">
index 0564aa0012f417378d8cf2bee0c9f28a19176b59..044ef40a5d74dc709e2a9611faaf74d6a72d562b 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-    <version>3.0.6-SNAPSHOT</version>
+    <version>3.0.12-SNAPSHOT</version>
   </parent>
   
   <modelVersion>4.0.0</modelVersion>
index 2fcf7ad76592820c07cddfabb8c949a43f4682f1..222bf2c60890352ea1fd390835eceeafa3645e9a 100644 (file)
@@ -272,7 +272,8 @@ public class EditorUtil extends AbstractUtility {
 
                        boolean doSave = MessageDialog
                                        .openConfirm(shell, "Confirm save",
-                                                       "The current editor must be saved before this action can be executed.");
+                                                       "Warning - this operation will save the editor. This will also save all other unsaved changes " +
+                                                       "in your working editor to the database. Please 'Cancel' if you are not ready to do this.");
 
                        if (!doSave) {
                                return false;
@@ -306,7 +307,7 @@ public class EditorUtil extends AbstractUtility {
         * 
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId() {
+       public static String getPluginId() {
                return TaxeditorEditorPlugin.PLUGIN_ID;
        }
 
index 3621107b92f8835dcc57daad413901f9e5de1522..c348d5c343c3d9600b9256a4ffb4cb91c1923cd4 100644 (file)
@@ -1,11 +1,11 @@
 /**
-* 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.
-*/
+ * 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;
 
@@ -17,7 +17,6 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.commands.operations.UndoContext;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorSite;
@@ -40,16 +39,18 @@ import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 
 /**
- *
- * Generates the tabbed editor with <code>TaxonNameEditor</code> on top and tabs for
- *  "Descriptions", "Concepts", "Geography", etc.
- *
+ * 
+ * Generates the tabbed editor with <code>TaxonNameEditor</code> on top and tabs
+ * for "Descriptions", "Concepts", "Geography", etc.
+ * 
  * @author p.ciardelli
  * @author n.hoffmann
  * @created 15.05.2008
  * @version 1.0
  */
-public class MultiPageTaxonEditor extends FormEditor implements IConversationEnabled, IPostOperationEnabled, IDirtyMarkableSelectionProvider, IPartContentHasDetails { 
+public class MultiPageTaxonEditor extends FormEditor implements
+               IConversationEnabled, IPostOperationEnabled,
+               IDirtyMarkableSelectionProvider, IPartContentHasDetails {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
        public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
@@ -61,24 +62,28 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
        private IUndoContext undoContext;
 
        private TaxonEditorInput input;
-       
+
        /**
-        * <p>Constructor for MultiPageTaxonEditor.</p>
+        * <p>
+        * Constructor for MultiPageTaxonEditor.
+        * </p>
         */
        public MultiPageTaxonEditor() {
-               super();                
+               super();
                undoContext = new UndoContext();
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void dispose() {
                conversation.unregisterForDataStoreChanges(this);
                conversation.close();
-               super.dispose();                
+               super.dispose();
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
         */
        /** {@inheritDoc} */
@@ -87,88 +92,105 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
                input = (TaxonEditorInput) getEditorInput();
                conversation = input.getConversationHolder();
                conversation.registerForDataStoreChanges(this);
-               
+
                try {
-                       addPage(Page.NAME.getIndex(), new TaxonNameEditor(this), getEditorInput());
-//                     setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
-                       
+                       addPage(Page.NAME.getIndex(), new TaxonNameEditor(this),
+                                       getEditorInput());
+                       // setPageText(Page.NAME.getIndex(), Page.NAME.getTitle());
+
                        // TODO lazy create
-//                     addPage(Page.DESCRIPTIVE.getIndex(), new TaxonDescriptionTreeEditor(this), getEditorInput());
-//                     setPageText(Page.DESCRIPTIVE.getIndex(), Page.DESCRIPTIVE.getTitle());
-                       
-//                     EditorUtil.showPropertySheet();
-                                       
+                       // addPage(Page.DESCRIPTIVE.getIndex(), new
+                       // TaxonDescriptionTreeEditor(this), getEditorInput());
+                       // setPageText(Page.DESCRIPTIVE.getIndex(),
+                       // Page.DESCRIPTIVE.getTitle());
+
+                       // EditorUtil.showPropertySheet();
+
                } catch (PartInitException e) {
                        EditorUtil.error(getClass(), e);
                }
        }
-       
-       
+
        /** {@inheritDoc} */
        @Override
        public void doSave(IProgressMonitor monitor) {
                monitor.beginTask("Saving Editor", 4);
-               try{
-                       if( ! conversation.isBound()){
+               try {
+                       if (!conversation.isBound()) {
                                conversation.bind();
                        }
                        monitor.worked(1);
-                       
-                       for(IEditorPart editorPage : getPages()){
-                               if(editorPage instanceof TaxonNameEditor){
-                                       if(((TaxonNameEditor) editorPage).checkForEmptyNames()){
-                                               MessageDialog.openWarning(EditorUtil.getShell(), "No Name Specified", "An attempt was made to save a taxon or synonym with " +
-                                               "an empty name. Operation was cancelled.");
+
+                       for (IEditorPart editorPage : getPages()) {
+                               if (editorPage instanceof TaxonNameEditor) {
+                                       if (((TaxonNameEditor) editorPage).checkForEmptyNames()) {
+                                               MessageDialog
+                                                               .openWarning(
+                                                                               EditorUtil.getShell(),
+                                                                               "No Name Specified",
+                                                                               "An attempt was made to save a taxon or synonym with "
+                                                                                               + "an empty name. Operation was cancelled.");
                                                return;
                                        }
                                }
-       
+
                                editorPage.doSave(monitor);
                                monitor.worked(1);
                        }
-                       
+
                        // commit the conversation and start a new transaction immediately
                        conversation.commit(true);
                        monitor.worked(1);
-                       
+
                        this.setDirty(false);
                        monitor.worked(1);
-               }catch(Exception e){
-                       EditorUtil.errorDialog("An error occurred while saving", getClass(), "An error occurred while saving the editor. Please close and reopen the taxon again.", e);
+               } catch (Exception e) {
+                       setFocus();
+                       EditorUtil
+                                       .errorDialog(
+                                                       "An error occurred while saving",
+                                                       getClass(),
+                                                       "An error occurred while saving the editor. Please close and reopen the taxon again.",
+                                                       e);
                        disableEditor();
-               }finally{
+               } finally {
                        monitor.done();
                }
        }
 
-
        private void disableEditor() {
-               for(IMultiPageTaxonEditorPage editorPage : getPages()){
+               for (IMultiPageTaxonEditorPage editorPage : getPages()) {
                        editorPage.setDisabled();
                }
+               conversation.unregisterForDataStoreChanges(this);
+               conversation.close();
                setDirty(false);
-               getSite().getSelectionProvider().setSelection(new StructuredSelection());
-               getSite().setSelectionProvider(null);
        }
 
        private void setDirty(boolean dirty) {
                this.dirty = dirty;
                firePropertyChange(PROP_DIRTY);
        }
-       
-       /* (non-Javadoc)
+
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.part.MultiPageEditorPart#isDirty()
         */
        /**
-        * <p>isDirty</p>
-        *
+        * <p>
+        * isDirty
+        * </p>
+        * 
         * @return a boolean.
         */
        public boolean isDirty() {
                return dirty;
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.editor.FormEditor#editorDirtyStateChanged()
         */
        /** {@inheritDoc} */
@@ -177,16 +199,18 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
                dirty = true;
                super.editorDirtyStateChanged();
        }
-       
-       
+
        /**
         * {@inheritDoc}
-        *
-        * Checks whether nested editors are calling <code>firePropertyChange(PROP_DIRTY)</code>
-        * to signal an edit has taken place before passing property change along to
+        * 
+        * Checks whether nested editors are calling
+        * <code>firePropertyChange(PROP_DIRTY)</code> to signal an edit has taken
+        * place before passing property change along to
         * <code>super.handlePropertyChange(int propertyId)</code>.
         */
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.part.MultiPageEditorPart#handlePropertyChange(int)
         */
        protected void handlePropertyChange(int propertyId) {
@@ -195,10 +219,11 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
                }
                super.handlePropertyChange(propertyId);
        }
-       
+
        /** {@inheritDoc} */
        @Override
-       public void doSaveAs() {}
+       public void doSaveAs() {
+       }
 
        /** {@inheritDoc} */
        @Override
@@ -208,129 +233,148 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
 
        /** {@inheritDoc} */
        @Override
-       public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-               
+       public void init(IEditorSite site, IEditorInput input)
+                       throws PartInitException {
+
                if (!(input instanceof TaxonEditorInput))
                        throw new PartInitException(
                                        "Invalid Input: Must be TaxonEditorInput");
-               
+
                this.input = (TaxonEditorInput) input;
 
-//             try {
-//                     // Listen for name changes, 
-//                     //  change tab for this taxon editor accordingly
-//                     getTaxon().addPropertyChangeListener("name",
-//                                     new PropertyChangeListener() {
-//                                             public void propertyChange(PropertyChangeEvent e) {
-//                                                     setPartName();
-//                                             }
-//                                     });
-//             } catch (NullPointerException e) {
-//                     EditorUtil.warn(getClass(), "Caught an NPE while initing an editor. This is most " +
-//                                     "likely due to the unsuccesful attempt to restore the former " +
-//                                     "state of the application. We ignore this because the workbench " +
-//                                     "will simply be reset.");
-//             }
+               // try {
+               // // Listen for name changes,
+               // // change tab for this taxon editor accordingly
+               // getTaxon().addPropertyChangeListener("name",
+               // new PropertyChangeListener() {
+               // public void propertyChange(PropertyChangeEvent e) {
+               // setPartName();
+               // }
+               // });
+               // } catch (NullPointerException e) {
+               // EditorUtil.warn(getClass(),
+               // "Caught an NPE while initing an editor. This is most " +
+               // "likely due to the unsuccesful attempt to restore the former " +
+               // "state of the application. We ignore this because the workbench " +
+               // "will simply be reset.");
+               // }
                setPartName();
-               
+
                super.init(site, input);
        }
-               
-    /**
-     * Calls <code>MultiPageEditorPart.setPartName(String partName)</code>
-     *  with text appropriate to the state of the taxon: any taxon that has
-     *  been saved will by necessity have a name to display; a new taxon
-     *  should display "New taxon" in the editor tab.
-     */
-    protected void setPartName() {
-        
-       String partName = null;
-       TaxonNameBase<?, ?> name = getTaxon().getName();
-       
-       if (name != null) {
-               partName = name.getTitleCache();
-       }
-       
-       if (partName == null || partName.equals("")) {
-               partName = ("New taxon");
-       }
-
-        setPartName(partName);
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * Editor pages call this in their postOperation to notify the MultiPageTaxonEditor
-     * of unsaved changes
-     */
-    public void changed(Object element) {
-//     setDirty(true);
+
+       /**
+        * Calls <code>MultiPageEditorPart.setPartName(String partName)</code> with
+        * text appropriate to the state of the taxon: any taxon that has been saved
+        * will by necessity have a name to display; a new taxon should display
+        * "New taxon" in the editor tab.
+        */
+       protected void setPartName() {
+
+               String partName = null;
+               TaxonNameBase<?, ?> name = getTaxon().getName();
+
+               if (name != null) {
+                       partName = name.getTitleCache();
+               }
+
+               if (partName == null || partName.equals("")) {
+                       partName = ("New taxon");
+               }
+
+               setPartName(partName);
+       }
+
+       /**
+        * {@inheritDoc}
+        * 
+        * Editor pages call this in their postOperation to notify the
+        * MultiPageTaxonEditor of unsaved changes
+        */
+       public void changed(Object element) {
+               // setDirty(true);
                dirty = true;
                super.editorDirtyStateChanged();
-               if(element instanceof TaxonBase){
+               if (element instanceof TaxonBase) {
                        TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
-                       AbstractGroupedContainer container = page.getContainer((TaxonBase) element);
-                       if(container != null){
+                       AbstractGroupedContainer container = page
+                                       .getContainer((TaxonBase) element);
+                       if (container != null) {
                                container.refresh();
                        }
                }
-    }
-    
-    /**
-     * The accepted taxon that is the input for this editor
-     *
-     * @return the accepted taxon
-     */
-    public Taxon getTaxon(){
-       return input.getTaxon();
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-     */
+       }
+
        /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+        * The accepted taxon that is the input for this editor
+        * 
+        * @return the accepted taxon
+        */
+       public Taxon getTaxon() {
+               return input.getTaxon();
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder
+        * ()
+        */
+       /**
+        * <p>
+        * getConversationHolder
+        * </p>
+        * 
+        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+        *         object.
         */
        public ConversationHolder getConversationHolder() {
                return conversation;
        }
-       
+
        /**
-        * <p>setConversationHolder</p>
-        *
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+        * <p>
+        * setConversationHolder
+        * </p>
+        * 
+        * @param conversation
+        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+        *            object.
         */
-       public void setConversationHolder(ConversationHolder conversation){
+       public void setConversationHolder(ConversationHolder conversation) {
                this.conversation = conversation;
        }
 
-
        /**
-        * <p>Getter for the field <code>undoContext</code>.</p>
-        *
-        * @return a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+        * <p>
+        * Getter for the field <code>undoContext</code>.
+        * </p>
+        * 
+        * @return a {@link org.eclipse.core.commands.operations.IUndoContext}
+        *         object.
         */
        public IUndoContext getUndoContext() {
                return undoContext;
        }
 
        /**
-        * <p>Setter for the field <code>undoContext</code>.</p>
-        *
-        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+        * <p>
+        * Setter for the field <code>undoContext</code>.
+        * </p>
+        * 
+        * @param undoContext
+        *            a {@link org.eclipse.core.commands.operations.IUndoContext}
+        *            object.
         */
        public void setUndoContext(IUndoContext undoContext) {
                this.undoContext = undoContext;
        }
-       
+
        /** {@inheritDoc} */
        @Override
-       public void setFocus(){
-               //logger.warn("Setting focus to editor");
+       public void setFocus() {
+               // logger.warn("Setting focus to editor");
                // bind the conversation
                getConversationHolder().bind();
                // pass focus to the active editor page
@@ -339,94 +383,111 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
 
        /*
         * (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
+        * 
+        * @see
+        * eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu
+        * .etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
         */
        /** {@inheritDoc} */
        public void update(CdmDataChangeMap events) {
-               if(dataChangeBehavior == null){
-                       dataChangeBehavior = new MultiPageTaxonEditorDataChangeBehaviour(this);
+               if (dataChangeBehavior == null) {
+                       dataChangeBehavior = new MultiPageTaxonEditorDataChangeBehaviour(
+                                       this);
                }
-               
+
                DataChangeBridge.handleDataChange(events, dataChangeBehavior);
        }
 
-
        /*
         * (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation()
+        * 
+        * @see
+        * eu.etaxonomy.taxeditor.store.operations.IPostOperationEnabled#postOperation
+        * ()
         */
        /** {@inheritDoc} */
        public boolean postOperation(CdmBase objectAffectedByOperation) {
                setDirty(true);
-               
-               for(IEditorPart editor : this.getPages()){
+
+               for (IEditorPart editor : this.getPages()) {
                        if (editor instanceof IPostOperationEnabled) {
-                               ((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
+                               ((IPostOperationEnabled) editor)
+                                               .postOperation(objectAffectedByOperation);
                        } else {
-                               EditorUtil.warn(getClass(), "postOperation not enabled for editor " + editor);
+                               EditorUtil.warn(getClass(),
+                                               "postOperation not enabled for editor " + editor);
                        }
                }
-               EditorUtil.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
-               
+               EditorUtil
+                               .warn(getClass(),
+                                               "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
+
                return false;
        }
-       
+
        /**
         * Returns an <code>IEditorPart</code> implementation by type
-        *
-        * @param page the page type
-        * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage} object.
+        * 
+        * @param page
+        *            the page type
+        * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage}
+        *         object.
         */
-       public IMultiPageTaxonEditorPage getPage(Page page){
-               for(IEditorPart editor : this.getPages()){
-                       if(editor.getClass().equals(page.getClazz())){
-                               return (IMultiPageTaxonEditorPage) editor;
-                       }
+       public IMultiPageTaxonEditorPage getPage(Page page) {
+               for (IEditorPart editor : this.getPages()) {
+                       if (editor.getClass().equals(page.getClazz())) {
+                               return (IMultiPageTaxonEditorPage) editor;
+                       }
                }
                return null;
        }
-       
+
        /**
         * Return a list of <code>AbstractTaxonEditor</code>s registered with this
         * <code>MultiPageTaxonEditor</code>.
-        *
+        * 
         * @return a {@link java.util.List} object.
         */
-       public List<IMultiPageTaxonEditorPage> getPages(){
+       public List<IMultiPageTaxonEditorPage> getPages() {
                ArrayList<IMultiPageTaxonEditorPage> editors = new ArrayList<IMultiPageTaxonEditorPage>();
-               for(int i = 0; i < this.getPageCount(); i++){
-                       
-                       editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
+               for (int i = 0; i < this.getPageCount(); i++) {
+
+                       editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
                }
                return editors;
        }
-       
+
        /**
         * Refreshes a certain page of the MultipageTaxonEditor
-        *
-        * @param page a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+        * 
+        * @param page
+        *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
         * @return a boolean.
         */
-       public boolean redraw(Page page){
+       public boolean redraw(Page page) {
                return redraw(page, true);
        }
-       
+
        /**
-        * Refreshes a certain page of the MultipageTaxonEditor and
-        * sets focus to that page
-        *
-        * @param page a {@link eu.etaxonomy.taxeditor.editor.Page} object.
-        * @param focus a boolean.
+        * Refreshes a certain page of the MultipageTaxonEditor and sets focus to
+        * that page
+        * 
+        * @param page
+        *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
+        * @param focus
+        *            a boolean.
         * @return a boolean.
         */
-       public boolean redraw(Page page, boolean focus){
+       public boolean redraw(Page page, boolean focus) {
                IMultiPageTaxonEditorPage editorPage = getPage(page);
                return editorPage != null && editorPage.redraw(focus);
        }
 
        /**
-        * <p>onComplete</p>
-        *
+        * <p>
+        * onComplete
+        * </p>
+        * 
         * @return a boolean.
         */
        public boolean onComplete() {
@@ -434,30 +495,40 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
        }
 
        /**
-        * Reloads the data for this 
+        * Reloads the data for this
         */
        public void reload() {
-               if(isDirty()){
-                       EditorUtil.warningDialog("Editor has unsaved data", getClass(), "This editor can not be " +
-                                       "refreshed because it contains unsaved data. Refreshing " +
-                                       "this editor would discard the changes. Please save this editor, " +
-                                       "close and reopen it manually in order to get the latest content");
-               }else{
+               if (isDirty()) {
+                       EditorUtil
+                                       .warningDialog(
+                                                       "Editor has unsaved data",
+                                                       getClass(),
+                                                       "This editor can not be "
+                                                                       + "refreshed because it contains unsaved data. Refreshing "
+                                                                       + "this editor would discard the changes. Please save this editor, "
+                                                                       + "close and reopen it manually in order to get the latest content");
+               } else {
                        TaxonEditorInput input = (TaxonEditorInput) getEditorInput();
-                       
+
                        UUID uuid = input.getTaxonNode().getUuid();
-                       
+
                        conversation.clear();
-                       
+
                        try {
                                TaxonEditorInput newInput = TaxonEditorInput.NewInstance(uuid);
                                setInput(newInput);
-                               for(IMultiPageTaxonEditorPage editorPart : getPages()){
+                               for (IMultiPageTaxonEditorPage editorPart : getPages()) {
                                        editorPart.redraw();
                                }
                        } catch (Exception e) {
-                               EditorUtil.errorDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
+                               EditorUtil.errorDialog("Error refreshing editor", getClass(),
+                                               "Could not refresh this editor", e);
                        }
                }
        }
+       
+       @Override
+       public String toString() {
+               return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
+       }
 }
index 31ac83f1e1aa1e68529bb651acdc6b9d4a352334..a1c38a7db597cc9d69136574534ffa9080e4f643 100644 (file)
@@ -9,9 +9,11 @@
 
 package eu.etaxonomy.taxeditor.editor;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.util.SafeRunnable;
@@ -32,7 +34,7 @@ import org.eclipse.swt.widgets.Display;
  */
 public class SimpleSelectionProvider implements ISelectionProvider {
 
-       private ListenerList selectionChangedListeners = new ListenerList();
+       private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
        private ISelection selection;
        private Job job;
        
@@ -84,7 +86,9 @@ public class SimpleSelectionProvider implements ISelectionProvider {
                
                // cancel previous selection setting
                if(job != null){
-                       job.cancel();
+                       if(job.getState() != Job.NONE){
+                               job.cancel();
+                       }
                        job = null;
                }
                
@@ -101,7 +105,7 @@ public class SimpleSelectionProvider implements ISelectionProvider {
                                                display.asyncExec(new Runnable() {
                                         
                                                        public void run() {
-                                                               fireSelectionChanged(selectionChangedEvent);
+                                                               SimpleSelectionProvider.this.fireSelectionChanged(selectionChangedEvent);
                                                        }
                                                });
                                        }
@@ -119,12 +123,10 @@ public class SimpleSelectionProvider implements ISelectionProvider {
 
        private void fireSelectionChanged(final SelectionChangedEvent event) {
                
-               Object[] listeners = selectionChangedListeners.getListeners();
-               for (int i = 0; i < listeners.length; ++i) {
-                       final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+               for (final ISelectionChangedListener listener : selectionChangedListeners) {
                        SafeRunnable.run(new SafeRunnable() {
                                public void run() {
-                                       l.selectionChanged(event);
+                                       listener.selectionChanged(event);
                                }
                        });
                }
index c9af4f016d9a0a556ba60703ce5c09887ea3793e..65403941dd6a7d7ba04c7f491a9fc887098e7607 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IClassificationService;
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
@@ -108,8 +109,8 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
        
        TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
        
-       if(taxonBase instanceof Taxon){
-               Taxon taxon = (Taxon) taxonBase;
+       if(taxonBase.isInstanceOf(Taxon.class)){
+               Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
                
                if (taxon.isMisapplication()){
                        // TODO get accepted taxon
@@ -161,9 +162,11 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
                Set<TaxonNode> nodes = taxon.getTaxonNodes();
                return getInputForMultipleNodes(conversation, nodes);
        }else if(taxa.size() > 1){
-                       // FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
-                       EditorUtil.warningDialog("Not implemented yet", TaxonEditorInput.class, "There are multiple accepted taxa for the current selection. We currently do not know which one you want to open." +
-                                       " This case is not handled yet by the software.");
+               Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
+                       for ( Taxon taxon : taxa ){
+                               taxonNodes.addAll(taxon.getTaxonNodes());
+                       }
+                       return getInputForMultipleNodes(conversation, taxonNodes);
                }else if(taxa.size() == 0){
                        // this is an undesired state
                        EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
@@ -385,4 +388,9 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
        public TaxonBase getInitiallySelectedTaxonBase() {
                return initiallySelectedTaxonBase;
        }
+       
+       @Override
+       public String toString() {
+               return String.format("%s[%s]", this.getClass().getSimpleName(), getTaxon());
+       }
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java
new file mode 100644 (file)
index 0000000..d994052
--- /dev/null
@@ -0,0 +1,175 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor;\r
+\r
+import java.net.URI;\r
+import java.net.URISyntaxException;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.ui.IMemento;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.service.IFeatureTreeService;\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.FeatureNode;\r
+import eu.etaxonomy.cdm.model.description.FeatureTree;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * The context listener will call this class when the uses view is being loaded.\r
+ * It checks if the uses view's necessary terms are present in the database. \r
+ * It will persist the terms that aren't present, using the CDMLib's services classes. \r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseObjectManager extends ContextListenerAdapter{\r
+       @Override\r
+       public void contextRefresh(IProgressMonitor monitor) {\r
+               monitor.subTask("Refreshing the Uses View");\r
+               StoreUtil.warn(getClass(), "Refreshing Uses View warn");\r
+               setupNecessaryItems(monitor);\r
+       }\r
+       \r
+       \r
+       @Override\r
+       public void contextStart(IMemento memento, IProgressMonitor monitor) {\r
+               monitor.subTask("Starting the Uses View");\r
+               StoreUtil.warn(getClass(), "Starting Uses View warn");\r
+               setupNecessaryItems(monitor);\r
+       }\r
+       \r
+       private void setupNecessaryItems(IProgressMonitor monitor) {\r
+               MarkerType existingMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+               TermVocabulary<State> stateVocabulary =  (TermVocabulary<State>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidUseCategoryVocabulary);\r
+               Feature featureUseRecord = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseRecordFeature);\r
+               Feature featureUseSummary = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseSummaryFeature);\r
+               TermVocabulary<Modifier> countryVocabulary =  (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidCountryVocabulary);\r
+               TermVocabulary<Modifier> plantPartVocabulary =  (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidPlantPartVocabulary);\r
+               TermVocabulary<Modifier> humanGroupVocabulary =  (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidHumanGroupVocabulary);\r
+               \r
+               ConversationHolder conversation = CdmStore.createConversation();\r
+               if (existingMarkertype == null) {\r
+                       existingMarkertype = MarkerType.NewInstance(UsageTermCollection.useMakerLabel, UsageTermCollection.useMakerLabel, null);\r
+                       existingMarkertype.setUuid( UsageTermCollection.uuidUseMarkerType);\r
+                       TermVocabulary<MarkerType> markerTypeVocabulary = (TermVocabulary<MarkerType>)CdmStore.getService(IVocabularyService.class).find((UsageTermCollection.uuidMarkersVocabulary));\r
+                       markerTypeVocabulary.addTerm(existingMarkertype);\r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(markerTypeVocabulary);\r
+                       conversation.commit(true);\r
+               }\r
+               if (stateVocabulary == null) {\r
+                       monitor.subTask("stateVocabulary empty");\r
+                       URI termSourceUri = null;\r
+                       try {\r
+                               termSourceUri = new URI("eu.etaxonomy.cdm.model.description.State");\r
+                       } catch (URISyntaxException e) {\r
+                               e.printStackTrace();\r
+                       }\r
+                       stateVocabulary = TermVocabulary.NewInstance(UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);\r
+                       stateVocabulary.setUuid(UsageTermCollection.uuidUseCategoryVocabulary);\r
+                       State newDummyState = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newDummyState.setUuid(UsageTermCollection.uuidUseCategoryDummy);\r
+                       State newDummySubCat = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newDummySubCat.setUuid(UsageTermCollection.uuidUseSubCategoryDummy);\r
+                       newDummyState.addIncludes(newDummySubCat);\r
+                       stateVocabulary.addTerm(newDummyState);\r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(stateVocabulary);\r
+                       conversation.commit(true);\r
+               }\r
+               if (countryVocabulary == null) {\r
+                       monitor.subTask("countryVocabulary empty");\r
+                       URI termSourceUri = null;\r
+                       try {\r
+                               termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+                       } catch (URISyntaxException e) {\r
+                               e.printStackTrace();\r
+                       }\r
+                       countryVocabulary = TermVocabulary.NewInstance(UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);\r
+                       countryVocabulary.setUuid(UsageTermCollection.uuidCountryVocabulary);\r
+                       Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newDummyModifier.setUuid(UsageTermCollection.uuidCountryDummy);\r
+                       countryVocabulary.addTerm(newDummyModifier);\r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(countryVocabulary);\r
+                       conversation.commit(true);\r
+               }\r
+               if (plantPartVocabulary == null) {\r
+                       monitor.subTask("plantPartVocabulary empty");\r
+                       URI termSourceUri = null;\r
+                       try {\r
+                               termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+                       } catch (URISyntaxException e) {\r
+                               e.printStackTrace();\r
+                       }\r
+                       plantPartVocabulary = TermVocabulary.NewInstance(UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);\r
+                       plantPartVocabulary.setUuid(UsageTermCollection.uuidPlantPartVocabulary);\r
+                       Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newDummyModifier.setUuid(UsageTermCollection.uuidPlantPartDummy);\r
+                       plantPartVocabulary.addTerm(newDummyModifier);\r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(plantPartVocabulary);\r
+                       conversation.commit(true);\r
+               }\r
+               if (humanGroupVocabulary == null) {\r
+                       monitor.subTask("humanGroupVocabulary empty");\r
+                       URI termSourceUri = null;\r
+                       try {\r
+                               termSourceUri = new URI("eu.etaxonomy.cdm.model.description.Modifier");\r
+                       } catch (URISyntaxException e) {\r
+                               e.printStackTrace();\r
+                       }\r
+                       humanGroupVocabulary = TermVocabulary.NewInstance(UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);\r
+                       humanGroupVocabulary.setUuid(UsageTermCollection.uuidHumanGroupVocabulary);\r
+                       Modifier newDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newDummyModifier.setUuid(UsageTermCollection.uuidHumanGroupDummy);\r
+                       Modifier newSubDummyModifier = Modifier.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);\r
+                       newSubDummyModifier.setUuid(UsageTermCollection.uuidEthnicGroupDummy);\r
+                       newDummyModifier.addIncludes(newSubDummyModifier);\r
+                       humanGroupVocabulary.addTerm(newDummyModifier);\r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(humanGroupVocabulary);\r
+                       conversation.commit(true);\r
+               }\r
+               \r
+               if(featureUseRecord == null|| featureUseSummary == null) {\r
+                       TermVocabulary<Feature> featureVocabulary = (TermVocabulary<Feature>)CdmStore.getService(IVocabularyService.class).find((UsageTermCollection.uuidFeatureVocabulary));\r
+                       FeatureTree palmWebFeatureTree = CdmStore.getService(IFeatureTreeService.class).find(UsageTermCollection.uuidPalmWebFeatureTree);\r
+                       \r
+                       if (featureUseRecord == null ) {\r
+                               featureUseRecord = Feature.NewInstance(UsageTermCollection.useRecordFeatureLabel, UsageTermCollection.useRecordFeatureLabel, null);\r
+                               featureUseRecord.setUuid(UsageTermCollection.uuidUseRecordFeature);\r
+                               featureUseRecord.isSupportsCategoricalData();\r
+                               featureUseRecord.setSupportsCategoricalData(true);\r
+                               featureVocabulary.addTerm(featureUseRecord);\r
+                               FeatureNode useRecFeatureNode = FeatureNode.NewInstance(featureUseRecord);\r
+                               palmWebFeatureTree.getRoot().addChild(useRecFeatureNode);\r
+                       }\r
+                       if (featureUseSummary == null) {\r
+                               featureUseSummary = Feature.NewInstance(UsageTermCollection.useSummaryFeatureLabel, UsageTermCollection.useSummaryFeatureLabel, null);\r
+                               featureUseSummary.setUuid(UsageTermCollection.uuidUseSummaryFeature);\r
+                               featureUseSummary.isSupportsTextData();\r
+                               featureUseSummary.setSupportsTextData(true);\r
+                               featureVocabulary.addTerm(featureUseSummary);\r
+                               FeatureNode useSumFeatureNode = FeatureNode.NewInstance(featureUseSummary);\r
+                               palmWebFeatureTree.getRoot().addChild(useSumFeatureNode);\r
+                       }\r
+                       \r
+                       CdmStore.getService(IVocabularyService.class).saveOrUpdate(featureVocabulary);\r
+                       CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(palmWebFeatureTree);\r
+                       conversation.commit(true);\r
+                       \r
+               }\r
+               conversation.close();   \r
+       }\r
+}\r
index 82be4554f5bff4487390be7df89941f7e32ac9e5..2d4261bfaf4ae66cf87e52b6375b8b8469e9f3b7 100644 (file)
@@ -5,6 +5,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
 import eu.etaxonomy.taxeditor.editor.EditorStateManager;
+import eu.etaxonomy.taxeditor.editor.UseObjectManager;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -40,7 +41,9 @@ public class TaxeditorEditorPlugin extends AbstractUIPlugin {
                super.start(context);
                
                EditorStateManager stateManager = new EditorStateManager();
+               UseObjectManager useManager = new UseObjectManager();
                CdmStore.getContextManager().addContextListener(stateManager);
+               CdmStore.getContextManager().addContextListener(useManager);
                
                plugin = this;
                logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
index cb9629bfd9cac8a49ec8ce1e066b0346619b291b..8d71a0c853392e50b095fc0a0cbd86c4b0b2b097 100644 (file)
@@ -38,7 +38,7 @@ import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
  * @author n.hoffmann
index 506c0b11d2e3d1a23486411a80e12261784ddfb7..1d414416e9020a5d185180d0aaffebe16948c854 100644 (file)
@@ -28,9 +28,10 @@ import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * @author n.hoffmann
@@ -66,7 +67,7 @@ public class PolytomousKeyListItem extends AbstractCdmFormElement implements
 
                Label label_statement = new Label(getLayoutComposite(), SWT.NULL);
                label_statement.setText(getItemStatement());
-               label_statement.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               label_statement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
 
                Link link = new Link(getLayoutComposite(), SWT.NONE);
                link.setText("<a>" + getItemLink() + "</a>");
index d1d4a917dd97f4567f57ef6f8ce1e291842b76b1..c0a5a57efd0709fec40244b32c721083e498e9df 100644 (file)
@@ -42,7 +42,7 @@ public class CreateNodeHandler extends AbstractHandler {
                                        .getActiveEditor();
 
                        IStructuredSelection selection = (IStructuredSelection) HandlerUtil
-                                       .getActiveMenuSelection(event);
+                                       .getCurrentSelection(event);
 
                        if (selection.getFirstElement() instanceof PolytomousKeyNode) {
                                try {
index d9e42c575d974b0c05581c43f87ab89b75ab35f9..988564378556ac3167280f5702a803e238e2f71c 100644 (file)
@@ -49,7 +49,7 @@ public class DeleteNodeHandler extends AbstractHandler {
                                        .getActiveEditor();
 
                        IStructuredSelection selection = (IStructuredSelection) HandlerUtil
-                                       .getActiveMenuSelection(event);
+                                       .getCurrentSelection(event);
 
                        if (selection.getFirstElement() instanceof PolytomousKeyNode) {
                                try {
index 8499008725edae40d637ca4521f0d6e9b621a89a..951dbcae6df3b417bec14bf5ec71835cd20b3b9a 100644 (file)
@@ -21,7 +21,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
@@ -64,7 +63,6 @@ import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup;
 import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
 import eu.etaxonomy.taxeditor.editor.name.container.AcceptedGroup;
 import eu.etaxonomy.taxeditor.editor.name.container.AcceptedNameContainer;
-import eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup;
 import eu.etaxonomy.taxeditor.editor.name.container.ContainerFactory;
 import eu.etaxonomy.taxeditor.editor.name.container.HomotypicalSynonymGroup;
 import eu.etaxonomy.taxeditor.editor.name.container.MisappliedGroup;
@@ -98,7 +96,7 @@ public class TaxonNameEditor extends EditorPart implements
        private ManagedForm managedForm;
        private ScrolledForm scrolledForm;
        private Composite parent;
-       private ISelectionProvider selectionProvider;
+       private ISelectionProvider simpleSelectionProvider;
 
        private final MultiPageTaxonEditor editor;
 
@@ -107,21 +105,16 @@ public class TaxonNameEditor extends EditorPart implements
        private final ConversationHolder conversation;
 
        private MenuManager menuManager;
-
        private Menu menu;
 
+       private AcceptedGroup acceptedGroup;
+       private List<HomotypicalSynonymGroup> heterotypicSynonymGroups = new ArrayList<HomotypicalSynonymGroup>();
        private MisappliedGroup misappliedGroup;
 
-       private ConceptGroup conceptGroup;
-
-       private final List<HomotypicalSynonymGroup> heterotypicSynonymGroups = new ArrayList<HomotypicalSynonymGroup>();
-
        private DropTarget target;
 
        private ISelectionService selectionService;
 
-       private AcceptedGroup acceptedGroup;
-
        private TaxonBase objectAffectedByLastOperation;
 
        /**
@@ -191,7 +184,12 @@ public class TaxonNameEditor extends EditorPart implements
                                if (input instanceof AbstractGroupedContainer) {
                                        selection = ((AbstractGroupedContainer) input).getData();
                                        getSite().getSelectionProvider().setSelection(new StructuredSelection(selection));
+                               }else if(input == null){
+                                       selection = null;
+                                       getSite().getSelectionProvider().setSelection(new StructuredSelection());
                                }
+                               
+                               
                                return super.setInput(input);
                        }
                };
@@ -237,7 +235,6 @@ public class TaxonNameEditor extends EditorPart implements
                ContainerFactory.createOrUpdateAcceptedTaxonsHomotypicGroup(this);
                ContainerFactory.createOrUpdateHeterotypicSynonymyGroups(this);
                ContainerFactory.createOrUpdateMisapplicationsGroup(this);
-               ContainerFactory.createOrUpdateConceptGroup(this);
 
                // Redraw composite
                managedForm.reflow(true);
@@ -363,7 +360,7 @@ public class TaxonNameEditor extends EditorPart implements
        public boolean postOperation(CdmBase objectAffectedByOperation) {
 
                editor.changed(objectAffectedByOperation);
-
+               
                redraw(false);
 
                if (objectAffectedByOperation instanceof TaxonBase) {
@@ -493,8 +490,8 @@ public class TaxonNameEditor extends EditorPart implements
                setSite(site);
                setInput(input);
 
-               selectionProvider = new SimpleSelectionProvider();
-               getSite().setSelectionProvider(selectionProvider);
+               simpleSelectionProvider = new SimpleSelectionProvider();
+               getSite().setSelectionProvider(simpleSelectionProvider);
        }
 
        /**
@@ -547,19 +544,6 @@ public class TaxonNameEditor extends EditorPart implements
                return null;
        }
 
-       /**
-        * <p>
-        * Getter for the field <code>conceptGroup</code>.
-        * </p>
-        * 
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup}
-        *         object.
-        */
-       public ConceptGroup getConceptGroup() {
-               return conceptGroup;
-       }
-
        /**
         * <p>
         * getDirtyNames
@@ -608,16 +592,18 @@ public class TaxonNameEditor extends EditorPart implements
 
                allGroups.add(getAcceptedGroup());
 
-               allGroups.addAll(getHeterotypicSynonymGroups());
+               List<HomotypicalSynonymGroup> grps = getHeterotypicSynonymGroups();
+               
+               heterotypicSynonymGroups = getHeterotypicSynonymGroups();
+               
+               if (heterotypicSynonymGroups != null) {
+                       allGroups.addAll(heterotypicSynonymGroups);
+               }
 
                if (misappliedGroup != null) {
                        allGroups.add(misappliedGroup);
                }
 
-               if (conceptGroup != null) {
-                       allGroups.add(conceptGroup);
-               }
-
                return allGroups;
        }
 
@@ -724,19 +710,6 @@ public class TaxonNameEditor extends EditorPart implements
                                EditorUtil.getColor(Resources.COLOR_COMPOSITE_BACKGROUND));
        }
 
-       /**
-        * <p>
-        * Setter for the field <code>conceptGroup</code>.
-        * </p>
-        * 
-        * @param conceptGroup
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.editor.name.container.ConceptGroup}
-        *            object.
-        */
-       public void setConceptGroup(ConceptGroup conceptGroup) {
-               this.conceptGroup = conceptGroup;
-       }
 
        /**
         * <p>
@@ -877,7 +850,10 @@ public class TaxonNameEditor extends EditorPart implements
        public void removeGroup(AbstractGroup group) {
                if (group != null) {
                        group.dispose();
-                       getHeterotypicSynonymGroups().remove(group);
+                       
+                       //if (heterotypicSynonymGroups != null) {
+                       heterotypicSynonymGroups.remove(group);
+                       //}
                }
        }
 
@@ -898,7 +874,12 @@ public class TaxonNameEditor extends EditorPart implements
 
        @Override
        public void setDisabled(){
-               setEnabled(false);
+               for(AbstractGroupedContainer groupedContainer : getGroupedContainers()){
+                       groupedContainer.setDisabled(true);
+               }
+               
+               // send an empty selection to the current provider
+               getManagedForm().setInput(null);
                
                // coloring the widgets
                
@@ -918,36 +899,6 @@ public class TaxonNameEditor extends EditorPart implements
                }
                
                // send an empty selection to the current provider
-               selectionProvider.setSelection(new StructuredSelection());
-               
-               // decide on the new selection provider
-               
-               ISelectionProvider newSelectionProvider = enabled ? selectionProvider : new ISelectionProvider() {
-                       
-                       @Override
-                       public void setSelection(ISelection selection) {
-                               
-                       }
-                       
-                       @Override
-                       public void removeSelectionChangedListener(
-                                       ISelectionChangedListener listener) {
-                               
-                       }
-                       
-                       @Override
-                       public ISelection getSelection() {
-                               return null;
-                       }
-                       
-                       @Override
-                       public void addSelectionChangedListener(ISelectionChangedListener listener) {
-                               
-                       }
-               };
-               
-               getSite().setSelectionProvider(newSelectionProvider);
-               
-               System.out.println("SELECTION PROVIDER" + getSite().getSelectionProvider());
+               getManagedForm().setInput(null);
        }
 }
index 1dc71498542c09b5686e4b4dd157873c21fa1277..23d6ec0460fab915650a0f49d870444d92686600 100644 (file)
@@ -634,7 +634,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                focusListener = new FocusAdapter() {
                        @Override
                        public void focusGained(FocusEvent e) {
-                               if(!enabled){
+                               if(disabled){
                                        return;
                                }
                                for (AbstractGroupedContainer container : getEditor()
@@ -1011,6 +1011,8 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
 
        private boolean enabled;
 
+       private boolean disabled;
+
        /**
         * nonEditableInfo is a label displayed underneath a GroupedComposite's
         * input field. For instance, NameComposites display things like name
@@ -1218,7 +1220,6 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         */
        @Override
        public boolean setFormInput(Object input) {
-               // TODO Auto-generated method stub
                return false;
        }
 
@@ -1239,10 +1240,14 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
         */
        @Override
        public boolean isStale() {
-               // TODO Auto-generated method stub
                return false;
        }
        
+       public void setDisabled(boolean disabled) {
+               this.disabled = disabled;
+               setEnabled(disabled);
+       }
+       
        public void setEnabled(boolean enabled) {
                this.enabled = enabled;
                Color color = enabled ? control.getForeground() : EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR);
index 7672265680a8d913ee33d2ec737cb767c6c1f409..1634b7dcc860ac92238988c8800e382237447ca6 100644 (file)
@@ -43,8 +43,13 @@ public class ContainerFactory {
                        TaxonNameEditor taxonNameEditor) {
                List<HomotypicalSynonymGroup> retainedGroups = new ArrayList<HomotypicalSynonymGroup>();
                
-               for(HomotypicalSynonymGroup group : taxonNameEditor.getHeterotypicSynonymGroups()){
-                       retainedGroups.add(group);
+               List<HomotypicalSynonymGroup> heterotypicSynonymGroups = taxonNameEditor.getHeterotypicSynonymGroups();
+               
+               if (heterotypicSynonymGroups != null) {
+               
+                       for(HomotypicalSynonymGroup group : heterotypicSynonymGroups){
+                               retainedGroups.add(group);
+                       }
                }
                
                for(HomotypicalGroup homotypicalGroup : taxonNameEditor.getTaxon().getHeterotypicSynonymyGroups()){
@@ -96,23 +101,4 @@ public class ContainerFactory {
                
        }
 
-       /**
-        * @param taxonNameEditor
-        */
-       public static void createOrUpdateConceptGroup(
-                       TaxonNameEditor taxonNameEditor) {
-               Set<TaxonRelationship> filteredTaxonRelations = new HashSet<TaxonRelationship>();
-               
-               for (TaxonRelationship relationship : taxonNameEditor.getTaxon().getTaxonRelations()) {
-                       if (! relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) ||
-                                        relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
-                               filteredTaxonRelations.add(relationship);
-                       }
-               }
-               
-               if(! filteredTaxonRelations.isEmpty()){
-                       taxonNameEditor.setConceptGroup(new ConceptGroup(taxonNameEditor));
-               }
-       }
-
 }
index ca896c33cba837baa77c6de12e9148c2496a6325..a3d7e894c031c79ef805c3731335a5f8117146be 100644 (file)
@@ -26,7 +26,7 @@ import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.name.operation.ChangeAcceptedTaxonToSynonymOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
 /**
  * <p>ChangeAcceptedTaxonToSynonymHandler class.</p>
index 00ab39b944f009056a7108c28e5c574fc764f9ec..b710737bcbfb40eff19c51dcf02f5d14e7ff0c80 100644 (file)
@@ -34,7 +34,7 @@ import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
 /**
  * <p>ChangeSynonymToAcceptedTaxonHandler class.</p>
@@ -63,7 +63,7 @@ public class ChangeSynonymToAcceptedTaxonHandler extends AbstractHandler impleme
                }
 
                // Get synonym from selection
-               StructuredSelection selection = (StructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+               StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
                if (!(selection.getFirstElement() instanceof Synonym)) {
                        logger.error("Selection does not contain a Synonym");
                        return null;
index 49048fe820a45f97fbb1e215fb803c150b2b5594..4d19f059ce7e6e6544a901a9900e971a44e99a89 100644 (file)
@@ -49,7 +49,7 @@ public class CreateSynonymInHomotypicalGroupHandler extends AbstractHandler
        public Object execute(ExecutionEvent event) throws ExecutionException {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
-               ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+               ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
                
                Object selecteObject = ((StructuredSelection) menuSelection).getFirstElement();
                
index c5d5cf8e147508ff5bd347a2384f09f39e503a26..c3b6b015a59e82c15ec4e12b0e65b1aab839b8aa 100644 (file)
@@ -45,7 +45,7 @@ public class RemoveBasionymHandler extends AbstractHandler implements IHandler {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
                
-               IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+               IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
                
                TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
 
index 20442c61bcc0918549a1492f6966e9dff3b4342e..5a5ece4cf6e50f9103dc60ffce465adc56d23e8d 100644 (file)
@@ -45,7 +45,7 @@ public class SetBasionymHandler extends AbstractHandler implements IHandler {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
                
-               IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+               IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
                                
                TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
 
index 879ec5fa72bb9e65ed9cc83732f7b3b77bc6bdca..507d44cf7748c8ee5f137be80c1983f156a40819 100644 (file)
@@ -16,13 +16,20 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 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.editor.name.operation.SwapSynonymAndAcceptedOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 
 /**
  * <p>SwapSynonymAndAcceptedHandler class.</p>
@@ -32,27 +39,31 @@ import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperat
  * @version 1.0
  */
 public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
-               IHandler {
+               IHandler, IPostOperationEnabled {
        private static final Logger logger = Logger
                        .getLogger(SwapSynonymAndAcceptedHandler.class);
+       private MultiPageTaxonEditor editor;
+       private Taxon taxon;
 
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
        /** {@inheritDoc} */
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               MultiPageTaxonEditor multiEditor = EditorUtil.getActiveMultiPageTaxonEditor();
-
-               TaxonNameEditor editor = (TaxonNameEditor) multiEditor.getPage(Page.NAME);
-               
+               editor = EditorUtil.getActiveMultiPageTaxonEditor();
+               Shell shell = HandlerUtil.getActiveShell(event);
                Synonym synonym = (Synonym) EditorUtil.getSelection(event).getFirstElement();
                
-               
-               SwapSynonymAndAcceptedOperation operation;
+
+               // Force user to save taxon - not really necessary though, is it?
+               if (!EditorUtil.forceUserSave(editor, shell)) {
+                       return null;
+               }
                
                try {
-                       operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
-                                                               editor.getTaxon(), synonym, editor);
+                       SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
+                                                               editor.getTaxon(), synonym, this);
+                       
                        EditorUtil.executeOperation(operation);
                        
                } catch (NotDefinedException e) {
@@ -61,4 +72,44 @@ public class SwapSynonymAndAcceptedHandler extends AbstractHandler implements
 
                return null;
        }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase, boolean)
+        */
+       @Override
+       public boolean postOperation(CdmBase objectAffectedByOperation) {
+               // Redraw existing editor
+               //((IPostOperationEnabled) editor).postOperation(null);
+               
+               editor.doSave(EditorUtil.getMonitor());
+               editor.close(true);
+               
+               if (objectAffectedByOperation instanceof Taxon) {
+               
+                       taxon = (Taxon) objectAffectedByOperation;
+                                       
+                       
+               }
+               return true;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
+        */
+       @Override
+       public boolean onComplete() {
+               Display display = Display.getCurrent();
+               display.asyncExec(new Runnable() {
+                       public void run() {
+                               try {
+                                       EditorUtil.openTaxonBase(taxon.getUuid());
+                                       
+                               } catch (Exception e) {
+                                       EditorUtil.warningDialog("Could not open editor for taxon", this, e.getMessage());
+                               }
+                               
+                       }
+               });
+               return true;
+       }
 }
index d6d209a0835b66cb38e7f322078e6c29a4d483a6..de323cf1343571111dc70bb9de1fbc3f1742af33 100644 (file)
@@ -17,10 +17,12 @@ import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;
 import eu.etaxonomy.cdm.model.taxon.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -73,7 +75,11 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
                
-               newTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym, taxon, true, true, null, null);
+               try {
+                       newTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym, taxon, true, true, null, null);
+               } catch (HomotypicalGroupChangeException e) {
+                       EditorUtil.warningDialog("Operation may lead to inconsistent data", getClass(), e.getMessage());
+               }
                monitor.worked(20);
                
                synonym.setSec(null);
index 4926128addfa6dcdeb7bfe2492c02d5f493a8bda..0758a17b23e00c66a70d9cf04cba6bcde4d4e9d6 100644 (file)
@@ -15,11 +15,14 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 
 import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -61,7 +64,7 @@ public class SwapSynonymAndAcceptedOperation extends AbstractPostOperation {
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-
+               
                monitor.worked(20);
                
                CdmStore.getService(ITaxonService.class).swapSynonymAndAcceptedTaxon(synonym, taxon);
index c20069909641b9b9512a4af1e638779acd4f4531..6fb3d9c37e701b097d1aa05ecdf3cb318b758cba 100644 (file)
@@ -15,9 +15,17 @@ import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.StyledString;
 import org.eclipse.swt.graphics.Image;
 
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.Representation;
+import eu.etaxonomy.cdm.model.reference.IReference;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.model.ImageResources;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author n.hoffmann
@@ -32,9 +40,7 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
        @Override
        public Image getImage(Object element) {
                if(element instanceof TaxonRelationship){
-                       TaxonRelationshipType type = ((TaxonRelationship) element).getType();
-                       
-                       return getTaxonRelationshipImage(type);
+                       return getTaxonRelationshipImage((TaxonRelationship) element);
                }
                return super.getImage(element);
        }
@@ -45,14 +51,28 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
        @Override
        public String getText(Object element) {
                if(element instanceof TaxonRelationship){
-                       TaxonRelationship relationship = (TaxonRelationship) element;
-                       
-                       return String.format("%s %s %s", relationship.getFromTaxon(), relationship.getType().getLabel(), relationship.getToTaxon());
+                       return formatRelationship((TaxonRelationship) element);
                }
                
                return "";
        }
        
+       /**
+        * Creates a string that holds a representation of the {@link TaxonRelationship} in relation to
+        * the accepted taxon of the currently active {@link MultiPageTaxonEditor}.
+        * 
+        * @param relationship
+        * @return a formatted String representation of the relationship
+        */
+       private String formatRelationship(TaxonRelationship relationship){
+               Taxon sourceTaxon = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon();
+               TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, relationship);
+               Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, relationship);
+               String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon);
+               
+               return string;
+       }
+       
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
         */
@@ -62,11 +82,14 @@ public class ConceptLabelProvider extends LabelProvider implements IStyledLabelP
        }
 
        /**
+        * TODO we will get the proper relationship symbol from the type's abbreviated label as a character.
+        * The image may be omitted then.
+        * 
         * @param type
         * @return
         */
-       public Image getTaxonRelationshipImage(TaxonRelationshipType type) {
-               
+       private Image getTaxonRelationshipImage(TaxonRelationship relationship) {
+               TaxonRelationshipType type = (relationship).getType();
                return ImageResources.getImage(ImageResources.CONCEPT_ICON);
        }
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphContentProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphContentProvider.java
new file mode 100644 (file)
index 0000000..d444bc6
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.zest.core.viewers.IGraphContentProvider;
+
+
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+
+/**
+ * @author andreas 
+ *
+ */
+public class ConceptGraphContentProvider implements IGraphContentProvider {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+        */
+       @Override
+       public void dispose() {
+               // TODO Auto-generated method stub
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+        */
+       @Override
+       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+               // TODO Auto-generated method stub
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getSource(java.lang.Object)
+        */
+       @Override
+       public Object getSource(Object taxonRelationship) {
+               return ((TaxonRelationship)taxonRelationship).getFromTaxon();
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getDestination(java.lang.Object)
+        */
+       @Override
+       public Object getDestination(Object taxonRelationship) {
+               return ((TaxonRelationship)taxonRelationship).getToTaxon();
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.zest.core.viewers.IGraphContentProvider#getElements(java.lang.Object)
+        */
+       @Override
+       public Object[] getElements(Object inputElement) {
+               if(inputElement instanceof TaxonEditorInput){
+                       Taxon taxon = ((TaxonEditorInput) inputElement).getTaxon();
+
+                       Map<String, TaxonRelationship> filteredTaxonRelations = new HashMap<String, TaxonRelationship>();
+                       getTaxonRelationshipsRecursive(filteredTaxonRelations, taxon);
+                       
+                       return filteredTaxonRelations.values().toArray();
+               }
+               return new Object[0];
+       }
+
+       private void getTaxonRelationshipsRecursive(Map<String, TaxonRelationship> filteredTaxonRelations, Taxon taxon) {
+               // TODO extract method into new class TaxonHelper in
+               // eu.etaxonomy.taxeditor.model;
+               // see also ConceptContentProvider
+               for (TaxonRelationship relationship : taxon.getTaxonRelations()) {
+                       
+                       if (!relationship.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())
+                                       && !relationship.getType().equals(TaxonRelationshipType.INVALID_DESIGNATION_FOR())
+                                       && !relationship.getType().equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
+                               
+                               if(!relationship.getToTaxon().equals(taxon)){
+                                       continue;
+                               }
+                               
+                               String key = relationship.getFromTaxon().getUuid().toString() + relationship.getType().getUuid();
+                               if(!filteredTaxonRelations.containsKey(key)) {
+                                       filteredTaxonRelations.put(key, relationship);                                  
+                                       Taxon toTaxon = relationship.getToTaxon();
+                                       if(toTaxon != null){
+                                               getTaxonRelationshipsRecursive(filteredTaxonRelations, toTaxon);
+       
+                                       }
+                               }
+                       }
+                       
+                       
+               }
+               
+               
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphLabelProvider.java
new file mode 100644 (file)
index 0000000..fe431c8
--- /dev/null
@@ -0,0 +1,86 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.zest.core.viewers.IEntityStyleProvider;
+
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author andreas
+ * 
+ */
+public class ConceptGraphLabelProvider extends LabelProvider implements
+               IEntityStyleProvider {
+       
+       
+
+       @Override
+       public String getText(Object element) {
+               if(element instanceof Taxon){
+                       return ((Taxon)element).getTitleCache();
+               } else if( element instanceof TaxonRelationship) {
+                       return ((TaxonRelationship)element).getType().getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+               }
+               return "TODO";
+       }
+
+       @Override
+       public Color getNodeHighlightColor(Object entity) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public Color getBorderColor(Object entity) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public Color getBorderHighlightColor(Object entity) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public int getBorderWidth(Object entity) {
+               // TODO Auto-generated method stub
+               return 0;
+       }
+
+       @Override
+       public Color getBackgroundColour(Object entity) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public Color getForegroundColour(Object entity) {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public IFigure getTooltip(Object element) {
+               if( element instanceof TaxonRelationship) {
+                       return new Label(((TaxonRelationship)element).getType().getRepresentation(CdmStore.getDefaultLanguage()).getLabel());
+               }
+               return null;
+       }
+
+       @Override
+       public boolean fisheyeNode(Object entity) {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java
new file mode 100644 (file)
index 0000000..c7a2f9c
--- /dev/null
@@ -0,0 +1,128 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.editor.view.concept.graph;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.zest.core.viewers.GraphViewer;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
+
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
+
+/**
+ * @author andreas
+ *
+ */
+public class ConceptGraphView extends AbstractCdmEditorViewPart {
+       
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept.graph";
+
+       private GraphViewer viewer;
+       private LayoutAlgorithm layoutAlgoritm;
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+        */
+       @Override
+       public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+//             if(part instanceof ConceptGraphView){
+//                     // ConceptGraphView is maximized
+//                     return;
+//             }
+               
+               if(EditorUtil.getActiveEditor() == null){
+                       showEmptyPage();
+                       return;
+               }
+               
+               if(part instanceof BulkEditor){
+                       showEmptyPage();
+                       return;
+               }
+               
+               
+               if(part instanceof MultiPageTaxonEditor){
+                       if(! part.equals(this.part)){
+                               IEditorInput input = ((IEditorPart) part).getEditorInput();
+                               showViewer(part, new StructuredSelection(input));
+                       }
+                       showViewer();
+               }
+
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
+        */
+       @Override
+       public boolean onComplete() {
+               // TODO IGNORED
+               return false;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.view.AbstractCdmViewPart#getViewer()
+        */
+       @Override
+       public Viewer getViewer() {
+               return viewer;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.view.AbstractCdmViewPart#createViewer(org.eclipse.swt.widgets.Composite)
+        */
+       @Override
+       public void createViewer(Composite parent) {
+               
+               viewer = new GraphViewer(parent, SWT.NONE);
+               getSite().setSelectionProvider(viewer);
+
+               viewer.setContentProvider(new ConceptGraphContentProvider());
+               viewer.setLabelProvider(new ConceptGraphLabelProvider());
+
+               viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
+
+               viewer.setLayoutAlgorithm(getLayoutAlgoritm(), false);
+
+//             createMenu();
+//
+//             createToolbar();
+
+
+       }
+
+       private LayoutAlgorithm getLayoutAlgoritm() {
+
+               if (layoutAlgoritm == null) {
+                       // layoutAlgoritm = new CompositeLayoutAlgorithm(
+                       // LayoutStyles.NO_LAYOUT_NODE_RESIZING,
+                       // new LayoutAlgorithm[] {
+                       // new TreeLayoutAlgorithm(
+                       // LayoutStyles.NO_LAYOUT_NODE_RESIZING),
+                       // new HorizontalShift(
+                       // LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
+
+                       layoutAlgoritm = new TreeLayoutAlgorithm(
+                                       LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+                       layoutAlgoritm.setEntityAspectRatio(0.5);
+               }
+               return layoutAlgoritm;
+       }
+
+}
index 9e756005d3ca14a128f74c3dcfa1946ffebe08c9..a651461cf2ebaa5c04eface5045fa6efea83f119 100644 (file)
@@ -3,9 +3,6 @@
  */
 package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.eclipse.jface.action.ContributionItem;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -14,9 +11,9 @@ import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.ui.handlers.IHandlerService;
 
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -27,12 +24,6 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @version 1.0
  */
 public abstract class AbstractDynamicConceptRelationMenu extends ContributionItem {
-
-       private static List<TaxonRelationshipType> excludeRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
-                       TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
-                       TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
-                       TaxonRelationshipType.ALL_RELATIONSHIPS()
-       });
        
        /*
         * (non-Javadoc)
@@ -42,22 +33,18 @@ public abstract class AbstractDynamicConceptRelationMenu extends ContributionIte
        @Override
        public void fill(Menu menu, int index){
                final IHandlerService handlerService = (IHandlerService) TaxeditorEditorPlugin.getDefault().getWorkbench().getService(IHandlerService.class);
-       
-               List<TaxonRelationshipType> relationshipTypes = CdmStore.getTermManager().getPreferredTaxonRelationshipTypes();
                
-               relationshipTypes.removeAll(excludeRelationshipTypes);
-               
-               for(final TaxonRelationshipType type : relationshipTypes){
+               for(final TaxonRelationshipTypeInverseContainer container : CdmStore.getTermManager().getPreferredTerms(TaxonRelationshipTypeInverseContainer.class)){
                        MenuItem menuItem = new MenuItem(menu, -1);
-                       menuItem.setText(type.getLabel());
-                       menuItem.setData(type);
+                       menuItem.setText(container.getTitleCache());
+                       menuItem.setData(container);
                        menuItem.addSelectionListener(new SelectionListener(){
 
                                public void widgetDefaultSelected(SelectionEvent e) {}
 
                                public void widgetSelected(SelectionEvent ev) {
                                        Event event = new Event();
-                                       event.data = type;
+                                       event.data = container;
                                        try {
                                                handlerService.executeCommand(getCommandName(), event);
                                        } catch (Exception e) {
@@ -74,4 +61,5 @@ public abstract class AbstractDynamicConceptRelationMenu extends ContributionIte
         * @return a {@link java.lang.String} object.
         */
        public abstract String getCommandName();
+
 }
index 935a65f7b2f6db8f2fb13a7d982b5b4c3c22636c..533d3b8865953644927411a3bbb2dc6b6c52571b 100644 (file)
 
 package eu.etaxonomy.taxeditor.editor.view.concept.handler;
 
+import org.apache.log4j.Level;
 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.common.NotDefinedException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-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.editor.view.concept.operation.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.parser.ParseHandler;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
 
 /**
  * <p>CreateConceptRelationHandler class.</p>
@@ -40,9 +40,7 @@ import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDia
  * @version 1.0
  */
 public class CreateConceptRelationHandler extends AbstractHandler {
-       private static final Logger logger = Logger
-                       .getLogger(CreateConceptRelationHandler.class);
-
+       
        /* (non-Javadoc)
         * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
         */
@@ -51,19 +49,32 @@ public class CreateConceptRelationHandler extends AbstractHandler {
                TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
                                Page.NAME);
                
-               Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder());
-                               
-               TaxonRelationshipType type = (TaxonRelationshipType) ((Event)event.getTrigger()).data;
+               Taxon taxonToBeFiltered = editor.getTaxon();
                
+               /* we need to get the activePart before calling TaxonBaseSelectionDialog.selectTaxon(), otherwise the 
+                * the variable of the parent applicationContext in event are overwritten during this method call
+                * this is Linux specific bugfix see: #2685 ([LINUX] Editing concept relationships does not work under linux)
+                */
                IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+
+               Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), taxonToBeFiltered);
+                                       
+               
+               if(relatedConcept == null){
+                       return Status.CANCEL_STATUS;
+               }
+               
+               TaxonRelationshipTypeInverseContainer typeInverseContainer = (TaxonRelationshipTypeInverseContainer) ((Event)event.getTrigger()).data;
+               
+
                IPostOperationEnabled postOperationEnabled = (activePart instanceof IPostOperationEnabled) ? (IPostOperationEnabled) activePart : null;
                
                try {
                        AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(), 
-                                       editor.getUndoContext(), editor.getTaxon(), relatedConcept, type, postOperationEnabled);
+                                       editor.getUndoContext(), editor.getTaxon(), relatedConcept, typeInverseContainer, postOperationEnabled);
                        EditorUtil.executeOperation(operation);
                } catch (NotDefinedException e) {
-                       logger.warn("Command name not set");
+                       EditorUtil.warn(getClass(), "Command name not set");
                }
                
                return null;
index 317ae6a6dd2f066c1753116a1222b839a392ec7d..502d9b94b0573e58905e5895fc4f77ad2f5eae29 100644 (file)
@@ -39,7 +39,7 @@ public class OpenRelatedConceptHandler extends AbstractHandler {
        public Object execute(ExecutionEvent event) throws ExecutionException {
                MultiPageTaxonEditor editor = EditorUtil.getActiveMultiPageTaxonEditor();
                
-               ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+               ISelection selection = HandlerUtil.getCurrentSelection(event);
                
                if(selection instanceof IStructuredSelection){
                        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
index 9e4de5b09e35dc813efccee60926ea66f9552eea..29079f925e0276991adfbcecf36f166e6f77ced5 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 
@@ -31,7 +32,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 public class CreateConceptRelationOperation extends AbstractPostOperation {
        
        private Taxon concept;
-       private TaxonRelationshipType taxonRelationshipType;
+       private TaxonRelationshipTypeInverseContainer taxonRelationshipTypeInverseContainer;
        
        /**
         * <p>Constructor for CreateConceptRelationOperation.</p>
@@ -44,11 +45,17 @@ public class CreateConceptRelationOperation extends AbstractPostOperation {
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
         */
        public CreateConceptRelationOperation(String label,
-                       IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipType taxonRelationshipType
+                       IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipTypeInverseContainer taxonRelationshipTypeInverseContainer
                        , IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, taxon, postOperationEnabled);
                this.concept = concept;
-               this.taxonRelationshipType = taxonRelationshipType;
+               this.taxonRelationshipTypeInverseContainer = taxonRelationshipTypeInverseContainer;
+       }
+       
+       public CreateConceptRelationOperation(String label,
+                       IUndoContext undoContext, Taxon taxon, Taxon concept, TaxonRelationshipType taxonRelationshipType
+                       , IPostOperationEnabled postOperationEnabled) {
+               this(label, undoContext, taxon, concept, new TaxonRelationshipTypeInverseContainer(taxonRelationshipType, false), postOperationEnabled);
        }
 
        /* (non-Javadoc)
@@ -61,7 +68,11 @@ public class CreateConceptRelationOperation extends AbstractPostOperation {
 
                monitor.worked(20);
                // add concept to taxon
-               concept.addTaxonRelation(taxon, taxonRelationshipType, null, null);     
+               if(taxonRelationshipTypeInverseContainer.isInverse()){
+                       concept.addTaxonRelation(taxon, taxonRelationshipTypeInverseContainer.getType(), null, null);   
+               } else {
+                       taxon.addTaxonRelation(concept, taxonRelationshipTypeInverseContainer.getType(), null, null);
+               }
                monitor.worked(40);
                
                // redraw editor if exists
@@ -86,7 +97,7 @@ public class CreateConceptRelationOperation extends AbstractPostOperation {
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
                
-               taxon.removeTaxon(concept, taxonRelationshipType);
+               taxon.removeTaxon(concept, taxonRelationshipTypeInverseContainer.getType());
                
                // redraw editor if exists
                return postExecute(null);
index 15fea804f96fe3b2caf7db7c653af77aed187737..ce60deeca9b8383cce8cc3a4143f9be8e41247bd 100644 (file)
@@ -35,7 +35,7 @@ public class DescriptionElementDropAdapter extends ViewerDropAdapter {
        /**
         * @param viewer
         */
-       protected DescriptionElementDropAdapter(Viewer viewer) {
+       public DescriptionElementDropAdapter(Viewer viewer) {
                super(viewer);
        }
 
index 568c914fd3587d8785ce6046b3267381afc9bde0..fce0faf8e592fc5ec687eb383a97af673547b092 100644 (file)
@@ -6,18 +6,25 @@ package eu.etaxonomy.taxeditor.editor.view.descriptive;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
+import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
@@ -29,8 +36,8 @@ import eu.etaxonomy.taxeditor.store.TermStore;
  */
 public class DescriptiveContentProvider implements ITreeContentProvider {
        
-       private static final Object[] NO_CHILDREN = new Object[0];
-       private Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache;
+       protected static final Object[] NO_CHILDREN = new Object[0];
+       protected Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache;
        
        /**
         * <p>Constructor for DescriptiveContentProvider.</p>
@@ -112,7 +119,7 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
                
                // create a transient tree with all features if none was selected
                if(featureTree == null){
-                       featureTree = FeatureTree.NewInstance(TermStore.getFeatures());
+                       featureTree = FeatureTree.NewInstance(TermStore.getTerms(Feature.class));
                }
                
                return featureTree;
@@ -124,13 +131,25 @@ public class DescriptiveContentProvider implements ITreeContentProvider {
         * @param parentElement
         * @return
         */
-       private List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {
+       protected List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {
                Taxon taxon = parentElement.getTaxon();
                List<DescriptionBase> descriptions = new ArrayList<DescriptionBase>();
                for(DescriptionBase description : taxon.getDescriptions()){
                        if(! description.isImageGallery()){
-                               descriptions.add(description);
+                               MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+                               Set<Marker> descriptionMarkers = description.getMarkers();
+                               if(descriptionMarkers != null && !descriptionMarkers.isEmpty()) {
+                                       for (Marker marker: descriptionMarkers) {
+                                               if(!(marker.getMarkerType().equals(useMarkertype))) {
+                                                       descriptions.add(description);
+                                               }
+                                       }
+                               }
+                               else {
+                                       descriptions.add(description);
+                               }
                        }
+                       
                }                       
                return descriptions;
        }
index 03b76f716d6847353b8316c76d6c7d58fc4eda91..a8ea15156ffc0a225781f8c295c53f3f2fe84003 100644 (file)
@@ -1,6 +1,11 @@
 /**
- * 
- */
+* 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.view.descriptive;
 
 import org.eclipse.jface.viewers.ColumnLabelProvider;
index b3799a0c3726771848b7df051ff53e77931fb27c..30db42aed714313840fd633d7008222a9d05882f 100644 (file)
@@ -42,6 +42,7 @@ import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
 import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
@@ -62,31 +63,25 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.desc"{trunked}</code> */
        public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive";
        
-       private TreeViewer viewer;
+       protected TreeViewer viewer;
        
-       private Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<TaxonDescription, FeatureNodeContainerTree>();
+       protected Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<TaxonDescription, FeatureNodeContainerTree>();
 
-       private ToggleDescriptionAction showAllElementsAction;
+       protected ToggleDescriptionAction showAllElementsAction;
 
-       private ToggleDescriptionAction hideAllElementsAction;
+       protected ToggleDescriptionAction hideAllElementsAction;
 
-       private int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
+       protected int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
        
        /** {@inheritDoc} */
        @Override
        public void createViewer(Composite parent) {
-               
                viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL
                                | SWT.V_SCROLL | SWT.FULL_SELECTION));
-                               
                viewer.setContentProvider(new DescriptiveContentProvider(featureNodeContainerCache));           
                viewer.setLabelProvider(new DescriptiveLabelProvider());
-               
                viewer.setSorter(new DescriptiveViewerSorter());
-               
                viewer.setAutoExpandLevel(2);
-               
-               
                Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };
                viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(
                                this));
@@ -123,7 +118,7 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                return super.getInitialSelection();
        }
 
-       private void createToolbar() {
+       protected void createToolbar() {
                IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
                toolBarManager.add(showAllElementsAction);
                toolBarManager.add(hideAllElementsAction);
@@ -132,7 +127,7 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
        /*
         * TODO add to the views menu
         */
-       private void createMenu(){
+       protected void createMenu(){
                MenuManager menuManager = new MenuManager();
                menuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
                
@@ -165,6 +160,11 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                        return;
                }
                
+               if(part instanceof DefinedTermEditor){
+                       showEmptyPage();
+                       return;
+               }
+               
                if(part instanceof MultiPageTaxonEditor){
                        if(! part.equals(this.part)){
                                IEditorInput input = ((IEditorPart) part).getEditorInput();
@@ -181,7 +181,7 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
         * @created May 28, 2010
         * @version 1.0
         */
-       private class ToggleDescriptionAction extends Action{
+       protected class ToggleDescriptionAction extends Action{
                private boolean expanded;
                
                public ToggleDescriptionAction(boolean expand){
index f388f018e6c7fd1a395ee1592af78092e7c75b9e..618d9c0ee3a6870466e65438279199ff9e014609 100644 (file)
@@ -66,7 +66,7 @@ public class CreateDescriptionElementHandler extends AbstractHandler {
 
                        TaxonDescription description = null;
 
-                       ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+                       ISelection selection = HandlerUtil.getCurrentSelection(event);
                        if (selection instanceof ITreeSelection) {
                                TreePath[] paths = ((ITreeSelection) selection).getPaths();
                                Object firstSegment = paths[0].getFirstSegment();
@@ -82,16 +82,10 @@ public class CreateDescriptionElementHandler extends AbstractHandler {
                        } 
 
                        if (description != null) {
-
-                               Feature feature = (Feature) ((Event) event.getTrigger()).data;
-
                                AbstractPostOperation operation = null;
                                try {
                                        // TODO use undo context specific to editor
-                                       operation = new CreateDescriptionElementOperation(event
-                                                       .getCommand().getName(),
-                                                       EditorUtil.getUndoContext(), taxon,
-                                                       description, feature, postOperationEnabled);
+                                       operation = operationCreationInstance(event.getCommand().getName(), event, taxon, description, postOperationEnabled);
                                        EditorUtil.executeOperation(operation);
                                } catch (NotDefinedException e) {
                                        EditorUtil.warn(getClass(), "Command name not set");
@@ -104,4 +98,21 @@ public class CreateDescriptionElementHandler extends AbstractHandler {
                return null;
 
        }
+       
+       /**
+        * Added to make the Class more generic and limit the amount of code changes required
+        * @param label
+        * @param event
+        * @param taxon
+        * @param description
+        * @param postOperationEnabled
+        * @return
+        */
+       protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
+               Feature feature = (Feature) ((Event) event.getTrigger()).data;
+               return new CreateDescriptionElementOperation(label,
+                                       EditorUtil.getUndoContext(), taxon,
+                                       description, feature, postOperationEnabled);
+       }
+
 }
index 491057e1aff728706c024274a7335412fdc48efe..9542fb5cd364519d8bcba15453d26bc560a9c96e 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
+* Copyright (C) 2011 EDIT
 * European Distributed Institute of Taxonomy 
 * http://www.e-taxonomy.eu
 * 
@@ -8,6 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 package eu.etaxonomy.taxeditor.editor.view.descriptive.handler;
+
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -52,9 +53,8 @@ public class CreateDescriptionHandler extends AbstractHandler {
                        Taxon taxon = ((TaxonEditorInput) input).getTaxon();    
                        AbstractPostOperation operation;
                        try {
-                               // TODO use undo context specific to editor
-                               operation = new CreateTaxonDescriptionOperation(event.getCommand().getName(), 
-                                               EditorUtil.getUndoContext(), taxon, postOperationEnabled);
+                               
+                               operation = createOperationInstance(event.getCommand().getName(), taxon, postOperationEnabled);
                                EditorUtil.executeOperation(operation);
                        } catch (NotDefinedException e) {
                                EditorUtil.warn(getClass(), "Command name not set.");
@@ -62,5 +62,18 @@ public class CreateDescriptionHandler extends AbstractHandler {
                } 
                return null;
        }
+       
+       /**Comments for funtion createOperationInstance
+        * The function is used to make the specific object creation more generic
+        * @param eventLabel
+        * @param taxon
+        * @param postOperationEnabled
+        * @return
+        */
+       protected AbstractPostOperation createOperationInstance(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {
+               // TODO use undo context specific to editor     
+               return new CreateTaxonDescriptionOperation(eventLabel,  EditorUtil.getUndoContext(), taxon, postOperationEnabled);
+       }
+       
 
 }
index f2374a56db6e84484e5ce1fb613c8d1085506296..766c5cf8dfc0ab60daf4f42c4364afb0be16f5a2 100644 (file)
@@ -1,12 +1,12 @@
 // $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.
-*/
+ * 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.view.descriptive.handler;
 
@@ -31,6 +31,7 @@ import eu.etaxonomy.cdm.model.description.FeatureNode;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
 import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateDescriptionElementOperation;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
@@ -38,105 +39,122 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>DynamicFeatureMenu class.</p>
- *
+ * <p>
+ * DynamicFeatureMenu class.
+ * </p>
+ * 
  * @author n.hoffmann
  * @created 17.04.2009
  * @version 1.0
  */
 public class DynamicFeatureMenu extends CompoundContributionItem {
-       
-       private ISelectionService selectionService = EditorUtil.getActivePart().getSite().getWorkbenchWindow().getSelectionService();
-       private IHandlerService handlerService = (IHandlerService) EditorUtil.getService(IHandlerService.class);
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+
+       private ISelectionService selectionService = EditorUtil.getActivePart()
+                       .getSite().getWorkbenchWindow().getSelectionService();
+       private IHandlerService handlerService = (IHandlerService) EditorUtil
+                       .getService(IHandlerService.class);
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
         */
        /** {@inheritDoc} */
        @Override
        protected IContributionItem[] getContributionItems() {
-               
-               return new IContributionItem[] {
-                               new ContributionItem() {
-                                       public void fill(Menu menu, int index){
-                                                               
-                                               ISelection selection = selectionService.getSelection(DescriptiveViewPart.ID);
-                                               
-                                               if(selection instanceof IStructuredSelection){
-                                                       IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-                                                       Object selectedElement = structuredSelection.getFirstElement();
-                                                       
-                                                       if(selectedElement instanceof TaxonDescription){
-                                                               FeatureTree featureTree = getFeatureTree((TaxonDescription) selectedElement);
-                                                               
-                                                               for(FeatureNode childNode : featureTree.getRootChildren()){
-                                                                       createMenuItem(menu, childNode.getFeature());
-                                                               }
-                                                       }
-                                                       else if(selectedElement instanceof FeatureNodeContainer){
-                                                               FeatureNode featureNode = ((FeatureNodeContainer) selectedElement).getFeatureNode();
-                                                               
-                                                               // add the feature to the menu
-                                                               createMenuItem(menu, featureNode.getFeature());
-                                                               
-                                                               // add possible children to the menu
-                                                               for(FeatureNode childNode : featureNode.getChildren()){
-                                                                       createMenuItem(menu, childNode.getFeature());
-                                                               }
-                                                       }
-                                                       else if(selectedElement instanceof DescriptionElementBase){
-                                                               Feature feature = ((DescriptionElementBase) selectedElement).getFeature();
-                                                               createMenuItem(menu, feature);
-                                                       }
-                                               }       
+
+               return new IContributionItem[] { new ContributionItem() {
+                       public void fill(Menu menu, int index) {
+
+                               ISelection selection = selectionService
+                                               .getSelection(DescriptiveViewPart.ID);
+
+                               if (selection instanceof IStructuredSelection) {
+                                       IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+                                       Object selectedElement = structuredSelection
+                                                       .getFirstElement();
+
+                                       if (selectedElement instanceof TaxonDescription) {
+                                               FeatureTree featureTree = getFeatureTree((TaxonDescription) selectedElement);
+
+                                               for (FeatureNode childNode : featureTree.getRootChildren()) {
+                                                       createMenuItem(menu, childNode.getFeature());
+
+                                               }
+                                       } else if (selectedElement instanceof FeatureNodeContainer) {
+                                               FeatureNode featureNode = ((FeatureNodeContainer) selectedElement)
+                                                               .getFeatureNode();
+
+                                               // add the feature to the menu
+                                               createMenuItem(menu, featureNode.getFeature());
+
+                                               // add possible children to the menu
+                                               for (FeatureNode childNode : featureNode.getChildren()) {
+                                                       createMenuItem(menu, childNode.getFeature());
+                                               }
+                                       } else if (selectedElement instanceof DescriptionElementBase) {
+                                               Feature feature = ((DescriptionElementBase) selectedElement)
+                                                               .getFeature();
+                                               createMenuItem(menu, feature);
                                        }
                                }
-               };
-       }       
-       
+                       }
+               } };
+       }
+
        private void createMenuItem(Menu menu, final Feature feature) {
                MenuItem menuItem = new MenuItem(menu, -1);
-               final Feature deproxiedFeature = (Feature) HibernateProxyHelper.deproxy(feature);
+               final Feature deproxiedFeature = (Feature) HibernateProxyHelper
+                               .deproxy(feature);
+
                menuItem.setText(deproxiedFeature.getLabel());
-               menuItem.addSelectionListener(new SelectionListener(){
+               menuItem.addSelectionListener(new SelectionListener() {
 
-                       public void widgetDefaultSelected(SelectionEvent e) {}
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
 
                        public void widgetSelected(SelectionEvent ev) {
                                Event event = new Event();
                                event.data = deproxiedFeature;
                                try {
-                                       handlerService.executeCommand(CreateDescriptionElementOperation.ID, event);
+                                       handlerService.executeCommand(
+                                                       CreateDescriptionElementOperation.ID, event);
                                } catch (Exception e) {
                                        EditorUtil.error(getClass(), e);
                                }
-                       }                               
+                       }
                });
+
        }
-       
+
        /**
         * Retrieves the feature tree associated with the given description
         * 
-        * TODO as of now this is always the same thing because feature trees may not be associated 
-        * to descriptions yet.
+        * TODO as of now this is always the same thing because feature trees may
+        * not be associated to descriptions yet.
         * 
         * @param description
         * @return
         */
-       private FeatureTree getFeatureTree(DescriptionBase description){
+       private FeatureTree getFeatureTree(DescriptionBase description) {
                FeatureTree featureTree = null;
-               
-               // TODO change this to the feature tree associated with this taxon description
-               if (description.hasStructuredData()){                                   
-                       featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription();
-               }else{
-                       featureTree = PreferencesUtil.getDefaultFeatureTreeForTextualDescription();
+
+               // TODO change this to the feature tree associated with this taxon
+               // description
+               if (description.hasStructuredData()) {
+                       featureTree = PreferencesUtil
+                                       .getDefaultFeatureTreeForStructuredDescription();
+               } else {
+                       featureTree = PreferencesUtil
+                                       .getDefaultFeatureTreeForTextualDescription();
                }
-               
-               if(featureTree == null){
-                       featureTree = FeatureTree.NewInstance(CdmStore.getTermManager().getPreferredFeatures());
+
+               if (featureTree == null) {
+                       featureTree = FeatureTree.NewInstance(CdmStore.getTermManager()
+                                       .getPreferredTerms(Feature.class));
                }
-               
+
                return featureTree;
        }
 }
index 1d27ca0fce60331335e958bc7d4e795cb45212fc..8448919f41af6f39061b216c37b1e0834a039cd1 100644 (file)
@@ -33,7 +33,8 @@ import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionE
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
+
 
 /**
  * @author n.hoffmann
@@ -66,7 +67,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler {
                                }
                        }
                        
-                       Taxon targetTaxon = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), EditorUtil.getActiveMultiPageTaxonEditor().getConversationHolder());
+                       Taxon targetTaxon = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), EditorUtil.getActiveMultiPageTaxonEditor().getConversationHolder(), null);
                                                
                        TaxonDescription targetDescription = TaxonDescription.NewInstance(targetTaxon);
                        targetDescription.setTitleCache(String.format("Copied from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon()), true);
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesContentProvider.java
new file mode 100644 (file)
index 0000000..dd8de1c
--- /dev/null
@@ -0,0 +1,85 @@
+/**\r
+ * Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashSet;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.Set;\r
+\r
+import org.eclipse.jface.viewers.ITreeContentProvider;\r
+import org.eclipse.jface.viewers.Viewer;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.FeatureTree;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveContentProvider;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.TermStore;\r
+\r
+/**\r
+ * The class provides the required content to the Uses View\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesContentProvider extends DescriptiveContentProvider implements ITreeContentProvider {\r
+\r
+       Set<MarkerType> markerTypes = new HashSet<MarkerType>();\r
+               \r
+       /**\r
+        * <p>Constructor for DescriptiveContentProvider.</p>\r
+        *\r
+        * @param featureNodeContainerCache a {@link java.util.Map} object.\r
+        */\r
+       public UsesContentProvider(Map<TaxonDescription, FeatureNodeContainerTree> featureNodeContainerCache) {\r
+               super(featureNodeContainerCache);\r
+               this.featureNodeContainerCache = featureNodeContainerCache;\r
+       }\r
+\r
+       /**\r
+        * Get all descriptions associated with the given TaxonEditorInput\r
+        * \r
+        * @param parentElement\r
+        * @return\r
+        */\r
+       @Override\r
+       protected List<DescriptionBase> getDescriptions(TaxonEditorInput parentElement) {\r
+               this.markerTypes.addAll(CdmStore.getTermManager().getPreferredTerms(MarkerType.class));\r
+               Taxon taxon = parentElement.getTaxon();\r
+               List<DescriptionBase> descriptions = new ArrayList<DescriptionBase>();\r
+               \r
+               for(DescriptionBase description : taxon.getDescriptions()){\r
+                       if(! description.isImageGallery()){\r
+                               MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+                               Set<Marker> descriptionMarkers = description.getMarkers();\r
+                               if(descriptionMarkers != null) {\r
+                                       for (Marker marker: descriptionMarkers) {\r
+                                               if(marker.getMarkerType().equals(useMarkertype)) {\r
+                                                       descriptions.add(description);\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }                       \r
+               return descriptions;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java
new file mode 100644 (file)
index 0000000..1858c85
--- /dev/null
@@ -0,0 +1,189 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.viewers.ColumnLabelProvider;\r
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;\r
+import org.eclipse.jface.viewers.StyledString;\r
+\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.LanguageString;\r
+import eu.etaxonomy.cdm.model.description.CategoricalData;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.StateData;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+\r
+/**\r
+ * UsesLabelProvider Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesLabelProvider extends ColumnLabelProvider implements\r
+               IStyledLabelProvider {\r
+       \r
+       /** {@inheritDoc} */\r
+       public String getText(Object element) {\r
+               String text = "";\r
+\r
+               if (element instanceof DescriptionBase) {\r
+                       text = ((DescriptionBase) element).getTitleCache();\r
+                       if (text == null || text.length() == 0) {\r
+                               text = "Use: No label provided";\r
+                       }\r
+                       else {\r
+                               text = "Use: " + text;\r
+                       }\r
+               }\r
+               else if (element instanceof CategoricalData) {\r
+                       if (!((CategoricalData) element).getStates().isEmpty()) {\r
+                               boolean isUseCategoryAbsent = true;\r
+                               for (StateData statedata : ((CategoricalData) element).getStates()) {\r
+                                       if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+                                               text = text + statedata.getState().getTitleCache() + ";";\r
+                                               isUseCategoryAbsent = false;\r
+                                       }\r
+                               }\r
+                               if(isUseCategoryAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                               \r
+                               boolean isUseSubCategoryAbsent = true;\r
+                               for (StateData statedata : ((CategoricalData) element).getStates()) {\r
+                                       if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+                                               text = text + statedata.getState().getTitleCache() + ";";\r
+                                               isUseSubCategoryAbsent = false;\r
+                                       }\r
+                               }\r
+                               if(isUseSubCategoryAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                       }\r
+                       else {\r
+                               text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+                       }\r
+                       if (!((CategoricalData) element).getModifiers().isEmpty()) {\r
+                               for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+                                       modifier.getPartOf();\r
+                                       modifier.getVocabulary();\r
+                               }\r
+                               \r
+                               boolean isPlantPartAbsent = true;\r
+                               for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
+                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               isPlantPartAbsent = false;\r
+                                       }\r
+                                       \r
+                               }\r
+                               if (isPlantPartAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                               \r
+                               boolean isHumanGroupAbsent = true;\r
+                               for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel)) {\r
+                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               isHumanGroupAbsent = false;\r
+                                       }\r
+                               }\r
+                               if (isHumanGroupAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                               \r
+                               boolean isEthnicGroupAbsent = true;\r
+                               for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) {\r
+                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               isEthnicGroupAbsent = false;\r
+                                       }\r
+                               }\r
+                               if (isEthnicGroupAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                               \r
+                               boolean isCountryAbsent = true;\r
+                               for (Modifier modifier: ((CategoricalData) element).getModifiers()){\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
+                                               text = text +  modifier.getTitleCache()+ ";";\r
+                                               isCountryAbsent = false;\r
+                                       }\r
+                               }\r
+                               if (isCountryAbsent) {\r
+                                       text = text + UsageTermCollection.notAvailableLabel + ";";\r
+                               }\r
+                       }\r
+                       else {\r
+                               text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+                       }\r
+               \r
+                       if (text == null || text.length() == 0) {\r
+                               text = "No data provided";\r
+                       }\r
+                       else {\r
+                               String[] textElements = text.split(";");\r
+                               String dataportalString = textElements[0] + ";" + textElements[1] + ";" + textElements[5] + ";" + textElements[2] + ";" + textElements[3] + ";" + textElements[4] + ";" ;  \r
+                               \r
+                               ((CategoricalData)element).putModifyingText(CdmStore.getDefaultLanguage(), dataportalString);\r
+                       }\r
+                       return text;\r
+               }\r
+               \r
+               else if (element instanceof TextData) {\r
+                       List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});\r
+                       LanguageString languageString = ((TextData) element).getPreferredLanguageString(languages);\r
+                       text = languageString != null ? languageString.getText() : null;\r
+                       if (text == null || text.length() == 0) {\r
+                               text = "No data provided";\r
+                       }\r
+               }\r
+               \r
+               else if (element instanceof FeatureNodeContainer){\r
+                       text = ((FeatureNodeContainer)element).getFeature().getTitleCache();\r
+               }\r
+\r
+               return  text;\r
+       }\r
+\r
+       /** Function dertmining which vocabulary is the term part of \r
+        *  \r
+        * @param term\r
+        * @param vocabularyExpected\r
+        * @return\r
+        */\r
+       private boolean GetVocabularyType(Modifier term, String vocabularyExpected) {\r
+               if ((term.getPartOf() != null)  && (term.getPartOf().getTitleCache().equals(vocabularyExpected))) {\r
+                       return true;\r
+               }\r
+               else if ((term.getVocabulary() != null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(vocabularyExpected))) {\r
+                       return true;\r
+               }\r
+               else if ((vocabularyExpected.equals(UsageTermCollection.ethnicGroupLabel))  && ((term.getPartOf() != null))) {\r
+                       return true;\r
+               }\r
+       return false;\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public StyledString getStyledText(Object element) {\r
+               return new StyledString(this.getText(element),\r
+                               StyledString.QUALIFIER_STYLER);\r
+       }\r
+       \r
+       \r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java
new file mode 100644 (file)
index 0000000..16fa9b0
--- /dev/null
@@ -0,0 +1,76 @@
+/**\r
+ * Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses;\r
+\r
+import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.dnd.Transfer;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Tree;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;\r
+import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;\r
+import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;\r
+\r
+\r
+/**\r
+ * The Class create a speific Use View to keep the taxonomic view clean\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UsesViewPart extends DescriptiveViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData {\r
+\r
+       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.uses"</code> */\r
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.view.uses";\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void createViewer(Composite parent) {\r
+               \r
+               viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL\r
+                               | SWT.V_SCROLL | SWT.FULL_SELECTION));\r
+               viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache));\r
+               viewer.setLabelProvider(new UsesLabelProvider());\r
+               viewer.setAutoExpandLevel(2);\r
+               \r
+               \r
+               \r
+               Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };\r
+               viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(\r
+                               this));\r
+               viewer.addDropSupport(dndOperations, transfers,\r
+                               new DescriptionElementDropAdapter(viewer));\r
+                                               \r
+               // Propagate selection from viewer\r
+               getSite().setSelectionProvider(viewer);\r
+               \r
+               showAllElementsAction = new ToggleDescriptionAction(false);             \r
+               hideAllElementsAction = new ToggleDescriptionAction(true);\r
+               \r
+               // Add context menu to tree\r
+               createMenu();\r
+               \r
+               createToolbar();\r
+\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public boolean postOperation(CdmBase objectAffectedByOperation) {\r
+               viewer.refresh();\r
+               return super.postOperation(objectAffectedByOperation);\r
+       }\r
+       \r
+\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseHandler.java
new file mode 100644 (file)
index 0000000..f208906
--- /dev/null
@@ -0,0 +1,32 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses.handler;\r
+\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionHandler;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateTaxonUseOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+/**\r
+ * CreateUseHandler Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseHandler extends CreateDescriptionHandler {\r
+\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected AbstractPostOperation createOperationInstance(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {\r
+               return new CreateTaxonUseOperation(eventLabel, EditorUtil.getUndoContext(), taxon, postOperationEnabled);\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseRecordHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseRecordHandler.java
new file mode 100644 (file)
index 0000000..8124bd3
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * Copyright (C) 2011 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.view.uses.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler;
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseRecordOperation;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * CreateUseRecordHandler Class
+ * @author a.theys     
+ * @created mar 13, 2012
+ * @version 1.0
+ */
+public class CreateUseRecordHandler extends CreateDescriptionElementHandler {
+       /** {@inheritDoc} */
+       @Override
+       protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
+               //Use Record Feature retrieval below
+               Feature feature = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseRecordFeature);
+               feature.setSupportsCategoricalData(true);
+               return new CreateUseRecordOperation(label,
+                                       EditorUtil.getUndoContext(), taxon,
+                                       description, feature, postOperationEnabled);
+       }
+       
+       
+       
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseSummaryHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/handler/CreateUseSummaryHandler.java
new file mode 100644 (file)
index 0000000..ebc3e28
--- /dev/null
@@ -0,0 +1,42 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses.handler;\r
+\r
+\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler;\r
+import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseSummaryOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * CreateUseSummaryHandler Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseSummaryHandler extends CreateDescriptionElementHandler {\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, Taxon taxon, TaxonDescription description, IPostOperationEnabled postOperationEnabled) {\r
+               //Use Record Feature retrieval below\r
+               Feature feature = (Feature) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseSummaryFeature);\r
+               feature.setSupportsTextData(true);\r
+               return new CreateUseSummaryOperation(label,     EditorUtil.getUndoContext(), taxon,     description, feature, postOperationEnabled);\r
+       }\r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java
new file mode 100644 (file)
index 0000000..f312a1a
--- /dev/null
@@ -0,0 +1,84 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses.operation;\r
+\r
+import java.util.UUID;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateTaxonDescriptionOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * CreateTaxonUseOperation Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateTaxonUseOperation extends CreateTaxonDescriptionOperation {\r
+       private TaxonDescription description;\r
+       private Marker marker;\r
+\r
+       /**\r
+        * <p>Constructor for CreateTaxonUseOperation.</p>\r
+        *\r
+        * @param label a {@link java.lang.String} object.\r
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+        */\r
+       public CreateTaxonUseOperation(String label, IUndoContext undoContext,\r
+                       Taxon taxon, IPostOperationEnabled postOperationEnabled) {\r
+               this(label, undoContext, taxon, postOperationEnabled, false);\r
+       }\r
+\r
+       /**\r
+        * <p>Constructor for CreateTaxonUseOperation.</p>\r
+        *\r
+        * @param label a {@link java.lang.String} object.\r
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+        * @param isImageGallery a boolean.\r
+        */\r
+       public CreateTaxonUseOperation(String label, IUndoContext undoContext,\r
+                       Taxon taxon, IPostOperationEnabled postOperationEnabled, boolean isImageGallery) {\r
+               super(label, undoContext, taxon, postOperationEnabled);\r
+       }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               description = TaxonDescription.NewInstance(taxon);\r
+               monitor.worked(20);\r
+               MarkerType useMarkerType = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);\r
+               marker = Marker.NewInstance(useMarkerType, true);\r
+               description.addMarker(marker);\r
+               monitor.worked(40);\r
+\r
+               return postExecute(description);\r
+       }\r
+}\r
+\r
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java
new file mode 100644 (file)
index 0000000..ea45ffb
--- /dev/null
@@ -0,0 +1,117 @@
+/**
+* Copyright (C) 2011 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.view.uses.operation;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+import eu.etaxonomy.cdm.model.description.CategoricalData;
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
+import eu.etaxonomy.cdm.model.description.TextData;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+
+
+/**
+ * CreateUseRecordOperation Class
+ * @author a.theys     
+ * @created mar 13, 2012
+ * @version 1.0
+ */
+public class CreateUseRecordOperation extends AbstractPostOperation {
+       
+       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
+       private TaxonDescription description;
+       private Feature feature;
+       private DescriptionElementBase element;
+
+       /**
+        * <p>Constructor for CreateUseRecordOperation.</p>
+        *
+        * @param label a {@link java.lang.String} object.
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
+        * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.
+        * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+        */
+       public CreateUseRecordOperation(String label, IUndoContext undoContext,
+               Taxon taxon, TaxonDescription description, Feature feature, IPostOperationEnabled postOperationEnabled) {
+                       super(label, undoContext, taxon, postOperationEnabled);
+               
+                       this.description = description;
+                       this.feature = feature;
+       }
+
+       
+       /**
+        * <p>Constructor for CreateUseRecordOperation.</p>
+        *
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
+        * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.
+        * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.
+        * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
+        * @param label a {@link java.lang.String} object.
+        */
+       public CreateUseRecordOperation(String label,
+                       IUndoContext undoContext, Taxon taxon,
+                       TaxonDescription description, Feature feature,
+                       DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {
+                       this(label, undoContext, taxon, description, feature, postOperationEnabled);
+                       
+               this.element = element;
+       }
+
+       @Override
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               monitor.worked(20);
+               if (element == null) {
+                       if(feature.isSupportsCategoricalData()){
+                               element = CategoricalData.NewInstance();
+                       }
+                       else {
+                               element = TextData.NewInstance();
+                       }
+               }
+
+               
+               element.setFeature(feature);
+               description.addElement(element);
+               monitor.worked(40);
+
+               return postExecute(element);
+       }
+
+       @Override
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               
+               description.addElement(element);
+               
+               return postExecute(element);
+       }
+
+       @Override
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+                       throws ExecutionException {
+               description.removeElement(element);
+               
+               return postExecute(null);
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java
new file mode 100644 (file)
index 0000000..2a86f90
--- /dev/null
@@ -0,0 +1,113 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.editor.view.uses.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.TaxonDescription;\r
+import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+\r
+/**\r
+ * CreateUseSummaryOperation Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class CreateUseSummaryOperation extends AbstractPostOperation {\r
+       \r
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";\r
+       \r
+       private TaxonDescription description;\r
+       private Feature feature;\r
+       private DescriptionElementBase element;\r
+\r
+       \r
+       /**\r
+        * <p>Constructor for CreateUseSummaryOperation.</p>\r
+        *\r
+        * @param label a {@link java.lang.String} object.\r
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+        * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.\r
+        * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.\r
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+        */\r
+       public CreateUseSummaryOperation(String label, IUndoContext undoContext,\r
+               Taxon taxon, TaxonDescription description, Feature feature, IPostOperationEnabled postOperationEnabled) {\r
+                       super(label, undoContext, taxon, postOperationEnabled);\r
+               \r
+                       this.description = description;\r
+                       this.feature = feature;\r
+       }\r
+\r
+       /**\r
+        * <p>Constructor for CreateUseSummaryOperation.</p>\r
+        *\r
+        * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.\r
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.\r
+        * @param description a {@link eu.etaxonomy.cdm.model.description.TaxonDescription} object.\r
+        * @param feature a {@link eu.etaxonomy.cdm.model.description.Feature} object.\r
+        * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.\r
+        * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.\r
+        * @param label a {@link java.lang.String} object.\r
+        */\r
+       public CreateUseSummaryOperation(String label,\r
+                       IUndoContext undoContext, Taxon taxon,\r
+                       TaxonDescription description, Feature feature,\r
+                       DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {\r
+                       this(label, undoContext, taxon, description, feature, postOperationEnabled);\r
+                       \r
+               this.element = element;\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               monitor.worked(20);\r
+               if (element == null) {\r
+\r
+                               element = TextData.NewInstance();\r
+               }\r
+\r
+               \r
+               element.setFeature(feature);\r
+               description.addElement(element);\r
+               monitor.worked(40);\r
+\r
+               return postExecute(element);\r
+       }\r
+\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               description.addElement(element);\r
+               \r
+               return postExecute(element);\r
+       }\r
+\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               description.removeElement(element);\r
+               \r
+               return postExecute(null);\r
+       }\r
+}\r
index 2b8857b444f01f979a6b907a30a63914282e8101..81724d3bb9d5ae5831f60957bfe7f1a09da75d03 100644 (file)
@@ -1,14 +1,16 @@
 <projectDescription>
   <name>eu.etaxonomy.taxeditor.feature.platform</name>
-  <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
-  <projects/>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-    <nature>org.eclipse.pde.PluginNature</nature>
-  </natures>
+  <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
 </projectDescription>
\ No newline at end of file
index d7cfc48c3954c9b4a5d15c136a0c018436eeae7b..943b7de6d208aa334e747baf34b3a2699f66d960 100644 (file)
@@ -2,15 +2,15 @@
 <feature\r
       id="eu.etaxonomy.taxeditor.feature.platform"\r
       label="Taxeditor Dependencies"\r
-      version="3.0.6.qualifier"\r
+      version="3.0.12.qualifier"\r
       os="linux,macosx,win32"\r
       ws="cocoa,gtk,win32"\r
       arch="x86,x86_64">\r
 \r
    <license url="http://www.eclipse.org/legal/epl-v10.html">\r
-      The contents of this file are subject to the Eclipse Public License Version 1.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
-http://www.eclipse.org/legal/epl-v10.html
-
+      The contents of this file are subject to the Eclipse Public License Version 1.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r
+http://www.eclipse.org/legal/epl-v10.html\r
+\r
 Software distributed under the License is distributed on an &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.\r
    </license>\r
 \r
@@ -168,8 +168,6 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.equinox.security.macosx"\r
          os="macosx"\r
-         ws="cocoa"\r
-         arch="x86,x86_64"\r
          download-size="0"\r
          install-size="0"\r
          version="0.0.0"\r
@@ -335,6 +333,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.filesystem.win32.x86"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86"\r
          download-size="0"\r
          install-size="0"\r
@@ -345,6 +344,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.net.win32.x86"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86"\r
          download-size="0"\r
          install-size="0"\r
@@ -355,7 +355,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.resources.win32.x86"\r
          os="win32"\r
-         arch="x86,x86_64"\r
+         arch="x86"\r
          download-size="0"\r
          install-size="0"\r
          version="0.0.0"\r
@@ -365,7 +365,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.equinox.security.win32.x86"\r
          os="win32"\r
-         arch="x86,x86_64"\r
+         arch="x86"\r
          download-size="0"\r
          install-size="0"\r
          version="0.0.0"\r
@@ -375,6 +375,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.swt.win32.win32.x86"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86"\r
          download-size="0"\r
          install-size="0"\r
@@ -518,27 +519,6 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
          version="0.0.0"\r
          unpack="false"/>\r
 \r
-   <plugin\r
-         id="org.eclipse.swt.motif.linux.x86"\r
-         os="linux"\r
-         ws="motif"\r
-         arch="x86"\r
-         download-size="0"\r
-         install-size="0"\r
-         version="0.0.0"\r
-         fragment="true"\r
-         unpack="false"/>\r
-\r
-   <plugin\r
-         id="org.eclipse.equinox.launcher.motif.linux.x86"\r
-         os="linux"\r
-         ws="motif"\r
-         arch="x86"\r
-         download-size="0"\r
-         install-size="0"\r
-         version="0.0.0"\r
-         fragment="true"/>\r
-\r
    <plugin\r
          id="org.apache.commons.logging"\r
          download-size="0"\r
@@ -668,16 +648,6 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
          version="0.0.0"\r
          unpack="false"/>\r
 \r
-   <plugin\r
-         id="org.eclipse.swt.cocoa.macosx"\r
-         os="macosx"\r
-         arch="x86"\r
-         download-size="0"\r
-         install-size="0"\r
-         version="0.0.0"\r
-         fragment="true"\r
-         unpack="false"/>\r
-\r
    <plugin\r
          id="org.eclipse.equinox.p2.core"\r
          download-size="0"\r
@@ -807,6 +777,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.filesystem.win32.x86_64"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86_64"\r
          download-size="0"\r
          install-size="0"\r
@@ -817,6 +788,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.net.win32.x86_64"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86_64"\r
          download-size="0"\r
          install-size="0"\r
@@ -837,6 +809,7 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.swt.win32.win32.x86_64"\r
          os="win32"\r
+         ws="win32"\r
          arch="x86_64"\r
          download-size="0"\r
          install-size="0"\r
@@ -867,14 +840,89 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
    <plugin\r
          id="org.eclipse.core.filesystem.macosx"\r
          os="macosx"\r
-         ws="cocoa"\r
-         arch="x86,x86_64"\r
          download-size="0"\r
          install-size="0"\r
          version="0.0.0"\r
          fragment="true"\r
          unpack="false"/>\r
 \r
+   <plugin\r
+         id="org.hamcrest"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.hamcrest.core"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.apache.lucene"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.apache.lucene.analysis"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.eclipse.help.base"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.eclipse.help.webapp"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.apache.jasper"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.eclipse.equinox.jsp.jasper.registry"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.eclipse.equinox.http.registry"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.eclipse.jdt.core"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.hamcrest.text"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
    <plugin\r
          id="org.hamcrest.core"\r
          download-size="0"\r
index 71986241d9de00090e45612d3f06ddf84b4a5d0a..0d665cf5af7cf81d1206a6c4989f3f64d55678be 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
index 35ce558dcf28945b350b9a067d89e43bb7d5833d..7e46fa237167397c1f9a1b410ec60911d51a145d 100644 (file)
@@ -1,6 +1,6 @@
 <projectDescription>
   <name>eu.etaxonomy.taxeditor.feature</name>
-  <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <comment></comment>
   <projects>
     <project>eu.etaxonomy.taxeditor.application</project>
     <project>eu.etaxonomy.taxeditor.bulkeditor</project>
     <project>eu.etaxonomy.taxeditor.printpublisher</project>
     <project>eu.etaxonomy.taxeditor.store</project>
   </projects>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-    <nature>org.eclipse.pde.PluginNature</nature>
-  </natures>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
 </projectDescription>
\ No newline at end of file
index f1201a6d35262e5656307d64f4e7729484c48ab6..30f68d152ce802dcfa0eb2399ee01c1a11018049 100644 (file)
@@ -1,5 +1,4 @@
-bin.includes = plugin_customization.ini,\
-               feature.xml
+bin.includes = feature.xml
 
 category.id.eu.etaxonomy=EDIT
 category.description.eu.etaxonomy=EDIT Taxonomic Editor
index c4caf249c59058dcf2891267922a0ffdcc712bef..1518c31385bbfe415ef4dde2d6911d5e18892a1c 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="eu.etaxonomy.taxeditor.feature"
       label="Taxonomic Editor"
-      version="3.0.6.qualifier"
+      version="3.0.12.qualifier"
       provider-name="EDIT"
       plugin="eu.etaxonomy.taxeditor.application"
       os="linux,macosx,win32"
@@ -68,49 +68,49 @@ Software distributed under the License is distributed on an &quot;AS IS&quot; ba
          id="eu.etaxonomy.taxeditor.application"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.bulkeditor"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.editor"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.navigation"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.store"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.printpublisher"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
          id="eu.etaxonomy.taxeditor.cdmlib"
          download-size="0"
          install-size="0"
-         version="3.0.6.qualifier"/>
+         version="0.0.0"/>
 
    <plugin
          id="javax.servlet"
index 9a63166a88960d59fcfe9073691face0b09baaa0..4c8023d7f6054390d2af1a417253e6614f13fda8 100644 (file)
@@ -3,7 +3,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
index 0c9ca6e5068f4fda46d46b94c7c309925ab34ce5..9ccd37e3d87acb84baf7f5d09fd3131df01d34b6 100644 (file)
@@ -2,12 +2,13 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Help
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
 Bundle-Vendor: EDIT
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.help.ui,
- org.eclipse.help.webapp
+ org.eclipse.help.webapp,
+ org.hamcrest
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
index 642e4204570021fdd27b8bb1a0b9193150441c66..31a2087326912132862891f0344a18f9a48ab3e5 100644 (file)
@@ -4,4 +4,5 @@ bin.includes = plugin.xml,\
                META-INF/,\
                .,\
                html/,\
-               *.xml
+               *.xml,\
+               p2.inf
diff --git a/eu.etaxonomy.taxeditor.help/html/concepts/maintopic.html b/eu.etaxonomy.taxeditor.help/html/concepts/maintopic.html
deleted file mode 100644 (file)
index a476078..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/concepts/subtopic.html b/eu.etaxonomy.taxeditor.help/html/concepts/subtopic.html
deleted file mode 100644 (file)
index 8a61c50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/concepts/subtopic2.html b/eu.etaxonomy.taxeditor.help/html/concepts/subtopic2.html
deleted file mode 100644 (file)
index 86bcbf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5255928834526380a88c3bfca88941625d503835 100644 (file)
@@ -0,0 +1,8 @@
+<h3>6.1.4 A Successfully Parsed Taxon Record</h3>\r
+       <p>\r
+A successfully parsed taxon record is given in the following example. You should note there is no warning symbol in the Taxon Name panel, and the<strong>Uninomial</strong>, <strong>Specific Epithet </strong>and <strong>Authorship</strong> of the new taxon, shown in the          <strong>Name Cache</strong> menu, have been parsed to the correct locations.\r
+       </p>\r
+       <p>\r
+               <img src="../img/6_1b.jpg"/>\r
+       </p>\r
+\r
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6a46c5bfc5e748d4a4336e21623f33dab4ca80c1 100644 (file)
@@ -0,0 +1,25 @@
+<h3>\r
+               About Bulk Editing\r
+       </h3>\r
+       <p>\r
+               <img src="../img/6_5a.jpg"/>\r
+       </p>\r
+       <p align="center">\r
+               <strong>Toolbar</strong>\r
+               &gt;<strong>General &gt;</strong> <strong>Bulk Editor</strong> menu\r
+       </p>\r
+       <p>\r
+The bulk editor allows multiple taxon records that share <strong>Names</strong>, <strong>Name Relationships</strong>,          <strong>References, Specimens and Observations,</strong> or <strong>Authors and Author Teams</strong> data to be edited. These data types are not\r
+               easily edited in the course of normal taxon editing and are frequently referenced (shared) in several places within a dataset, therefore they are\r
+               edited in a separate location.\r
+       </p>\r
+       <p>\r
+               Furthermore References frequently contain a number of duplicate entries, for example, after a mass import, where multiple entries for a single object\r
+               must be merged to insure data integrity. The Bulk Editor allows you to search for and merge duplicate reference records.\r
+       </p>\r
+       <p>\r
+The <strong>Bulk Editor</strong> consists of a search field and a list editor. The list is populated when a search is executed. The<strong>Details Panel</strong> is used to display and edit details of the object which is currently activated; changes made in the          <strong>Details Panel</strong> are reflected immediately in the list.\r
+       </p>\r
+       <p>\r
+               This version of the manual will explain how to edit the name of multiple taxa records.\r
+       </p>
\ No newline at end of file
index aff0fffa8686d6c56057001bdf7263c17e06c7db..97bc6bdaf9281c8b22519efbb2a8e986ba3e8587 100644 (file)
@@ -4,7 +4,7 @@
 
 <p>
        Double-click here    and the taxon opens here      in a new tab<br />
-       <img src="" alt="" />
+                       <p><img src="../img/3_4b.jpg" alt="" /></p>
 </p>
 
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c170392cb0d4988d736fb8ac6f2c372e49a6ba9a 100644 (file)
@@ -0,0 +1,31 @@
+<h3>Adding a Description Tree to a Taxon</h3>\r
+       <p>\r
+               The taxon must first be activated in the <strong>Taxon Name</strong> panel.\r
+       </p>\r
+       <p>\r
+               The Description Panel must also be open <strong>Windows &gt; Show View &gt;</strong> <strong>Descriptive</strong>.\r
+       </p>\r
+       <p>\r
+               1. Point the mouse cursor in the Description panel box.\r
+       </p>\r
+       <ol start="2" type="1">\r
+               <li>\r
+                       Click on the right hand mouse button and a menu will appear\r
+               </li>\r
+               <li>\r
+                       Select <strong>New Descriptive Data</strong>\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/8_3a.jpg"/>\r
+       </p>\r
+\r
+       <p>\r
+An entry will appear in the Descriptive panel and the &#8220;<strong>Description Details</strong>&#8221; box will open in the          <strong>Details panel</strong>\r
+       </p>\r
+       <p>\r
+               <img src="../img/8_3b.jpg"/>\r
+       </p>\r
+       <p>\r
+               <img src="../img/8_3c.jpg"/>\r
+       </p>\r
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..476f4a4826f9fc757e13a72be31a4ea5f628934a 100644 (file)
@@ -0,0 +1,34 @@
+       <h2>Adding a Heterotypic Synonym\r
+       </h2>\r
+       <p>\r
+               There is a quick and easy way of attaching synonyms to a taxon record:\r
+       </p>\r
+       <p>\r
+1. In the <strong>Taxon Navigator</strong> panel, double-click the taxon to which you want to attach a synonym; this will open the record in the               <strong>Taxon Name </strong>panel if it is not already open (see <strong>Activating Taxon Records</strong> on page 25 for more information).\r
+       </p>\r
+       <p>\r
+               2. Click in the <strong>Taxon Name</strong> panel to the right of any text already entered.\r
+       </p>\r
+       <p>\r
+               3. Press <strong>Return </strong>on the keyboard.\r
+       </p>\r
+       <p>\r
+               Another text box will appear in the <strong>Taxon Name </strong>panel, below that of the root taxon/accepted name for which you are entering a synonym.\r
+               You will notice the standard taxonomic synonym indicator (=) at the left hand side of the new text box within a green circle:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_1a.jpg"/>\r
+       </p>\r
+       <p>\r
+               If the synonym text box was opened in error, point the mouse arrow into the synonym text box and click the right mouse button; a drop-down menu will\r
+               open &gt; click on the <strong>Delete </strong>option:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_1b.jpg"/>\r
+       </p>\r
+       <p>\r
+               4. Enter the name of the synonym.\r
+       </p>\r
+       <p>\r
+               5. Save the synonym (see <strong>Saving Synonyms</strong> below).\r
+       </p>\r
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9486fd64a79e0527955902f8db2491729afb086f 100644 (file)
@@ -0,0 +1,36 @@
+       <h2>Adding a Homotypic Synonym\r
+       </h2>\r
+       <p>\r
+               By default, a carriage return from a taxon record in the <strong>Taxon Name</strong> panel will create a new text box for a heterotypic synonym, as\r
+               detailed above. Homotypic synonyms can be added using a drop-down menu:\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Point the mouse arrow into the text box for the taxon to which you are attaching a homotypic synonym and click the right mouse button; a drop-down\r
+                       menu will appear.\r
+               </li>\r
+               <li>\r
+                       Point the mouse at the <strong>New</strong> option at the top of the menu; a new menu will appear.\r
+               </li>\r
+               <li>\r
+                       Click on the <strong>Homotypic Synonym</strong> option:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/7_2a.jpg"/>\r
+\r
+       </p>\r
+       <p>\r
+               Another text box will appear in the <strong>Taxon Name</strong> panel, below that of the root taxon/accepted name for which you are entering a synonym.\r
+               You will notice the homotypic synonym icon of (&#186;) inside a blue circle:\r
+       </p>\r
+       <p>\r
+<img src="../img/7_2b.jpg"/>\r
+\r
+       </p>\r
+       <p>\r
+               4. Enter the name of the synonym.\r
+       </p>\r
+       <p>\r
+               5. Save the synonym (see <strong>Saving Synonyms</strong> below).\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..35c2760b9582b3e920caade2eceb8eb0ff43f312 100644 (file)
@@ -0,0 +1,36 @@
+       <h2>Adding a Species Description to a Taxon Record\r
+       </h2>\r
+       <p>\r
+               Add the descriptive data type of &#8220;Description&#8221; as described in section <strong>8.4</strong> above. The <strong>Descriptive</strong> panel\r
+               should look like this:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/8_6a.jpg"/>\r
+       </p>\r
+       <p>\r
+               As with several other descriptive data types available, the description of a species is added as free text.\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Point the mouse cursor in the Details box; the cursor will appear.\r
+               </li>\r
+               <li>\r
+                       Type in your species description, this will appear automatically in the Descriptive panel. For example:\r
+               </li>\r
+       </ol>\r
+       <p align="center">\r
+               <img src="../img/8_6b.jpg"/>\r
+       </p>\r
+       <p>\r
+               <strong>Tip!</strong>\r
+               You can also cut and paste text from a word document or another database where you store taxonomic information. Simply highlight the text you want to\r
+               copy from the original document, press Ctrl on your keyboard and then C whilst still holding the Ctrl button. Release both buttons. You have just\r
+               copied the text. Now click in the box of the Taxonomic Editor where you would like to paste the text and press Ctrl and then V whilst still holding the\r
+               Ctrl button. The text will be pasted.\r
+       </p>\r
+       <p>\r
+               3. Save the changes by clicking on the Save icon:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/8_6c.jpg"/>\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c0e3d5d8d176163bb847f99b6fefd92752f2b63b 100644 (file)
@@ -0,0 +1,26 @@
+       <h2>Adding annotations to Taxon Record\r
+       </h2>\r
+       <p>\r
+               The following is an example of how to use the supplemental data panel. The taxon must first be activated in the <strong>Taxon Name</strong> panel. The\r
+               Supplemental data Panel must also be open <strong>Windows &gt; Show View &gt;Supplemental</strong>.\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Expand Annotations box using the arrow to the left of the data box name\r
+               </li>\r
+               <li>\r
+                       Add new annotation by clicking on the + symbol on the right of the box\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/9_2a.jpg"/>\r
+       </p>\r
+       <p>\r
+               3. Select annotation type from the drop down box; editorial or technical\r
+       </p>\r
+       <p>\r
+               4. Enter annotation to freetext box\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/9_2b.jpg"/>\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..12ee5d9f682c149b07428b59a8b9baad36f9e805 100644 (file)
@@ -0,0 +1,63 @@
+       <h2>Adding Common Name Descriptive Data to a Taxon Record\r
+       </h2>\r
+       <p>\r
+               Add the descriptive data type of &#8220;Common Name&#8221; as described in section <strong>8.4</strong> above. The <strong>Details panel </strong>\r
+               should look like this.\r
+       </p>\r
+       <p>\r
+               <img src="../img/8_5a.jpg"/>\r
+       </p>\r
+       <p>\r
+               <strong>Tip!</strong>\r
+               <em> </em>\r
+               Each individual panel of the Taxonomic Editor can be resized; if you are having difficulties viewing the entire Descriptions panel you can use the\r
+arrows which appear at the top, bottom, left and right of the panel to resize it (see          <strong> <a href="#_Changing_Panel_Sizes">Changing Panel Sizes</a></strong> page 39).\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Click in the &#8220;Language&#8221; field in the <strong>Common Name Details</strong> box; the field will be highlighted and a drop-down menu will\r
+                       appear:\r
+               </li>\r
+       </ol>\r
+       <p align="center">\r
+               <img src="../img/8_5b.jpg"/>\r
+       </p>\r
+       <ol start="2" type="1">\r
+               <li>\r
+                       Enter the first digit of the name of the language. The first language name that begins with that letter will be shown. Continue to enter the first\r
+                       digit of the name until the language you wish to select is shown in the highlighted box.\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               For example, to input the language of the common name as &#8220;Thai&#8221;, after clicking and highlighting the Language field, press &#8220;T&#8221;\r
+               on the keyboard. Repeat the pressing until the name &#8220;Thai&#8221; in shown the Language field:\r
+       </p>\r
+       <p>\r
+               <img src="../img/8_5c.jpg"/>\r
+       </p>\r
+       <ol start="3" type="1">\r
+               <li>\r
+                       When the language you want to select is shown in the Language field, press return on the keyboard to confirm your selection; the drop-down menu\r
+                       will close and your selection will be shown in the Language field:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/8_5d.jpg"/>\r
+       </p>\r
+       <ol start="4" type="1">\r
+               <li>\r
+                       Click in the &#8220;<strong>Common Name</strong>&#8221; field in the <strong>Common Name Details</strong> box; the cursor will appear in the box.\r
+               </li>\r
+               <li>\r
+                       Type in the common name of the activated Taxon; the text will appear in the Common Name field:\r
+               </li>\r
+       </ol>\r
+       <p align="center">\r
+               <img src="../img/8_5e.jpg"/>\r
+       </p>\r
+       <p>\r
+               6. Save the changes by clicking on the Save icon:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/8_5f.jpg"/>\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cee6703e3494ed4e8e0d22a3a9be19cd322643cc 100644 (file)
@@ -0,0 +1,11 @@
+       <h1>Adding Descriptive Data to Taxon Record\r
+       </h1>\r
+       <p>\r
+               There is a variety of types of descriptive data that can be added to a taxon (shown below). If you do not need to use all of these kinds of data you\r
+can remove the available descriptive data types via the <strong>Preferences</strong> menu as explained in              <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30. Due to the variety of data types available, examples will be given here rather than\r
+               instructions specific to every data type.\r
+       </p>\r
+       <p>\r
+               <strong>Please Note: </strong>\r
+               The Descriptive Data element is under construction and there may be some changes to later versions of the Taxonomic Editor.\r
+       </p>\r
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b10ef65c02d4ad9bf1628d0fc05579f49aa84b61 100644 (file)
@@ -0,0 +1,2 @@
+       <h1>Adding Media Data to a Taxon Record\r
+       </h1>
\ No newline at end of file
index 0b11a53cb7554e6c71ce1e6f877c3522edbc92f3..c4d4c851c432a6764d7553995041c6eab86c4f60 100644 (file)
@@ -6,7 +6,7 @@
 
 <ul>
        <li><strong>Description:</strong> You can add a new data field to the Descriptive panel.</li>
-       <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example “common name”, “distribution” and “ecology”.</li>
+       <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example "common name", "distribution" and "ecology".</li>
        <li><strong>Named Area Type:</strong> you can add a new data option to the Named Area Type field drop down box found in the Details sheet.</li>
        <li><strong>Extension Types:</strong> You can add a new data option to the Extension Type field drop-down box found in the Supplemental Data panel.</li>
        <li><strong>Marker Types:</strong> You can add a new data option to the Marker Type field drop-down box found in the Supplemental Data panel.</li>
@@ -17,7 +17,7 @@
 <ol>
        <li>Open the <strong>Preferences</strong> pop-up box (<strong>Toolbar > Window</strong> menu > <strong>Preferences</strong> option).</li>
        <li>Navigate to the element you wish to change by expanding the <strong>Taxonomic Editor > Description</strong>  menu found in the Taxonomic Editor menu:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_1d.jpg" alt="" /></p>
        <li>
        <li>Click on the data field you would like to add to from the menu on the left hand side of the pop-up. The existing options associated with the drop-down list for that data field will appear in the main panel of the pop-up box. The example shown below is adding a new feature or data field to the overall Description.</li>
        <li>Click the <strong>New</strong> button.</li>
@@ -25,7 +25,7 @@
        <li>Click the <strong>Finish</strong> button.</li>
 </ol>
  
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_1e.jpg" alt="" /></p>
  
 <p>Your new data option will be added to the drop-down box for the selected data field in the Properties Sheet.</p>
  
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..70f72f9e65b83d259c60c4190a1a3b2602cf5b73 100644 (file)
@@ -0,0 +1,5 @@
+<h1>Adding Supplemental Data to a Taxon Record\r
+       </h1>\r
+       <p>\r
+The Supplemental data panel is accessed in the same way as the descriptive panel. <strong>Windows </strong>&gt; <strong>Show View</strong> &gt;                <strong>Supplemental.</strong>\r
+       </p>
\ No newline at end of file
index f3ab5b94d1c6cf23e1febd8ebb303cd7af582631..2d565d6181703116f87736faab958e5bfaa34f22 100644 (file)
@@ -23,7 +23,7 @@
                <strong>Taxon</strong>
                :
                <p>
-                       <img src="" alt="" />
+                       <img src="../img/5_3a.jpg" alt="" />
                </p>
        </li>
        <li>Enter the name of the taxon, including authorship if you wish.</li>
 </ol>
 
 <p>
-       <img src="" alt="" />
-       The new taxon record will appear in the Taxon Navigator panel and is
-       saved automatically:
+       <img src="../img/5_3b.jpg" alt="" /></p>
+       <p>The new taxon record will appear in the Taxon Navigator panel and is
+       saved automatically:    
 </p>
-
+<p><img src="../img/5_3c.jpg" alt="" /></p>
 <p>
        You can continue to add new taxa to any node in the classification in
        this way in order to build up your taxonomic treatment. To create and
index d5ae2923597e6bf9fa968ea92906d14b57500d45..83ba25908cc062afcb719b976af0a98f1beae007 100644 (file)
 <ol>
        <li>Click on the <strong>General</strong> menu in the toolbar > <strong>New > Taxon</strong>:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4a.jpg" alt="" /></p>
 
                <p>The New Taxon pop-up box will open.</p>
        </li>
        <li>Click the <strong>Browse</strong> button to the right of the Classification field:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4b.jpg" alt="" /></p>
 
-               <p>The “Choose a classification” pop-up box will open.</p>
+               <p>The "Choose a classification" pop-up box will open.</p>
        </li>
        <li>Enter a search term for the name of the Classification, for example
                the first letter of the name. As you type, matching taxonomic trees
-               will be shown in the “Matching items” field below:
+               will be shown in the "Matching items" field below:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4c.jpg" alt="" /></p>
 
        </li>
        <li>Click the name of the desired classification from the list in the
-               “Matching items” field.
+               "Matching items" field.
        </li>
        <li>Click <strong>OK</strong>; the pop-up box will close and the name of the
                Classification will be shown in the Classification field:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4d.jpg" alt="" /></p>
 
                <p>If appropriate, you can now choose a parent to attach the new taxon to
                in the exact same way:</p>
        </li>
        <li>Click the <strong>Browse</strong> button to the right of the Parent field:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4e.jpg" alt="" /></p>
 
-               <p>The “Select parent taxon” pop-up box will open.</p>
+               <p>The "Select parent taxon" pop-up box will open.</p>
        </li>
        <li>Select classification from drop down at the bottom of the box.
        </li>
        <li>Enter a search term for the name of the parent taxon, for example the
                first letter of the name. As you type, matching taxa from your
-               selected Taxonomic Tree will be shown in the “Matching items” field
+               selected Taxonomic Tree will be shown in the "Matching items" field
                below:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4f.jpg" alt="" /></p>
 
        </li>
        <li>Click the name of the desired parent taxon from the list in the
-               “Matching items” field.
+               "Matching items" field.
        </li>
        <li>Click <strong>OK</strong>; the pop-up box will close and the name of the parent taxon
                will be shown in the Parent field:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4g.jpg" alt="" /></p>
        </li>
        <li>Click in the <strong>New Taxon</strong> field.
        </li>
        <li>Enter the name of the taxon, including authorship if you wish.
        </li>
        <li>Click the <strong>Finish</strong> button or press the <strong>Return</strong> button on the keyboard:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_4h.jpg" alt="" /></p>
        </li>
 </ol>
 
@@ -75,7 +75,7 @@
 <p>The new taxon record will appear in the <strong>Taxon Navigator</strong> panel and is
        saved automatically:</p>
        
-<p><img src="" alt="" /></p>
+<p><img src="../img/5_4i.jpg" alt="" /></p>
 
 <p>You can continue new taxa to any node in the classification in this
        way in order to build up your taxonomic treatment. To create and manage
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8627ff65b0e259b11a5b6775cd0fe19dccd4b7c1 100644 (file)
@@ -0,0 +1,61 @@
+<h2>Adding the Nomenclatural Status of a Name using the Details Panel\r
+       </h2>\r
+       <p>\r
+               The Details panel can be used to assign a status to a taxon name, for example, illegitimate, invalid, valid.\r
+       </p>\r
+       <p>\r
+If the taxon you want to edit is not yet open you can activate it by double-clicking the taxon record in the <strong>Taxon Navigator</strong> (see             <strong>The Taxon Name Panel </strong>on page 224 for further details).\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Expand the Nomenclatural Status menu by clicking the arrow icon to the left of the field label:\r
+               </li>\r
+               <li>\r
+                       Click on the + symbol in the Nomenclatural Status box.\r
+               </li>\r
+       </ol>\r
+       <p align="center">\r
+               <img src="../img/6_3a.jpg"/>\r
+       </p>\r
+       <ol start="3" type="1">\r
+               <li>\r
+                       Click on the arrow in Nomenclatural Status type field; a drop-down menu will appear at the right of the field.\r
+               </li>\r
+       </ol>\r
+       <p align="center">\r
+               <img src="../img/6_3b.jpg"/>\r
+       </p>\r
+       <ol start="4" type="1">\r
+               <li>\r
+                       To navigate to and select the nomenclatural status you have several options:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               a. Use the up and down arrows on the keyboard until the desired nomenclatural status is highlighted and press the return button.\r
+       </p>\r
+       <p>\r
+               b. Navigate the menu by using the mouse to move the scroll bar to the right of the menu up and down, or if your mouse has a wheel you can also use\r
+               that. Click on the desired nomenclatural status.\r
+       </p>\r
+       <p>\r
+               c. Type the first letter of the name of the nomenclatural status, for example, &#8220;V&#8221; for &#8220;Valid&#8221;. The Editor will automatically\r
+               jump to the first entry within the menu with that first letter. Repeat pressing the letter until the desired nomenclatural status is highlighted and\r
+               press the return button.\r
+       </p>\r
+       <p>\r
+               <strong> </strong>\r
+       </p>\r
+       <p>\r
+               The drop-down menu will close, your selection will be shown in the Nomenclatural Status field, and the text string in the Taxon Name panel will be\r
+               updated:\r
+       </p>\r
+       <p>\r
+               <img src="../img/6_3c.jpg"/>\r
+       </p>\r
+       <p>\r
+               5. Save the record (see <strong>Saving your Work</strong><strong> </strong>on page<strong> </strong>77).\r
+       </p>\r
+       <p>\r
+               It is also possible to add further information regarding the Nomenclatural Status using the other free text (Rule Considered and Reference detail) and\r
+               Browse boxes in the Details panel.\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e06b84481f0510b2a051423e7f528577a99b7dc9 100644 (file)
@@ -0,0 +1,30 @@
+<h3>Black text only = No warning signal\r
+       </h3>\r
+       <p>\r
+A successful parsing action will be apparent from the lack of a warning sign and no underline appearing beneath the name in the                <strong>Taxon Name</strong> panel. This indicates that the text string has been separated into its constituent parts with confidence.\r
+       </p>\r
+       <table cellpadding="0" cellspacing="0">\r
+               <tbody>\r
+                       <tr>\r
+                               <td height="34" width="143">\r
+                                       <table cellpadding="0" cellspacing="0" width="100%">\r
+                                               <tbody>\r
+                                                       <tr>\r
+                                                               <td>\r
+                                                                       <div>\r
+                                                                               <p>\r
+                                                                                       No warning signal\r
+                                                                               </p>\r
+                                                                       </div>\r
+                                                               </td>\r
+                                                       </tr>\r
+                                               </tbody>\r
+                                       </table>\r
+                               </td>\r
+                       </tr>\r
+               </tbody>\r
+       </table>\r
+       <img src="../img/6_1c.jpg"/>\r
+       <p>\r
+               You may still check the parsing results in the <strong>Details Panel</strong> if you wish (see <strong>Dealing with Parsing Problems</strong> below).\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fa160c8e85585326bd365ba2a948c50fbf681988 100644 (file)
@@ -0,0 +1,32 @@
+       <h3>Building a Description Tree by adding Descriptive Data Types\r
+       </h3>\r
+       <p>\r
+               A description tree must first be created for the taxon; see the section above.\r
+       </p>\r
+       <p>\r
+               1. Point the mouse cursor at the entry in the <strong>Descriptive panel</strong>.\r
+       </p>\r
+       <p>\r
+               2. Press the right-hand mouse button; a menu will appear.\r
+       </p>\r
+       <p>\r
+               3. Point the mouse cursor at the &#8220;<strong>New</strong>&#8221; option in the menu; a drop-down menu of all available descriptive data types will\r
+               be shown:\r
+       </p>\r
+       <p>\r
+               <img src="../img/8_4a.jpg"/>\r
+       </p>\r
+       <ol start="4" type="1">\r
+               <li>\r
+Click on the descriptive data type that you wish to enter for the taxon, for example &#8220;Common Name&#8221;; the data type will be added to the                     <strong>Description Tree</strong> and its specific data entry box will be activated in the<strong> Details</strong> panel:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/8_4b.jpg"/>\r
+       </p>\r
+       <p>\r
+               A customised Descriptive Tree consisting of different description types can be created in this way. As stated previously the format of the types of\r
+               descriptive data varies; for some the data is input as free text but for others data must be chosen from options given in a drop-down menu. Therefore\r
+               examples of how to input certain descriptive data types will be given in the following sections, rather than showing how to input data for each data\r
+               type.\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..96d0778171d14e116db3d605565931fe9e2f1908 100644 (file)
@@ -0,0 +1,3 @@
+<h2>Bulk Editing\r
+       </h2>\r
+       
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4d33c8a0be657351d98cf4d24e2195a3107ef52e 100644 (file)
@@ -0,0 +1,91 @@
+       <h3>Bulk Editing Names\r
+       </h3>\r
+       <p>\r
+The bulk editor allows multiple taxon records that share <strong>Names</strong>, <strong>Name Relationships</strong>,          <strong>References, Specimens and Observations,</strong> or <strong>Authors and Author Teams</strong> data to be edited. These data types are not\r
+               easily edited in the course of normal taxon editing and are frequently referenced (shared) in several places within a dataset, therefore they are\r
+               edited in a separate location.\r
+       </p>\r
+       <p>\r
+               In this example, we search for all the taxa within a Genus and change the Genus name.\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       In the Toolbar area, click on the Window menu &gt;Bulk Editor; a drop-down menu will appear.\r
+               </li>\r
+               <li>\r
+                       Click the <strong>Name</strong> option.\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/6_5b.jpg"/>\r
+       </p>\r
+       <p>\r
+               You will notice that a new tab has opened in the Taxon name panel titled <strong>Name</strong>. The tab has a search bar at the top and a blank space\r
+               below which will display the results of your search.\r
+       </p>\r
+       <ol start="3" type="1">\r
+               <li>\r
+                       Click in search box.\r
+               </li>\r
+               <li>\r
+                       Enter a search term in the search box.\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               To find multiple variations for the same name it is best to use a shortened version of the name with the &#8216;wildcard&#8217; icon, an asterisk (*).\r
+               The Taxonomic Editor will return all records that match the initial letters you have input but with no restrictions on the following characters (see\r
+               the example below).\r
+       </p>\r
+       <p>\r
+               Press <strong>Return</strong> on the keyboard or click on the <strong>Search</strong> button to run your search. A list of matching records will appear\r
+               beneath the search bar.\r
+       </p>\r
+       <p>\r
+               <img src="../img/6_5c.jpg"/>\r
+       </p>\r
+       <p>\r
+               You will also find that the <strong>Details Panel </strong>will display information regarding each entry in the search results when you double-click\r
+               its name within the list:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_5d.jpg"/>\r
+       </p>\r
+       <p>\r
+               In order to now change the genus name of all the taxa displayed in the Taxon Names panel, click through the list and edit the name in the Details panel\r
+               to the right:\r
+       </p>\r
+       <ol start="5" type="1">\r
+               <li>\r
+                       Click on a taxon from the list in the Taxon Name panel; the taxon record will be activated in the Details panel as shown above.\r
+               </li>\r
+               <li>\r
+                       Expand the Name menu by clicking the arrow icon to the left of the field label:\r
+               </li>\r
+       </ol>\r
+       \r
+       <img src="../img/6_5e.jpg"/>\r
+       <ol start="7" type="1">\r
+               <li>\r
+                       Click on <strong>Edit</strong>.\r
+               </li>\r
+               <li>\r
+                       Edit the taxon name as desired, for example:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/6_5g.jpg"/>\r
+       </p>\r
+       <ol start="9" type="1">\r
+               <li>\r
+                       Click on Edit to finish.\r
+               </li>\r
+               <li>\r
+                       Click the <strong>Save</strong> icon in the toolbar; the name will automatically be changed in the Taxon Names panel and in the Taxon Navigator:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/6_5f.jpg"/>\r
+       </p>\r
+       <p>\r
+               You can now move down the list in the Taxon Names tab and edit all the names as described above.\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..688a52470bb78d81f57e6a70ca78da5f771d9577 100644 (file)
@@ -0,0 +1,24 @@
+       <h2>Changing a Synonym to an Accepted Name\r
+       </h2>\r
+       <p>\r
+1. The accepted name taxon record which has the synonym attached to it that you wish to change to an accepted name has to be open in the               <strong>Taxon Names</strong> panel (see <strong>The Taxon Name </strong>Panel on page 24 to learn how to search for and open a taxon record).\r
+       </p>\r
+       <p>\r
+               2. Right-click anywhere within the text box of the synonym in the<strong> Taxon Names</strong> panel; a drop-down menu will appear.\r
+       </p>\r
+       <p>\r
+               3. Point the mouse arrow over the <strong>Change To</strong> option; a new drop-down menu will appear.\r
+       </p>\r
+       <p>\r
+               4. Click the <strong>Accepted Name</strong> option:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_6a.jpg"/>\r
+       </p>\r
+       <p>\r
+               5. Save your changes (see <strong>Saving Synonyms</strong> on page 81 above); your changes will appear in the <strong>Taxon Navigator</strong> panel:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/7_6b.jpg"/></p>\r
+       <h2>\r
+       </h2>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ad529aabe8a31239c9d928cc6ca7b2178e2cfb92 100644 (file)
@@ -0,0 +1,50 @@
+       <h2>Changing an Accepted Name to a Synonym\r
+       </h2>\r
+       <p>\r
+1. The accepted name taxon record that you wish to change to a synonym has to be open in the <strong>Taxon Name</strong> panel (see            <strong>The Taxon Name Panel </strong> on page 24 to learn how to search for and open a taxon record).\r
+       </p>\r
+       <p>\r
+               2. Right-click anywhere within the text box of the taxon record in the <strong>Taxon Name </strong>panel; a drop-down menu will appear.\r
+       </p>\r
+       <p>\r
+               3. Click on the option &#8220;Change Accepted Taxon to a Synonym&#8221;:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_7a.jpg"/>\r
+       </p>\r
+       <p>\r
+               The &#8220;Choose the accepted taxon&#8221; pop-up box will open.\r
+       </p>\r
+       <ol start="4" type="1">\r
+               <li>\r
+                       Enter the name of the accepted name that you wish to attach the synonym to in the search bar at the top of the pop-up box; as you type, matching\r
+                       entries will be filtered automatically and will be shown in the &#8220;Matching items&#8221; box beneath the search bar:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/7_7b.jpg"/>\r
+       </p>\r
+\r
+       <ol start="5" type="1">\r
+               <li>\r
+                       Select the desired accepted name by either:\r
+               </li>\r
+               <ol start="1" type="a">\r
+                       <li>\r
+                               Point the mouse cursor to the desired accepted name and clicking the left mouse button twice; or\r
+                       </li>\r
+                       <li>\r
+                               Point the mouse cursor to the desired accepted name; click the left mouse button once and then click the OK button.\r
+                       </li>\r
+               </ol>\r
+       </ol>\r
+       <p>\r
+               The &#8220;Choose the accepted taxon&#8221; pop-up box will close and the record that has been edited will be shown as a synonym in the Taxon Name\r
+               panel.\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_7c.jpg"/>\r
+       </p>\r
+       <p>\r
+               The change is automatically saved.\r
+       </p>\r
index 7e44e721f2acf5e3d8a9eb95cbef85b2e8444cc1..3e53ddb06d8ac7a035136f351a7e54c260a8f251 100644 (file)
@@ -2,7 +2,7 @@
  
 <p>You can close the activated taxon record by clicking on the Exit icon at the right of the tab:</p>
  
-<p><img src="" alt="" /></p>
+               <p><img src="../img/3_4h.jpg" alt="" /></p>
  
 <p>If you want to close a taxon record for which the tab for the record is visible, click on the tab to activate the record and click the Exit icon as shown above.</p>
 
@@ -17,5 +17,5 @@
                The taxon record will close and the taxon name will disappear from the list.</li>
 </ol>
 
-<p><img src="" alt="" /></p>
+                               <p><img src="../img/3_4i.jpg" alt="" /></p>
 
index c340fcf6d0a6ec958ea461a9045e41160f89e5d9..a1a91b6ebd3f7b404b652478192136446b4bdeb6 100644 (file)
@@ -1,26 +1,26 @@
-<h2>Connecting to a Different Datasources</h2>
+<h2>Connecting to a Different Datasource</h2>
  
 <p>
 The open Datasource is indicated by an open folder icon in the Datasource panel:
 </p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_11a.jpg" alt="" /></p>
  
 <p>To open a different Datasource .</p>
  
 <ol>
        <li>Click the right mouse button with the cursor pointing to the Datasource you wish to select.</li>
        <li>Click <strong>Connect</strong>.
-       <p><img src="" alt="" /></p>
+       <p><img src="../img/2_11b.jpg" alt="" /></p>
        The "Confirm Datasource Change" pop-up box will open.
-       <p><img src="" alt="" /></p>
+       <p><img src="../img/2_11c.jpg" alt="" /></p>
        </li>
        <li>Click <strong>OK</strong>.
        The Taxonomic Editor will restart with the selected Datasource open.
        <p>If you are opening a Datasource with a Nomenclatural Code that is different to the preferred Nomenclatural Code that you selected when installing the Taxonomic Editor, you will receive a warning:
                
        </p>
-       <p><img src="" alt="" /></p>
+       <p><img src="../img/2_11d.jpg" alt="" /></p>
 </li>
        <li>Click <strong>OK</strong>; the warning will close and the Nomenclatural Code will be changed to match that of the Datasource.</li>
 </ol>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..29a502a9ea938f8e8f8a0e11b6775b06958184c8 100644 (file)
@@ -0,0 +1,66 @@
+       <h2>Create an image gallery\r
+       </h2>\r
+       <p>\r
+The taxon must first be activated in the <strong>Taxon Name</strong> panel. The Media Panel must also be open          <strong>Windows &gt; Show View &gt;</strong> <strong>Media</strong>.\r
+       </p>\r
+       <p>\r
+               1. Point the mouse cursor in the Media panel.\r
+       </p>\r
+       <ol start="2" type="1">\r
+               <li>\r
+                       Click on the right hand mouse button and a menu will appear\r
+               </li>\r
+               <li>\r
+                       Select <strong>New Image Gallery </strong>\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <strong> </strong>\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1a.jpg"/>\r
+       </p>\r
+       <p>\r
+               4. Click on Image gallery to open in details panel . You can change the label here, should you wish, in the Label freetext box.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1b.jpg"/>\r
+       </p>\r
+       <p>\r
+               5. Expand the image gallery by clicking on the menu arrow in the media panel. There will already be one existing &#8216;empty media&#8217;.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1c.jpg"/>\r
+       </p>\r
+       <p>\r
+               6. To add additional images (or galleries) right click in the window and make selection from menu.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1d.jpg"/>\r
+       </p>\r
+       <p>\r
+               7. Click on image to open in details panel.\r
+       </p>\r
+       <p>\r
+               <img src="../img/10_1e.jpg"/>\r
+       </p>\r
+       <p>\r
+8. Add title, artist and description as required. This will automatically be updated in the Media window. Then click on + symbol to expand             <strong>Media Representation</strong> menu.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1f.jpg"/>\r
+       </p>\r
+       <p>\r
+               9. Enter the type of image file in the Mime type field. Click on the + symbol to expand <strong>Media Representation Part</strong> menu.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1g.jpg"/>\r
+       </p>\r
+       <p>\r
+               10. Enter the URI of where the image is to be found in the URI field. The size, height and width fields will be automatically filled. The image will be\r
+               visible beneath this.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/10_1h.jpg"/>\r
+       </p>\r
+</div>
\ No newline at end of file
index 77a581d8494d4ecdb245fd6c253073e0eedcf348..c02c8f45d4dc4b9b27ba28dd476c582e0b420967 100644 (file)
@@ -3,17 +3,17 @@
 <p>It is recommended that you create a desktop shortcut to the file location of the TaxonomicEditor.exe file as soon as you have downloaded and installed the Taxonomic Editor. You will then be able to open the Taxonomic Editor using the shortcut instead of having to navigate to the .exe file location. These instructions apply only to Windows systems.</p>
  
 <ol>
-       <li>Locate and open the extracted Taxonomic Editor folder in the destination in which you chose to extract the folder (if you selected the “Show extracted files when complete” option when extracting the folder it will automatically open).</li>
+       <li>Locate and open the extracted Taxonomic Editor folder in the destination in which you chose to extract the folder (if you selected the â€œShow extracted files when completeâ€� option when extracting the folder it will automatically open).</li>
        <li>Right-click the <strong>TaxonomicEditor.exe</strong> file; a drop-down menu will appear.</li>
        <li>Click the <strong>Send To</strong> option.</li>
        <li>Click the <strong>Desktop (create shortcut)</strong> option.</li>
 </ol>
  
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_4a.jpg" alt="" /></p>
  
 <p>This will create a shortcut on your desktop that will automatically open the Taxonomic Editor:</p>
  
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_4b.jpg" alt="" /></p>
  
 <p>You can double-click this icon to open the Taxonomic Editor.</p>
  
\ No newline at end of file
index ba274a34b1faf66b41556fc8eac22b375e93f2ec..ad8feb9cf5f6de80998de99f3522891414dd9738 100644 (file)
@@ -9,7 +9,7 @@
        <li>Click the <strong>General</strong> menu in the <strong>Toolbar</strong> > move the mouse to the <strong>New</strong>
                option; a drop-down menu will appear > Click the <strong>Classification</strong> option:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1b.jpg" alt="" /></p>
 
                <p>Alternatively, you can access the New > Classification menu by clicking the right
                mouse button with the mouse arrow pointing within the Taxon Navigator
        <li>Enter a label for the Classification. This could be the name of a
                project or publication, for example:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1c.jpg" alt="" /></p>
 
                <p>You may enter reference details if you wish:</p>
        </li>
        <li>Click the <strong>Browse</strong> button to the right of the Reference field:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1d.jpg" alt="" /></p>
                `
                <p>A new pop-up box entitled <strong>"Choose a reference"</strong> will appear. The cursor
                will appear in the search box by default. You can search here for a
                reference that you already have within your database:</p>
        </li>
        <li>Type in the title of the reference; as you type, matching references
-               from within your database will be filtered and shown in the </strong>Matching
-               items</strong> box beneath the search box:
+               from within your database will be filtered and shown in the </strong>"Matching
+               items"</strong> box beneath the search box:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1e.jpg" alt="" /></p>
 
                <p>If you are creating a new database or do not have the required reference
                already input, you can choose to create a new reference by clicking
-               the text at the bottom of the “Choose a reference” box:</p>
+               the text at the bottom of the "Choose a reference" box:</p>
                
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1f.jpg" alt="" /></p>
        </li>
-       <li>The </strong>“Create reference”</strong> pop-up box will appear:
+       <li>The </strong>"Create reference"</strong> pop-up box will appear:
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1g.jpg" alt="" /></p>
        
                <p>Choose a reference type from the drop-down menu:</p>
        </li>
        <li>Click on the arrow to the right of the Reference Type field; a
                drop-down list will appear:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1h.jpg" alt="" /></p>
 
        </li>
        <li>Scroll down the list; there are several methods for doing this:
        <li>Enter the title of the reference in the title field.</li>
        <li>To enter Author details click on browse existing.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1i.jpg" alt="" /></p>
        </li>
-       <li>The <strong>“choose team”</strong> pop up box will appear. The cursor will appear in
+       <li>The <strong>"choose team"</strong> pop up box will appear. The cursor will appear in
                the search box by default. You can search for an author or team of
                authors that you already have within your database:
        </li>
        <li>Type in the name of the Author; as you type, matching authors from
-               within your database will be filtered down and shown in the <strong>matching
-               items</strong> box beneath the search box.
+               within your database will be filtered down and shown in the <strong>"matching
+               items"</strong> box beneath the search box.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1j.jpg" alt="" /></p>
 
                <p>If you are creating a new database or do not have the required author
                already input, you can choose to create a new author by clicking on
-               the text at the bottom of the <strong>“Choose Team”</strong> box.</p>
+               the text at the bottom of the <strong>"Choose Team"</strong> box.</p>
                
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1k.jpg" alt="" /></p>
        </li>
-       <li>The “New Entity” pop-up box will appear
+       <li>The "New Entity pop-up box will appear
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1l.jpg" alt="" /></p>
        </li>
-       <li>Click on the + sign to add team member. A” person” field will then
+       <li>Click on the + sign to add team member. A" person" field will then
                appear.
        </li>
        <li>Click on the edit button
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1m.jpg" alt="" /></p>
 
        </li>
-       <li>A ‘new entity’ free text box will pop-up. To enter a person (author)
+       <li>A â€˜new entity’ free text box will pop-up. To enter a person (author)
                click on the edit button. The fields will become white and can now be
                edited.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1n.jpg" alt="" /></p>
        </li>
        <li>Enter author name and click on edit.
        </li>
        <li>Click finish.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1o.jpg" alt="" /></p>
 
        </li>
        <li>The name will then automatically appear in the Choose a person pop-up
                box.
        </li>
        <li>Select OK.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1p.jpg" alt="" /></p>
        </li>
        <li>Click finish on new entity pop-up box. Or if there are multiple
                authors repeat steps 14 to 21 to add additional people.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1q.jpg" alt="" /></p>
        </li>
        <li>Click OK in Choose Team pop-up box
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1r.jpg" alt="" /></p>
        </li>
        <li>The author will now appear in the reference box.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1s.jpg" alt="" /></p>
        </li>
        <li>Complete the rest of the free text boxes. Depending on the reference
                type there may be other fields which need to be filled from the
        </li>
        <li>Select Finish.
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1t.jpg" alt="" /></p>
        </li>
-       <li>Select OK in “Choose a Reference” pop-up box.
+       <li>Select OK in "Choose a Reference" pop-up box.
        
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1u.jpg" alt="" /></p>
        
        </li>
        <li>Click finish in New Classification pop-up
 
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1v.jpg" alt="" /></p>
 
        </li>
        <li>The name of your new Classification will appear in the Taxon
                Navigator panel:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/5_1w.jpg" alt="" /></p>
        </li>
 </ol>
 
        in a lighter colour than the actual taxa names. You can use the arrows
        to the left of the taxonomic tree labels and the taxon nodes to show or
        hide the child taxon/taxa that are attached to that tree or taxon:</p>
+       
+       <p><img src="../img/5_1x.jpg" alt="" /></p>
 
 
  
index b2947c56f4059cc0531320dbf8898ba500838cf3..e0c76546294c5a6edd5adf077bbbed549d5ac7e2 100644 (file)
@@ -9,36 +9,40 @@
                <p>
                        Window > Show View > Datasource
                </p>
-               <p><img src="" alt="" />
-               The Datasource panel will open at the bottom of the Taxonomic Editor window.</p>
+               <p><img src="../img/2_10a.jpg" alt="" /></p>
+               <p>The Datasource panel will open at the bottom of the Taxonomic Editor window.</p>
        </li>
        <li>Press the right-click of the mouse with the cursor pointing within the Datasource panel; a drop-down menu will appear.</li>
        <li>Click <strong>New</strong>: 
 The <strong>"Create New Datasource"</strong> panel will appear.
+<p><img src="../img/2_10b.jpg" alt="" /></p>
  
        </li>
        <li>Enter a name for the Datasource in the Datasource Name field:</li>
+       <p><img src="../img/2_10c.jpg" alt="" /></p>
        <li>Click the arrow icon to the right of the <strong>Database Type field</strong>; a drop-down menu will appear.</li>
        <li>Click the <strong>"H2 Database"</strong> option.
-                <p><img src="" alt="" />
+       <p><img src="../img/2_10d.jpg" alt="" /></p>
+                <p>
                        The drop-down menu will close.
                 </p>
 
        </li>
        <li>
                Click Next.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/2_10e.jpg" alt="" /></p>
                The <strong>"Enter credentials for embedded H2 database"</strong> pop-up box will open.
        </li>
        <li>Enter a Database name (for example the name of a user or a taxonomic group).</li>
        <li>Select <strong>ICBN</strong> or <strong>ICZN</strong> as appropriate.</li>
        <li>Click <strong>Finish</strong>.</li>
+       <p><img src="../img/2_10f.jpg" alt="" /></p> 
 </ol>
 
  
 <p><strong>Please Note:</strong> There is no need to input a user name or password. Although you can create a user name and password if you wish, the enforcement of this function is not yet operational, therefore a user will be able to edit any datasource without using the username and password.</p>
  
-<p>The new Datasource will appear in the Datasource panel:<img src="" alt="" /></p> 
+<p>The new Datasource will appear in the Datasource panel: <p><img src="../img/2_10g.jpg" alt="" /></p></p> 
  
 <p>The process to create new datasources can be repeated as many times as desired.</p>
  
\ No newline at end of file
index b28a0e46499299c0b7a818a9babfab12389c7174..40a8876766941f79d82fe81dffe9cc5770a98674 100644 (file)
 <p>To open a perspective</p>
 
 <ol>
-       <li>Click on the “open perspective button”</li>
-       <li>Select other.  A list of available perspectives will be displayed in the “open perspective” pop-up. Select a perspective and it will open in the editor.</li>
+       <li>Click on the "open perspective button"</li>
+       <li>Select other.  A list of available perspectives will be displayed in the "open perspective" pop-up. Select a perspective and it will open in the editor.</li>
 </ol>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3a.jpg" alt="" /></p>
 
 <p>After a new perspective has been opened the last perspective viewed will remain open but will be hidden and replaced by the new perspective. A new button will be added to the perspectives tab allowing you to quickly switch between perspectives.</p>
  
 <p>After a new button has been added to the perspective tabs you may find that there is insufficient room to display all the buttons in which case the perspective tabs will display a double headed arrow on the right hand side as shown below.</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3b.jpg" alt="" /></p>
  
 <p>To reveal the hidden buttons you can either click on the double headed arrow, the results of which are shown below</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3c.jpg" alt="" /></p>
 
 <p>Or you can hover the mouse over the left hand edge of the tab until the cursor changes to a double headed arrow as shown below.</p>
  
-<p><img src="" alt="" /></p>                                                    
+<p><img src="../img/4_3d.jpg" alt="" /></p>                                                    
  
 <p>When the cursor changes in this way left click the mouse and drag the edge of the tab to the left to enlarge it. Release the mouse button when you are happy with the size of the tab. The following screen shot shows the editor with the perspective tab enlarge sufficiently to display all three open perspective buttons and with the taxonomic perspective currently active.</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_3e.jpg" alt="" /></p>
  
 <p>The screen shots below show the effect of changing between a taxonomic and bulk editing frame work.</p>
  
-<p>Default Taxonomic Perspective<img src="" alt="" /></p>
+<p>Default Taxonomic Perspective<img src="../img/4_3e.jpg" alt="" /></p>
 
-<p>Bulk Editing Perspective<img src="" alt="" /></p>
+<p>Bulk Editing Perspective<img src="../img/4_3f.jpg" alt="" /></p>
  
  
  
  
 <ol>
        <li>Left click on the grey area of the top tab of a panel and keep holding the mouse button down, a grey box will appear around the panel.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_3g.jpg" alt="" /></p>
        </li>
        <li>Drag panel to new location. The grey box shows where the panel will be moved to. It is best to experiment with moving panels around the interface in order to get the hang of this behaviour. In the examples below the details panel is moved in front of the descriptive panel, to form a new column alongside the taxon name tabs and beneath the descriptive panel.
                <p>Details panel is moved to to create a new alongside the Descriptive panel.
-                       The file icon (<img src="" alt="" />) shows that the details panel will be stacked behind any panels which are located here already.
-               <img src="" alt="" /></p>
+                       The file icon (<img src="../img/fileicon.jpg" alt="" />) shows that the details panel will be stacked behind any panels which are located here already.
+               <img src="../img/4_3aa.jpg" alt="" /></p>
                <p>
                        Details panel is moved to form a new column alongside the Taxon Name panel. NB this will now need to be resized to display the text.
-The black arrow icon (<img src="" alt="" />) shows that the details panel will form a new column rather than stacking behind the existing panels in the space.
+The black arrow icon (<img src="../img/blackarrow.jpg" alt="" />)shows that the details panel will form a new column rather than stacking behind the existing panels in the space.
                        
-               <img src="" alt="" /></p>
+               <p><img src="../img/4_3bb.jpg" alt="" /></p></p>
                
                <p>
                        Details panel is moved to form a new column alongside the Taxon Name 
-               <img src="" alt="" /></p>
+               
        </li>
 </ol> 
+<p><img src="../img/4_3cc.jpg" alt="" /></p>
 
 <p>Panels can also be detached from the workspace. This can be done in two ways.</p>
 
 <ol>
        <li>Drag the grey outline of the panel  out of the workspace the release the button</li>
        <li>Right click on the tab at the top of the panel and select detached form the drop down menu.
-               <p><img src="" alt="" /></p>
+<p><img src="../img/4_3j.jpg" alt="" /></p>
        </li>
 </ol>
 
 <p>To reattach the panel again right click in heading tab and unselect detached tick box.</p>
 
-<p><img src="" alt="" /></p>
+               <p><img src="../img/4_3k.jpg" alt="" /></p>
  
 
  
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c09b7d524ddbf8294d1176f33a6ea4df89436208 100644 (file)
@@ -0,0 +1,71 @@
+<h2>Dealing with Parsing Problems\r
+       </h2>\r
+       <p>\r
+               If you have received a warning sign after entering a new taxon (see <strong>Parsing Status Feedback</strong> above) or would like to check the parsing\r
+               results you will need to check these data fields in the <strong>Details Panel</strong>. This panel is an editable display of the data fields that are\r
+contained within the database. A taxon record is displayed in the <strong>Details Panel</strong> when it has been activated in the<strong>Taxon Name panel</strong>. If the taxon you need to edit is not yet open you can activate it by double-clicking the taxon record in the              <strong>Taxon Navigator</strong> panel (see <strong>The Taxon Name Panel </strong> on page 4 for further details).\r
+       </p>\r
+       <p>\r
+Initially you will need to expand the high level menus to reveal the relevant data fields and further menus below them. This will include at least the<strong> Name</strong> menu and <strong>Scientific Name </strong>sub-menu, but you may also need to expand the <strong>Authorship </strong>sub           <strong>-</strong>menu depending on the information you are checking/editing.\r
+       </p>\r
+       <p>\r
+               The menus can be expanded or minimised using the arrow icons to the left of the appropriate menu. These arrows are only activated when the mouse arrow\r
+               is located within the <strong>Details</strong> panel.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_2a.jpg"/>\r
+       </p>\r
+       <p>\r
+This version of the manual explains how to address problems with the basic data fields of <strong>Rank</strong>, <strong>Uninomial</strong> and                <strong>Specific Epithet</strong>. The <strong>Parsing Status</strong> field at the bottom of the <strong>Details</strong> <strong>panel</strong> will\r
+               inform you of which field to check:\r
+       </p>\r
+       <table cellpadding="0" cellspacing="0">\r
+               <tbody>\r
+                       <tr>\r
+                               <td height="72" width="225">\r
+                                       <table cellpadding="0" cellspacing="0" width="100%">\r
+                                               <tbody>\r
+                                                       <tr>\r
+                                                               <td>\r
+                                                                       <div>\r
+                                                                               <p>\r
+                                                                                       <em>\r
+If you see this parsing status you should check the <strong>Uninomial</strong> and                                                                                             <strong>Specific Epithet</strong> fields\r
+                                                                                       </em>\r
+                                                                               </p>\r
+                                                                       </div>\r
+                                                               </td>\r
+                                                       </tr>\r
+                                               </tbody>\r
+                                       </table>\r
+                               </td>\r
+                       </tr>\r
+               </tbody>\r
+       </table>\r
+       <img src="../img/6_2b.jpg"/>\r
+       <table cellpadding="0" cellspacing="0">\r
+               <tbody>\r
+                       <tr>\r
+                               <td height="58" width="225">\r
+                                       <table cellpadding="0" cellspacing="0" width="100%">\r
+                                               <tbody>\r
+                                                       <tr>\r
+                                                               <td>\r
+                                                                       <div>\r
+                                                                               <p>\r
+                                                                                       <em>If you see this parsing status you should check the <strong>Rank</strong> field</em>\r
+                                                                               </p>\r
+                                                                       </div>\r
+                                                               </td>\r
+                                                       </tr>\r
+                                               </tbody>\r
+                                       </table>\r
+                               </td>\r
+                       </tr>\r
+               </tbody>\r
+       </table>\r
+       <img src="../img/6_2c.jpg"/>\r
+       <p>\r
+               Remember, if there continues to be a parsing problem after you have checked that the correct data is stored in the correct data field, the record can\r
+               remain as it is; you will not be forced to eliminate the parsing problem before the data can be saved.\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..77cc576cfc0ed90c178ecec14a9f127daacc2f7f 100644 (file)
@@ -0,0 +1,20 @@
+       <h2>Deleting a Synonym\r
+       </h2>\r
+       <p>\r
+1. The accepted name to which the synonym you wish to delete has to be open in the <strong>Taxon Name</strong> panel (see <strong>The Taxon Name Panel </strong> on page 24 to learn how to search for and open a taxon record).\r
+       </p>\r
+       <p>\r
+               2. When the record is open, point the mouse arrow into the text box of the synonym you want to delete within the <strong>Taxon Name</strong> panel.\r
+       </p>\r
+       <p>\r
+               3. Click the right mouse button; a drop-down menu will appear.\r
+       </p>\r
+       <p>\r
+               4. Click the <strong>delete</strong> option.\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_5a.jpg"/></p>\r
+       \r
+       <p>\r
+               5. Save your changes (see <strong>Saving your Work</strong> on page 77).\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6fdde8fb8efdb7da06b6ac612a8b9753f809b960 100644 (file)
@@ -0,0 +1,37 @@
+       <h2>Deleting a Taxon\r
+       </h2>\r
+       <p>\r
+               There are two ways of deleting a taxon:\r
+       </p>\r
+       <ol start="1" type="1">\r
+               <li>\r
+                       Click on the taxon in the <strong>Taxon Navigator</strong> panel &gt; press <strong>delete</strong> on the keyboard &gt; go to step 3., or:\r
+               </li>\r
+               <li>\r
+                       Point the mouse arrow at the taxon name in the <strong>Taxon Navigator</strong> panel and click the right mouse button; a drop-down menu will\r
+                       appear &gt; click the <strong>Delete</strong> option.\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/6_4a.jpg"/>\r
+       </p>\r
+       <p>\r
+               A pop-up box will appear asking you for confirmation to delete the taxon from the taxon navigator.\r
+       </p>\r
+       <ol start="3" type="1">\r
+               <li>\r
+                       Click the <strong>OK</strong> button:\r
+               </li>\r
+       </ol>\r
+       <p>\r
+               <img src="../img/6_4b.jpg"/>\r
+       </p>\r
+       <p>\r
+               The taxon will disappear from the Taxon Navigator panel.\r
+       </p>\r
+       <p>\r
+               <strong>Please Note: </strong>\r
+               You can delete a taxon even if it has child taxa attached to it; all the records will be deleted. You cannot undo this action so you should be sure\r
+               that this is what you want to do.\r
+       </p>\r
+       
\ No newline at end of file
index 5f04d42fbcc8fb1988614554148fd810085d5a25..6a7ed0101b4fba5655e48add263dbe3f5b436931 100644 (file)
                <p>Alternatively, you can access the download site directly by entering <a href="http://wp5.e-taxonomy.eu/downlaod/taxeditor">http://wp5.e-taxonomy.eu/downlaod/taxeditor</a> into the address bar of your browser.</p>
        </li>
        <li>Click on the download link and then navigate to the latest version of the Taxonomic Editor 
-               <p>The following steps will differ slightly depending on whether you are using Mozilla Firefox or Internet Explorer and the operating system you are using. If you are using Mozilla Firefox on Vista, you will be taken straight to the “Save As” details pop-up box; go to Step 5. If you are using Internet Explorer or Mozilla Firefox on an older operating system such as Windows XP, you will see a pop-up box the same as or similar to the ones shown below; go to step 4.</p>
+       
+        <p><img src="../img/2_1a.jpg" alt="" /></p>                         
+       <p><img src="../img/2_1b.jpg" alt="" /></p>
+       <p><img src="../img/2_1c.jpg" alt="" /></p>
+               
+               <p>The following steps will differ slightly depending on whether you are using Mozilla Firefox or Internet Explorer and the operating system you are using. If you are using Mozilla Firefox on Vista, you will be taken straight to the â€œSave Asâ€� details pop-up box; go to Step 5. If you are using Internet Explorer or Mozilla Firefox on an older operating system such as Windows XP, you will see a pop-up box the same as or similar to the ones shown below; go to step 4.</p>
        </li>
-       <li>Click the Save button or choose the Save option. Click the OK button if necessary. The “Save As” details pop-up box will open; go to step 5.
-       <p><img src="" alt="" /></p>
-       Mozilla Firefox and Vista/Windows XP                           
-       <p><img src="" alt="" /></p>
-       Internet Explorer and Vista/Windows XP
+       <li>Click the Save button or choose the Save option. Click the OK button if necessary. The â€œSave Asâ€� details pop-up box will open; go to step 5.
+
+       <p><img src="../img/2_1d.jpg" alt="" /></p>
  
        </li>
-       <li>Choose a destination for the folder containing the Taxonomic Editor (Tip! You may have to click a Browse Folders button as shown below in order to access your computers directory). Make a note of the destination.</li>
+       <li>Choose a destination for the folder containing the Taxonomic Editor (Tip! You may have to click a Browse Folders button as shown below in order to access your computer’s directory). Make a note of the destination.</li>
        <li>Enter a file name or use the default file name. Make a note of the file name.</li>
        <li>"Save as type" should be Compressed (Zipped) Folder.
  
-       <p><img src="" alt="" /></p>
-       <p><img src="" alt="" /></p>
+               <p><img src="../img/2_1e.jpg" /></p>
        <p>"Save As" details box: choose a location and name for the folder (choose a new name or keep the default) and Save.</p>
   
        <p><strong>Tip!</strong> If you are using Mozilla Firefox and you do not see a pop-up box as shown above, your internet options may not be set up to ask for confirmation on where to save files that you download. The folder will automatically be saved to your desktop. If you wish to change this setting, see the Troubleshooting instructions at the end of this section.</p>
@@ -35,7 +36,7 @@
        </li>
        <li>Click the <strong>Save</strong> button; a download progress bar will appear. The download may take a few minutes.
        
-               <p><img src="" alt="" /></p>
+<p><img src="../img/2_1f.jpg" alt="" /></p>
 
                <p>You now have to extract the contents of the compressed folder; the exact method will depend on whether you are using Mozilla Firefox or Internet Explorer (see Extracting the Contents of the Compressed Folder (Internet Explorer) or Extracting the Contents of the Compressed Folder (Mozilla Firefox) below).</p>
        </li>
@@ -43,6 +44,6 @@
 <h3>Troubleshooting: Mozilla Firefox Settings</h3>
 <p>If your internet settings are set up to not ask you for confirmation as to where to save files and folders that you are downloading, they will automatically be saved to your desktop. If you want to change this setting open the <strong>Mozilla Firefox</strong> start page > click on the <strong>Tools</strong> menu on the toolbar at the top of the screen > click on Options. A new pop-up box will open. Click in the box to the right of the text <strong>"Always ask me where to save files"</strong> and click OK:</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_1g.jpg" alt="" /></p>
 
  
\ No newline at end of file
index 94486847dd7047afe76da1f7e1298e5df55b868d..43cc3c3f68f1828387ce958d7121be8adb931f88 100644 (file)
 <ol>
        <li>Open the <strong>Preferences</strong> pop-up box (<strong>Toolbar > Window</strong> menu > <strong>Preferences</strong> option).</li>
        <li>Navigate to the element you wish to change by expanding the <strong>Description</strong> or <strong>Taxonomic</strong> menus found in the Taxonomic Editor menu:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_1f.jpg" alt="" /></p>
        </li>
        <li>Click on the data field you would like to edit so that it is highlighted. The example shown below is editing the <strong>Conservation</strong> feature.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_1g.jpg" alt="" /></p>
        </li>
        <li>Click the <strong>Edit</strong> button:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_1h.jpg" alt="" /></p>
                <p>The "Edit Feature" pop-up box will open.</p>
        </li>
        <li>Edit the feature as desired. An example is given below:
-               <p>Original Feature details<img src="" alt="" /></p>
-               <p>Edited Feature details<img src="" alt="" /></p>
+               <p>Original Feature details<img src="../img/4_1i.jpg" alt="" /></p>
+               <p>Edited Feature details<img src="../img/4_1j.jpg" alt="" /></p>
        </li>
        <li>Click the <strong>Finish</strong> button:
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_1k.jpg" alt="" /></p>
        </li>
 </ol>
 
 <p>If you have edited the name of the Feature this will be immediately visible in the Features list:</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_1l.jpg" alt="" /></p>
  
 
  
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..27fdb3aa7da47e3ce05ce76f6ec0b8d0ca3d56c5 100644 (file)
@@ -0,0 +1,7 @@
+<h2>Editing Synonyms\r
+       </h2>\r
+       <p>\r
+A synonym name is parsed in exactly the same way as a root or child taxon. However, in the <strong>Details </strong> panel you will see that<strong>Synonym Name</strong> is seen at the top, rather than Accepted Name. The details of a synonym name can be expanded and edited in the               <strong>Details</strong> panel in the same was as a child taxon (see <strong>Editing your Taxa</strong> on page 66).\r
+       </p>\r
+       <p><img src="../img/7_4a.jpg"/>\r
+       </p>
\ No newline at end of file
index f36ad180659611450c0d407524a8e8d3940910af..8136bfeb2a81fec20eda8f56641fc3cb06b59bcc 100644 (file)
@@ -1,14 +1,14 @@
 <h2>Enabling Unicode Characters</h2>
  
-<p>The Taxonomic Editor uses the operating system's default font to display all the fields that store specimen data. On a Macintosh, the system font is Unicode-compliant, so there is no problem displaying specimen data that includes symbols such as ♀ and ♂. On some, mainly older Windows systems, this is unfortunately not the case. To ensure that all data will be visible on your system, you may need to install a Unicode-compliant font on your Window’s system. If you are experiencing this problem it can be resolved quite easily:</p>
+<p>The Taxonomic Editor uses the operating system's default font to display all the fields that store specimen data. On a Macintosh, the system font is Unicode-compliant, so there is no problem displaying specimen data that includes symbols such as &#9792; and &#9794;. On some, mainly older Windows systems, this is unfortunately not the case. To ensure that all data will be visible on your system, you may need to install a Unicode-compliant font on your Windows system. If you are experiencing this problem it can be resolved quite easily:</p>
  
 <ol>
        <li>Right-click on your Desktop.</li>
        <li>Click Properties in the drop-down menu > Click the Appearance tab > Click the Advanced option. A new pop-up box will open.</li>
-       <li>Click the “Item” drop-down menu and select Message Box.</li>
-       <li>Click the “Font” drop-down menu and select Arial Unicode MS.
+       <li>Click the Item drop-down menu and select Message Box.</li>
+       <li>Click the Font drop-down menu and select Arial Unicode MS.
                <p>The Unicode characters should now appear in the Taxonomic Editor.</p>
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/2_8a.jpg" alt="" /></p>
                <p>If the Arial Unicode MS font is not shown as an option in the Font drop-down menu, and you are using Microsoft Office 2000 or later, you can obtain the font from your Microsoft Office CD:</p>
        </li>
        <li>Insert the Office CD, and do a Custom Install.</li>
index 247952fe80a291ce106aa6042eda9e40de8bae5d..d1db1c2de7658ddba53dfd44941ab9eabdba8696 100644 (file)
@@ -4,19 +4,21 @@
  
        <ol>
                <li>Open the folder by double-clicking it in the pop-up box:
+                               <p><img src="../img/2_3a.jpg" alt="" /></p>
                        <p>Alternatively, locate the folder in the destination in which you chose to save it, and double-click the .zip folder.</p>
                </li>
+
                <li>Click the <strong>Extract All Files</strong> button:
  
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/2_3b.jpg" alt="" /></p>
  
                <p>A new pop-up box will open for you to choose the destination where the extracted folder will be placed. The default destination will be the location of the compressed folder; if you wish the extracted folder to be in the same place as the compressed folder there is no need to change the destination.</p>
                </li>
                <li>Select the folder destination using the Browse button or leave the default destination.
                </li>
-               <li>Ensure “Show extracted files when complete” is selected, and click the <strong>Extract</strong> button.
+               <li>Ensure â€œShow extracted files when completeâ€� is selected, and click the <strong>Extract</strong> button.
                        <p>
-                               <img src="" alt="" />
+                               <img src="../img/2_3c.jpg" alt="" />
                                The contents of the compressed folder will be extracted; this may take a few minutes.
                        </p>
                </li>
index 868ff5fa68f2ec6f37170f2f6eca245932cd365e..395375ec787056f95672b33f4f1c17ca886a55d5 100644 (file)
@@ -5,11 +5,11 @@
        <li>Right-click the folder.
        </li>
        <li>Click the <strong>Extract Files</strong> option.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/2_2a.jpg" alt="" /></p>
                <p>A new pop-up box will open for you to choose the destination where the extracted folder will be placed. The default destination will be the location of the compressed folder; if you wish the extracted folder to be in the same place as the compressed folder there is no need to change the destination.</p>
        </li>
        <li>Select the destination and click the <strong>OK</strong> button. The folder will be extracted; this may take a few minutes.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/2_2b.jpg" alt="" /></p>
        </li>
 </ol>
 
index 43ef8e8adaefc0e3f6edbf8ab3ee1e9d718c2162..be92f842bdc557d53e596a3c59ab3c5158843bc6 100644 (file)
@@ -2,8 +2,8 @@
  
 <p>Every time you open the Taxonomic Editor a log-in pop-up box will open. It allows changes to be tracked if there will be multiple users of the underlying CDM data store and you need to track changes. There are currently no authorization mechanisms in place and the login is therefore solely for authentication. Each user can log in under their own account.</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/2_6a.jpg" alt="" /></p>
 
 <p><strong>Tip!</strong> A CDM datasource will have a user named admin with password '00000', so you can login immediately. The default password should the be changed.</p>
 
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..839c388d72d95da99fee523d333f5e31e40a08f9 100644 (file)
@@ -0,0 +1,10 @@
+<h1>Managing Taxonomic Relationships</h1>\r
+\r
+<p>This sections tells you how to:\r
+       <ol>\r
+               <li>Add heterotypic and homotypic synonyms to taxa.</li>\r
+               <li>Save, delete and edit synonyms.</li>\r
+               <li>Change a synonym to an accepted name.</li>\r
+               <li>Change the position of taxa within a taxonomic tree.</li>\r
+       </ol>\r
+</p>\r
index 4b6d40d0a579c35cf32d83513dd06efd7b188451..41ffb36f5f3fd8df12a02a986ea92e5fa8324b5e 100644 (file)
@@ -2,7 +2,7 @@
  
 <p>In all sections of the Editor except the toolbar clicking the <strong>right mouse button</strong> will open up a context menu containing a list of possible commands that can be performed on the data element the mouse is pointing at. When no commands are available right-click will have no effect.</p>
  
-<p>Most of the commands written in the manual are based on the user using the mouse. However, it is also possible to use the keyboard for some functions. Notably, when pop-up boxes require confirmation by selecting ‘OK’ or ‘Finish’, the default setting will be on the OK/Finish button, therefore you can select OK/Finish by pressing Return on the keyboard as well as clicking the button with the mouse.</p>
+<p>Most of the commands written in the manual are based on the user using the mouse. However, it is also possible to use the keyboard for some functions. Notably, when pop-up boxes require confirmation by selecting "OK" or "Finish", the default setting will be on the OK/Finish button, therefore you can select OK/Finish by pressing Return on the keyboard as well as clicking the button with the mouse.</p>
  
  
 <p>Keyboard arrows can be used to navigate around the Toolbar area to find menus and make selections. You must first click on one of the menus using the mouse, but can then use the arrows on the keyboard to navigate and the Return/Enter key to make your selection.</p>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4f2e8586f249ee67b93b5e853b8c7a79f218f239 100644 (file)
@@ -0,0 +1,45 @@
+       <h2>Moving the Position of Taxa within a Taxonomic Tree\r
+       </h2>\r
+       <p>\r
+If a taxonomic treatment has changed and you need to update your classification to reflect this, this can be done easily via the               <strong>Move Taxon (with Child taxa)</strong> function. This function allows you to move a taxon with any associated synonyms and child taxa.\r
+       </p>\r
+       <p>\r
+               1. Point the mouse arrow at the taxon name which you want to change within the <strong>Taxon Navigator</strong> panel.\r
+       </p>\r
+       <p>\r
+               2. Click the right mouse button; a drop-down menu will appear.\r
+       </p>\r
+       <p>\r
+               3. Click the <strong>Move Taxon (with child taxa)</strong> option:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_8a.jpg"/>\r
+       </p>\r
+       <p>\r
+               4. The &#8220;Choose new parent&#8221; pop-up box will open. Select the classification in which you are searching in the drop down menu at the bottom\r
+               of the box.\r
+       </p>\r
+       <p>\r
+               5. In the text box at the top of the box, enter a term to search for the parent taxon to which you would like to move the child to. As you type the\r
+               Taxonomic Editor will automatically search for matching taxon names. You can also use (*) to search using part of the name, or (?) to see all entries.\r
+               A list will appear with matching taxon names:\r
+       </p>\r
+       <p>\r
+               <img src="../img/7_8b.jpg"/>\r
+       </p>\r
+       <p>\r
+               6. Click on the name of the desired parent taxon.\r
+       </p>\r
+       <p>\r
+               7. Click the <strong>OK </strong>button or press <strong>Return </strong>on the keyboard. Alternatively, simply double-click the name of the desired\r
+               parent taxon.\r
+       </p>\r
+       <p>\r
+               8. The location of the selected child taxon will be moved within the Taxonomic Tree and will be saved automatically:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/7_8c.jpg"/>\r
+       </p>\r
+       <strong>\r
+               <br clear="all"/>\r
+       </strong>
\ No newline at end of file
index e71885ae8fcdd9b301da7b29c2f34368ae15372b..753269385959661fb29fd9aabac8e418577f2a39 100644 (file)
@@ -3,13 +3,13 @@
 <p>It is possible to open multiple taxon records so that there are several documents open in the <strong>Taxon Name</strong> panel. Each taxon will be opened as a new document; each document can be accessed by clicking on the appropriate tab at the top of the free text panel. A double-arrow icon will displayed at the top right of the panel when there are more taxa open than are currently visible; the number refers to the number of open taxon records.</p>
  
 <p>The tabs of 2 taxon records are visible and there are 4 open taxon records that are not currently displayed
-       <img src="" alt="" />
+               <p><img src="../img/3_4f.jpg" alt="" /></p>
 </p>
   
 <p>In order to view more tabs of taxon records you can expand the width of the <strong>Taxon Name</strong> panel using the arrows that appear at the sides of the panel when you hover the mouse arrow over them (see <a href="">Panel Sizes</a>). Also, clicking on the double-arrow icon will reveal a list of all the open taxon records; those in <strong>bold</strong> are those for which the tabs are not current displayed:</p>
   
 <p>
-<img src="" alt="" />
+               <p><img src="../img/3_4g.jpg" alt="" /></p>
 Taxa with currently displayed tabs
  
 Open taxa with tabs not currently displayed
index 292079816f1d4591cf14148edb8ed6973cf7aabd..0df87487dbe386171b322c0f1f2ee8c20f007184 100644 (file)
@@ -2,6 +2,6 @@
 
 <p>The Taxonomic Editor allows for the input of data in a hierarchical way. Databases within the Taxonomic Editor consist of Taxonomic classifications composed of linked child nodes representing the taxa in the classification:</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/5_1a.jpg" alt="" /></p>
 
 <p>You can have several classifications within your database, with unlimited numbers of taxa in each one. Synonyms can be attached to taxa at any level in the classification.</p>
index 4ea01031a7174168c59b9659b8c36917101bd1b0..00305feb271b5b934824217cd13b3a6a684f68d1 100644 (file)
@@ -1,7 +1,7 @@
 <h3>Opening and Closing Panels</h3>
  
-<p>Each individual panel can be minimised/maximised using the icons at the top right of the panel, or closed using the ‘X’ icon on the tab bearing the name of each panel:</p>
+<p>Each individual panel can be minimised/maximised using the icons at the top right of the panel, or closed using the 'X' icon on the tab bearing the name of each panel:</p>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_2d_text.jpg" alt="" /></p>
  
 <p>The panels can be reopened using the Show View menu (see <a href="">The Show View Menu</a>).</p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..044b385ddd8ef3e9cc9475a5bc46a6ca39129165 100644 (file)
@@ -0,0 +1,6 @@
+       <h2>Opening the Descriptive Panel for a Taxon\r
+       </h2>\r
+       <p>\r
+The <strong>Descriptive Panel</strong> can be viewed via the windows menu. Windows &gt; Show View &gt; Descriptive. A taxon has to be included in the          <strong>Taxon Navigator</strong> panel and has to be activated within the <strong>Taxon Names </strong>panel before descriptive data can be added to\r
+               that taxon.\r
+       </p>
\ No newline at end of file
index 4cb084dba2abff1eea120bc53cc5b351b5f2d98a..95b38c77520f2d97f57c7ee178e0c7221d6c9894 100644 (file)
@@ -5,19 +5,20 @@
                <p>A security warning may open; this is a standard Windows security warning asking for confirmation that you trust the source of the application.</p>
        </li> 
 
-       <li>If you have received a Security Warning pop-up, deselect the option “Always ask before opening this file” – this will prevent this pop-up box from appearing every time you run the Taxonomic Editor.</li>
+       <li>If you have received a Security Warning pop-up, deselect the option "Always ask before opening this file" this will prevent this pop-up box from appearing every time you run the Taxonomic Editor.</li>
                
        <li>Click the Run button to continue opening the Taxonomic Editor.</li>
+       <img src="../img/2_5a.jpg" alt="" />
 
        <li>The Taxonomic Editor will load and open; this may take a minute or two the first time you open the Taxonomic Editor.</li>
        <li>The first time you run the Taxonomic Editor, you will be asked to choose a nomenclatural code. Select the code you wish to use and click the OK button.
  
        <p>
-               <img src="" alt="" />
+               <img src="../img/2_5b.jpg" alt="" />
                A pop-up box will open confirming your choice of nomenclatural code.
        </p>
  </li>
 </ol>
 
-<p>You can change the nomenclatural code at any time in the “Preferences” (see The Preferences Menu).</p>
+<p>You can change the nomenclatural code at any time in the "Preferences" (see The Preferences Menu).</p>
  
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0425d217dab6672551cce6831af30440f2cd54b4 100644 (file)
@@ -0,0 +1,15 @@
+<h3>\r
+               Orange warning icon = Parsing completed but checks are recommended\r
+               <br clear="all"/>\r
+       </h3>\r
+       <p>\r
+               <img src="../img/6_1b.jpg"/>\r
+       </p>\r
+       <p>\r
+               The taxon name will be underlined in orange and there will be an orange warning sign\r
+               <img src="../img/orangewarning.jpg" border="0" height="18" width="19"/>\r
+               to the left of the taxon name. This indicates that parsing has been successful, but that there is an element of uncertainty and you may want to check\r
+               that the parser has correctly inserted the separate elements of your text string in the correct data fields. Hovering over the warning sign will give\r
+               you details on which element to check. In the example above the warning says to check that the <strong>Rank</strong> status has been accurately\r
+               determined. You have to check this in the <strong>Details Panel</strong> (see <strong>Dealing with Parsing Problems</strong> below).<strong></strong>\r
+       </p>
\ No newline at end of file
index f1d2239b903235f6d403efdb47c6e62418f823ac..6931130ebe471459a8d35610a8356cf4b0c8c2ce 100644 (file)
@@ -11,7 +11,7 @@ Middle column: Taxon name panel (3), Descriptive panel (4) and Media panel (5)<b
 Right hand column: Descriptive Panel (6) and Supplemental Data panel (7)
 </p>
  
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_1a.jpg" alt="" /></p>
  
 <p>The different parts of the Taxonomic Editor are outlined below. To view those which are not shown in the default view see section 4.2 The Show View Menu page 41.</p>
 
@@ -23,14 +23,14 @@ Right hand column: Descriptive Panel (6) and Supplemental Data panel (7)
        <dt>C/ The Taxon Name panel (3)</dt>
                <dd>This panel contains a tab for each open taxon. Information entered here will be parsed directly and displayed in the taxon details panel .</dd>
        <dt>D/ Taxon Data Panels</dt>
-               <dd>There are four different taxon data panels where data types can be selected and added for Descriptive(4), Supplemental (6), Media (5) and Polytomous keys (not shown  not yet functional). When an item in a pane associated with one of these tabs is selected the data associated with the selection will be displayed and can be edited in the details panel (6).</dd>
+               <dd>There are four different taxon data panels where data types can be selected and added for Descriptive(4), Supplemental (6), Media (5) and Polytomous keys (not shown â€“ not yet functional). When an item in a pane associated with one of these tabs is selected the data associated with the selection will be displayed and can be edited in the details panel (6).</dd>
        <dt>E/ The Details Panel (6)</dt>
                <dd>The contents displayed in this panel will vary depending upon the selections in the other panels. When a taxon is currently selected this panel displays the parsed taxon details. When an element in a Taxon data panel is selected then the details of the selected item are displayed here.  When the bulk  editor is activated the edit controls for the bulk editor will also be displayed in this panel</dd>
        <dt>F/ Management Panels</dt>
                <dd>There are 4 database management panels, none of which open in the default view.<br/>
                        The Datasource panel shows which datasource, or database, the Taxonomic Editor is currently connected to. You can connect or delete connections to different datasources or create a new datasource.
  
-                       <p>The User Manager panel will be used to view, edit, create or delete user accounts in order to track changes to your data, for example “Created By” and “Updated By”; it is not yet operational.</p>
+                       <p>The User Manager panel will be used to view, edit, create or delete user accounts in order to track changes to your data, for example "Created By" and "Updated By" it is not yet operational.</p>
  
                        <p>Messages - experimental feature, not yet fully functional.<br/>
                        Reporting - experimental feature, not yet fully functional.</p>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..08985dcbed3ee47e7b2ed6596a90f025c631cbc6 100644 (file)
@@ -0,0 +1,34 @@
+       <h3>Rank\r
+       </h3>\r
+       <p>\r
+               <strong> </strong>\r
+       </p>\r
+       <p>\r
+               The Parsing Status of the field may ask you to check the <strong>Rank</strong> data field. If the rank is correct, there is no need to take any action.\r
+               If the rank is incorrect, you can change it using the drop-down menu:\r
+       </p>\r
+       <p>\r
+               1. Expand the <strong>Scientific Name</strong> menu using the arrow to the left of the menu.\r
+       </p>\r
+       <p>\r
+               2. Click within the <strong>Rank</strong> data field; the field will be activated and a drop-down menu arrow will appear at the right of the field.\r
+       </p>\r
+       <p>\r
+               3. Click on the drop-down menu arrow; the data options for the Rank field will appear.\r
+       </p>\r
+       <p>\r
+               4. Navigate to the correct rank value using the bar at the right hand side of the menu to scroll down if necessary.\r
+       </p>\r
+       <p>\r
+               5. Click the correct rank value; the drop-down menu will close and the selected rank will be shown in the rank data field.\r
+       </p>\r
+       <p>\r
+               6. Save the record (see <strong>Saving your Work</strong><strong> </strong>on page<strong> </strong>77).\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_2d.jpg"/>\r
+       </p>\r
+       <p>\r
+               Note the many options in the <strong>Rank</strong> drop-down menu. This menu can be customised to show only those ranks which you are likely to use.\r
+               See <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30 for further information.\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4c5fd3486ad22f0c748f81a0b99fd91e48c31bba 100644 (file)
@@ -0,0 +1,19 @@
+       <h3>Red warning icon = Parsing has been unsuccessful\r
+       </h3>\r
+       <p>\r
+               <strong> </strong>\r
+       </p>\r
+       <p>\r
+               <strong> </strong>\r
+       </p>\r
+       <p>\r
+               <img src="../img/6_1a.jpg"/>\r
+       </p>\r
+       <p>\r
+               The taxon name will be underlined in red and there will be the red warning sign\r
+               <img src="../img/redwarning.jpg" border="0" height="16" width="14"/>\r
+               to the left of the taxon name. This warning sign indicates that the parser has not been able to separate the text string into its constituent parts.\r
+       </p>\r
+       <p>\r
+You can rectify this by editing the taxon information, if necessary, in the <strong>Details Sheet</strong> (see                <strong>Dealing with Parsing Problems</strong><strong> </strong>below).\r
+       </p>
\ No newline at end of file
index c60482073ede6c1d83194f22f8544280b2c3d843..7b8355ed700c1a7defe6172ed1239c45b37f785d 100644 (file)
@@ -1,8 +1,12 @@
 <h2>Removing the Taxonomic Editor</h2>
  
 <p>To remove the Taxonomic Editor from your system, locate the folder in which the taxonomic editor.exe file is stored on your system and simply delete the folder. If you cannot find the folder and you are on a windows platform and have created a desktop shortcut to the Editor you can determine the path to the folder by looking at the properties of the shortcut. Do this by right clicking on the shortcut and selecting the properties option from the drop down menu.  In the Shortcut tab of the properties window look in the 'Target field' this will reveal the location of the taxonomic editor.</p>
-                               
+<p><img src="../img/2_9a.jpg" alt="" /></p>
+                              
 <p>Navigate to the Taxonomic Editor folder and delete it by simply clicking once on the folder and pressing the Delete button on the keyboard. A pop-up box will appear asking "do you really want to delete this folder"; press Return on the keyboard to confirm.</p>
+
+<p><img src="../img/2_9b.jpg" alt="" /></p>
  
 <p>You will also need to delete the <code>.cdmLibrary</code> folder where your local data is stored. The exact location of this folder will depend on your computer system. In order to locate it, run a system search as detailed for different operating systems.</p>
  
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..17b9d2a3acf2883f9c38f6b9104a117171db5b13 100644 (file)
@@ -0,0 +1,16 @@
+       <h2>Saving Synonyms\r
+       </h2>\r
+       <p>\r
+               You can save synonym records by either:\r
+       </p>\r
+       <p>\r
+               1. Pressing <strong>Control </strong>and<strong> S</strong> together on the keyboard, or by:\r
+       </p>\r
+       <p>\r
+2. Pointing the mouse arrow into the synonym text box and click the right mouse button; a drop-down menu will open &gt; click on the           <strong>Save </strong>option:\r
+       </p>\r
+       <p>\r
+<img src="../img/7_3a.jpg"/>\r
+       </p>\r
+\r
+       \r
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c3c2d3c75eb27969b458c4d1e1d3a1ac954f7be5 100644 (file)
@@ -0,0 +1,56 @@
+<h2>Saving your Work\r
+       </h2>\r
+       <p>\r
+               Any record that has been edited without being saved will be flagged with an asterisk in the <strong>Taxon Name </strong>panel to the left of the taxon\r
+               name in the tab label:\r
+       </p>\r
+       <p>\r
+               <em>An asterisk indicates unsaved changes</em>\r
+       </p>\r
+       <br clear="ALL"/>\r
+       <p>\r
+               <img src="../img/6_6a.jpg"/>\r
+       </p>\r
+       <p>\r
+               You can save your changes using the <strong>Save</strong> icon on the Toolbar and at the top left of the Taxonomic Editor window:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_6b.jpg"/>\r
+       </p>\r
+       <p>\r
+               Alternatively, hold the <strong>Control</strong> and <strong>S</strong> keys on the keyboard at the same time.\r
+       </p>\r
+       <p>\r
+               <strong>Please Note:</strong>\r
+               If you have multiple taxon records with unsaved changes <em>this method will only save changes in the currently activated record</em> i.e. the record\r
+               that is open in the <strong>Taxon Name </strong>panel. To save all unsaved changes in multiple records you need to select the <strong>Save All</strong>\r
+               option found under the<strong> General</strong> menu:\r
+       </p>\r
+       <p>\r
+               Click on the <strong>General </strong>menu in the <strong>Toolbar</strong>; the File drop-down menu will appear &gt; Click on <strong>Save All</strong>\r
+               .\r
+       </p>\r
+       <p>\r
+               <img src="../img/6_6c.jpg"/>\r
+       </p>\r
+       <p>\r
+               If you attempt to try to close an edited taxon record without saving your changes the Taxonomic Editor will give you a warning:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_6cc.jpg"/>\r
+       </p>\r
+       <p>\r
+               Any changes to text in the <strong>Taxon Name</strong> panel will not appear in the <strong>Taxon Navigator</strong> panel until the changes have been\r
+               saved as above. Alternatively, you can refresh the classification by right-clicking anywhere in the <strong>Taxon Navigator</strong> panel and\r
+               selecting <strong>Refresh</strong>:\r
+       </p>\r
+       <p>\r
+               Point the mouse arrow anywhere within the <strong>Taxon Navigator </strong>panel &gt; Click the right mouse button; a drop-down menu will appear &gt;\r
+               Click the <strong>Refresh</strong> option.\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_6d.jpg"/>\r
+       </p>\r
+       <strong>\r
+               <br clear="all"/>\r
+       </strong>
\ No newline at end of file
index 4f78c68947a75fa10d262cce3927ce388dcfbffc..93537a6a0b187bf205d365389e9c3a7dad108f1b 100644 (file)
  
 <p>The search results will appear as a new panel as shown below. Taxon records can be double-clicked to open their records in the Taxon Name panel.</p>
  
-<p><img src="" alt="" /></p>
+               <p><img src="../img/3_4c.jpg" alt="" /></p>
  
 Also in the search results are the types of taxa that you have included in your search. For example, the search above included Taxa, Synonyms, Names (without taxa) and Common Names:
  
-<p><img src="" alt="" /></p>
+               <p><img src="../img/3_4e.jpg" alt="" /></p>
  
 Should you want to limit the search results to one or a sub-set of these options, you can do so by selecting and/or deselecting your search criteria using the drop-down menu to the right of the Search bar. Simply click the arrow icon to reveal the drop-down menu, and click on the available criteria. If the criterion is included in searches there will be a tick icon to its left.
 
-<p>All criteria will be included in searches<img src="" alt="" /></p> 
+<p>All criteria will be included in searches<p><img src="../img/3_4f.jpg" alt="" /></p></p> 
 
 
  
-<p>Only (accepted) Taxa and Synonyms will be included in searches<img src="" alt="" /></p>
+<p>Only (accepted) Taxa and Synonyms will be included in searches<p><img src="../img/3_4g.jpg" alt="" /></p></p>
  
 <p><strong>Tip!</strong> If your search results do not show any taxa but you know there should be matches within your dataset, make sure that the search criteria are selected. If they are ALL deselected you searches will be unsuccessful.</p>
  
\ No newline at end of file
index 77f7b8d52241d68e437912603d1ae03409f4e1ee..95549cea6c18387aaba29fad712188f3cea00b8e 100644 (file)
@@ -1,4 +1,6 @@
 <h3>Show/Hide Options of Drop-Down Menus</h3>
+
+<p><img src="../img/4_1a.jpg" alt="" /></p>
  
 <p>Some taxonomic and descriptive elements of the Properties Sheet have numerous options, as is the nature of taxonomy, for example there are 19 options to describe the Distribution Status of a taxon. You may find that you only need to use a sub-set of these options.</p>
  
                        <li><strong>Description</strong>
                                <ul>
                                        <li><strong>Distribution Status:</strong> for example "introduced: cultivated", "introduced: naturalised".</li>
-                                       <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example “common name”, “distribution” and “ecology”.</li>
+                                       <li><strong>Features:</strong> the features you would like to include in your taxon descriptions, for example "common name", "distribution" and "ecology".</li>
                                        <li><strong>Named Area Type:</strong>  for example "natural area"</li>
                                        <li><strong>Preservation method:</strong>  not yet functional.</li>
                                        <li><strong>Stage:</strong> not yet functional.</li>
-                                       <li><strong>Extension types:</strong> the types for the section ‘extensions’ in the supplemental data view for example “abbreviation “, “order”.</li>
+                                       <li><strong>Extension types:</strong> the types for the section "extensions" in the supplemental data view for example "abbreviation", "order".</li>
                                        <li><strong>Language:</strong> languages available for common name field</li>
-                                       <li><strong>Marker types:</strong> the types for the section ‘extensions’ in the supplemental data view for example “complete”, “to be checked”.</li>
+                                       <li><strong>Marker types:</strong> the types for the section "extensions" in the supplemental data view for example "complete", "to be checked".</li>
                                        <li><strong>Matching:</strong> Experimental feature, not yet fully functional.</li>
-                                       <li><strong>Taxonomic:</strong> Name Relationships Type: for example “misspelling for”, “basionym for”.</li>
-                                       <li><strong>Name Type Designation Status:</strong> for example “monotypy”, “present designation”</li>
+                                       <li><strong>Taxonomic:</strong> Name Relationships Type: for example "misspelling for", "basionym for".</li>
+                                       <li><strong>Name Type Designation Status:</strong> for example "monotypy", "present designation"</li>
                                        <li><strong>Nomenclatural Code:</strong> ICBN or ICZN.</li>
-                                       <li><strong>Nomenclatural Status Type:</strong> for example “invalid”, “conserved”.</li>
+                                       <li><strong>Nomenclatural Status Type:</strong> for example "invalid", "conserved".</li>
                                        <li><strong>Ranks:</strong> for example "cultivar", "tribe".</li>
                                        <li><strong>Specimen Type Designation Status:</strong> for example "epitype", "holotype".</li>
                                        <li><strong>Taxon Relationship Type:</strong> for example "overlaps", "excludes".</li>
  
 <ol>
        <li>The menus given above are located in the Taxonomic Editor option in the menu. They can be accessed by expanding the Taxonomic Editor menu by clicking on the arrow icon:
-               <p><img src="" alt="" /></p>
+                               <p><img src="../img/4_1b.jpg" alt="" /></p>
        </li>
        <li>Click on the data field you would like to change from the menu on the left hand side of the pop-up. The existing options associated with the drop-down list for that data field will appear in the main panel of the Preferences pop-up box. By default, all of the options will be selected. Use the scroll bar to the right of the options list to navigate the list.</li>
        <li>Ensure that all of the options you wish to appear in the drop-down box for that data field are ticked, and all those you do not wish to appear are un-ticked. You will need to use the mouse to do this. You can use the <strong>Toggle</strong> button on the right-hand side of the box to select or deselect all of the options in the list.</li>
        <li>Click the <strong>Apply</strong> button > click the <strong>OK</strong> button to finish. The Preferences pop-up box will close and you will be returned to Taxonomic Editor.
-               <p><img src="" alt="" /></p>
+
        </li>
 </ol>
+
+<p><img src="../img/4_1c.jpg" alt="" /></p>
index 7552c48261b7285efc47590010648c3f27a8c509..8025845bcf2a7b80f29af49332a97d1e709dbdda 100644 (file)
@@ -2,6 +2,8 @@
  
 <h3>General</h3>
 
+<p><img src="../img/3_2a.jpg" alt="" /></p>
+
 <p>The General menu has the following options:</p>
 
 <ul>
@@ -14,7 +16,7 @@
        <li>Recently opened records are listed at the bottom of the menu. Click on a taxon name in this list to open the taxon in the Freetext panel.</li>
 </ul>
 
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_2b.jpg" alt="" /></p>
 
  
 <h3>Edit</h3>
        <li><strong>Undo; Redo;</strong> these commands are currently operational only when using the Bulk Editor (see below).</li>
        <li><strong>Cut; Copy; Paste; Delete;</strong> these commands apply to all panels of the Taxonomic Editor apart from the Taxon Navigator panel where only the Delete function works.</li>
 </ul> 
-<p><img src="" alt="" /></p>
+<p><img src="../img/3_2c.jpg" alt="" /></p>
  
 <h3>Window</h3>
           
 <p>The Window menu lets you open other editors and views that are not visible yet or have been closed before.</p>
           
-<p><img src="" alt="" /></p>         
+<p><img src="../img/3_2d.jpg" alt="" /></p>         
                                 
 <ul>
        <li><strong>Bulk Editor;</strong> The Bulk Editor is used to edit lists of:
@@ -40,8 +42,6 @@
                        <li>Authors and Author Teams</li>
                </ul>
                
-               <p><img src="" alt="" /></p>
-               
                See <a href="">Bulk Editing</a> for further details.
        </li>
        <li><strong>Show View;</strong>
@@ -57,7 +57,6 @@
                        <li><strong>Messaged</strong></li>
                </ul>
                
-               <p><img src="" alt="" /></p>
                
                (see <a href="">Customising the Taxonomic Editor</a>).
        </li>
@@ -77,7 +76,7 @@
        <li><strong>About the EDIT Platform</li>
 </ul> 
 
-<p><img src="" alt="" /></p>
+               <p><img src="../img/3_2e.jpg" alt="" /></p>
  
  
  
index 3b7ce51672f6d8c766f9ac10201687ffb526310c..a3df9f4c6d36fe05f8899f1f439ae7584a978f1c 100644 (file)
@@ -2,14 +2,14 @@
  
 <p>The five panels of the Taxonomic Editor can be closed independently by clicking on the (x) icon on the right-hand side of the tab of each panel. For example:</p>
  
-<p><img src="" alt="" /></p>
+<p><img src="../img/4_2a.jpg" alt="" /></p>
 
 <p>Panels can be reopened by clicking the panel name under the <strong>Show View</strong> menu.</p>
 
 <ol>
        <li>Click the <strong>Windows</strong> menu in the Toolbar. A drop-down box will appear.</li>
        <li>Move the mouse to the <strong>Show View</strong> option in the drop-down box.
-               <p><img src="" alt="" /></p>
+               <p><img src="../img/4_2b.jpg" alt="" /></p>
                <p><strong>Toolbar > Window > Show View</strong></p>
        </li>
        <li>Click the panel option that you wish to open.
@@ -21,4 +21,4 @@
  
 <p><strong>Tip!</strong> If, when you select a panel in the Show View menu you still cannot see it in the Taxonomic Editor window, it may have been minimised. Check at the bottom right of the window for minimised panels:</p>
  
-<p><img src="" alt="" /></p>
\ No newline at end of file
+<p><img src="../img/4_2c.jpg" alt="" /></p>
\ No newline at end of file
index 57bbd7d04cd90c36ad93df7b1c4a4056454ccb6b..82d748b505822516a9b49fc9b97d08fade81d8f9 100644 (file)
@@ -2,4 +2,4 @@
  
 <p>This section describes how to work within the Taxon Name panel. This is where the nomenclatural information such as accepted name, authority and nomenclatural reference as well as synonym information is displayed and updated.</p>
  
-<p><img src="" alt="" /></p>
\ No newline at end of file
+               <p><img src="../img/3_4a.jpg" alt="" /></p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..654298695979751ff90fe9fa033cff1fdd5058c9 100644 (file)
@@ -0,0 +1,222 @@
+<h2>Types of Descriptive Data\r
+       </h2>\r
+       <p>\r
+               The descriptive data panel allows you to attach descriptive data to each taxon within your taxonomic tree. The following types of data can be included:\r
+       </p>\r
+       <div align="center">\r
+               <table border="0" cellpadding="0" cellspacing="0">\r
+                       <tbody>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Abstract\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Discussion\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Observation\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Acknowledgements\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Distribution\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Occurrence\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Additional Publication\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Ecology\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Pathogen Agent\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Anatomy\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Etymology\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Phenology\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Biology and Ecology\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Habitat\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Protologue\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Chromosome\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Host Plant\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Specimen\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Citation\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Individuals Association\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Synopsis\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Common Name\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Introduction\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Unknown Feature Type\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Conservation\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Key\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Uses\r
+                                               </p>\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Cultivation\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Materials Examined\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Description\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Materials Methods\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                               <p>\r
+                                                       Diagnosis\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                               <p>\r
+                                                       Multiple\r
+                                               </p>\r
+                                       </td>\r
+                                       <td width="205">\r
+                                       </td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td width="189">\r
+                                       </td>\r
+                                       <td width="205">\r
+                                       </td>\r
+                                       <td width="205">\r
+                                       </td>\r
+                               </tr>\r
+                       </tbody>\r
+               </table>\r
+       </div>\r
+       <p>\r
+               The format of the types of descriptive data varies; for some the data is input as freetext but for others data must be chosen from options given in\r
+               drop-down menus.\r
+       </p>\r
+       <p>\r
+               <strong>Please Note:</strong>\r
+The options given to you in the drop-down menus can be customised using the <strong>Preferences </strong>menu (see             <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30).\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c220b5198b9b233b4dd385cc4eff1ce2636ce741 100644 (file)
@@ -0,0 +1,18 @@
+\r
+       <h2>Types of Supplemental Data\r
+       </h2>\r
+       <p>\r
+               The Supplemental data panel allows you to attach supplemental data to each taxon within your classification. The following types of data can be\r
+               included:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/9_1a.jpg"/>\r
+       </p>\r
+       <p>\r
+               The format of the types of descriptive data varies; for some the data is input as free text but for others data must be chosen from options given in\r
+               drop-down menus.\r
+       </p>\r
+       <p>\r
+               <strong>Please Note:</strong>\r
+The options given to you in the drop-down menus can be customised using the <strong>Preferences </strong>menu (see             <strong>Show/Hide Options of Drop-Down</strong> Menus on page 30).\r
+       </p>
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4bd4ccd80986e8e01b6c185c511d31feabc9cec3 100644 (file)
@@ -0,0 +1,24 @@
+<h3>Uninomial and Specific Epithet\r
+       </h3>\r
+       <p>\r
+               In order for these fields to be visible, both the <strong>Accepted Name</strong> and <strong>Name Cache</strong> menus need to be expanded using the\r
+               arrows to the left of the data field name:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_2e.jpg"/>\r
+       </p>\r
+       <p>\r
+               If these fields are incorrect, they can be edited simply:\r
+       </p>\r
+       <p>\r
+               1. Click in the relevant field; the field will become highlighted:\r
+       </p>\r
+       <p align="center">\r
+               <img src="../img/6_2f.jpg"/>\r
+       </p>\r
+       <p>\r
+               2. Make the correction.\r
+       </p>\r
+       <p>\r
+               3. Save the record (see <strong>Saving your Work</strong> on page 77).\r
+       </p>
\ No newline at end of file
index f3cce1c93870ba5e0f57eb097a39272c34e0affb..202cf4922c26c2ef1d41dc5d44b9e7df8ed5c987 100644 (file)
@@ -5,8 +5,8 @@
        <li>Click in the <strong>search bar</strong> at the bottom of the menu.</li>
        <li>Enter <code>.cdmLibrary</code>:
                
-               <p><img src="" alt="" />Windows Start button</p>                
-               
+               <p><img src="../img/2_9c.jpg" alt="" />Windows Start button</p>         
                <br/>
         A menu of matching search results will open.
     </li>
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg
new file mode 100644 (file)
index 0000000..2fea5e2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg
new file mode 100644 (file)
index 0000000..a722a01
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg
new file mode 100644 (file)
index 0000000..cc7cbf2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg
new file mode 100644 (file)
index 0000000..2b3cdc5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg
new file mode 100644 (file)
index 0000000..b43c26c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg
new file mode 100644 (file)
index 0000000..6e3f360
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg
new file mode 100644 (file)
index 0000000..ded0ed9
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg b/eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg
new file mode 100644 (file)
index 0000000..82aa484
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/10_1h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg
new file mode 100644 (file)
index 0000000..2455ac7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg
new file mode 100644 (file)
index 0000000..20cb357
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg
new file mode 100644 (file)
index 0000000..09d0c8a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg
new file mode 100644 (file)
index 0000000..5e0994b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg
new file mode 100644 (file)
index 0000000..4bca1fb
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg
new file mode 100644 (file)
index 0000000..8a4f18a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg
new file mode 100644 (file)
index 0000000..4dae1d5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_10g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg
new file mode 100644 (file)
index 0000000..1432b21
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_11a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg
new file mode 100644 (file)
index 0000000..c7bb23a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_11b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg
new file mode 100644 (file)
index 0000000..25bf31a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_11c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg
new file mode 100644 (file)
index 0000000..f22d192
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_11d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg
new file mode 100644 (file)
index 0000000..a799993
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg
new file mode 100644 (file)
index 0000000..21cc10f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg
new file mode 100644 (file)
index 0000000..6c99bd8
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg
new file mode 100644 (file)
index 0000000..a687726
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg
new file mode 100644 (file)
index 0000000..ad67554
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg
new file mode 100644 (file)
index 0000000..586ee63
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg
new file mode 100644 (file)
index 0000000..219d7b8
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_1g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg
new file mode 100644 (file)
index 0000000..d6bbfef
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg
new file mode 100644 (file)
index 0000000..0184418
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg
new file mode 100644 (file)
index 0000000..0df3a18
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg
new file mode 100644 (file)
index 0000000..73365e7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_3b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg
new file mode 100644 (file)
index 0000000..f6e68b2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_3c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg
new file mode 100644 (file)
index 0000000..4fe76c6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg
new file mode 100644 (file)
index 0000000..90a36f0
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_4b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg
new file mode 100644 (file)
index 0000000..ca017e0
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_5a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg
new file mode 100644 (file)
index 0000000..58d4eed
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_5b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg
new file mode 100644 (file)
index 0000000..c1799d7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_6a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg
new file mode 100644 (file)
index 0000000..daab6e5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_8a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg
new file mode 100644 (file)
index 0000000..ffda35d
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_9a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg
new file mode 100644 (file)
index 0000000..99dd947
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_9b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg b/eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg
new file mode 100644 (file)
index 0000000..33f8ab3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/2_9c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg
new file mode 100644 (file)
index 0000000..7f78801
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg
new file mode 100644 (file)
index 0000000..ef42f64
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg
new file mode 100644 (file)
index 0000000..e1b584a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg
new file mode 100644 (file)
index 0000000..f87c215
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_2c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg
new file mode 100644 (file)
index 0000000..09411c3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_2d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg
new file mode 100644 (file)
index 0000000..9967bf4
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_2e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg
new file mode 100644 (file)
index 0000000..3892b21
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg
new file mode 100644 (file)
index 0000000..252f247
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg
new file mode 100644 (file)
index 0000000..b1f572f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg
new file mode 100644 (file)
index 0000000..39124ca
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg
new file mode 100644 (file)
index 0000000..00076c9
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg
new file mode 100644 (file)
index 0000000..e9cc7dd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg
new file mode 100644 (file)
index 0000000..21c88ae
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg
new file mode 100644 (file)
index 0000000..b47fa1e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg b/eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg
new file mode 100644 (file)
index 0000000..b2fe332
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/3_4i.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg
new file mode 100644 (file)
index 0000000..4c77a67
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg
new file mode 100644 (file)
index 0000000..fe3c4c0
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg
new file mode 100644 (file)
index 0000000..b014814
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg
new file mode 100644 (file)
index 0000000..72621f6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg
new file mode 100644 (file)
index 0000000..4e062c6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg
new file mode 100644 (file)
index 0000000..2a901cd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg
new file mode 100644 (file)
index 0000000..7908ffb
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg
new file mode 100644 (file)
index 0000000..5446b88
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg
new file mode 100644 (file)
index 0000000..a5237d3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1i.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg
new file mode 100644 (file)
index 0000000..65eeea6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1j.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg
new file mode 100644 (file)
index 0000000..c7bb379
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1k.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg
new file mode 100644 (file)
index 0000000..a5f2d8f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_1l.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg
new file mode 100644 (file)
index 0000000..61cb065
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg
new file mode 100644 (file)
index 0000000..a90373f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg
new file mode 100644 (file)
index 0000000..b81fc49
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_2c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg
new file mode 100644 (file)
index 0000000..80e3485
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_2d_text.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg
new file mode 100644 (file)
index 0000000..2ce6d30
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg
new file mode 100644 (file)
index 0000000..e500179
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3aa.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg
new file mode 100644 (file)
index 0000000..9459818
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg
new file mode 100644 (file)
index 0000000..0ad8b08
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3bb.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg
new file mode 100644 (file)
index 0000000..dc03e58
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg
new file mode 100644 (file)
index 0000000..ebf6c81
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3cc.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg
new file mode 100644 (file)
index 0000000..8253d1b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg
new file mode 100644 (file)
index 0000000..c3605a3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg
new file mode 100644 (file)
index 0000000..935dfb9
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg
new file mode 100644 (file)
index 0000000..b19ff06
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg
new file mode 100644 (file)
index 0000000..44bbf2a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg
new file mode 100644 (file)
index 0000000..5614f10
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3i.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg
new file mode 100644 (file)
index 0000000..70b681b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3j.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg b/eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg
new file mode 100644 (file)
index 0000000..f942ef2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/4_3k.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg
new file mode 100644 (file)
index 0000000..d46214c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg
new file mode 100644 (file)
index 0000000..70dc0b8
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg
new file mode 100644 (file)
index 0000000..899c0e7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg
new file mode 100644 (file)
index 0000000..aab8273
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg
new file mode 100644 (file)
index 0000000..a014803
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg
new file mode 100644 (file)
index 0000000..c40c976
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg
new file mode 100644 (file)
index 0000000..8e14294
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg
new file mode 100644 (file)
index 0000000..abe70db
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg
new file mode 100644 (file)
index 0000000..0f3f51c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1i.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg
new file mode 100644 (file)
index 0000000..af3b1a4
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1j.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg
new file mode 100644 (file)
index 0000000..c6ad480
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1k.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg
new file mode 100644 (file)
index 0000000..4cb4816
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1l.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg
new file mode 100644 (file)
index 0000000..e948b77
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1m.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg
new file mode 100644 (file)
index 0000000..0a7ff9e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1n.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg
new file mode 100644 (file)
index 0000000..5e42266
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1o.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg
new file mode 100644 (file)
index 0000000..f1b1c26
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1p.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg
new file mode 100644 (file)
index 0000000..5853a98
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1q.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg
new file mode 100644 (file)
index 0000000..271dcf1
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1r.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg
new file mode 100644 (file)
index 0000000..6d2ff33
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1s.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg
new file mode 100644 (file)
index 0000000..cf0115c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1t.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg
new file mode 100644 (file)
index 0000000..281606e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1u.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg
new file mode 100644 (file)
index 0000000..dbde57e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1v.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg
new file mode 100644 (file)
index 0000000..8d532f7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1w.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg
new file mode 100644 (file)
index 0000000..fcfedbc
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_1x.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg
new file mode 100644 (file)
index 0000000..f713569
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg
new file mode 100644 (file)
index 0000000..471f12c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_3b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg
new file mode 100644 (file)
index 0000000..5cdf07e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_3c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg
new file mode 100644 (file)
index 0000000..d47358e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg
new file mode 100644 (file)
index 0000000..6f4e1e3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg
new file mode 100644 (file)
index 0000000..6bd44a7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg
new file mode 100644 (file)
index 0000000..f70d9fd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg
new file mode 100644 (file)
index 0000000..c375fed
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg
new file mode 100644 (file)
index 0000000..532e32a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg
new file mode 100644 (file)
index 0000000..92a229d
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg
new file mode 100644 (file)
index 0000000..cc95d66
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4h.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg b/eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg
new file mode 100644 (file)
index 0000000..339be84
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/5_4i.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg
new file mode 100644 (file)
index 0000000..5c8fbf9
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg
new file mode 100644 (file)
index 0000000..299ac3a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg
new file mode 100644 (file)
index 0000000..01b3f06
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_1c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg
new file mode 100644 (file)
index 0000000..128ea44
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_1d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg
new file mode 100644 (file)
index 0000000..e106714
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg
new file mode 100644 (file)
index 0000000..e90d514
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg
new file mode 100644 (file)
index 0000000..3f4bc40
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg
new file mode 100644 (file)
index 0000000..b3b794b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg
new file mode 100644 (file)
index 0000000..910b123
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg
new file mode 100644 (file)
index 0000000..b2fa322
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_2f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg
new file mode 100644 (file)
index 0000000..533f7f1
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg
new file mode 100644 (file)
index 0000000..a109c72
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_3b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg
new file mode 100644 (file)
index 0000000..160b5ad
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_3c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg
new file mode 100644 (file)
index 0000000..a724771
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg
new file mode 100644 (file)
index 0000000..1a90326
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_4b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg
new file mode 100644 (file)
index 0000000..2ccd0be
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg
new file mode 100644 (file)
index 0000000..a827c78
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg
new file mode 100644 (file)
index 0000000..c7762cc
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg
new file mode 100644 (file)
index 0000000..ecf626f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg
new file mode 100644 (file)
index 0000000..b5d3e13
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg
new file mode 100644 (file)
index 0000000..71fe38a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg
new file mode 100644 (file)
index 0000000..af6a14a
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_5g.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg
new file mode 100644 (file)
index 0000000..9f0d8f2
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_6a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg
new file mode 100644 (file)
index 0000000..e08bf9d
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_6b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg
new file mode 100644 (file)
index 0000000..5394417
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_6c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg
new file mode 100644 (file)
index 0000000..2fe9bd3
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_6cc.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg b/eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg
new file mode 100644 (file)
index 0000000..1e19a00
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/6_6d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg
new file mode 100644 (file)
index 0000000..0e7d81b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg
new file mode 100644 (file)
index 0000000..b0b0a3e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_1b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg
new file mode 100644 (file)
index 0000000..c28f277
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg
new file mode 100644 (file)
index 0000000..c018d28
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg
new file mode 100644 (file)
index 0000000..ff674bd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg
new file mode 100644 (file)
index 0000000..bc309bd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg
new file mode 100644 (file)
index 0000000..6d7a2e0
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_5a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg
new file mode 100644 (file)
index 0000000..f69b62c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_6a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg
new file mode 100644 (file)
index 0000000..69117d7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_6b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg
new file mode 100644 (file)
index 0000000..156ee8c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_7a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg
new file mode 100644 (file)
index 0000000..b27dd0f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_7b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg
new file mode 100644 (file)
index 0000000..b440fa7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_7c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg
new file mode 100644 (file)
index 0000000..2a736e5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_8a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg
new file mode 100644 (file)
index 0000000..0cd4ddf
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_8b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg b/eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg
new file mode 100644 (file)
index 0000000..24a867c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/7_8c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg
new file mode 100644 (file)
index 0000000..cf5ae06
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_3a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg
new file mode 100644 (file)
index 0000000..04e7380
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_3b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg
new file mode 100644 (file)
index 0000000..5d8c00e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_3c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg
new file mode 100644 (file)
index 0000000..80880f4
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_4a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg
new file mode 100644 (file)
index 0000000..ed85e4f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_4b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg
new file mode 100644 (file)
index 0000000..b1d8478
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg
new file mode 100644 (file)
index 0000000..356f9e6
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg
new file mode 100644 (file)
index 0000000..d464f9d
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg
new file mode 100644 (file)
index 0000000..54a67a9
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5d.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg
new file mode 100644 (file)
index 0000000..d1bc28e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5e.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg
new file mode 100644 (file)
index 0000000..f922b57
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_5f.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg
new file mode 100644 (file)
index 0000000..cff762b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_6a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg
new file mode 100644 (file)
index 0000000..80e17f4
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_6b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg b/eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg
new file mode 100644 (file)
index 0000000..68ace43
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/8_6c.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg b/eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg
new file mode 100644 (file)
index 0000000..98b39c7
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/9_1a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg b/eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg
new file mode 100644 (file)
index 0000000..4549627
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/9_2a.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg b/eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg
new file mode 100644 (file)
index 0000000..d89dd01
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/9_2b.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg b/eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg
new file mode 100644 (file)
index 0000000..8095c09
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/blackarrow.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg b/eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg
new file mode 100644 (file)
index 0000000..89f707e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/fileicon.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg b/eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg
new file mode 100644 (file)
index 0000000..aae6c1f
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/orangewarning.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg b/eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg
new file mode 100644 (file)
index 0000000..a136e54
Binary files /dev/null and b/eu.etaxonomy.taxeditor.help/html/img/redwarning.jpg differ
diff --git a/eu.etaxonomy.taxeditor.help/html/nameparser/authorship_part.html b/eu.etaxonomy.taxeditor.help/html/nameparser/authorship_part.html
new file mode 100644 (file)
index 0000000..f8a29d8
--- /dev/null
@@ -0,0 +1,26 @@
+<h3>Authorship Part</h3>
+
+<p>The authorship part is divided into the original combination authorship and the combination authorship. 
+The earlier is put in brackets.</p>
+
+<pre>
+Example (bot.): (L.) Mill. 
+Example (zoo.): (XXX, 1830) XXX, 1845
+</pre> 
+
+<p>You can use either no authorship (only if not followed by any other part), the original combination 
+authorship, the combination authorship or both.</p>
+
+<p>The parser differentiates botanical and zoological authorship. The later has a year following the 
+author, separated by a comma. Botanical names only have authors. 
+Authorship may include single persons and teams. Team members are separated by <code>&amp;</code> . A placeholder <code>al.</code> 
+may be used for further team members. Both authorships may include ex-authors separated by <code>ex</code> or <code>ex.</code> 
+Some valid author strings are:</p> 
+<pre>
+Example (bot.): (Greuther & L'Hiver & al. ex Müller & Schmidt) Clark ex Ciardelli 
+Example (zoo.):
+</pre>
+
+<p>The number of allowed special characters like <code>'</code> or <code>-</code> at the moment is beyond the scope of this 
+documentation and will change in the future.</p>
+
diff --git a/eu.etaxonomy.taxeditor.help/html/nameparser/name_part.html b/eu.etaxonomy.taxeditor.help/html/nameparser/name_part.html
new file mode 100644 (file)
index 0000000..4fc3b1d
--- /dev/null
@@ -0,0 +1,69 @@
+<h3>Name Part</h3>
+
+<p>The name part recognizes uninomials, binomials and trinomials. The first epithet must start 
+with a capital letter; all other words (except for infrageneric epitheta) can only contain 
+lower-case letters. Only latin letters are allowed in names (except for <strong>ï</strong>).
+The name part parser differentiates 6 different syntaxes.</p>
+
+<h4>Uninomials</h4>
+<p>One word starting with a capital letter. As the rank is usually ambiguous for uninomials, 
+the rank represents the parser's best guess and a warning is returned to check the rank.</p>
+<pre>Example: Cichorieae</pre>
+
+
+<h4>Infrageneric Names</h4>
+<p>Capital word followed by the infrageneric marker followed by the infrageneric epitheton. 
+Valid markers are: 
+       <ul>
+               <li><code>subgen.</code></li>
+               <li><code>subg.</code></li>
+               <li><code>sect.</code></li>
+               <li><code>subsect.</code></li>
+               <li><code>ser.</code></li>
+               <li><code>subser.</code></li>
+               <li><code>t.infgen.</code></li>
+       </ul>
+</p>
+<pre>Example: Desmometopa subg. LitoXXX</pre>
+
+
+<h4>Species Aggregates</h4>
+<p>Species aggregates are recognized similarly to species except they are followed by a group 
+marker. Valid markers are: 
+       <ul>
+               <li><code>aggr.</code></li>
+               <li><code>agg.</code></li>
+               <li><code>group</code></li>
+       </ul>
+</p>
+<pre>Example: XXX</pre>
+
+
+<h4>Species</h4>
+<p>Species names have a genus part (capital letter) and a species part (lower case letter).</p>
+<pre>Examples are: Abies alba</pre>
+
+<h4>Infraspecific names</h4>
+<p>Infraspecific names have four parts: the genus part, the species part, the infraspecific 
+marker and the infraspecific part. All but the first may not start with a capital letter. 
+Recognized markers are: 
+       <ul>
+               <li><code>subsp.</code></li> 
+               <li><code>convar.</code></li>
+               <li><code>var.</code></li>
+               <li><code>subvar.</code></li>
+               <li><code>f.</code></li>
+               <li><code>subf.</code></li>
+               <li><code>f.spec.</code></li>
+               <li><code>tax.infrasp.</code></li> 
+               <li><code>tax. infrasp.</code></li>
+       </ul>
+
+</p>
+<pre>Example:</pre>
+
+<h4>Infraspecific names (old markers)</h4>
+<p>Some older names (not valid according to the nomenclatural code) use other infraspecific 
+markers. The recognition of these older names is not yet implemented.</p>
+
+
diff --git a/eu.etaxonomy.taxeditor.help/html/nameparser/nomenclatural_status_part.html b/eu.etaxonomy.taxeditor.help/html/nameparser/nomenclatural_status_part.html
new file mode 100644 (file)
index 0000000..e3c5fb1
--- /dev/null
@@ -0,0 +1,20 @@
+<h3>Nomenclatural Status</h3>
+
+<p>The nomeclatural status is separated from the preceding text by a comma. Current valid values for a status:</p> 
+
+<ul>
+       <li><code>nom. superfl.</code></li>
+       <li><code>nom. nud.</code></li> 
+       <li><code>nom. illeg.</code></li> 
+       <li><code>nom. inval.</code></li> 
+       <li><code>nom. cons.</code></li> 
+       <li><code>nom. alternativ.</code></li> 
+       <li><code>nom. subnud.</code></li> 
+       <li><code>nom. rej.</code></li>
+       <li><code>nom. rej.</code></li> 
+       <li><code>nom. prop.</code></li> 
+       <li><code>nom. provis.</code></li> 
+       <li><code>orth. var.</code></li>
+</ul>  
+
+<p>Multiple values separated by comma are possible.</p>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/nameparser/overview.html b/eu.etaxonomy.taxeditor.help/html/nameparser/overview.html
new file mode 100644 (file)
index 0000000..ba52dd4
--- /dev/null
@@ -0,0 +1,51 @@
+<h2>Name Parser Documentation</h2>
+
+
+<p>The taxonomic name parser analyzes a free text taxonomic reference for the following four components:</p>
+
+<ul>
+       <li><a href="name_part.html">Name Part</a></li>
+       <li><a href="authorship_part.html">Authorship Part</a></li>
+       <li><a href="reference_part.html">Reference Part</a></li>
+       <li><a href="nomenclatural_status_part.html">Nomenclatural Status</a></li>
+</ul>
+
+<p>Not all of them are required.</p>
+
+<p>The four parts are separated by the following separators:</p>
+
+<table border="1">
+       <thead>
+               <tr>
+                       <td>part</td>
+                       <td>separator</td>
+                       <td>example</td>
+               </tr>
+       </thead>
+       <tbody>
+               <tr>
+                       <td>authorship</td>
+                       <td>any whitespace</td>
+                       <td><code>Abies alba_L.</code></td>
+               </tr>
+               <tr>
+                       <td>reference</td>
+                       <td>commata with following whitespace OR whitespace+'in'+whitespace</td>
+                       <td><code>Abies alba L.,_Sp. Pl... or Pinus alba_in_Bull. Soc....</code></td>
+               </tr>
+               <tr>
+                       <td>nom. status</td>
+                       <td>commata with following whitespace</td>
+                       <td><code>in Bull. Bot. 3: 99. 1987., nom illeg.</code></td>
+               </tr>
+       </tbody>
+</table>
+
+<p>Some valid name texts fully recognized by the parser are:</p>
+
+<pre>
+Abies alba (L.) Mill., Sp. Pl.: 105. 1846., nom illeg. 
+Abies alba (L.) Mill. in Bull. Bot. 3: 99. 1987., nom illeg.
+</pre> 
+
+<p>The name part is required. The authorship part is required only if followed by the reference part. The reference part as well as the status part are not required. In the following sections, the four parts are described in detail:</p>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/nameparser/reference_part.html b/eu.etaxonomy.taxeditor.help/html/nameparser/reference_part.html
new file mode 100644 (file)
index 0000000..bc9ac8c
--- /dev/null
@@ -0,0 +1,50 @@
+<h3>Reference Part</h3>
+
+<p>The reference part follows the syntax: <code>{separator}{authorship{,}}{titleEditionVolume}{:}{detail}{.}{year}</code></p>
+
+<p>Zoological new combinations should not have a reference part, since in zoology, it is not common 
+to mention the new combination reference.</p>
+
+<h4>Separator</h4>
+
+<p>The separator between the reference part and the preceding authorship may be a comma , or 
+an <pre> in </pre> (surrounded by whitespaces). The comma indicates a book whereas the <code>in</code> stands either 
+for a journal article or a book section. If the <code>in</code> is not followed by a comma, the parser 
+interprets the reference as an article; otherwise, as a book section. Reference type parsing 
+should be improved in future.</p>
+
+<h4>Reference Authorship</h4>
+
+<p>An author is only available for book sections. Articles and book sections are differentiated 
+from each other by comparing the first four words that follow the separator. If these words 
+include a comma and the words before the comma are likely to represent an author, the reference 
+is recognized as a book section. Otherwise, it will be treated as an article. In both cases, 
+a warning is thrown that differentiation is not possible.</p>
+
+<h4>TitleEditionVolume</h4>
+
+<p>The TitleEditionVolume part includes the title itself as well as optional edition part 
+and volume parts. The title itself allows most character combinations but care must be taken 
+if a <code>:</code> is included as this is the separator for the subsequent detail part. Special characters 
+like <code>&amp;</code> and <code>-</code> are only allowed if preceded and followed immediately by ordinary characters. 
+Ordinary brackets are allowed. Edition and volume are separated by whitespace if only one 
+of them exists. If both exist the later is separated by a comma. Both are optional, so all 
+four of the following formats are valid:</p>
+
+<pre>
+Sp. Pl.
+Sp. Pl. ed. 3
+Sp. Pl. ed. 3, 4
+Sp. Pl. 4
+</pre>
+
+<p>As can be seen, the edition is recognized by a preceding <code>ed.</code>, whereas the volume is just 
+a number (or a number followed by another number in brackets - e.g. <code>4(5)</code> ).</p>
+
+<p>The detail part is separated by a column <code>:</code> from the preceding titleEditonVolume part and 
+is separated from the year by <code>.</code> (botanical names only). A number of typical detail information 
+is recognized as either pure page numbers (<code>345</code>) or ranges (<code>345-348</code>). Page numbers may be 
+preceded by <code>p.</code>(e.g. <code>p. 345</code>) or <code>pp.</code>(e.g. <code>pp. 345-348</code>). Abbreviations indicating special parts of a 
+reference such as <code>fig.</code> or <code>tab.</code> are recognized as well. Roman numbers are not detected 
+at the moment.</p>
+
diff --git a/eu.etaxonomy.taxeditor.help/html/reference/maintopic.html b/eu.etaxonomy.taxeditor.help/html/reference/maintopic.html
deleted file mode 100644 (file)
index a476078..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/reference/subtopic.html b/eu.etaxonomy.taxeditor.help/html/reference/subtopic.html
deleted file mode 100644 (file)
index 8a61c50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/reference/subtopic2.html b/eu.etaxonomy.taxeditor.help/html/reference/subtopic2.html
deleted file mode 100644 (file)
index 86bcbf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/samples/maintopic.html b/eu.etaxonomy.taxeditor.help/html/samples/maintopic.html
deleted file mode 100644 (file)
index a476078..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/samples/subtopic.html b/eu.etaxonomy.taxeditor.help/html/samples/subtopic.html
deleted file mode 100644 (file)
index 8a61c50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/samples/subtopic2.html b/eu.etaxonomy.taxeditor.help/html/samples/subtopic2.html
deleted file mode 100644 (file)
index 86bcbf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/tasks/maintopic.html b/eu.etaxonomy.taxeditor.help/html/tasks/maintopic.html
deleted file mode 100644 (file)
index a476078..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Main Topic</title>
-</head>
-
-<body>
-<h1>Main Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/tasks/subtopic.html b/eu.etaxonomy.taxeditor.help/html/tasks/subtopic.html
deleted file mode 100644 (file)
index 8a61c50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Sub Topic</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/tasks/subtopic2.html b/eu.etaxonomy.taxeditor.help/html/tasks/subtopic2.html
deleted file mode 100644 (file)
index 86bcbf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Sub Topic 2</title>
-</head>
-
-<body>
-<h1>Sub Topic 2</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/html/toc.html b/eu.etaxonomy.taxeditor.help/html/toc.html
deleted file mode 100644 (file)
index 326f0a9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-Please enter your text here.
-</body>
-</html>
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.help/p2.inf b/eu.etaxonomy.taxeditor.help/p2.inf
new file mode 100644 (file)
index 0000000..cdeccf8
--- /dev/null
@@ -0,0 +1,3 @@
+instructions.configure=\
+       addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+       addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
index 027ed0feeea328256ca7f9b66a7eac31e85d73e6..db9b794efc51bb1c780051963702c4640dc6474d 100644 (file)
@@ -9,7 +9,12 @@
             primary="true">
       </toc>
       <toc
-            file="tocgettingstarted.xml">
+            file="tocgettingstarted.xml"
+            primary="false">
+      </toc>
+      <toc
+            file="tocnameparser.xml"
+            primary="false">
       </toc>
    </extension>
 
index 765dfbd98989be588f7a6fbb51c40091154d9bbf..dd947da4c8175ee64fe5f3c671ece42d58ff4d72 100644 (file)
@@ -4,7 +4,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 011941785d1e2936964456bda71f0a954c0ba5c6..92e4369ca1d4875bfe60f550bc7c568a623093bc 100644 (file)
@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?NLS TYPE="org.eclipse.help.toc"?>
 
-<toc label="EDIT Taxonomic Editor" topic="html/toc.html">
+<toc label="EDIT Taxonomic Editor">
    <topic label="Getting Started">
       <anchor id="gettingstarted"/>
    </topic>
+   <topic label="Name Parser">
+      <anchor id="nameparser"/>
+   </topic>
 </toc>
diff --git a/eu.etaxonomy.taxeditor.help/tocnameparser.xml b/eu.etaxonomy.taxeditor.help/tocnameparser.xml
new file mode 100644 (file)
index 0000000..b249a5a
--- /dev/null
@@ -0,0 +1,12 @@
+<toc label="Name Parser" link_to="toc.xml#nameparser">
+   <topic href="html/nameparser/overview.html" label="Overview">
+   </topic>
+   <topic href="html/nameparser/name_part.html" label="Name Part">
+   </topic>
+   <topic href="html/nameparser/authorship_part.html" label="Authorship Part">
+   </topic>
+   <topic href="html/nameparser/reference_part.html" label="Reference Part">
+   </topic>
+   <topic href="html/nameparser/nomenclatural_status_part.html" label="Nomenclatural Status Part">
+   </topic> 
+</toc>
index 38f8b6fcf8d7e521edab8b12d428ddc7779bacb1..740c1909c5693aeae2f111e3da4eac91a9872f61 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Navigation Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
diff --git a/eu.etaxonomy.taxeditor.navigation/p2.inf b/eu.etaxonomy.taxeditor.navigation/p2.inf
new file mode 100644 (file)
index 0000000..cdeccf8
--- /dev/null
@@ -0,0 +1,3 @@
+instructions.configure=\
+       addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+       addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
index 4edd45aaf1f0dd73dbb481164816f100d768fcd8..c5859503cbc8ff2c6c7f737a8fe3fedda71e5d23 100644 (file)
                label="Refresh"
                style="push">
          </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.navigation.command.copyTaxonName"
+               label="Copy"
+               style="push">
+         </command>
       </menuContribution>
       <menuContribution
             locationURI="toolbar:org.eclipse.ui.main.toolbar">
             id="org.eclipse.ui.file.refresh"
             name="Refresh">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.CopyHandler"
+            id="eu.etaxonomy.taxeditor.navigation.command.copyTaxonName"
+            name="Copy">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
       <definition
             id="isTaxonNode">
          <with
-               variable="activeMenuSelection">
+               variable="selection">
             <iterate>
                <instanceof
                      value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
       <definition
             id="isTaxonomicTree">
          <with
-               variable="activeMenuSelection">
+               variable="selection">
             <iterate>
                <instanceof
                      value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
       <definition
             id="isSynonymNode">
          <with
-               variable="activeMenuSelection">
+               variable="selection">
             <iterate>
                <instanceof
                      value="eu.etaxonomy.cdm.model.taxon.Synonym">
index fee80f1b0c11d797db59208ae9d74572e48aac84..aa33ad597c86ff3e31b4c9f84a87102c16632bf7 100644 (file)
@@ -4,7 +4,7 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 5a76457d792e5541d54782cc2a43a5fc849c2e9e..5925be91e873ab2ed6bc4acddf15898b199cac96 100644 (file)
@@ -317,7 +317,7 @@ public class NavigationUtil extends AbstractUtility{
         *
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId(){
+       public static String getPluginId(){
                return TaxeditorNavigationPlugin.PLUGIN_ID;
        }
 
index 342819f2358c9012a5838511537fdaa3dece1e6c..db7b16441167f8ab01ce4c1482aa2441485e9048 100644 (file)
@@ -43,7 +43,7 @@ import eu.etaxonomy.taxeditor.model.IContextListener;
 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
  * @author n.hoffmann
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CopyHandler.java
new file mode 100644 (file)
index 0000000..aaf3e6d
--- /dev/null
@@ -0,0 +1,77 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.navigation.navigator.handler;\r
+\r
+import java.util.Iterator;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.taxon.Taxon;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.navigation.NavigationUtil;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;\r
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.CopyOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 23 Jan 2012\r
+ *\r
+ */\r
+public class CopyHandler extends AbstractHandler implements IHandler {\r
+       \r
+       private TaxonNavigator taxonNavigator;\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               \r
+               taxonNavigator = NavigationUtil.showNavigator();\r
+               \r
+               IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+                               .getCurrentSelection(event);\r
+\r
+               if(selection.size() == 1) {\r
+                       \r
+                       Object selectedObject = selection.getFirstElement();\r
+                       \r
+                       if (selectedObject instanceof TaxonNode) {\r
+                               \r
+                               try {\r
+                                       \r
+                                       AbstractPostOperation operation = new CopyOperation(event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+                                       (TaxonNode)selectedObject, taxonNavigator);\r
+                                       \r
+                                       IStatus status = NavigationUtil.executeOperation(operation);\r
+                                       \r
+                               } catch (NotDefinedException e) {\r
+                                       NavigationUtil.warn(getClass(), "Command name not set");\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               \r
+               return null;\r
+       }\r
+\r
+}\r
index 2fcb4d7ec8e12ecb10bfd3cee9fdbe8a6d02b15f..a7c8a2b0dd1a0244185c31ec7a2c24d1c37be597 100644 (file)
@@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
 import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
 
 /**
  * <p>MoveTaxonHandler class.</p>
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java
new file mode 100644 (file)
index 0000000..a514c8c
--- /dev/null
@@ -0,0 +1,84 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.navigation.navigator.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.swt.dnd.Clipboard;\r
+import org.eclipse.swt.dnd.TextTransfer;\r
+import org.eclipse.swt.dnd.Transfer;\r
+\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 23 Jan 2012\r
+ *\r
+ */\r
+public class CopyOperation extends AbstractPostOperation {\r
+\r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        * @param taxon\r
+        * @param postOperationEnabled\r
+        */\r
+       public CopyOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, \r
+                       IPostOperationEnabled postOperationEnabled) {\r
+               super(label, undoContext, taxonNode, postOperationEnabled);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               String name = taxonNode.getTaxon().getName().getTitleCache();\r
+               \r
+           final Clipboard cb = new Clipboard(null);\r
+           TextTransfer textTransfer = TextTransfer.getInstance();\r
+           Transfer[] transfers = new Transfer[]{textTransfer};\r
+           \r
+           cb.setContents(new Object[]{name}, transfers);\r
+           \r
+               return postExecute(taxonNode);  \r
+               //return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
index 324dc2b1949ece2116ef46e048dd5f273c3f4f81..3e55623bbe0e514152e05e21c24845eec2c4f7ec 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Printpublisher Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.printpublisher;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib,
index 43cb29eda2afebb6dcaa675da2fd723ea55671c0..5589fdf944c710f9aece4c51cdced1f4baf7770c 100644 (file)
@@ -1,4 +1,5 @@
 source.. = src/main/java/
 bin.includes = META-INF/,\
                .,\
-               plugin.xml
+               plugin.xml,\
+               p2.inf
diff --git a/eu.etaxonomy.taxeditor.printpublisher/p2.inf b/eu.etaxonomy.taxeditor.printpublisher/p2.inf
new file mode 100644 (file)
index 0000000..cdeccf8
--- /dev/null
@@ -0,0 +1,3 @@
+instructions.configure=\
+       addRepository(type:0,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);\
+       addRepository(type:1,location:http${#58}//wp5.e-taxonomy.eu/taxeditor/update);
\ No newline at end of file
index 7f57480d719fcd31496be93f427e55178e64fd3a..633947cfcfa74c105c0966d56ffa5d7b65e8a8b5 100644 (file)
@@ -4,7 +4,7 @@
        <parent>
                <artifactId>taxeditor-parent</artifactId>
                <groupId>eu.etaxonomy</groupId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
index 237488355bb01d412c57c2203e58dbcd55064341..f8efcac309b19b35c4659f78caf81e4fd1cb6f1f 100644 (file)
@@ -2,13 +2,15 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: DataStore Bundle
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 3.0.6.qualifier
+Bundle-Version: 3.0.12.qualifier
 Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
 Bundle-Vendor: EDIT
 Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.cdm.database,
  eu.etaxonomy.taxeditor.datasource,
  eu.etaxonomy.taxeditor.datasource.wizard,
+ eu.etaxonomy.taxeditor.editor,
+ eu.etaxonomy.taxeditor.editor.definedterm,
  eu.etaxonomy.taxeditor.featuretree,
  eu.etaxonomy.taxeditor.handler,
  eu.etaxonomy.taxeditor.io,
@@ -26,9 +28,10 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.store.internal,
  eu.etaxonomy.taxeditor.store.operations,
  eu.etaxonomy.taxeditor.ui.bar,
- eu.etaxonomy.taxeditor.ui.dialogs,
- eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection,
- eu.etaxonomy.taxeditor.ui.forms,
+ eu.etaxonomy.taxeditor.ui.combo,
+ eu.etaxonomy.taxeditor.ui.dialog,
+ eu.etaxonomy.taxeditor.ui.dialog.selection,
+ eu.etaxonomy.taxeditor.ui.element,
  eu.etaxonomy.taxeditor.ui.section,
  eu.etaxonomy.taxeditor.ui.section.agent,
  eu.etaxonomy.taxeditor.ui.section.classification,
@@ -40,7 +43,6 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.ui.section.supplemental,
  eu.etaxonomy.taxeditor.ui.section.taxon,
  eu.etaxonomy.taxeditor.ui.selection,
- eu.etaxonomy.taxeditor.ui.term,
  eu.etaxonomy.taxeditor.view,
  eu.etaxonomy.taxeditor.view.datasource,
  eu.etaxonomy.taxeditor.view.datasource.handler,
@@ -49,8 +51,7 @@ Export-Package: eu.etaxonomy.cdm,
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  org.eclipse.jface.text,
- org.eclipse.pde.runtime,
- org.eclipse.ui.forms;bundle-version="3.5.0",
+ org.eclipse.ui.forms,
  eu.etaxonomy.taxeditor.cdmlib
 Import-Package: org.eclipse.core.commands,
  org.eclipse.core.commands.operations,
diff --git a/eu.etaxonomy.taxeditor.store/icons/leaf_detail.png b/eu.etaxonomy.taxeditor.store/icons/leaf_detail.png
new file mode 100644 (file)
index 0000000..217c601
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/leaf_detail.png differ
index c072a61a651282c96b432d6a23996a8f66da0514..c9cc810b911be2924812c8e4ec0639c0df5da371 100644 (file)
             id="eu.etaxonomy.taxeditor.preferences.mobotOpenUrl"
             name="Mobot Open Url">
       </page>
+      <page
+            category="eu.etaxonomy.taxeditor.preferences.general"
+            class="eu.etaxonomy.taxeditor.preference.TypeDesignationPreferences"
+            id="eu.etaxonomy.taxeditor.preferences.typeDesignation"
+            name="Type Designations">
+      </page>
    </extension>
    <extension
          point="org.eclipse.ui.views">
         name="Details"
         restorable="true">
   </view>
+  <view
+        class="eu.etaxonomy.taxeditor.view.userecords.UseRecordsViewPart"
+        icon="icons/leaf_detail.png"
+        id="eu.etaxonomy.taxeditor.view.userecords"
+        name="Use Records"
+        restorable="true">
+  </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor"
+            default="false"
+            id="eu.etaxonomy.taxeditor.editor.definedTerm"
+            name="Defined Term Editor">
+      </editor>
    </extension>
    <extension
          point="org.eclipse.ui.menus">
                </visibleWhen>
             </command>
          </menu>
+         <menu
+               id="eu.etaxonomy.taxeditor.store.definedTermEditorMenu"
+               label="Term Editor">
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Named Area"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.location.NamedArea">
+               </parameter>
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Named Area Level"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.location.NamedAreaLevel">
+               </parameter>
+            </command>
+            <separator
+                  name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator2"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Extension Type"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.common.ExtensionType">
+               </parameter>
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Marker Type"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.common.MarkerType">
+               </parameter>
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="State"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.description.State">
+               </parameter>
+            </command>
+            <separator
+                  name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator3"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Feature"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.description.Feature">
+               </parameter>
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+                  label="Modifier"
+                  style="push">
+               <parameter
+                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+                     value="eu.etaxonomy.cdm.model.description.Modifier">
+               </parameter>
+            </command>
+         </menu>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
             </control>
          </toolbar>
       </menuContribution>
+      <menuContribution
+            locationURI="popup:eu.etaxonomy.taxeditor.editor.definedTerm">
+         <menu
+               label="New">
+            <command
+                  commandId="eu.etaxonomy.taxeditor.editor.definedTerms.newTermVocabulary"
+                  label="Vocabulary"
+                  style="push">
+            </command>
+            <command
+                  commandId="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
+                  label="Defined Term"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <reference
+                        definitionId="isModifiable">
+                  </reference>
+               </visibleWhen>
+            </command>
+         </menu>
+         <command
+               commandId="org.eclipse.ui.edit.delete"
+               label="Delete"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isModifiable">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
    </extension>
    <extension
          name="Window Menu Commands"
          point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
+            id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+            name="Open Defined Term Editor">
+         <commandParameter
+               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
+               name="inputType"
+               optional="true">
+         </commandParameter>
+      </command>
+   </extension>
+   <extension
+         name="File Menu Commands"
+         point="org.eclipse.ui.commands">
       <command
             defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
             id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.editor.definedterm.handler.DeleteTermBaseHandler"
+            commandId="org.eclipse.ui.edit.delete">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="eu.etaxonomy.taxeditor.editor.definedTerm">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
    </extension>
    <extension
          name="Popup Menu Commands"
             name="Update Datasource">
       </command>
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateDefinedTermHandler"
+            id="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
+            name="New Defined Term">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateTermVocabularyHandler"
+            id="eu.etaxonomy.taxeditor.editor.definedTerms.newTermVocabulary"
+            name="New Term Vocabulary">
+      </command>
+   </extension>
    <extension
          point="org.eclipse.ui.importWizards">
       <category
          properties="isShowExperimentalFeatures"
          type="org.eclipse.jface.viewers.IStructuredSelection">
    </propertyTester>
+   <propertyTester
+         class="eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester"
+         id="eu.etaxonomy.taxeditor.store.termEditor.propertyTester"
+         namespace="eu.etaxonomy.taxeditor.store.termEditor.propertyTester"
+         properties="isModifiable"
+         type="org.eclipse.jface.viewers.IStructuredSelection">
+   </propertyTester>
 </extension>
 <extension
       point="org.eclipse.core.expressions.definitions">
    <definition
          id="isCompatible">
       <with
-            variable="activeMenuSelection">
+            variable="selection">
          <test
                property="eu.etaxonomy.taxeditor.datasource.propertyTester.isCompatible">
          </test>
    <definition
          id="isShowExperimentalFeatures">
       <with
-            variable="activeMenuSelection">
+            variable="selection">
          <test
                property="eu.etaxonomy.taxeditor.preferences.propertyTester.isShowExperimentalFeatures">
          </test>
       </with>
    </definition>
+   <definition
+         id="isModifiable">
+      <with
+            variable="selection">
+         <test
+               property="eu.etaxonomy.taxeditor.store.termEditor.propertyTester.isModifiable">
+         </test>
+      </with>
+   </definition>
 </extension>
        
 </plugin>
index 8aeee3bbac83fb98814ecde28dde170b60315536..40ddc832be3394f88a812ab12f4cb3279ac9033a 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
        <groupId>eu.etaxonomy</groupId>
        <artifactId>taxeditor-parent</artifactId>
-       <version>3.0.6-SNAPSHOT</version>
+       <version>3.0.12-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/UsageTermCollection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/UsageTermCollection.java
new file mode 100644 (file)
index 0000000..de2ced2
--- /dev/null
@@ -0,0 +1,61 @@
+/**\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
+package eu.etaxonomy.taxeditor.editor;\r
+\r
+import java.util.UUID;\r
+\r
+public class UsageTermCollection {\r
+       public final static UUID uuidMarkersVocabulary = UUID.fromString("19dffff7-e142-429c-a420-5d28e4ebe305");\r
+       \r
+       public final static UUID uuidUseMarkerType = UUID.fromString("2e6e42d9-e92a-41f4-899b-03c0ac64f039");\r
+       public final static String useMakerLabel = "use";\r
+       \r
+       public final static UUID uuidFeatureVocabulary = UUID.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8");\r
+       public final static UUID uuidPalmWebFeatureTree = UUID.fromString("72ccce05-7cc8-4dab-8e47-bf3f5fd848a0");\r
+       \r
+       \r
+       public final static UUID uuidUseRecordFeature = UUID.fromString("8125a59d-b4d5-4485-89ea-67306297b599");\r
+       public final static String useRecordFeatureLabel = "Use Record";\r
+       \r
+       public final static UUID uuidUseSummaryFeature = UUID.fromString("6acb0348-c070-4512-a37c-67bcac016279");\r
+       public final static String useSummaryFeatureLabel = "Use";\r
+       \r
+       public final static UUID uuidUseCategoryVocabulary = UUID.fromString("67430d7c-fd43-4e9d-af5e-d0dca3f74931");\r
+       public final static String useCategoryVocabularyLabel = "Use Category";\r
+       public final static String useSubCategoryVocabularyLabel = "Use SubCategory";\r
+       public final static UUID uuidUseCategoryDummy = UUID.fromString("983a7184-6a51-489e-aca1-f21fc4fdbae3");\r
+       public final static UUID uuidUseSubCategoryDummy = UUID.fromString("a8d80223-5c79-4063-8c6b-4dc8681e9c62");\r
+       \r
+       public final static UUID uuidCountryVocabulary = UUID.fromString("116c51f1-e63a-46f7-a258-e1149a42868b");\r
+       public final static String countryLabel = "Country";\r
+       public final static UUID uuidCountryDummy = UUID.fromString("761dddee-bfa2-41f4-82df-3a19c71adee0");\r
+       \r
+       public final static UUID uuidPlantPartVocabulary = UUID.fromString("369914fe-d54b-4063-99ce-abc81d30ad35");\r
+       public final static String plantPartLabel = "Plant Part";\r
+       public final static UUID uuidPlantPartDummy = UUID.fromString("30150a82-a12f-4278-96ad-7ce708efa082");\r
+       \r
+       public final static UUID uuidHumanGroupVocabulary = UUID.fromString("ca46cea5-bdf7-438d-9cd8-e2793d2178dc");\r
+       public final static String humanGroupLabel = "Human Group";\r
+       public final static UUID uuidHumanGroupDummy = UUID.fromString("c4b63327-2548-429d-8d55-81fdba5900a5");\r
+       public final static UUID uuidEthnicGroupDummy = UUID.fromString("3ca851e5-d0d4-41cd-9066-f79e246c36c2");\r
+       \r
+       public final static String ethnicGroupLabel = "Ethnic Group";\r
+       \r
+       public final static String notAvailableLabel = "N/A";\r
+       \r
+       \r
+       \r
+       \r
+       \r
+       \r
+\r
+\r
+       \r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDragListener.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDragListener.java
new file mode 100644 (file)
index 0000000..42ead93
--- /dev/null
@@ -0,0 +1,77 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.jface.viewers.Viewer;\r
+import org.eclipse.swt.dnd.DragSourceAdapter;\r
+import org.eclipse.swt.dnd.DragSourceEvent;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDragListener extends DragSourceAdapter {\r
+       \r
+       private Viewer viewer;\r
+\r
+       /**\r
+        * \r
+        */\r
+       public DefinedTermDragListener(Viewer viewer) {\r
+               this.viewer = viewer;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)\r
+        */\r
+       @Override\r
+       public void dragStart(DragSourceEvent event) {\r
+               \r
+               event.doit = true;// set to false if needed - default is true\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)\r
+        */\r
+       @Override\r
+       public void dragFinished(DragSourceEvent event) {\r
+               // TODO Auto-generated method stub\r
+               super.dragFinished(event);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.swt.dnd.DragSourceAdapter#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)\r
+        */\r
+       @Override\r
+       public void dragSetData(DragSourceEvent event) {\r
+               \r
+               IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();\r
+               List<DefinedTermBase> definedTerms = new ArrayList<DefinedTermBase>();\r
+               \r
+               for (Object object : selection.toList()){\r
+                               definedTerms.add((DefinedTermBase)object);\r
+                       }\r
+                       \r
+               if (TermTransfer.getInstance().isSupportedType(\r
+                               event.dataType)) {\r
+                       event.data = definedTerms.toArray(new DefinedTermBase[definedTerms.size()]);\r
+               }\r
+       }\r
+       \r
+       \r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermDropAdapter.java
new file mode 100644 (file)
index 0000000..8744410
--- /dev/null
@@ -0,0 +1,77 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+\r
+import org.eclipse.jface.viewers.ViewerDropAdapter;\r
+import org.eclipse.swt.dnd.TransferData;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.MoveDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDropAdapter extends ViewerDropAdapter {\r
+\r
+       private DefinedTermEditor editor;\r
+       /**\r
+        * @param viewer\r
+        */\r
+       protected DefinedTermDropAdapter(DefinedTermEditor editor) {\r
+               super(editor.getViewer());\r
+               this.editor = editor;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)\r
+        */\r
+       @Override\r
+       public boolean performDrop(Object data) {\r
+               \r
+               TermBase target = (TermBase) getCurrentTarget();//can be vocab\r
+               //DefinedTermBase[] droppedElements = (DefinedTermBase[]) data;\r
+               Object[] droppedTerms = (Object[]) data;\r
+               Collection<DefinedTermBase> sourceTerms = new ArrayList<DefinedTermBase>(); //Arrays.asList(droppedElements)\r
+               \r
+               for (Object droppedTerm : droppedTerms) {\r
+                       \r
+                       DefinedTermBase term = (DefinedTermBase) droppedTerm;\r
+                       sourceTerms.add(term);\r
+                       \r
+               }\r
+               \r
+               AbstractPostOperation operation = new MoveDefinedTermOperation("Move Descriptions", StoreUtil.getUndoContext(), target, sourceTerms, editor);\r
+               //TODO: implement execute\r
+               StoreUtil.executeOperation(operation);\r
+               \r
+               return true;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)\r
+        */\r
+       @Override\r
+       public boolean validateDrop(Object target, int operation,\r
+                       TransferData transferType) {\r
+               boolean transferDataIsSupported = TermTransfer.getInstance().isSupportedType(transferType);\r
+               System.out.println(target);\r
+               // maybe don't need this - they will be all TermBase anyway\r
+               return target instanceof TermBase && transferDataIsSupported; \r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java
new file mode 100644 (file)
index 0000000..31a3165
--- /dev/null
@@ -0,0 +1,270 @@
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.HashSet;\r
+import java.util.List;\r
+import java.util.Set;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.jface.action.GroupMarker;\r
+import org.eclipse.jface.action.MenuManager;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.StructuredSelection;\r
+import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.jface.viewers.ViewerSorter;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.dnd.DND;\r
+import org.eclipse.swt.dnd.Transfer;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Menu;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IEditorSite;\r
+import org.eclipse.ui.ISelectionListener;\r
+import org.eclipse.ui.ISelectionService;\r
+import org.eclipse.ui.IWorkbenchActionConstants;\r
+import org.eclipse.ui.IWorkbenchPart;\r
+import org.eclipse.ui.PartInitException;\r
+import org.eclipse.ui.part.EditorPart;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput;\r
+import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermEditor extends EditorPart implements IConversationEnabled, ISelectionListener, IDirtyMarkableSelectionProvider, IPostOperationEnabled {\r
+\r
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.definedTerm";\r
+\r
+       public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.store.openDefinedTermEditor";\r
+       \r
+       protected TreeViewer viewer;\r
+       protected ConversationHolder conversation;\r
+       private ISelectionService selectionService;\r
+       private boolean dirty;\r
+       Set<TermVocabulary<? extends DefinedTermBase>> inMemoryVocabularies = new HashSet<TermVocabulary<? extends DefinedTermBase>>();\r
+\r
+       private int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;\r
+       /**\r
+        * \r
+        */\r
+       public DefinedTermEditor() {\r
+               super();\r
+               conversation = CdmStore.createConversation();\r
+       }\r
+\r
+       @Override\r
+       public void createPartControl(Composite parent) {\r
+                       \r
+       //              parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));\r
+                       \r
+                       FillLayout layout = new FillLayout();\r
+                       layout.marginHeight = 0;\r
+                       layout.marginWidth = 0;\r
+                       layout.type = SWT.VERTICAL;\r
+                       \r
+                       parent.setLayout(layout);\r
+                       viewer = new TreeViewer(parent);\r
+                       viewer.getControl().setLayoutData(LayoutConstants.FILL());\r
+                       viewer.setContentProvider(new TermContentProvider());\r
+                       viewer.setLabelProvider(new TermLabelProvider());\r
+                       viewer.setSorter(new ViewerSorter());\r
+                       \r
+                       Transfer[] transfers = new Transfer[] { TermTransfer.getInstance() };\r
+                       viewer.addDragSupport(dndOperations, transfers, new DefinedTermDragListener(viewer));\r
+                       viewer.addDropSupport(dndOperations, transfers, new DefinedTermDropAdapter(this));\r
+\r
+                                       \r
+                       initialiseVocabularies();               \r
+                       viewer.setInput(inMemoryVocabularies);\r
+                                               \r
+                       getSite().setSelectionProvider(viewer);\r
+                       \r
+                       selectionService = getSite().getWorkbenchWindow().getSelectionService();\r
+                       selectionService.addSelectionListener(this);\r
+       \r
+                       setPartName(getEditorInput().getName());\r
+                       createMenu();\r
+               }\r
+       \r
+       \r
+       protected void initialiseVocabularies() {\r
+               inMemoryVocabularies.clear();\r
+               //List<TermVocabulary> vocabularies = CdmStore.getService(IVocabularyService.class).list(null, null, null, null, null);\r
+\r
+//             for (TermVocabulary vocabulary : vocabularies){\r
+//                     if(vocabulary.getTerms().isEmpty()){\r
+//                             inMemoryVocabularies.add(vocabulary);\r
+//                     }\r
+//             }\r
+\r
+               \r
+               List<TermVocabulary<? extends DefinedTermBase>> termVocabularies = CdmStore.getService(IVocabularyService.class).listByTermClass(getDefinedTermEditorInput().getTermClass(), true, true, null, null, null, null);\r
+               \r
+               \r
+               inMemoryVocabularies.addAll(termVocabularies);\r
+       }\r
+       \r
+       /**\r
+        * \r
+        */\r
+       public AbstractDefinedTermEditorInput getDefinedTermEditorInput() {\r
+               return (AbstractDefinedTermEditorInput) getEditorInput();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)\r
+        */\r
+       @Override\r
+       public boolean postOperation(CdmBase objectAffectedByOperation) {\r
+\r
+               if(objectAffectedByOperation instanceof DefinedTermBase){\r
+                       viewer.refresh();\r
+               } else if (objectAffectedByOperation instanceof TermVocabulary){\r
+//                     if (inMemoryVocabularies.contains(objectAffectedByOperation)){\r
+//                             inMemoryVocabularies.remove((TermVocabulary) objectAffectedByOperation);\r
+//                     }else{\r
+//                             inMemoryVocabularies.add((TermVocabulary) objectAffectedByOperation);\r
+//                             DetailsViewPart view = (DetailsViewPart) StoreUtil.getView(DetailsViewPart.ID, true);\r
+//                             view.setFocus();\r
+//                     }\r
+                       \r
+//                     viewer.setInput(inMemoryVocabularies);\r
+                       viewer.refresh();\r
+                       \r
+               }\r
+               \r
+               \r
+               \r
+               if(objectAffectedByOperation != null){\r
+                       viewer.setSelection(new StructuredSelection(objectAffectedByOperation));\r
+               }\r
+               setDirty(true);\r
+\r
+               return true;\r
+       } \r
+\r
+       private void createMenu() {\r
+               // register context menu\r
+               MenuManager menuManager = new MenuManager();\r
+               menuManager\r
+                               .add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));\r
+               getSite().registerContextMenu(ID, menuManager, viewer);\r
+       \r
+               Control control = viewer.getControl();\r
+               Menu menu = menuManager.createContextMenu(control);\r
+               control.setMenu(menu);\r
+       }\r
+       \r
+\r
+               \r
+\r
+       @Override\r
+       public void doSave(IProgressMonitor monitor) {\r
+               getConversationHolder().commit();\r
+               setDirty(false);\r
+               initialiseVocabularies();\r
+       }\r
+       \r
+\r
+       @Override\r
+       public void doSaveAs() {}\r
+\r
+       @Override\r
+       public void init(IEditorSite site, IEditorInput input) throws PartInitException {\r
+               setSite(site);\r
+               setInput(input);\r
+               \r
+       }\r
+\r
+       @Override\r
+       public boolean isDirty() {\r
+               return dirty;\r
+       }\r
+\r
+       @Override\r
+       public boolean isSaveAsAllowed() {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void setFocus() {\r
+               getConversationHolder().bind();\r
+       }\r
+\r
+       @Override\r
+       public void update(CdmDataChangeMap changeEvents) {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       @Override\r
+       public ConversationHolder getConversationHolder() {\r
+               return conversation;\r
+       }\r
+\r
+       @Override\r
+       public void selectionChanged(IWorkbenchPart part, ISelection selection) {\r
+               // TODO Auto-generated method stub\r
+               \r
+       }\r
+\r
+       @Override\r
+       public void changed(Object element) {\r
+               dirty = true;\r
+               setDirty(true);\r
+               viewer.update(element, null);\r
+       }\r
+\r
+       /**\r
+        * @param dirty the dirty to set\r
+        */\r
+       public void setDirty(boolean dirty) {\r
+               this.dirty = dirty;\r
+               firePropertyChange(PROP_DIRTY);\r
+       }\r
+\r
+       @Override\r
+       public boolean onComplete() {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       /**\r
+        * \r
+        */\r
+       public TreeViewer getViewer() {\r
+               return viewer;\r
+       }\r
+\r
+       /**\r
+        * @return \r
+        * \r
+        */\r
+       public Set<TermVocabulary<? extends DefinedTermBase>> getInMemoryVocabularies() {\r
+               return inMemoryVocabularies;\r
+       }\r
+\r
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java
new file mode 100644 (file)
index 0000000..dfde1e7
--- /dev/null
@@ -0,0 +1,84 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import org.eclipse.core.expressions.PropertyTester;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+\r
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 9 Jan 2012\r
+ *\r
+ */\r
+public class TermBasePropertyTester extends PropertyTester {\r
+\r
+       private static final String IS_MODIFIABLE = "isModifiable";\r
+       \r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)\r
+        */\r
+       @Override\r
+       public boolean test(Object receiver, String property, Object[] args,\r
+                       Object expectedValue) {\r
+               \r
+               IStructuredSelection selection = (IStructuredSelection) receiver;\r
+               Object selectedElement = selection.getFirstElement();\r
+               if (selectedElement != null && HibernateProxyHelper.isInstanceOf(selectedElement, TermBase.class)){\r
+                       TermBase term = HibernateProxyHelper.deproxy(selectedElement, TermBase.class);\r
+\r
+                       if(IS_MODIFIABLE.equals(property)){\r
+                               return isModifiable(term);\r
+                       }\r
+               }\r
+               \r
+               return false;\r
+       }\r
+\r
+\r
+       /**\r
+        * Checks whether there is a {@link Marker} with the type {@link MarkerType#MODIFIABLE()} and if there is then return its value.\r
+        * \r
+        * @return The markers value if it exists \r
+        */\r
+       public static boolean isModifiable(TermBase termBase) {\r
+               if (termBase == null){\r
+                       return true;\r
+               }\r
+               \r
+               TermVocabulary vocabulary = null;\r
+               \r
+               if(termBase instanceof DefinedTermBase){\r
+                       vocabulary = ((DefinedTermBase) termBase).getVocabulary();\r
+               }else if(termBase instanceof TermVocabulary){\r
+                       vocabulary = (TermVocabulary) termBase;\r
+               }\r
+               \r
+               if(vocabulary == null){\r
+                       return true;\r
+               }\r
+               \r
+               for(Marker vocabularyMarker : vocabulary.getMarkers()){\r
+                       if(vocabularyMarker.getMarkerType().equals(MarkerType.MODIFIABLE())){\r
+                               return vocabularyMarker.getValue();                     \r
+                       }\r
+               }\r
+                               \r
+               return true;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermContentProvider.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermContentProvider.java
new file mode 100644 (file)
index 0000000..3b6241a
--- /dev/null
@@ -0,0 +1,127 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.Collection;\r
+import java.util.HashSet;\r
+import java.util.Set;\r
+import java.util.SortedSet;\r
+\r
+import org.eclipse.jface.viewers.ITreeContentProvider;\r
+import org.eclipse.jface.viewers.Viewer;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class TermContentProvider implements ITreeContentProvider {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IContentProvider#dispose()\r
+        */\r
+       @Override\r
+       public void dispose() {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)\r
+        */\r
+       @Override\r
+       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)\r
+        */\r
+       @Override\r
+       public Object[] getElements(Object inputElement) {\r
+       \r
+               Collection<TermVocabulary> inputElements = (Collection<TermVocabulary>) inputElement;\r
+               return inputElements.toArray();\r
+               //return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)\r
+        */\r
+       @Override\r
+       public Object[] getChildren(Object parentElement) {\r
+               \r
+               if(parentElement instanceof TermVocabulary){\r
+                       return getTopLevelElements((TermVocabulary) parentElement);\r
+               } else if (parentElement instanceof DefinedTermBase) {\r
+                       return ((DefinedTermBase) parentElement).getIncludes().toArray();\r
+               }\r
+               return null;\r
+       }\r
+       \r
+       /**\r
+        *  \r
+        * @param vocabulary\r
+        * @return An array of DefinedTermBase objects that do not have parents\r
+        * \r
+        * TODO: Needs to be implemented in cdmlib\r
+        */\r
+       private Object[] getTopLevelElements(TermVocabulary vocabulary) {\r
+               \r
+               SortedSet<DefinedTermBase> terms = vocabulary.getTermsOrderedByLabels(CdmStore.getDefaultLanguage());\r
+               Set<DefinedTermBase> topLevelTerms = new HashSet<DefinedTermBase>(); \r
+        \r
+               for (DefinedTermBase term : terms){\r
+                        if (term.getPartOf() == null){\r
+                                topLevelTerms.add(term);\r
+                        }\r
+                               \r
+               }\r
+        \r
+               return topLevelTerms.toArray();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)\r
+        */\r
+       @Override\r
+       public Object getParent(Object element) {\r
+               \r
+               if(element instanceof DefinedTermBase){\r
+                       \r
+                       DefinedTermBase definedTerm = (DefinedTermBase)element;\r
+                       if (definedTerm.getPartOf() == null) {\r
+                               return definedTerm.getVocabulary();\r
+                       } else {\r
+                               return definedTerm.getPartOf();\r
+                       }\r
+               }       \r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)\r
+        */\r
+       @Override\r
+       public boolean hasChildren(Object element) {\r
+               \r
+               if (getChildren(element) != null){\r
+                       \r
+                       return getChildren(element).length > 0;\r
+               }\r
+               return false;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermLabelProvider.java
new file mode 100644 (file)
index 0000000..ea647af
--- /dev/null
@@ -0,0 +1,48 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;\r
+import org.eclipse.jface.viewers.LabelProvider;\r
+import org.eclipse.jface.viewers.StyledString;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 9 Dec 2011\r
+ *\r
+ */\r
+public class TermLabelProvider extends LabelProvider implements\r
+               IStyledLabelProvider {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)\r
+        */\r
+       @Override\r
+       public StyledString getStyledText(Object element) {\r
+               \r
+               return  new StyledString(getText(element), StyledString.QUALIFIER_STYLER);\r
+       }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)\r
+        */\r
+       @Override\r
+       public String getText(Object element) {\r
+               \r
+               if (element instanceof TermBase){\r
+                       return ((TermBase)element).getLabel();\r
+               } \r
+               return super.getText(element);\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermTransfer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermTransfer.java
new file mode 100644 (file)
index 0000000..c8623b0
--- /dev/null
@@ -0,0 +1,60 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm;\r
+\r
+import java.util.UUID;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.taxeditor.model.CdmObjectTransfer;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class TermTransfer extends CdmObjectTransfer<DefinedTermBase> {\r
+       \r
+       private static TermTransfer instance = new TermTransfer();\r
+       private static final String TYPE_NAME = "termElement-transfer-format";\r
+       private static final int TYPEID = registerType(TYPE_NAME);\r
+       \r
+       public static synchronized TermTransfer getInstance(){\r
+               return instance;\r
+       }\r
+       \r
+       private TermTransfer() {}\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.model.CdmObjectTransfer#loadElement(java.util.UUID)\r
+        */\r
+       @Override\r
+       public DefinedTermBase loadElement(UUID uuid) {\r
+               return CdmStore.getService(ITermService.class).load(uuid);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.swt.dnd.Transfer#getTypeIds()\r
+        */\r
+       @Override\r
+       protected int[] getTypeIds() {\r
+               return new int[] { TYPEID };\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.swt.dnd.Transfer#getTypeNames()\r
+        */\r
+       @Override\r
+       protected String[] getTypeNames() {\r
+               return new String[] { TYPE_NAME };\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateDefinedTermHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateDefinedTermHandler.java
new file mode 100644 (file)
index 0000000..24a8462
--- /dev/null
@@ -0,0 +1,64 @@
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ * \r
+ */\r
+public class CreateDefinedTermHandler extends AbstractHandler implements IHandler {\r
+\r
+       /*\r
+        * (non-Javadoc)\r
+        * \r
+        * @see\r
+        * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.\r
+        * ExecutionEvent)\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               IPostOperationEnabled editor = (IPostOperationEnabled) HandlerUtil\r
+                               .getActiveEditor(event);\r
+\r
+               IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+                               .getCurrentSelection(event);\r
+\r
+               TermBase selectedElement = (TermBase) selection.getFirstElement();\r
+\r
+               try {\r
+                       AbstractPostOperation operation = new CreateDefinedTermOperation(\r
+                                       event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+                                       selectedElement, editor);\r
+                       StoreUtil.executeOperation(operation);\r
+\r
+               } catch (NotDefinedException e) {\r
+                       StoreUtil.error(getClass(), e);\r
+               }\r
+\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateTermVocabularyHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/CreateTermVocabularyHandler.java
new file mode 100644 (file)
index 0000000..3ad89be
--- /dev/null
@@ -0,0 +1,60 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateDefinedTermOperation;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateTermVocabularyOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateTermVocabularyHandler extends AbstractHandler implements\r
+               IHandler {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               IPostOperationEnabled editor = (IPostOperationEnabled) HandlerUtil\r
+                               .getActiveEditor(event);\r
+\r
+               if (! (editor instanceof DefinedTermEditor)){\r
+                       return null;\r
+               }\r
+               \r
+               try {\r
+                       AbstractPostOperation operation = new CreateTermVocabularyOperation(\r
+                                       event.getCommand().getName(), StoreUtil.getUndoContext(), (DefinedTermEditor) editor);\r
+                       StoreUtil.executeOperation(operation);\r
+\r
+               } catch (NotDefinedException e) {\r
+                       StoreUtil.error(getClass(), e);\r
+               }\r
+\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/DeleteTermBaseHandler.java
new file mode 100644 (file)
index 0000000..ec008ea
--- /dev/null
@@ -0,0 +1,67 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import java.util.Iterator;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.operation.DeleteTermBaseOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 22 Dec 2011\r
+ *\r
+ */\r
+public class DeleteTermBaseHandler extends AbstractHandler {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               DefinedTermEditor editor = (DefinedTermEditor) HandlerUtil\r
+                               .getActiveEditor(event);\r
+\r
+               IStructuredSelection selection = (IStructuredSelection) HandlerUtil\r
+                               .getCurrentSelection(event);\r
+\r
+               Iterator<TermBase> selectionIterator = selection.iterator();\r
+\r
+               while (selectionIterator.hasNext()){\r
+                       \r
+                       TermBase term = selectionIterator.next();\r
+                       \r
+                       try {\r
+                               AbstractPostOperation operation = new DeleteTermBaseOperation(\r
+                                               event.getCommand().getName(), StoreUtil.getUndoContext(),\r
+                                               term, editor);\r
+                               StoreUtil.executeOperation(operation);\r
+       \r
+                       } catch (NotDefinedException e) {\r
+                               StoreUtil.error(getClass(), e);\r
+                       }\r
+               }\r
+\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermEditorHandler.java
new file mode 100644 (file)
index 0000000..393a3e6
--- /dev/null
@@ -0,0 +1,59 @@
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.IHandler;\r
+import org.eclipse.core.commands.IParameter;\r
+import org.eclipse.core.commands.common.NotDefinedException;\r
+import org.eclipse.ui.IWorkbenchPage;\r
+import org.eclipse.ui.PartInitException;\r
+import org.eclipse.ui.handlers.HandlerUtil;\r
+import org.eclipse.ui.handlers.ShowViewHandler;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.DefinedTermEditorInputFactory;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 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
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class OpenDefinedTermEditorHandler extends AbstractHandler implements\r
+               IHandler {\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\r
+        */\r
+       @Override\r
+       public Object execute(ExecutionEvent event) throws ExecutionException {\r
+               \r
+               try {\r
+                       String parameter = event.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter");\r
+                       Class<? extends DefinedTermBase> clazz = (Class<? extends DefinedTermBase>) Class.forName(parameter);\r
+               \r
+                       IWorkbenchPage activePage = StoreUtil.getActivePage();\r
+                       try {\r
+                               activePage.openEditor(DefinedTermEditorInputFactory.NewInstance(clazz), DefinedTermEditor.ID);\r
+                       } catch (PartInitException e) {\r
+                               StoreUtil.error(getClass(), e);\r
+                       }\r
+               } catch (ClassNotFoundException e) {\r
+                       StoreUtil.error(getClass(), e);\r
+               }\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermMenu.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/handler/OpenDefinedTermMenu.java
new file mode 100644 (file)
index 0000000..5d6e797
--- /dev/null
@@ -0,0 +1,73 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.handler;\r
+\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.eclipse.jface.action.IContributionItem;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.ui.PlatformUI;\r
+import org.eclipse.ui.actions.CompoundContributionItem;\r
+import org.eclipse.ui.menus.CommandContributionItem;\r
+import org.eclipse.ui.menus.CommandContributionItemParameter;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class OpenDefinedTermMenu extends CompoundContributionItem {\r
+\r
+       /**\r
+        * \r
+        */\r
+       public OpenDefinedTermMenu() {\r
+               // TODO Auto-generated constructor stub\r
+       }\r
+\r
+       /**\r
+        * @param id\r
+        */\r
+       public OpenDefinedTermMenu(String id) {\r
+               super(id);\r
+               // TODO Auto-generated constructor stub\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()\r
+        */\r
+       @Override\r
+       protected IContributionItem[] getContributionItems() {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+       \r
+       /**\r
+        * @param key\r
+        * @param object\r
+        * @return\r
+        */\r
+       private IContributionItem createContributionItem(String label,\r
+                       String inputType) {\r
+               CommandContributionItemParameter parameter = new CommandContributionItemParameter(\r
+                               PlatformUI.getWorkbench().getActiveWorkbenchWindow(), null,\r
+                               "eu.etaxonomy.taxeditor.store.definedterm.menu.open", SWT.NONE);\r
+\r
+               parameter.label = label;\r
+\r
+               Map parameters = new HashMap();\r
+               parameters.put("eu.etaxonomy.taxeditor.store.definedterm.menu.open", inputType);\r
+               parameter.parameters = parameters;\r
+\r
+               return new CommandContributionItem(parameter);\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/AbstractDefinedTermEditorInput.java
new file mode 100644 (file)
index 0000000..49cc3d4
--- /dev/null
@@ -0,0 +1,71 @@
+// $Id$\r
+/**\r
+ * Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.List;\r
+\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.ui.IEditorInput;\r
+import org.eclipse.ui.IPersistableElement;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public abstract class AbstractDefinedTermEditorInput<T extends DefinedTermBase> implements IEditorInput {\r
+\r
+       /**\r
+        * \r
+        */\r
+       public AbstractDefinedTermEditorInput() {\r
+               super();\r
+       }\r
+\r
+       @Override\r
+       public Object getAdapter(Class adapter) {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public boolean exists() {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public ImageDescriptor getImageDescriptor() {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public IPersistableElement getPersistable() {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public String getToolTipText() {\r
+               return getName();\r
+       }\r
+\r
+       /**\r
+        * @return\r
+        */\r
+       public abstract List<String> getTermClasses();\r
+       \r
+       public abstract T createTermInstance();\r
+       \r
+       public Class<? extends DefinedTermBase> getTermClass() {\r
+               \r
+               return createTermInstance().getClass();\r
+       }\r
+\r
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/DefinedTermEditorInputFactory.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/DefinedTermEditorInputFactory.java
new file mode 100644 (file)
index 0000000..cdb5b68
--- /dev/null
@@ -0,0 +1,62 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import org.eclipse.ui.IEditorInput;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.ExtensionType;\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 3 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermEditorInputFactory {\r
+\r
+//     public static final String NamedArea = "eu.etaxonomy.taxeditor.editor.namedArea";\r
+\r
+       /**\r
+        * @param clazz\r
+        * @return\r
+        */\r
+       public static IEditorInput NewInstance(Class<? extends DefinedTermBase> clazz) {\r
+               if(clazz == NamedArea.class){\r
+                       return new NamedAreaEditorInput();\r
+               } \r
+               if (clazz == NamedAreaLevel.class){\r
+                       return new NamedAreaLevelEditorInput();\r
+               }\r
+               if (clazz == ExtensionType.class){\r
+                       return new ExtensionTypeEditorInput();\r
+               }\r
+               if (clazz == MarkerType.class){\r
+                       return new MarkerTypeEditorInput();\r
+               }\r
+               if (clazz == Feature.class){\r
+                       return new FeatureEditorInput();\r
+               }\r
+               if (clazz == State.class){\r
+                       return new StateEditorInput();\r
+               }\r
+               if (clazz == Modifier.class){\r
+                       return new ModifierEditorInput();\r
+               }\r
+               \r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ExtensionTypeEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ExtensionTypeEditorInput.java
new file mode 100644 (file)
index 0000000..49d597a
--- /dev/null
@@ -0,0 +1,52 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.common.ExtensionType;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 6 Jan 2012\r
+ *\r
+ */\r
+public class ExtensionTypeEditorInput extends AbstractDefinedTermEditorInput<ExtensionType> {\r
+       \r
+       private List<String> termClasses = Arrays.asList(new String[]{\r
+                       ExtensionType.class.getName()\r
+       });\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IEditorInput#getName()\r
+        */\r
+       @Override\r
+       public String getName() {\r
+               return "Extension Type";\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+        */\r
+       @Override\r
+       public List<String> getTermClasses() {\r
+               return termClasses;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+        */\r
+       @Override\r
+       public ExtensionType createTermInstance() {\r
+               return ExtensionType.NewInstance();\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/FeatureEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/FeatureEditorInput.java
new file mode 100644 (file)
index 0000000..da4c4d8
--- /dev/null
@@ -0,0 +1,50 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.description.Feature;\r
+/**\r
+ * @author l.morris\r
+ * @date 11 Jan 2012\r
+ *\r
+ */\r
+public class FeatureEditorInput extends AbstractDefinedTermEditorInput<Feature> {\r
+\r
+       private List<String> termClasses = Arrays.asList(new String[]{\r
+                       Feature.class.getName()\r
+       });\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IEditorInput#getName()\r
+        */\r
+       @Override\r
+       public String getName() {\r
+               return "Feature";\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()\r
+        */\r
+       @Override\r
+       public List<String> getTermClasses() {\r
+               return termClasses;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()\r
+        */\r
+       @Override\r
+       public Feature createTermInstance() {\r
+               return Feature.NewInstance();\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/MarkerTypeEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/MarkerTypeEditorInput.java
new file mode 100644 (file)
index 0000000..5bc6cb5
--- /dev/null
@@ -0,0 +1,54 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.common.MarkerType;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 6 Jan 2012\r
+ *\r
+ */\r
+public class MarkerTypeEditorInput extends AbstractDefinedTermEditorInput<MarkerType> {\r
+       \r
+       private List<String> termClasses = Arrays.asList(new String[]{\r
+                       MarkerType.class.getName()\r
+       });\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IEditorInput#getName()\r
+        */\r
+       @Override\r
+       public String getName() {\r
+               return "Marker Type";\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+        */\r
+       @Override\r
+       public List<String> getTermClasses() {\r
+               return termClasses;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+        */\r
+       @Override\r
+       public MarkerType createTermInstance() {\r
+               return new MarkerType();\r
+       }\r
+       \r
+       \r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ModifierEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/ModifierEditorInput.java
new file mode 100644 (file)
index 0000000..da3b772
--- /dev/null
@@ -0,0 +1,53 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.definedterm.input;
+
+import java.util.Arrays;
+import java.util.List;
+
+import eu.etaxonomy.cdm.model.description.Modifier;
+
+
+/**
+ * @author n.hoffmann
+ * @date Jan 24, 2012
+ *
+ */
+public class ModifierEditorInput extends AbstractDefinedTermEditorInput<Modifier> {
+
+       private List<String> termClasses = Arrays.asList(new String[]{
+                       Modifier.class.getName()
+       });
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getName()
+        */
+       @Override
+       public String getName() {
+               return "Modifier";
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()
+        */
+       @Override
+       public List<String> getTermClasses() {
+               return termClasses;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()
+        */
+       @Override
+       public Modifier createTermInstance() {
+               return Modifier.NewInstance();
+       }
+
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaEditorInput.java
new file mode 100644 (file)
index 0000000..2b9a529
--- /dev/null
@@ -0,0 +1,57 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.location.Continent;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.TdwgArea;\r
+import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 8 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaEditorInput extends AbstractDefinedTermEditorInput<NamedArea> {\r
+\r
+       private List<String> termClasses = Arrays.asList(new String[]{\r
+                       NamedArea.class.getName(), \r
+                       TdwgArea.class.getName(),\r
+                       WaterbodyOrCountry.class.getName(),\r
+                       Continent.class.getName()\r
+       });\r
+       \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IEditorInput#getName()\r
+        */\r
+       @Override\r
+       public String getName() {\r
+               return "Named Area";\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+        */\r
+       @Override\r
+       public List<String> getTermClasses() {\r
+               return termClasses;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+        */\r
+       @Override\r
+       public NamedArea createTermInstance() {\r
+                return NamedArea.NewInstance();\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaLevelEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/NamedAreaLevelEditorInput.java
new file mode 100644 (file)
index 0000000..a379239
--- /dev/null
@@ -0,0 +1,53 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.input;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class NamedAreaLevelEditorInput extends AbstractDefinedTermEditorInput<NamedAreaLevel> {\r
+\r
+       \r
+       private List<String> termClasses = Arrays.asList(new String[]{\r
+                       NamedAreaLevel.class.getName()\r
+       });\r
+       \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.IEditorInput#getName()\r
+        */\r
+       @Override\r
+       public String getName() {\r
+               return "Named Area Level";\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#getTermClasses()\r
+        */\r
+       @Override\r
+       public List<String> getTermClasses() {\r
+               return termClasses;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.AbstractDefinedTermEditorInput#createTermInstance()\r
+        */\r
+       @Override\r
+       public NamedAreaLevel createTermInstance() {\r
+               return NamedAreaLevel.NewInstance();\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/StateEditorInput.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/StateEditorInput.java
new file mode 100644 (file)
index 0000000..609dfe0
--- /dev/null
@@ -0,0 +1,52 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.definedterm.input;
+
+import java.util.Arrays;
+import java.util.List;
+
+import eu.etaxonomy.cdm.model.description.State;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 24, 2012
+ *
+ */
+public class StateEditorInput extends AbstractDefinedTermEditorInput<State> {
+
+       private List<String> termClasses = Arrays.asList(new String[]{
+                       State.class.getName()
+       });
+       
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IEditorInput#getName()
+        */
+       @Override
+       public String getName() {
+               return "State";
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#getTermClasses()
+        */
+       @Override
+       public List<String> getTermClasses() {
+               return termClasses;
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput#createTermInstance()
+        */
+       @Override
+       public State createTermInstance() {
+               return State.NewInstance();
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java
new file mode 100644 (file)
index 0000000..cc2512f
--- /dev/null
@@ -0,0 +1,97 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.ui.IEditorInput;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.AbstractDefinedTermEditorInput;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.input.NamedAreaEditorInput;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateDefinedTermOperation extends AbstractPostOperation {\r
+\r
+       \r
+\r
+       private TermBase parentTermBase;\r
+       private AbstractDefinedTermEditorInput editorInput; \r
+\r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        * @param postOperationEnabled\r
+        */\r
+       public CreateDefinedTermOperation(String label,\r
+                       IUndoContext undoContext, TermBase termBase, IPostOperationEnabled postOperationEnabled) {\r
+               super(label, undoContext, postOperationEnabled);\r
+               this.parentTermBase = termBase;\r
+               editorInput = ((DefinedTermEditor)postOperationEnabled).getDefinedTermEditorInput();\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               DefinedTermBase newTerm = editorInput.createTermInstance();                             \r
+               \r
+               newTerm.setLabel("Untitled");\r
+               \r
+               if (parentTermBase instanceof TermVocabulary){\r
+                       TermVocabulary vocabulary = (TermVocabulary) parentTermBase;\r
+                       vocabulary.addTerm(newTerm);\r
+               } else if (parentTermBase instanceof DefinedTermBase) {\r
+                       DefinedTermBase parent = (DefinedTermBase) parentTermBase;\r
+                       parent.addIncludes(newTerm);\r
+                       TermVocabulary vocabulary = parent.getVocabulary();\r
+                       vocabulary.addTerm(newTerm);\r
+               }\r
+               \r
+               return postExecute(newTerm);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java
new file mode 100644 (file)
index 0000000..a8950ee
--- /dev/null
@@ -0,0 +1,79 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 21 Dec 2011\r
+ *\r
+ */\r
+public class CreateTermVocabularyOperation extends AbstractPostOperation {\r
+\r
+       private DefinedTermEditor definedTermEditor;\r
+\r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        * @param postOperationEnabled\r
+        */\r
+       public CreateTermVocabularyOperation(String label,\r
+                       IUndoContext undoContext, DefinedTermEditor definedTermEditor) {\r
+               super(label, undoContext, definedTermEditor);\r
+               this.definedTermEditor = definedTermEditor;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+\r
+               TermVocabulary termVocabulary = OrderedTermVocabulary.NewInstance(null, "Untitled", null, null);\r
+               CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
+               definedTermEditor.getInMemoryVocabularies().add(termVocabulary);\r
+               \r
+               return postExecute(termVocabulary);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java
new file mode 100644 (file)
index 0000000..7ce6785
--- /dev/null
@@ -0,0 +1,120 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 22 Dec 2011\r
+ *\r
+ */\r
+public class DeleteTermBaseOperation extends AbstractPostOperation {\r
+\r
+       private TermBase termBase;\r
+       private DefinedTermEditor definedTermEditor;\r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        * @param postOperationEnabled\r
+        */\r
+       public DeleteTermBaseOperation(String label, IUndoContext undoContext, TermBase termBase,\r
+                       DefinedTermEditor definedTermEditor) {\r
+               super(label, undoContext, definedTermEditor);\r
+               this.termBase = termBase;\r
+               this.definedTermEditor = definedTermEditor;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               \r
+               \r
+               if (termBase instanceof TermVocabulary) {\r
+                       \r
+                       if (!((TermVocabulary)termBase).getTerms().isEmpty()) {\r
+                               IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Delete all terms from this vocaulary before deleting the vocabulary.");\r
+                               StoreUtil.warningDialog("Vocabulary not empty", termBase, status);\r
+                               return status;\r
+                       }\r
+                       definedTermEditor.getInMemoryVocabularies().remove(termBase); \r
+                       CdmStore.getService(IVocabularyService.class).delete((TermVocabulary)termBase);\r
+                       \r
+               } else if (termBase instanceof DefinedTermBase) {\r
+                       \r
+                       \r
+                       DefinedTermBase definedTermBase = (DefinedTermBase) termBase;\r
+                       if(!definedTermBase.getIncludes().isEmpty()){\r
+                               IStatus status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "This term includes other terms. Please delete the included terms before deleting this term.");                            \r
+                               StoreUtil.warningDialog("Term has included terms", termBase, status);\r
+                               return status;\r
+                       } \r
+                                               \r
+                       DefinedTermBase partOf = definedTermBase.getPartOf();\r
+                       if(partOf != null){\r
+                               partOf.removeIncludes(definedTermBase);\r
+                       }\r
+                       \r
+                       DefinedTermBase kindOf = definedTermBase.getKindOf();\r
+                       if(kindOf != null){\r
+                               definedTermBase.removeGeneralization(kindOf);\r
+                       }\r
+                       \r
+                       TermVocabulary vocabulary = definedTermBase.getVocabulary();\r
+                       if(vocabulary != null){\r
+                               vocabulary.removeTerm(definedTermBase);\r
+                       }\r
+                       CdmStore.getService(ITermService.class).delete((DefinedTermBase)termBase);\r
+                       \r
+               }\r
+               \r
+               return postExecute(termBase);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java
new file mode 100644 (file)
index 0000000..b68a850
--- /dev/null
@@ -0,0 +1,135 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.editor.definedterm.operation;\r
+\r
+import java.util.Collection;\r
+\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.eclipse.core.commands.operations.IUndoContext;\r
+import org.eclipse.core.runtime.IAdaptable;\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.eclipse.core.runtime.IStatus;\r
+import org.eclipse.core.runtime.Status;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 10 Jan 2012\r
+ *\r
+ */\r
+public class MoveDefinedTermOperation extends AbstractPostOperation {\r
+       \r
+       private Collection<DefinedTermBase> sourceTerms;// the actual DefinedTermBase(s) we are moving\r
+       private TermBase targetTermOrVocabulary;// the target VOCABULARY or DefinedTerm we are moving these to\r
+\r
+       /**\r
+        * @param label\r
+        * @param undoContext\r
+        * @param postOperationEnabled\r
+        */\r
+       public MoveDefinedTermOperation(String label, IUndoContext undoContext, TermBase target, Collection<DefinedTermBase> sourceTerms,\r
+                       IPostOperationEnabled postOperationEnabled) {\r
+               super(label, undoContext, postOperationEnabled);\r
+               \r
+               this.targetTermOrVocabulary = target;\r
+               this.sourceTerms = sourceTerms;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               \r
+               // need to make the moved DefinedTerm part of another DefinedTerm or Vocabulary (target)\r
+               // and remove it from old associations\r
+               \r
+               //TODO move to ITermService\r
+               \r
+               for (DefinedTermBase term : sourceTerms){\r
+                       // do nothing when moving it on itself\r
+                       if(targetTermOrVocabulary.equals(term)){\r
+                               Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term can not be added to itself");\r
+                               StoreUtil.informationDialog("", status);\r
+                               return status;\r
+                       }\r
+                       \r
+                       if (targetTermOrVocabulary instanceof TermVocabulary) {\r
+                               TermVocabulary termVocabulary = (TermVocabulary)targetTermOrVocabulary;\r
+                               \r
+                               // do nothing when term is top level and gets added to the same vocabulary\r
+                               if(term.getPartOf() == null && termVocabulary.equals(term.getVocabulary())){\r
+                                       Status status = new Status(IStatus.CANCEL, StoreUtil.getPluginId(), "Term is already in this vocabulary");\r
+                                       StoreUtil.informationDialog("", status);\r
+                                       return status;\r
+                               }\r
+                               \r
+                               cleanTerm(term);\r
+                               termVocabulary.addTerm(term);\r
+                               \r
+                       } else if (targetTermOrVocabulary instanceof DefinedTermBase) {\r
+                               cleanTerm(term);\r
+                               DefinedTermBase targetDefinedTerm = (DefinedTermBase) targetTermOrVocabulary;\r
+                               targetDefinedTerm.addIncludes(term);\r
+                               targetDefinedTerm.getVocabulary().addTerm(term);                                \r
+                       }\r
+\r
+               }\r
+               //return null;\r
+               return postExecute(targetTermOrVocabulary);                     \r
+       }\r
+       \r
+       private DefinedTermBase cleanTerm(DefinedTermBase term){\r
+\r
+               DefinedTermBase partOf = term.getPartOf();\r
+               if(partOf != null){\r
+                       partOf.removeIncludes(term);\r
+               }\r
+       \r
+               \r
+               TermVocabulary vocabulary = term.getVocabulary();\r
+               if(vocabulary != null){\r
+                       vocabulary.removeTerm(term);\r
+               }\r
+               \r
+               return term;\r
+       }\r
+       \r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
+       @Override\r
+       public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
+                       throws ExecutionException {\r
+               // TODO Auto-generated method stub\r
+               return null;\r
+       }\r
+\r
+}\r
index adac91b5195aa0396018173e6c4a776eac2e1b16..bd2a64f69a03cf292df153296008932969b7091c 100644 (file)
@@ -97,7 +97,7 @@ public class AvailableFeaturesWizardPage extends WizardPage {
         */
        private List<Feature> getAvailableFeatures(){
                
-               List<Feature> preferredFeatures = CdmStore.getTermManager().getPreferredFeatures();
+               List<Feature> preferredFeatures = CdmStore.getTermManager().getPreferredTerms(Feature.class);
                
                for(Feature featureAlreadyInTree : featureTree.getDistinctFeatures()){
                        preferredFeatures.remove(featureAlreadyInTree);
index d90f953b34c5ca8d034af13b1cee76769068f935..c4587b41d48f21b4204c71bdd482620dcfabcb03 100644 (file)
 
 package eu.etaxonomy.taxeditor.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.handlers.HandlerUtil;
 
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 
 /**
  * <p>ShowLoginWindowHandler class.</p>
index 9480057d430afcf52b6ec86d13e3fedcd4ccb607..15b8367849c21f55d5946e141d1e307387e58dbf 100644 (file)
@@ -88,15 +88,15 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
                                configurator.setProgressMonitor(CdmProgressMonitorAdapter
                                                .CreateSubMonitor(monitor, 70));
 
-                               monitor.worked(10);
+                               monitor.worked(5);
 
                                CdmDefaultImport<IImportConfigurator> importer = new CdmDefaultImport<IImportConfigurator>();
                                importer.setCdmAppController(applicationConfiguration);
-                               monitor.worked(10);
+                               monitor.worked(5);
 
                                try {
                                        importer.invoke(configurator);
-                                       monitor.worked(60);
+                                       monitor.worked(80);
                                } catch (RuntimeException e) {
                                        StoreUtil.errorDialog(
                                                        "Error importing data",
@@ -108,7 +108,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> {
                                                                        + "Please check error log for details.", e);
                                }
 
-                               monitor.worked(10);
+                               monitor.worked(5);
                                monitor.done();
 
                                display.asyncExec(new Runnable() {
index d9812712ca23fc5541d9a590c0998dc132d500d0..eada1477bbf3f1db1fe801a6323c8639bded663a 100644 (file)
 package eu.etaxonomy.taxeditor.io.wizard;
 
 import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
 
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWorkbench;
 
 import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
  * <p>JaxbExportWizard class.</p>
@@ -46,14 +49,17 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
+               try {
+                       URI urlString = new URI(page.getFolderText() + File.separator + page.getExportFileName());
+                       configurator.setDestination(urlString);
+                       CdmStore.getExportManager().run(configurator);
+                       return true;
+               } catch (URISyntaxException e) {
+                       StoreUtil.error(getClass(), "Could not run JAXB export", e);
+               }
                
-               String urlString = page.getFolderText() + File.separator + page.getExportFileName();
+               return false;
                
-               configurator.setDestination(urlString);
-               
-               CdmStore.getExportManager().run(configurator);
-               
-               return true;
        }
 
        /* (non-Javadoc)
index 4bf709a117199affb57cf7925904861132362b28..8ce48d376d7876e5480bf411bf1dc143a3e86997 100644 (file)
@@ -25,7 +25,7 @@ public class DefaultLabelStrategy implements ILabelImageStrategy {
        /** {@inheritDoc} */
        public String getNameRelationTypeLabel(NameRelationshipType type) {
                List<NameRelationshipType> vocab = 
-                       TermStore.getNameRelationshipTypes();
+                       TermStore.getTerms(NameRelationshipType.class);
        
                for (NameRelationshipType type1 : vocab) {
                        if (type1.equals(type)) {
@@ -42,7 +42,7 @@ public class DefaultLabelStrategy implements ILabelImageStrategy {
        public String getNameRelationTypeInverseLabel(NameRelationshipType type) {
                
                List<NameRelationshipType> vocab = 
-                       TermStore.getNameRelationshipTypes();
+                       TermStore.getTerms(NameRelationshipType.class);
 
                for (NameRelationshipType type1 : vocab) {
                        if (type1.equals(type)) {
index c9fb62deedeccc80bb4910a2ee4f55fff2674621..3072f460e780d09b9192018d6021e66136bce989 100644 (file)
@@ -49,6 +49,7 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.themes.ITheme;
 import org.eclipse.ui.themes.IThemeManager;
 
+import eu.etaxonomy.cdm.model.common.TermBase;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
@@ -308,6 +309,11 @@ public abstract class AbstractUtility {
                });
        }
 
+       public static void informationDialog(final String title,
+                       final IStatus status) {
+               informationDialog(title, status.getMessage());
+       }
+       
        /**
         * <p>
         * warningDialog
@@ -332,6 +338,16 @@ public abstract class AbstractUtility {
                        }
                });
        }
+       
+       /**
+        * @param title
+        * @param termBase
+        * @param status
+        */
+       public static void warningDialog(String title, Object source,
+                       IStatus status) {
+               warningDialog(title, source, status.getMessage());
+       }
 
        /**
         * <p>
@@ -374,6 +390,11 @@ public abstract class AbstractUtility {
                        }
                });
        }
+       
+       public static void errorDialog(final String title, final Object source,
+                       final String message){
+               errorDialog(title, source, message, null);
+       }
 
        /**
         * <p>
@@ -740,6 +761,11 @@ public abstract class AbstractUtility {
                log(status);
        }
        
+       public static void warn(Class source, IStatus status) {
+               getLog4JLogger(source).warn(status.getMessage(), status.getException());
+               log(status);
+       }
+       
        public static void warn(Class source, Throwable t) {
                IStatus status = new Status(IStatus.WARNING, getPluginId(), t.getMessage(), t);
                getLog4JLogger(source).warn(t);
@@ -822,7 +848,7 @@ public abstract class AbstractUtility {
         * 
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId() {
+       public static String getPluginId() {
                return "eu.taxeditor";
        }
 
@@ -883,4 +909,5 @@ public abstract class AbstractUtility {
                                        .reflow();
                }
        }
-}
+       
+       }
index e78528a885d4efc48912d12e7b1706e47d5f75b9..87dec860ab71e9b2dd8b7b14ac8a456cb1a31b5e 100644 (file)
@@ -15,7 +15,7 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  * @created Sep 17, 2010
  * @version 1.0
  */
-public class CdmProgressMonitorAdapter implements eu.etaxonomy.cdm.common.IProgressMonitor {
+public class CdmProgressMonitorAdapter implements eu.etaxonomy.cdm.common.monitor.IProgressMonitor {
        
        private IProgressMonitor progressMonitor;
 
@@ -102,4 +102,9 @@ public class CdmProgressMonitorAdapter implements eu.etaxonomy.cdm.common.IProgr
        public void warning(String message, Throwable throwable) {
                StoreUtil.error(this.getClass(), message, throwable);
        }
+
+       @Override
+       public void internalWorked(double arg0) {
+               progressMonitor.internalWorked(arg0);
+       }
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DefaultTermComparator.java
new file mode 100644 (file)
index 0000000..16c07df
--- /dev/null
@@ -0,0 +1,33 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.model;
+
+import java.util.Comparator;
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * Implements a {@link Comparator} for {@link DefinedTermBase} objects based on the term's label.
+ * The compare algorithm compares a term's label. Example: If used on an unsorted list of terms, the
+ * list will be alphabetically  sorted by label afterwards.
+ * 
+ * @author n.hoffmann
+ * @date Jan 18, 2012
+ *
+ */
+public class DefaultTermComparator<T extends DefinedTermBase> implements Comparator<T> {
+       @Override
+       public int compare(T o1, T o2) {
+               String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
+               String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
+               return label1.compareTo(label2);
+       }
+};
index 467acc68ab268218e6d620a4d43adfe3b71d7ca8..bada117220dbfd9975e381ca66da82d828ecf4d5 100644 (file)
@@ -381,6 +381,7 @@ public class DescriptionHelper {
                if (text == null || text.length() == 0) {
                        text = "No label provided";
                }
+               
                return "Description: " + text;
        }
        
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/TaxonRelationshipTypeInverseContainer.java
new file mode 100644 (file)
index 0000000..a194b8f
--- /dev/null
@@ -0,0 +1,120 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.model;
+
+import org.apache.commons.lang.NotImplementedException;
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.Representation;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created Nov 30, 2011
+ * @version 1.0
+ *
+ */
+public class TaxonRelationshipTypeInverseContainer extends DefinedTermBase<DefinedTermBase> {
+       
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 7225140304186547675L;
+       private boolean inverse;
+       private TaxonRelationshipType type;
+       
+       /**
+        * 
+        * @param sourceTaxon
+        * @param relationship
+        * @return
+        */
+       public static TaxonRelationshipTypeInverseContainer CreateFromSource(Taxon sourceTaxon, TaxonRelationship relationship){
+               return new TaxonRelationshipTypeInverseContainer(relationship.getType(), isRelationshipInverse(sourceTaxon, relationship));
+       }
+       
+       /**
+        * 
+        * @param sourceTaxon
+        * @param relationship
+        * @return
+        */
+       public static Taxon RelatedTaxon(Taxon sourceTaxon, TaxonRelationship relationship){
+               return isRelationshipInverse(sourceTaxon, relationship) ? relationship.getFromTaxon() : relationship.getToTaxon();
+       }
+       
+       /**
+        * 
+        * @param sourceTaxon
+        * @param relationship
+        * @return
+        */
+       private static boolean isRelationshipInverse(Taxon sourceTaxon, TaxonRelationship relationship){
+               return relationship.getFromTaxon().equals(sourceTaxon) ? false : true;
+       }
+       
+       /**
+        * 
+        * @param type
+        * @param inverse
+        */
+       public TaxonRelationshipTypeInverseContainer(TaxonRelationshipType type, boolean inverse){
+               this.inverse = inverse;
+               this.setType(type);
+       }
+       
+       public boolean isInverse() {
+               return inverse;
+       }
+
+       public Representation getRepresentation(Language language){
+               return inverse ? type.getInverseRepresentation(language) : type.getRepresentation(language);
+       }
+       
+       public String getLabel(Language language){
+               return getRepresentation(language).getLabel();
+       }
+       
+       public String getDescription(Language language){
+               return getRepresentation(language).getDescription();
+       }
+       
+       public String getAbbreviatedLabel(){
+               return getRepresentation(Language.ENGLISH()).getAbbreviatedLabel();
+       }
+       
+       public void setInverse(boolean inverse) {
+               this.inverse = inverse;
+       }
+
+       public TaxonRelationshipType getType() {
+               return type;
+       }
+
+       public void setType(TaxonRelationshipType type) {
+               this.type = type;
+       }
+       
+       @Override
+       public String getTitleCache() {
+               return String.format("%s (%s)", getLabel(CdmStore.getDefaultLanguage()), getAbbreviatedLabel());
+       }
+
+       @Override
+       public void resetTerms() {
+               throw new NotImplementedException();
+       }
+
+       @Override
+       protected void setDefaultTerms(
+                       TermVocabulary<DefinedTermBase> termVocabulary) {
+               throw new NotImplementedException();
+       }
+       
+}
index 51681507807b4d4fe95159b3dd2a678b6ac92f7e..4c6e6c79d0afc002fef5f5f51620475a5906a882 100644 (file)
@@ -62,4 +62,13 @@ public class TextHelper {
                return textValue;
                
        }
+       
+       public static String deproxyClassName(Class clazz){
+               String name = clazz.getSimpleName();
+               if (name.indexOf("_$$")>-1){
+                       return name.substring(0, name.indexOf("_$$"));
+               }else{
+                       return name;
+               }
+       }
 }
index aad8b1c96cc1d2eda74df04e6f72ff11eebf5d5b..f2657aae1f13b8d4400d0e925b477cc3d0f1a9f9 100644 (file)
@@ -22,7 +22,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
  * <p>Abstract AbstractNewEntityWizard class.</p>
@@ -50,9 +50,16 @@ public abstract class AbstractNewEntityWizard<T> extends Wizard implements
         * @param <T> a T object.
         */
        public AbstractNewEntityWizard(){
-               setWindowTitle("New Entity");
+               setWindowTitle(String.format("New %s", getEntityName()));
        }
        
+       /**
+        * FIXME there might be a smarter way to do this,
+        * 
+        * @return
+        */
+       protected abstract String getEntityName();
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#performFinish()
         */
index 0e92c436d41db5ce256ec23913854faea37184ae..1348b2a67726408c713dc58abe7c7268125a5392 100644 (file)
@@ -33,7 +33,8 @@ import eu.etaxonomy.cdm.ext.ipni.IIpniService;
 import eu.etaxonomy.cdm.ext.ipni.IpniService;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * <p>ExternalReferenceServiceWizardPage class.</p>
@@ -57,7 +58,7 @@ public class ExternalReferenceServiceWizardPage extends WizardPage implements Se
        /**
         * <p>Constructor for ExternalReferenceServiceWizardPage.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
         */
@@ -79,19 +80,19 @@ public class ExternalReferenceServiceWizardPage extends WizardPage implements Se
        public void createControl(Composite parent) {
                control = formFactory.createComposite(parent);
                
-               control.setLayout(CdmFormFactory.LAYOUT(2, false));
+               control.setLayout(LayoutConstants.LAYOUT(2, false));
                
                text_query = new Text(control, SWT.SINGLE | SWT.BORDER);
-               text_query.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               text_query.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                
                button_search = new Button(control, SWT.PUSH);
-               button_search.setLayoutData(CdmFormFactory.RIGHT());
+               button_search.setLayoutData(LayoutConstants.RIGHT());
                button_search.setText("Search");
                
                button_search.addSelectionListener(this);
                
                viewer = new ListViewer(control);
-               viewer.getControl().setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2,1));
+               viewer.getControl().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
                
                viewer.setContentProvider(new IStructuredContentProvider(){
 
index b105ac6a6ce4d00920184b9c0d2702bd9528495c..6b23b4bc04b8974d7f04b79dae779a71fa605be5 100644 (file)
@@ -32,7 +32,7 @@ public class NewClassificationWizard extends AbstractNewEntityWizard<Classificat
         */
        @Override
        public void setEntity(Classification entity) {
-               setWindowTitle("Edit Classification");
+               setWindowTitle(String.format("Edit %s", getEntityName()));
                entity = CdmStore.getService(IClassificationService.class).load(entity.getUuid());
                super.setEntity(entity);
        }
@@ -52,4 +52,9 @@ public class NewClassificationWizard extends AbstractNewEntityWizard<Classificat
        protected Classification createNewEntity() {
                return Classification.NewInstance(null);
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Classification";
+       }
 }
index 7ec742e5c444f73e1a0258578419b4577ecf27b2..d28f0ec5d6ddf22aebde5d18e77193ed517b6ba5 100644 (file)
@@ -47,5 +47,10 @@ public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
        protected Collection createNewEntity() {
                return Collection.NewInstance();
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Collection";
+       }
        
 }
index d64adb137642bac0e8c8e4c062179a0e3fc2f660..d132f0544eb0b3beb48ff8a99753768ec1dd666d 100644 (file)
@@ -72,4 +72,11 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<DerivedUni
        protected void saveEntity() {
                CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Specimen";
+       }
+       
+       
 }
index d25a83869fbeee4670b394b73dff0186e6915025..925aead2a171bf33a16efd6bd1a18ad22050cf27 100644 (file)
@@ -40,4 +40,9 @@ public class NewFieldObservationWizard extends AbstractNewEntityWizard<FieldObse
        protected void saveEntity() {
                CdmStore.getService(IOccurrenceService.class).saveOrUpdate(getEntity());
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Field Observation";
+       }
 }
index 5cf320748e9ba554c05670a177cedd683dfd6690..ad6c3ac255de9a5d835726ce5b3b8ef04734a295 100644 (file)
@@ -49,4 +49,9 @@ public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
                return Group.NewInstance();
        }
 
+       @Override
+       protected String getEntityName() {
+               return "Group";
+       }
+
 }
index 50e1117d35239199953000d78c69e8799ef592df..1eba0be640dbf9de4c056c80c32d23bdedc40e47 100644 (file)
@@ -46,4 +46,9 @@ public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
                return Institution.NewInstance();
        }
 
+       @Override
+       protected String getEntityName() {
+               return "Institution";
+       }
+
 }
index c82a842be4398b4f31dde650e770daeb2a07e4e7..9ab033f49d32d61679c873dd9ec5d0cc357084e5 100644 (file)
@@ -51,4 +51,9 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        protected void saveEntity() {
                CdmStore.getService(INameService.class).saveOrUpdate(getEntity());
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Scientific Name";
+       }
 }
index 2268713342c95ad21c1e9d7dfa0cb52514c1ee9d..da18787665f6b06ea4ce61095da79e6055b150b8 100644 (file)
@@ -41,4 +41,9 @@ public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
        protected void saveEntity() {
                CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Person";
+       }
 }
index ec67349a0f5c1f6b4af7b466674e6a7630908a9b..7b7624a7361c96aecc332e82442da9812f959df3 100644 (file)
@@ -35,4 +35,9 @@ public class NewPolytomousKeyWizard extends AbstractNewEntityWizard<PolytomousKe
                return PolytomousKey.NewInstance();
        }
 
+       @Override
+       protected String getEntityName() {
+               return "Polytomous Key";
+       }
+
 }
index 91131aa736c68df006757c12a102602751695de1..f1b19c94a5dac2417fac4d26252401f63d027f98 100644 (file)
@@ -54,4 +54,9 @@ public class NewReferenceWizard extends AbstractNewEntityWizard<Reference> {
                super.setEntity(entity);
                referencePage.getDetailElement().setEntity(entity);
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Reference";
+       }
 }
index 983785da1fc30be6b6f58fe5a82db84dafc7a445..f0e65cbd5134ab5f0ac512e08deb4e2c2c07da35 100644 (file)
@@ -105,5 +105,10 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITreeNode>{
        public ITreeNode getParentTreeNode(){
                return taxonNodePage.getParentTreeNode();
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Taxon";
+       }
        
 }
\ No newline at end of file
index 4e50f0c6b8fcc706b27bb319e13ed595dbea6866..050b5984334b77d838c98d2b54b95715fcd87b6c 100644 (file)
@@ -44,4 +44,9 @@ public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
        protected void saveEntity() {
                CdmStore.getService(IAgentService.class).saveOrUpdate(getEntity());
        }
+
+       @Override
+       protected String getEntityName() {
+               return "Team";
+       }
 }
index 61243981c3c76b1fce788e3d0e03276952efb08f..aa3cd19dd733d2ae274bbc270091134c2b05eb6c 100644 (file)
@@ -32,4 +32,9 @@ public class NewUserWizard extends AbstractNewEntityWizard<User> {
                return User.NewInstance(null, null);
        }
 
+       @Override
+       protected String getEntityName() {
+               return "Institution";
+       }
+
 }
index 7b02512df4a39472706740444e67693171ae93ba..16a7d1108d0dd8a2a265e1bc1d7a50001c564915 100644 (file)
@@ -7,10 +7,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailElement;
 
index e9bd3b1344af6897ffe22bc2204fbf09a2103a16..40e533a0ff457cc3e5291601ed3f1ee276241aa8 100644 (file)
@@ -37,7 +37,7 @@ public interface IPostOperationEnabled {
         *         might not be what you want.
         */
        public boolean postOperation(CdmBase objectAffectedByOperation);
-
+       
        /**
         * This method will get called after the execution took place and occasional
         * cleanups were performed. This is typically the last thing to happen.
@@ -45,4 +45,5 @@ public interface IPostOperationEnabled {
         * @return a boolean.
         */
        public boolean onComplete();
+       
 }
index 97bade239fb63896a5a73296498c5f6b6646cdcc..a2382fcee91a24f331026d4332437805fae1d18d 100644 (file)
@@ -115,4 +115,6 @@ public interface IPreferenceKeys {
        public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldObservations";
 
        public static final String SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS = "eu.etaxonomy.taxeditor.navigation.search.openResultInSeparateWindows";
+
+       public static final String ADD_TYPES_TO_ALL_NAMES = "eu.etaxonomy.taxeditor.store.addTypeToAllNames";
 }
index 8380858886ed36e586cd4c07fa0cc8ed23cfd6b3..e1a6b959c7b3b4c3ac3071c24029aa81900c0f59 100644 (file)
@@ -81,7 +81,7 @@ public class LanguagePreferencePage extends PreferencePage implements IWorkbench
                
                final Combo combo_globalLanguage = new Combo(composite, SWT.NONE); 
                
-               List<Language> preferredLanguages = CdmStore.getTermManager().getPreferredLanguages();
+               List<Language> preferredLanguages = CdmStore.getTermManager().getPreferredTerms(Language.class);
                
                for(int i = 0; i < preferredLanguages.size(); i++){
                        Language language = preferredLanguages.get(i);
index 4035427827ecf26aa797c1996c42799a29307631..ca321d13724370020c073fcd6f54f377d53efff7 100644 (file)
@@ -483,7 +483,7 @@ public class PreferencesUtil implements IPreferenceKeys {
         */
        public static Map<MarkerType, Boolean> getEditMarkerTypePreferences() {
                List<MarkerType> markerTypes = CdmStore.getTermManager()
-                               .getPreferredMarkerTypes();
+                               .getPreferredTerms(MarkerType.class);
 
                Map<MarkerType, Boolean> result = new HashMap<MarkerType, Boolean>();
 
index d6dd732ea7908c8aaea83ed965c56b66a41ba169..60de9c9d6265b7c87ce547dfc433468a10afd342 100644 (file)
@@ -42,7 +42,7 @@ public class TaxonomicEditorGeneralPreferences extends
                                getFieldEditorParent()));
                addField(new BooleanFieldEditor(
                                IPreferenceKeys.SHOULD_EXPAND_SECTION_WHEN_DATA_AVAILABLE,
-                               "Should expand sections when data is available (Details View)",
+                               "Should expand sections when data is available (Details View). This might make the Editor slow.",
                                getFieldEditorParent()));
                addField(new StringFieldEditor(
                                IPreferenceKeys.EDIT_MAP_SERVICE_ACCES_POINT,
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/TypeDesignationPreferences.java
new file mode 100644 (file)
index 0000000..e35e143
--- /dev/null
@@ -0,0 +1,44 @@
+/// $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.preference;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author n.hoffmann
+ *
+ * @created Oct 12, 2011
+ * @version 1.0
+ */
+public class TypeDesignationPreferences extends FieldEditorPreferencePage
+               implements IWorkbenchPreferencePage {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+        */
+       @Override
+       public void init(IWorkbench workbench) {
+               setPreferenceStore(PreferencesUtil.getPreferenceStore());
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+        */
+       @Override
+       protected void createFieldEditors() {
+               addField(new BooleanFieldEditor(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES,
+                               "Add type designations to all names in a homotypical group.",
+                               getFieldEditorParent()));
+       }
+
+}
index 75e164d7352187a75bcbb33c31cdefefba1348fd..f78483bd64ade4007c5559700ee8bb91f2b0d4d3 100644 (file)
@@ -15,13 +15,17 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.IParameter;
+import org.eclipse.core.commands.Parameterization;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -33,16 +37,21 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.commands.Parameter;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>Abstract AbstractMenuPreferences class.</p>
@@ -87,7 +96,9 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                setDescription(description);
        }
        
-       protected abstract List<T> getTerms();
+       protected List<T> getTerms(){
+               return TermStore.getTerms(getTermClass());
+       }
 
        /**
         * {@inheritDoc}
@@ -178,24 +189,12 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
         * @param buttonContainer a {@link org.eclipse.swt.widgets.Composite} object.
         */
        protected void createEditButtons(Composite buttonContainer) {
-               newButton = new Button(buttonContainer, SWT.PUSH);
-               newButton.setText("New");
-               newButton.setLayoutData(new GridData(SWT.FILL));
 
-               
                editButton = new Button(buttonContainer, SWT.PUSH);
-               editButton.setText("Edit");
+               editButton.setText("Open Term Editor");
                editButton.setLayoutData(new GridData(SWT.FILL));
 
-               
-               removeButton = new Button(buttonContainer, SWT.PUSH);
-               removeButton.setText("Remove");
-               removeButton.setLayoutData(new GridData(SWT.FILL));
-
-               
-               addNewButtonListeners();
                addEditButtonListeners();
-               addDeleteButtonListeners();
        }
 
        /**
@@ -231,59 +230,43 @@ public abstract class AbstractMenuPreferences<T extends DefinedTermBase> extends
                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
                         */
                        @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               T selection = (T) ((StructuredSelection) tableViewer.getSelection()).getFirstElement();
+                       public void widgetSelected(SelectionEvent event) {
                                
-                               if(selection == null){
-                                       StoreUtil.informationDialog("Nothing selected", "Please select a term to edit.");
-                                       return;
-                               }
+                               ICommandService commandService = (ICommandService)  StoreUtil.getService(ICommandService.class);
+
+                               Command command = commandService.getCommand(DefinedTermEditor.OPEN_COMMAND_ID);
                                
-                               VocabularyTermWizard<T> wizard = new VocabularyTermWizard<T>(getTermClass(), selection, getConversationHolder()); 
+                               IParameter parameter;
+                               try {
+                                       parameter = command.getParameter("eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter");
                                
-                               WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
-                           
-                               if(dialog.open() == IStatus.OK){                            
-                                   tableViewer.setInput(getTerms());
-                                   tableViewer.reveal(selection);
-                           }
-                       }
-               });
-       }
-       
-       /**
-        * Implement this method in MenuPreference Pages where the vocabulary should be editable, editable flag
-        * is set.
-        */
-       protected void addDeleteButtonListeners() {
-               removeButton.addSelectionListener(new SelectionAdapter(){
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               boolean confirmation = StoreUtil.confirmDialog("Confirm deletion", "Do you really want to delete the selected terms?");
-                               
-                               if(confirmation){
-                                       IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
+                                       Parameterization[] parameterizations = new Parameterization[]{
+                                                       new Parameterization(parameter, getTermClass().getName())
+                                       };
                                        
-                                       Iterator<T> selectionIterator = selection.iterator();
+                                       ParameterizedCommand pCommand = new ParameterizedCommand(command, parameterizations);
                                        
-                                       while(selectionIterator.hasNext()){
-                                               T term = selectionIterator.next();
-
-                                               tableViewer.remove(term);
-                                               
-                                               if(getConversationHolder().getSessionHolder().getSession().contains(term)){
-                                                       ITermService service = CdmStore.getService(ITermService.class);
-                                                       DefinedTermBase theTerm = service.load(term.getUuid());
-                                                       
-                                                       service.delete(theTerm);
+                                       if (command.isEnabled()) {
+                                               IHandlerService handlerService = (IHandlerService) StoreUtil.getService(IHandlerService.class);
+                                               try {
+                                                       handlerService.executeCommand(pCommand, null);
+                                               } catch (NotDefinedException e) {
+                                                       throw new RuntimeException("Could not find open command: "
+                                                                       + DefinedTermEditor.OPEN_COMMAND_ID);
+                                               } catch (Exception e) {
+                                                       StoreUtil
+                                                                       .error(getClass(),
+                                                                                       "An exception occured while trying to open a selection",
+                                                                                       e);
                                                }
                                        }
-                                       
-//                                     tableViewer.refresh();
+                               } catch (NotDefinedException e) {
+                                       StoreUtil
+                                       .error(getClass(),
+                                                       "An exception occured while trying to open the Term Editor",
+                                                       e);
                                }
+                               
                        }
                });
        }
index 0c00d5540414d25c9c8065dbcac0dd5c14702a8b..3f752f5368609e55d3d7ce0e13f1e283c804fec4 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>ExtensionTypeMenuPreferences class.</p>
@@ -30,7 +27,7 @@ public class ExtensionTypeMenuPreferences extends AbstractMenuPreferences<Extens
        public ExtensionTypeMenuPreferences() {
                super("Extension Type Preferences" , 
                                "Choose which extension types to display",
-                               true);
+                               false);
        }
 
        /* (non-Javadoc)
@@ -41,12 +38,4 @@ public class ExtensionTypeMenuPreferences extends AbstractMenuPreferences<Extens
        protected Class<ExtensionType> getTermClass() {
                return ExtensionType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<ExtensionType> getTerms() {
-               return TermStore.getExtensionTypes();
-       }
 }
index 0375bf2a8f692c236cbcbaf1f02b8f9ba774d0d7..a228ef6a698d70d4019644ac8a69eb4904332d3a 100644 (file)
@@ -8,10 +8,7 @@
 */
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>FeatureMenuPreferences class.</p>
@@ -32,7 +29,7 @@ public class FeatureMenuPreferences extends AbstractMenuPreferences<Feature> {
        public FeatureMenuPreferences() {
                super("Feature Preferences", 
                                "Choose which features you would like to use for descriptive elements.", 
-                               true);
+                               false);
        }
 
        /* (non-Javadoc)
@@ -43,12 +40,4 @@ public class FeatureMenuPreferences extends AbstractMenuPreferences<Feature> {
        protected Class<Feature> getTermClass() {
                return Feature.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<Feature> getTerms() {
-               return TermStore.getFeatures();
-       }
 }
index e630441c997dc066a83fa3bf381f043a8887528f..b355fc4fa338148f8fcc73eebbc56b78436427be 100644 (file)
@@ -10,8 +10,6 @@
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.ViewerComparator;
@@ -20,7 +18,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 
 import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>LanguageMenuPreferences class.</p>
@@ -87,12 +84,4 @@ public class LanguageMenuPreferences extends AbstractMenuPreferences<Language> {
        protected Class<Language> getTermClass() {
                return Language.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<Language> getTerms() {
-               return TermStore.getLanguages();
-       }
 }
index 406ae6162621c21459ccfe5df1b5b40a568d89f7..0fc47e1a93f2f29f3bee31e920dff19bed229fa0 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>MarkerTypeMenuPreferences class.</p>
@@ -41,12 +38,4 @@ public class MarkerTypeMenuPreferences extends AbstractMenuPreferences<MarkerTyp
        protected Class<MarkerType> getTermClass() {
                return MarkerType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<MarkerType> getTerms() {
-               return TermStore.getNonTechnicalMarkerTypes();
-       }
 }
index 545fe62f96a3a78083d786e042499cb25a3b6009..f664e5f5f0c3591e49a942d48002b228f18624dc 100644 (file)
@@ -3,10 +3,7 @@
  */
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>MeasurementUnitMenuPreferences class.</p>
@@ -34,12 +31,4 @@ public class MeasurementUnitMenuPreferences extends AbstractMenuPreferences<Meas
                return MeasurementUnit.class;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<MeasurementUnit> getTerms() {
-               return TermStore.getMeasurementUnits();
-       }
-
 }
index 5cb22dc4e90e3bb654b6dd72a0b27398b228fad4..0e8184895184c89d942ba288e3828f50c47893b6 100644 (file)
@@ -10,8 +10,6 @@
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -20,7 +18,6 @@ import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.taxeditor.labels.ILabelImageStrategy;
 import eu.etaxonomy.taxeditor.labels.LabelImageProvider;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>NameRelationshipTypeMenuPreferences class.</p>
@@ -97,12 +94,4 @@ public class NameRelationshipTypeMenuPreferences extends
        protected Class<NameRelationshipType> getTermClass() {
                return NameRelationshipType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<NameRelationshipType> getTerms() {
-               return TermStore.getNameRelationshipTypes();
-       }
 }
index bfdd50f744dfd2f1d1a960aed24aad83c42841d9..715258774a5dbcf2343d6f45386919e762e4ff8e 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>NameTypeDesignationStatusMenuPreferences class.</p>
@@ -42,12 +39,4 @@ public class NameTypeDesignationStatusMenuPreferences extends
                return NameTypeDesignationStatus.class;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<NameTypeDesignationStatus> getTerms() {
-               return TermStore.getNameTypeDesignationStatus();
-       }
-
 }
index 335e293d7f98cc97f6009800110f3b341a62cf19..b24c6d941931c37e363029efeee6b060e6c39a0f 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>NamedAreaTypeMenuPreferences class.</p>
@@ -30,7 +27,7 @@ public class NamedAreaTypeMenuPreferences extends AbstractMenuPreferences<NamedA
        public NamedAreaTypeMenuPreferences() {
                super("Named Area Types", 
                                "Edit displayed named area types", 
-                               true);
+                               false);
        }
 
        /* (non-Javadoc)
@@ -41,12 +38,4 @@ public class NamedAreaTypeMenuPreferences extends AbstractMenuPreferences<NamedA
        protected Class<NamedAreaType> getTermClass() {
                return NamedAreaType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<NamedAreaType> getTerms() {
-               return TermStore.getNamedAreaTypes();
-       }
 }
index 4ec3a86fc11697249268bf85ecce1f5f344950ad..e947a269c95213b9f85187cc6118fd37efe1b5fe 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>NomenclaturalStatusTypeMenuPreferences class.</p>
@@ -42,13 +39,5 @@ public class NomenclaturalStatusTypeMenuPreferences extends
        protected Class<NomenclaturalStatusType> getTermClass() {
                return NomenclaturalStatusType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<NomenclaturalStatusType> getTerms() {
-               return TermStore.getNomenclaturalStatusTypes();
-       }
        
 }
index 8a5c7b669219f5f5f4e9499a229c8c8ab88180d8..d71ae560b7b652cb2b530914da241c97ce31c930 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>PresenceAbsenceMenuPreferences class.</p>
@@ -44,13 +41,5 @@ public class PresenceAbsenceMenuPreferences extends AbstractMenuPreferences<Pres
        protected Class<PresenceAbsenceTermBase> getTermClass() {
                return PresenceAbsenceTermBase.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<PresenceAbsenceTermBase> getTerms() {
-               return TermStore.getPresenceAbsenceTerms();
-       }
        
 }
index 40486bfe3444b96fc995e1ef1f50bc11c5128e49..9459ed7a60884e0cdb6b8ab32e7dc99506b08b49 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>PreservationMethodMenuPreferences class.</p>
@@ -41,12 +38,4 @@ public class PreservationMethodMenuPreferences extends AbstractMenuPreferences<P
        protected Class<PreservationMethod> getTermClass() {
                return PreservationMethod.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<PreservationMethod> getTerms() {
-               return TermStore.getPreservationMethods();
-       }
 }
index 78a40b855648a5e44b23f21a22aac194e838fe19..9c16f51bc247eae4ffd2951c40f0dccf067db178 100644 (file)
@@ -8,8 +8,6 @@
 */
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -19,7 +17,6 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
 
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * Allows the user to choose which <code>Rank</code>s to display in the
@@ -52,8 +49,6 @@ public class RankMenuPreferences extends AbstractMenuPreferences<Rank> implement
        @Override
        protected void createAdditionalContent(Composite container) {
                
-               // TODO create option to sort ranks either alphabetically or hierarchically (asc- or descending)
-               
                final Button checkbox = new Button(container, SWT.CHECK);
                checkbox.setText("Sort ranks hierarchically (default is alphabetically)");
                
@@ -66,7 +61,7 @@ public class RankMenuPreferences extends AbstractMenuPreferences<Rank> implement
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                PreferencesUtil.setSortRanksHierarchichally(checkbox.getSelection());
-                               refresh(TermStore.getRanks());
+                               refresh(getTerms());
                        }
                });
                
@@ -81,12 +76,4 @@ public class RankMenuPreferences extends AbstractMenuPreferences<Rank> implement
                return Rank.class;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<Rank> getTerms() {
-               return TermStore.getRanks();
-       }
-
 }
index aa132d05146d9851a91ce9219c8151b0429644f7..5291ae7a3f199a65b943ff8e03d29a5dfedf4445 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>SpecimenTypeDesignationStatusMenuPreferences class.</p>
@@ -42,12 +39,4 @@ public class SpecimenTypeDesignationStatusMenuPreferences extends
                return SpecimenTypeDesignationStatus.class;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<SpecimenTypeDesignationStatus> getTerms() {
-               return TermStore.getSpecimenTypeDesignationStatus();
-       }
-
 }
index 5185f29450c43c8385a49e41b2b4c0ec8e081ee6..82c3707254f082f19411f3fc67eae019241a9261 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>StageMenuPreferences class.</p>
@@ -42,11 +39,4 @@ public class StageMenuPreferences extends AbstractMenuPreferences<Stage> {
                return Stage.class;
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<Stage> getTerms() {
-               return TermStore.getStages();
-       }
 }
index 243eb00f028ddafd7821a0f9eb34b8e8af37ed66..6bb9724a7421f04f8696e21026014720a5139254 100644 (file)
 
 package eu.etaxonomy.taxeditor.preference.menu;
 
-import java.util.List;
-
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.store.TermStore;
 
 /**
  * <p>TaxonRelationshipTypeMenuPreferences class.</p>
@@ -42,13 +39,5 @@ public class TaxonRelationshipTypeMenuPreferences extends
        protected Class<TaxonRelationshipType> getTermClass() {
                return TaxonRelationshipType.class;
        }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.preference.menu.AbstractMenuPreferences#getTerms()
-        */
-       @Override
-       protected List<TaxonRelationshipType> getTerms() {
-               return TermStore.getTaxonRelationshipTypes();
-       }
        
 }
index 6f3316e050eeb09a8408388f946fa8c460ac99c1..fcada2099860383358d86be1ffb73b30a5041538 100644 (file)
@@ -233,8 +233,11 @@ public class CdmStore {
        public static ConversationHolder createConversation() {
                ConversationHolder conversation = getCurrentApplicationConfiguration()
                                .NewConversation();
-
-               conversation.startTransaction();
+               try{
+                       conversation.startTransaction();
+               }catch(Exception e){
+                       StoreUtil.errorDialog("No database connection", CdmStore.class, "No database connection available", e);
+               }
                return conversation;
        }
 
index 0892ec48e47addd511a335fe558ac5b4833d4e09..4827b632ec01564285dc36d040482809ca322519 100644 (file)
@@ -11,6 +11,7 @@
 package eu.etaxonomy.taxeditor.store;
 
 import java.sql.SQLException;
+import java.util.concurrent.CancellationException;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -26,7 +27,7 @@ import eu.etaxonomy.cdm.database.ICdmDataSource;
 import eu.etaxonomy.cdm.model.common.CdmMetaData;
 import eu.etaxonomy.cdm.model.common.CdmMetaData.MetaDataPropertyName;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
-import eu.etaxonomy.taxeditor.ui.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
 
 /**
@@ -86,19 +87,22 @@ class CdmStoreConnector extends Job {
 
                if (!monitor.isCanceled()) {
                        CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
-                                       .CreateSubMonitor(monitor, IProgressMonitor.UNKNOWN);
+                                       .CreateSubMonitor(monitor, 7);
                        // This is where we instantiate the application controller
                        try {
                                applicationController = CdmApplicationController.NewInstance(
                                                applicationContextBean, dataSource, dbSchemaValidation,
                                                false, subprogressMonitor);
                        } catch (Exception e) {
+                               if(! causeIsCancelationExceptionRecursive(e)){
+                                       return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
+                               }
+                       } finally {
                                monitor.done();
-                               return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
                        }
                }
-
-               monitor.done();
+               
+               
 
                if (!monitor.isCanceled()) {
                        CdmStore.setInstance(applicationController, dataSource);
@@ -213,6 +217,16 @@ class CdmStoreConnector extends Job {
                }
        }
 
+       private boolean causeIsCancelationExceptionRecursive(Throwable throwable){
+               if(throwable == null){
+                       return false;
+               }else if(throwable instanceof CancellationException){
+                       return true;
+               }else{
+                       return causeIsCancelationExceptionRecursive(throwable.getCause());
+               }
+       }
+       
        private void checkDatabaseReachable(IProgressMonitor monitor) {
                try {
                        monitor.subTask("Checking if datasource is reachable.");
index c5d8057002d999c2af43b11c6f2ce7ee22407707..f5c4c7d318672bd210212775e8044d94e23d3522 100644 (file)
@@ -14,8 +14,12 @@ import java.util.UUID;
 
 import org.eclipse.core.commands.operations.IOperationHistory;
 import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
 
+import eu.etaxonomy.cdm.model.common.TermBase;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 
@@ -74,7 +78,19 @@ public class StoreUtil extends AbstractUtility {
         *
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId(){
+       public static String getPluginId(){
                return TaxeditorStorePlugin.PLUGIN_ID;
        }
+
+       /**
+        * 
+        * @return
+        */
+       public static IEditorInput getActiveEditorInput() {
+               IEditorPart activeEditor = getActiveEditor();
+               if (activeEditor != null){
+                       return activeEditor.getEditorInput();
+               }
+               return null;
+       }
 }
index f0b52dc890021cb1a23e3de55c2ff8610dcbeddf..9290201b4d889399ae512e6a9790fcfede76d671 100644 (file)
@@ -20,30 +20,8 @@ import java.util.UUID;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.ui.IMemento;
 
-import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.TermBase;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 
 /**
@@ -66,6 +44,15 @@ public class TermManager extends ContextListenerAdapter{
                CdmStore.getContextManager().addContextListener(this);
        }
        
+       /**
+        * 
+        * @param clazz
+        * @return
+        */
+       public <T extends DefinedTermBase> List<T> getPreferredTerms(Class<T> clazz){
+               return getFilteredTerms(TermStore.getTerms(clazz));
+       }
+       
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.model.ContextListenerAdapter#contextStart(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
         */
@@ -154,160 +141,202 @@ public class TermManager extends ContextListenerAdapter{
                return initialTerms.iterator().next().getClass().getName();
        }
        
-       /**
-        * <p>getPreferredSpecimenTypeDesignationStatus</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<SpecimenTypeDesignationStatus> getPreferredSpecimenTypeDesignationStatus() { return getFilteredTerms(TermStore.getSpecimenTypeDesignationStatus());}
-
-       /**
-        * <p>getPreferredNameTypeDesignationStatus</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<NameTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getFilteredTerms(TermStore.getNameTypeDesignationStatus()); }
-       
-       /**
-        * <p>getPreferredTaxonRelationshipTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<TaxonRelationshipType> getPreferredTaxonRelationshipTypes() { return getFilteredTerms(TermStore.getTaxonRelationshipTypes());}
-       
-       /**
-        * <p>getPreferredFeatures</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Feature> getPreferredFeatures() { return getFilteredTerms(TermStore.getFeatures());}
-
-       /**
-        * <p>getPreferredRanks</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Rank> getPreferredRanks() { return getFilteredTerms(TermStore.getRanks());}
-       
-       /**
-        * <p>getPreferredPresenceAbsenceTerms</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<PresenceAbsenceTermBase> getPreferredPresenceAbsenceTerms(){ return getFilteredTerms(TermStore.getPresenceAbsenceTerms());}
-       
-       /**
-        * <p>getPreferredNomenclaturalStatusTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<NomenclaturalStatusType> getPreferredNomenclaturalStatusTypes(){    return getFilteredTerms(TermStore.getNomenclaturalStatusTypes());}
-       
-       /**
-        * <p>getPreferredNameRelationshipTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<NameRelationshipType> getPreferredNameRelationshipTypes(){ return getFilteredTerms(TermStore.getNameRelationshipTypes());}
-       
-       /**
-        * <p>getPreferredLanguages</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Language> getPreferredLanguages() { return getFilteredTerms(TermStore.getLanguages()); }
-       
-       /**
-        * <p>getPreferredMarkerTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<MarkerType> getPreferredMarkerTypes() { return getFilteredTerms(TermStore.getNonTechnicalMarkerTypes()); }
-       
-       /**
-        * <p>getPreferredExtensionTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<ExtensionType> getPreferredExtensionTypes() { return getFilteredTerms(TermStore.getExtensionTypes()); }
-       
-       /**
-        * <p>getPreferredRightsTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<RightsTerm> getPreferredRightsTypes() {     return getFilteredTerms(TermStore.getRightsTypes());}
-       
-       /**
-        * <p>getPreferredNamedAreaTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<NamedAreaType> getPreferredNamedAreaTypes() { return getFilteredTerms(TermStore.getNamedAreaTypes()); } 
+//     /**
+//      * <p>getPreferredSpecimenTypeDesignationStatus</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<SpecimenTypeDesignationStatus> getPreferredSpecimenTypeDesignationStatus() { return getFilteredTerms(TermStore.getSpecimenTypeDesignationStatus());}
+//
+//     /**
+//      * <p>getPreferredNameTypeDesignationStatus</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<NameTypeDesignationStatus> getPreferredNameTypeDesignationStatus() { return getFilteredTerms(TermStore.getNameTypeDesignationStatus()); }
+//     
+//     /**
+//      * <p>getPreferredTaxonRelationshipTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<TaxonRelationshipType> getPreferredTaxonRelationshipTypes() { return getFilteredTerms(TermStore.getTaxonRelationshipTypes());}
+//     
+//     private static List<TaxonRelationshipType> excludeTaxonRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
+//                     TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
+//                     TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
+//                     TaxonRelationshipType.ALL_RELATIONSHIPS()
+//     });
+//     
+//     /**
+//      * Please note that the {@link TaxonRelationshipType}s TAXONOMICALLY_INCLUDED_IN, MISAPPLIED_NAME_FOR and ALL_RELATIONSHIPS
+//      * are filtered out as they are most likely not needed. If you do need them please refactor this method to your needs.
+//      * 
+//      * @return a list of {@link TaxonRelationshipTypeInverseContainer} elements
+//      */
+//     public List<TaxonRelationshipTypeInverseContainer> getPreferredRelationshipTypesWithInverses(){
+//             List<TaxonRelationshipTypeInverseContainer> relationshipTypeInverseContainers = new ArrayList<TaxonRelationshipTypeInverseContainer>();
+//             
+//             List<TaxonRelationshipType> relationshipTypes = getPreferredTaxonRelationshipTypes();
+//             
+//             relationshipTypes.removeAll(excludeTaxonRelationshipTypes);
+//             
+//             for (TaxonRelationshipType relationshipType : relationshipTypes){
+//                     if(!relationshipType.isSymmetric()){
+//                             TaxonRelationshipTypeInverseContainer inverseContainer = new TaxonRelationshipTypeInverseContainer(relationshipType, true);
+//                             relationshipTypeInverseContainers.add(inverseContainer);
+//                     }                       
+//                     TaxonRelationshipTypeInverseContainer container = new TaxonRelationshipTypeInverseContainer(relationshipType, false);
+//                     relationshipTypeInverseContainers.add(container);                       
+//             }               
+//             
+//             return relationshipTypeInverseContainers;
+//     }
        
-       /**
-        * <p>getPreferredAnnotationTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<AnnotationType> getPreferredAnnotationTypes() { return getFilteredTerms(TermStore.getAnnotationTypes()); } 
 
-       /**
-        * <p>getPreferredStages</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Stage> getPreferredStages() { return getFilteredTerms(TermStore.getStages()); }
        
-       /**
-        * <p>getPreferredPreservationMethods</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<PreservationMethod> getPreferredPreservationMethods() { return getFilteredTerms(TermStore.getPreservationMethods()); }
-       
-       /**
-        * <p>getPreferredMeasurementUnits</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<MeasurementUnit> getPreferredMeasurementUnits() { return getFilteredTerms(TermStore.getMeasurementUnits()); }
-       
-       /**
-        * <p>getPreferredStates</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<State> getPreferredStates() { return getFilteredTerms(TermStore.getStates()); }
-       
-       /**
-        * <p>getPreferredModifiers</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Modifier> getPreferredModifiers() { return getFilteredTerms(TermStore.getModifiers()); }
-       
-       /**
-        * <p>getPreferredStatisticalMeasures</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<StatisticalMeasure> getPreferredStatisticalMeasures() { return getFilteredTerms(TermStore.getStatisticalMeasures()); }
-       
-       /**
-        * <p>getPreferredScopes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<Scope> getPreferredScopes() { return getFilteredTerms(TermStore.getScopes()); }
-       
-       /**
-        * <p>getPreferredDeterminationModifiers</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public List<DeterminationModifier> getPreferredDeterminationModifiers() { return getFilteredTerms(TermStore.getDeterminationModifiers()); }
        
+//     
+//     /**
+//      * <p>getPreferredFeatures</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Feature> getPreferredFeatures() { return getFilteredTerms(TermStore.getFeatures());}
+//
+//     /**
+//      * <p>getPreferredRanks</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Rank> getPreferredRanks() { return getFilteredTerms(TermStore.getRanks());}
+//     
+//     /**
+//      * <p>getPreferredPresenceAbsenceTerms</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<PresenceAbsenceTermBase> getPreferredPresenceAbsenceTerms(){ return getFilteredTerms(TermStore.getPresenceAbsenceTerms());}
+//     
+//     /**
+//      * <p>getPreferredNomenclaturalStatusTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<NomenclaturalStatusType> getPreferredNomenclaturalStatusTypes(){    return getFilteredTerms(TermStore.getNomenclaturalStatusTypes());}
+//     
+//     /**
+//      * <p>getPreferredNameRelationshipTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<NameRelationshipType> getPreferredNameRelationshipTypes(){ return getFilteredTerms(TermStore.getNameRelationshipTypes());}
+//     
+//     /**
+//      * <p>getPreferredLanguages</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Language> getPreferredLanguages() { return getFilteredTerms(TermStore.getLanguages()); }
+//     
+//     /**
+//      * <p>getPreferredMarkerTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<MarkerType> getPreferredMarkerTypes() { return getFilteredTerms(TermStore.getNonTechnicalMarkerTypes()); }
+//     
+//     /**
+//      * <p>getPreferredExtensionTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<ExtensionType> getPreferredExtensionTypes() { return getFilteredTerms(TermStore.getExtensionTypes()); }
+//     
+//     /**
+//      * <p>getPreferredRightsTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<RightsTerm> getPreferredRightsTypes() {     return getFilteredTerms(TermStore.getRightsTypes());}
+//     
+//     /**
+//      * <p>getPreferredNamedAreaTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<NamedAreaType> getPreferredNamedAreaTypes() { return getFilteredTerms(TermStore.getNamedAreaTypes()); } 
+//     
+//     /**
+//      * <p>getPreferredNamedAreaTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<NamedAreaLevel> getPreferredNamedAreaLevels() { return getFilteredTerms(TermStore.getNamedAreaLevels()); } 
+//     
+//     /**
+//      * <p>getPreferredAnnotationTypes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<AnnotationType> getPreferredAnnotationTypes() { return getFilteredTerms(TermStore.getAnnotationTypes()); } 
+//
+//     /**
+//      * <p>getPreferredStages</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Stage> getPreferredStages() { return getFilteredTerms(TermStore.getStages()); }
+//     
+//     /**
+//      * <p>getPreferredPreservationMethods</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<PreservationMethod> getPreferredPreservationMethods() { return getFilteredTerms(TermStore.getPreservationMethods()); }
+//     
+//     /**
+//      * <p>getPreferredMeasurementUnits</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<MeasurementUnit> getPreferredMeasurementUnits() { return getFilteredTerms(TermStore.getMeasurementUnits()); }
+//     
+//     /**
+//      * <p>getPreferredStates</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<State> getPreferredStates() { return getFilteredTerms(TermStore.getStates()); }
+//     
+//     /**
+//      * <p>getPreferredModifiers</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Modifier> getPreferredModifiers() { return getFilteredTerms(TermStore.getModifiers()); }
+//     
+//     /**
+//      * <p>getPreferredStatisticalMeasures</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<StatisticalMeasure> getPreferredStatisticalMeasures() { return getFilteredTerms(TermStore.getStatisticalMeasures()); }
+//     
+//     /**
+//      * <p>getPreferredScopes</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<Scope> getPreferredScopes() { return getFilteredTerms(TermStore.getScopes()); }
+//     
+//     /**
+//      * <p>getPreferredDeterminationModifiers</p>
+//      *
+//      * @return a {@link java.util.List} object.
+//      */
+//     public List<DeterminationModifier> getPreferredDeterminationModifiers() { return getFilteredTerms(TermStore.getDeterminationModifiers()); }
+//     
        /**
         * Generic method to set term preferences
         *
@@ -328,19 +357,4 @@ public class TermManager extends ContextListenerAdapter{
                
                hiddenTermsMap.put(typeName, undesiredTermUuids);
        }
-       
-       /**
-        * <p>addTermToPreferredTerms</p>
-        *
-        * @param term a T object.
-        * @param <T> a T object.
-        */
-       public <T extends TermBase> void addTermToPreferredTerms(T term){
-
-//             VocabularyEnum vocabulary = VocabularyEnum.getVocabularyEnum(term.getClass());
-//             
-//             getPreferenceStore().setValue(getPreferenceKey(term), VocabularyStore.getTermVocabulary(vocabulary).getTerms().contains(term));
-//             
-//             firePreferencesChanged(term.getClass());
-       }
 }
index d462cc8ca5a464566e01b5adcb7179efd271d53d..ab52136365b62548298657675f3629e01fe29a6a 100644 (file)
 package eu.etaxonomy.taxeditor.store;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import eu.etaxonomy.cdm.api.service.ITermService;
-import eu.etaxonomy.cdm.api.service.IVocabularyService;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.cdm.model.common.OrderedTermBase;
-import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
-import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.VocabularyEnum;
 import eu.etaxonomy.cdm.model.description.AbsenceTerm;
 import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.cdm.model.description.Modifier;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
 import eu.etaxonomy.cdm.model.description.PresenceTerm;
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.model.DefaultTermComparator;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
 /**
@@ -62,328 +43,214 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 public class TermStore {
        
        /**
-        * <p>getSpecimenTypeDesignationStatus</p>
-        *
-        * @return a {@link java.util.List} object.
+        * Returns an alphabetically sorted list of terms (anything that extends {@link DefinedTermBase}) of the given type currently available in the system. 
+        * 
+        * @param clazz a class that inherits from {@link DefinedTermBase}
+        * @return an alphabetically sorted list of terms
         */
-       public static List<SpecimenTypeDesignationStatus> getSpecimenTypeDesignationStatus() {
-               return getTerms(SpecimenTypeDesignationStatus.class);
+       public static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz){
+               return getTerms(clazz, null, true);
        }
        
-
        /**
-        * <p>getNameTypeDesignationStatus</p>
-        *
-        * @return a {@link java.util.List} object.
+        * Returns a list of terms of the given type currently available in the system. 
+        * If <code>filtered</code> is set to <code>true</code>, all terms for certain types will be
+        * gathered from edge cases.
+        * 
+        * @param clazz a class that inherits from {@link DefinedTermBase}
+        * @param comparator a {@link Comparator} that defines the sorting algorithm. If set to null, {@link DefaultTermComparator} will be used
+        * @param filtered if set to true, some terms are filtered from the result (according to definition in {@link ITermStoreEdgeCase}s)
+        * @return a sorted list of terms
         */
-       public static List<NameTypeDesignationStatus> getNameTypeDesignationStatus() {
-               return getTerms(NameTypeDesignationStatus.class);
+       public static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz, Comparator<TERM> comparator, boolean filtered){
+               List<TERM> terms = new ArrayList<TERM>();
+
+               ITermStoreEdgeCase<TERM> edgeCase = getEdgeCase(clazz);
+               if(filtered && edgeCase != null){
+                       terms = edgeCase.getTerms();
+               }else{
+                       terms = getTermsFromService(clazz, comparator);
+               }
+               
+               return terms;
+               
        }
        
        /**
-        * <p>getNamedAreaTypes</p>
-        *
-        * @return a {@link java.util.List} object.
+        * 
+        * @param termClass
+        * @param comparator
+        * @return
         */
-       public static List<NamedAreaType> getNamedAreaTypes(){
-               return getTerms(NamedAreaType.class);
+       private static <T extends DefinedTermBase> List<T> getTermsFromService(Class<T> termClass, Comparator<T> comparator){
+               if (comparator == null){
+                       comparator = new DefaultTermComparator<T>();
+               }
+               
+               List<T> terms = CdmStore.getService(ITermService.class).listByTermClass(termClass, null, null, null, null);
+               Collections.sort(terms, comparator);
+               return terms;
        }
        
        /**
-        * <p>getAnnotationTypes</p>
-        *
-        * @return a {@link java.util.List} object.
+        * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
         */
-       public static List<AnnotationType> getAnnotationTypes(){
-               return getTerms(AnnotationType.class);
+       public static void saveTerm(DefinedTermBase term){
+               CdmStore.getService(ITermService.class).saveOrUpdate(term);
        }
        
        /**
-        * <p>getTaxonRelationshipTypes</p>
+        * <p>delete</p>
         *
-        * @return a {@link java.util.List} object.
+        * @param selected a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
         */
-       public static List<TaxonRelationshipType> getTaxonRelationshipTypes(){
-               return getTerms(TaxonRelationshipType.class);
+       public static void delete(DefinedTermBase selected) {
+               CdmStore.getService(ITermService.class).delete(selected);
        }
        
-       
        /**
-        * <p>getLanguages</p>
+        * Save a vacabulary to data store
         *
-        * @return a {@link java.util.List} object.
+        * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
         */
-       public static List<Language> getLanguages(){
-               return getTerms(Language.class);
+       public static void updateVocabulary(DefinedTermBase term) {
+               CdmStore.getService(ITermService.class).saveOrUpdate(term);
        }
-       
-       /**
-        * <p>getFeatures</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<Feature> getFeatures() {
-               List<Feature> features = getTerms(Feature.class);
-               features.remove(Feature.IMAGE());
-               return features;
 
-       }
-       
        /**
-        * <p>getNameRelationshipTypes</p>
-        *
-        * @return a {@link java.util.List} object.
+        * Handingling of special cases
         */
-       public static List<NameRelationshipType> getNameRelationshipTypes() {
-               return getTerms(NameRelationshipType.class);
-       }
        
-       /**
-        * <p>getNomenclaturalStatusTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<NomenclaturalStatusType> getNomenclaturalStatusTypes(){
-               return getTerms(NomenclaturalStatusType.class);
-       }
+       private static Set<ITermStoreEdgeCase<? extends DefinedTermBase>> termStoreEdgeCases = new HashSet<ITermStoreEdgeCase<? extends DefinedTermBase>>();
        
+       static {
+               termStoreEdgeCases.add(new ITermStoreEdgeCase<Feature>() {
 
-       /**
-        * <p>getNonTechnicalMarkerTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<MarkerType> getNonTechnicalMarkerTypes() {
-               List<MarkerType> nonTechnicalMarkerTypes = new ArrayList<MarkerType>();
-               List<MarkerType> markerTypes = getTerms(MarkerType.class);
-               
-               for (Object type : markerTypes) {
-                       if (((MarkerType) type).isTechnical() == false) {
-                               nonTechnicalMarkerTypes.add((MarkerType) type);
+                       @Override
+                       public Class<Feature> getTermClass() {
+                               return Feature.class;
                        }
-               }
-               
-               return nonTechnicalMarkerTypes;
-       }
-       
 
-       /**
-        * <p>getExtensionTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<ExtensionType> getExtensionTypes() {
-               return getTerms(ExtensionType.class);
-       }
-       
-       /**
-        * <p>getRightsTypes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<RightsTerm> getRightsTypes() {
-               return getTerms(RightsTerm.class);
-       }
-       
-       
-       /**
-        * Retrieve all ranks from data store.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<Rank> getRanks(){
-               if(PreferencesUtil.getSortRanksHierarchichally()){
-                       return getTerms(Rank.class, new Comparator<Rank>(){
-       
-                               @Override
-                               public int compare(Rank o1, Rank o2) {
-                                       return o1.compareTo(o2);
+                       @Override
+                       public List<Feature> getTerms() {
+                               List<Feature> features = TermStore.getTermsFromService(Feature.class, null);
+                               features.remove(Feature.IMAGE());
+                               return features;
+                       }
+               });
+               termStoreEdgeCases.add(new ITermStoreEdgeCase<MarkerType>(){
+
+                       @Override
+                       public Class<MarkerType> getTermClass() {
+                               return MarkerType.class;
+                       }
+
+                       @Override
+                       public List<MarkerType> getTerms() {
+                               // filter out non technical markers
+                               List<MarkerType> nonTechnicalMarkerTypes = new ArrayList<MarkerType>();
+                               List<MarkerType> markerTypes = TermStore.getTermsFromService(MarkerType.class, null);
+                               
+                               for (Object type : markerTypes) {
+                                       if (((MarkerType) type).isTechnical() == false) {
+                                               nonTechnicalMarkerTypes.add((MarkerType) type);
+                                       }
                                }
                                
-                       });
-               }else{
-                       return getTerms(Rank.class);
-               }
-       }
-       
-       
-       /**
-        * Retrieve all presence and absence terms from data store.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<PresenceAbsenceTermBase> getPresenceAbsenceTerms() {
-               List presenceAbsenceTerms = getTerms(PresenceTerm.class);
-               presenceAbsenceTerms.addAll(getTerms(AbsenceTerm.class));
+                               return nonTechnicalMarkerTypes;
+                       }
+                       
+               });
+               termStoreEdgeCases.add(new ITermStoreEdgeCase<Rank>() {
 
-               return presenceAbsenceTerms;
-       }
+                       @Override
+                       public Class<Rank> getTermClass() {
+                               return Rank.class;
+                       }
 
-       /**
-        * Retrieve all stages from data store.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<Stage> getStages(){
-               return getTerms(Stage.class);
-       }
-       
-       /**
-        * Retrieve all states from data store.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<State> getStates() {
-               return getTerms(State.class);
-       }
-       
-       /**
-        * Retrieve all preservation methods from data store.
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<PreservationMethod> getPreservationMethods(){
-               return getTerms(PreservationMethod.class);
-       }
-       
-       
+                       @Override
+                       public List<Rank> getTerms() {
+                               if(PreferencesUtil.getSortRanksHierarchichally()){
+                                       return TermStore.getTermsFromService(Rank.class, new Comparator<Rank>(){
+                       
+                                               @Override
+                                               public int compare(Rank o1, Rank o2) {
+                                                       return o1.compareTo(o2);
+                                               }
+                                               
+                                       });
+                               }else{
+                                       return TermStore.getTermsFromService(Rank.class, null);
+                               }
+                       }
+                       
+               });
+               termStoreEdgeCases.add(new ITermStoreEdgeCase<PresenceAbsenceTermBase>() {
 
-       /**
-        * <p>getMeasurementUnits</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<MeasurementUnit> getMeasurementUnits() {
-               return getTerms(MeasurementUnit.class);
-       }
-       
+                       @Override
+                       public Class<PresenceAbsenceTermBase> getTermClass() {
+                               return PresenceAbsenceTermBase.class;
+                       }
 
-       /**
-        * <p>getModifiers</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<Modifier> getModifiers() {
-               return getTerms(Modifier.class);
-       }
+                       @Override
+                       public List<PresenceAbsenceTermBase> getTerms() {
+                               List presenceAbsenceTerms = TermStore.getTermsFromService(PresenceTerm.class, null);
+                               presenceAbsenceTerms.addAll(TermStore.getTermsFromService(AbsenceTerm.class, null));
 
+                               return presenceAbsenceTerms;
+                       }
+               });
+               termStoreEdgeCases.add(new ITermStoreEdgeCase<TaxonRelationshipTypeInverseContainer>() {
 
-       /**
-        * <p>getStatisticalMeasures</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<StatisticalMeasure> getStatisticalMeasures() {
-               return getTerms(StatisticalMeasure.class);
-       }
-       
-       /**
-        * <p>getScopes</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<Scope> getScopes() {
-               return getTerms(Scope.class);
-       }
-       
-       /**
-        * <p>getDeterminationModifiers</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<DeterminationModifier> getDeterminationModifiers() {
-               return getTerms(DeterminationModifier.class);
-       }
-       
-       /**
-        * <p>getReferenceSystems</p>
-        *
-        * @return a {@link java.util.List} object.
-        */
-       public static List<ReferenceSystem> getReferenceSystems() {
-               return getTerms(ReferenceSystem.class);
-       }
-       
-       /**
-        ************* save methods *****************************
-        *
-        * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
-        */
-       public static void saveTerm(DefinedTermBase term){
-               getTermService().saveOrUpdate(term);
-       }
-       
-       /**
-        * <p>delete</p>
-        *
-        * @param selected a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
-        */
-       public static void delete(DefinedTermBase selected) {
-               getTermService().delete(selected);
-       }
-       
-       /**
-        * Save a vacabulary to data store
-        *
-        * @param term a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase} object.
-        */
-       public static void updateVocabulary(DefinedTermBase term) {
-               getTermService().saveOrUpdate(term);
-       }
-       
-       
-       
-       /*************** internal methods **************************/
-       
-       private static Language getDefaultLanguage(){
-               return CdmStore.getDefaultLanguage();
-       }
-       
-       private static OrderedTermVocabulary<? extends OrderedTermBase> getOrderedTermVocabulary(VocabularyEnum vocabularyType){
-               TermVocabulary<DefinedTermBase> vocabulary = getTermVocabulary(vocabularyType);         
-               return HibernateProxyHelper.deproxy(vocabulary, OrderedTermVocabulary.class);
+                       @Override
+                       public Class<TaxonRelationshipTypeInverseContainer> getTermClass() {
+                               return TaxonRelationshipTypeInverseContainer.class;
+                       }
+
+                       @Override
+                       public List<TaxonRelationshipTypeInverseContainer> getTerms() {
+                               List<TaxonRelationshipType> excludeTaxonRelationshipTypes = Arrays.asList(new TaxonRelationshipType[]{
+                                       TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(),
+                                       TaxonRelationshipType.MISAPPLIED_NAME_FOR(),
+                                       TaxonRelationshipType.ALL_RELATIONSHIPS()       
+                               });
+                               
+                               List<TaxonRelationshipTypeInverseContainer> relationshipTypeInverseContainers = new ArrayList<TaxonRelationshipTypeInverseContainer>();
+                               
+                               List<TaxonRelationshipType> relationshipTypes = TermStore.getTerms(TaxonRelationshipType.class);
+                               
+                               relationshipTypes.removeAll(excludeTaxonRelationshipTypes);
+                               
+                               for (TaxonRelationshipType relationshipType : relationshipTypes){
+                                       if(!relationshipType.isSymmetric()){
+                                               TaxonRelationshipTypeInverseContainer inverseContainer = new TaxonRelationshipTypeInverseContainer(relationshipType, true);
+                                               relationshipTypeInverseContainers.add(inverseContainer);
+                                       }                       
+                                       TaxonRelationshipTypeInverseContainer container = new TaxonRelationshipTypeInverseContainer(relationshipType, false);
+                                       relationshipTypeInverseContainers.add(container);                       
+                               }               
+                               
+                               return relationshipTypeInverseContainers;
+                       }
+               });
        }
        
-       /**
-        * <p>getTermVocabulary</p>
-        *
-        * @param vocabularyType a {@link eu.etaxonomy.cdm.model.common.VocabularyEnum} object.
-        * @return a {@link eu.etaxonomy.cdm.model.common.TermVocabulary} object.
-        */
-       public static TermVocabulary<DefinedTermBase> getTermVocabulary(VocabularyEnum vocabularyType){
+       private static <T extends DefinedTermBase> ITermStoreEdgeCase<T> getEdgeCase(Class<T> termClass) {
                
-               return CdmStore.getService(IVocabularyService.class).getVocabulary(vocabularyType);
-       }
-       
-       private static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz){
-               Comparator<TERM> comparator = new Comparator<TERM>() {
-                       @Override
-                       public int compare(TERM o1, TERM o2) {
-                               String label1 = o1.getLabel(getDefaultLanguage()) != null ? o1.getLabel(getDefaultLanguage()) : o1.getTitleCache();
-                               String label2 = o2.getLabel(getDefaultLanguage()) != null ? o2.getLabel(getDefaultLanguage()) : o2.getTitleCache();
-                               return label1.compareTo(label2);
+               for (ITermStoreEdgeCase termStoreEdgeCase : termStoreEdgeCases){
+                       if (termStoreEdgeCase.getTermClass().equals(termClass)){
+                               return termStoreEdgeCase;
                        }
-               };
+               }
                
-               return getTerms(clazz, comparator);
+               return null;
        }
        
-       
-       private static <TERM extends DefinedTermBase> List<TERM> getTerms(Class<TERM> clazz, Comparator<TERM> comparator){
+       private interface ITermStoreEdgeCase<TERM> {
 
+               public abstract Class<TERM> getTermClass();
                
-               List<TERM> terms = new ArrayList<TERM>();
-               if(getTermService() != null){
-                       terms = getTermService().listByTermClass(clazz, null, null, null, null);
+               public abstract List<TERM> getTerms();
                
-                       Collections.sort(terms, comparator); 
-               }
-               
-               return terms;
-               
-       }
-       
-       private static ITermService getTermService(){
-               return CdmStore.getService(ITermService.class);
        }
 }
similarity index 53%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractEnumComboElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java
index 1452ce07c9e91ceaf4c95f2b219eab54e2998513..addb64ae527100013ec29a88c48570907063b58f 100644 (file)
@@ -8,9 +8,11 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.term;
+package eu.etaxonomy.taxeditor.ui.combo;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 
 import org.eclipse.swt.SWT;
@@ -20,14 +22,18 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Label;
 
+import eu.etaxonomy.cdm.model.common.IDefinedTerm;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.cdm.model.reference.ReferenceType;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * <p>
@@ -38,11 +44,50 @@ import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
  * @created Mar 16, 2010
  * @version 1.0
  */
-public abstract class AbstractEnumComboElement<T extends Enum> extends
+public class EnumComboElement<T extends IDefinedTerm> extends
                AbstractCdmFormElement implements SelectionListener,
                IEnableableFormElement, ISelectable {
 
-       private static final int VISIBLE_ITEMS = 10;
+       private static CdmEnumDataHolder[] cdmEnumDataHolders = {
+               new CdmEnumDataHolder<NomenclaturalCode>(){
+                       
+                       @Override
+                       public String getName() {
+                               return "Nomenclatural Code";
+                       }
+
+                       @Override
+                       public Collection<NomenclaturalCode> getElements() {
+                               return  Arrays.asList(NomenclaturalCode.values());
+                       }
+
+                       @Override
+                       public Class<NomenclaturalCode> getClazz() {
+                               return NomenclaturalCode.class;
+                       }
+                       
+               },
+               new CdmEnumDataHolder<ReferenceType>(){
+
+                       @Override
+                       public String getName() {
+                               return "Reference Type";
+                       }
+
+                       @Override
+                       public Collection<ReferenceType> getElements() {
+                               return Arrays.asList(ReferenceType.values());
+                       }
+
+                       @Override
+                       public Class<ReferenceType> getClazz() {
+                               return ReferenceType.class;
+                       }
+                       
+               }
+       };
+       
+       private static final int DEFAULT_VISIBLE_ITEMS = 10;
 
        protected T selection;
 
@@ -51,45 +96,62 @@ public abstract class AbstractEnumComboElement<T extends Enum> extends
        private Label label;
        protected Combo combo;
 
+       private Class<T> enumType;
+
        /**
         * <p>
         * Constructor for AbstractEnumComboElement.
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
         * @param <T>
         *            a T object.
         */
-       public AbstractEnumComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString) {
+       public EnumComboElement(CdmFormFactory formFactory,
+                       ICdmFormElement parentElement, Class<T> enumType, int style) {
                super(formFactory, parentElement);
-               label = formFactory.createLabel(getLayoutComposite(), labelString);
+               this.enumType = enumType;
+               label = formFactory.createLabel(getLayoutComposite(), getDefaultLabelString());
                addControl(label);
 
                // create combo
                combo = new Combo(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY);
                addControl(combo);
-               combo.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
-               combo.setVisibleItemCount(VISIBLE_ITEMS);
+               combo.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+               setVisibleItemCount(DEFAULT_VISIBLE_ITEMS);
 
                populateTypes();
 
                combo.addSelectionListener(this);
        }
 
+       private String getDefaultLabelString() {
+               if(enumType.equals(ReferenceType.class)){
+                       return "Reference Type";
+               }else if (enumType.equals(NomenclaturalCode.class)){
+                       return "Nomenclatural Code";
+               }
+               return "No Label";
+       }
+
        /**
         * <p>
         * populateTypes
         * </p>
         */
-       protected abstract void populateTypes();
+       private void populateTypes(){
+               for(T enumElement : getElementsForClass(enumType)){
+                       elementTypeList.add(enumElement);
+                       combo.add(((Enum) enumElement).name());
+               }
+       }
 
        /**
         * <p>
@@ -180,4 +242,31 @@ public abstract class AbstractEnumComboElement<T extends Enum> extends
        /** {@inheritDoc} */
        public void widgetDefaultSelected(SelectionEvent e) {
        }
+       
+       public void setVisibleItemCount(int visibleItems){
+               combo.setVisibleItemCount(visibleItems);
+       }
+       
+       private Collection<T> getElementsForClass(Class<T> clazz){
+               CdmEnumDataHolder<T> dataHolder = getCdmEnumDataHolderForClass(clazz);
+               if (dataHolder != null) {
+                       return dataHolder.getElements(); 
+               }
+               return null;
+       }
+       
+       private CdmEnumDataHolder<T> getCdmEnumDataHolderForClass(Class<T> clazz){
+               for (CdmEnumDataHolder dataHolder : cdmEnumDataHolders) {
+                       if (dataHolder.getClazz().equals(clazz)){
+                               return dataHolder;
+                       }
+               }
+               return null;
+       }
+       
+       private interface CdmEnumDataHolder<T> {
+               Class<T> getClazz();
+               String getName();
+               Collection<T> getElements();
+       }
 }
similarity index 65%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AbstractTermComboElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java
index a6180bfe5881bff16b65c1770c9b5c016afaf6c8..c43ac73e0ab1ec0b7118a81bb0bfff538c154c94 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.term;
+package eu.etaxonomy.taxeditor.ui.combo;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -16,7 +16,6 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
 
@@ -26,12 +25,13 @@ import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.store.TermManager;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * <p>
@@ -43,14 +43,16 @@ import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
  * @version 1.0
  * @param <T>
  */
-public abstract class AbstractTermComboElement<T extends DefinedTermBase>
+public class TermComboElement<T extends DefinedTermBase>
                extends AbstractCdmFormElement implements SelectionListener,
                DisposeListener, IEnableableFormElement, ISelectable {
 
-       T selection;
+       private static final int DEFAULT_VISIBLE_ITEMS = 10;
+       
+       private T selection;
 
+       private T emptyElement;
        private static String EMPTY_ELEMENT_LABEL = "";
-       T emptyElement;
 
        protected Label label;
        private Combo combo;
@@ -59,7 +61,10 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
 
        private Comparator<T> termComparator;
 
-       private Composite msgComposite;
+       private Class<T> termClass;
+
+       private List<T> customPreferredTerms;
+
 
        /**
         * <p>
@@ -67,12 +72,12 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -83,11 +88,13 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
         * @param <T>
         *            a T object.
         */
-       public AbstractTermComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, T selection,
-                       int visibleItems, int style) {
+       public TermComboElement(CdmFormFactory formFactory,
+                       ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection,
+                       int style) {
                super(formFactory, parentElement);
-
+               
+               this.termClass = termClass;
+               
                if (labelString != null) {
                        label = formFactory.createLabel(getLayoutComposite(), labelString);
                        addControl(label);
@@ -96,10 +103,10 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
                // create combo
                combo = new Combo(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY);
                addControl(combo);
-               combo.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
-               combo.setVisibleItemCount(visibleItems);
+               combo.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+               combo.setVisibleItemCount(DEFAULT_VISIBLE_ITEMS);
 
-               populateTerms(preferredTerms());
+               populateTerms(getPreferredTerms());
 
                combo.addSelectionListener(this);
                combo.addDisposeListener(this);
@@ -122,32 +129,47 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
        }
 
        /**
-        * <p>
-        * Setter for the field <code>selection</code>.
-        * </p>
+        * <p>Sets the selection of the combo to the given T object.</p>
+        * <p>Passing <code>null</code> to this method will set the selection to 
+        * the empty element and effectively clear the selection</p>
         * 
         * @param selection
-        *            a T object.
+        *            a T object or <code>null</code> to clear the selection
         */
-       public void setSelection(T selection) {
+       public void setSelection(T selection) {                 
+               this.selection = selection;
+               
+               this.selection = selection;
+               
                Listener[] listeners = combo.getListeners(SWT.Selection);
 
                for (Listener listener : listeners) {
                        combo.removeListener(SWT.Selection, listener);
                }
-
-               int index = terms.indexOf(selection);
-               if (index == -1) {
-                       createTermNotInPreferredTerms(selection);
-                       index = terms.indexOf(selection);
+               int selectedIndex;
+               if(selection == null){
+                       // set selection to the emptyElement
+                       selectedIndex = 0;
+               }else{
+                       selectedIndex = terms.indexOf(selection);
+                       if (selectedIndex == -1) {
+                               createTermNotInPreferredTerms(selection);
+                               selectedIndex = terms.indexOf(selection);
+                       }
                }
-               combo.select(index);
+               combo.select(selectedIndex);
 
                for (Listener listener : listeners) {
                        combo.addListener(SWT.Selection, listener);
                }
        }
 
+       /**
+        * Fills the combo with elements and sets up the convenience functions
+        * for selection index
+        * 
+        * @param preferredTerms
+        */
        private void populateTerms(List<T> preferredTerms) {
 
                combo.removeAll();
@@ -157,7 +179,7 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
                int i = 1;
                int index = 0;
 
-               // Add an empty element for when nothing was selected already
+               // Add an empty element for when nothing was selected yet
                combo.add(EMPTY_ELEMENT_LABEL);
                terms.add(emptyElement);
 
@@ -169,14 +191,14 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
                        if (label == null) {
                                if (term.getTitleCache() != null) {
                                        label = term.getTitleCache();
-                                       StoreUtil.error(getClass(),
+                                       StoreUtil.warn(getClass(),
                                                        "Term does not have a representation: " + term
-                                                                       + ", " + term.getUuid(), null);
+                                                                       + ", " + term.getUuid());
                                } else {
                                        label = "Unknown";
-                                       StoreUtil.error(getClass(),
+                                       StoreUtil.warn(getClass(),
                                                        "Representation Label and TitleCache empty for term: "
-                                                                       + term + ", " + term.getUuid(), null);
+                                                                       + term + ", " + term.getUuid());
                                }
 
                        }
@@ -217,7 +239,12 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
         * 
         * @return a {@link java.util.List} object.
         */
-       protected abstract List<T> preferredTerms();
+       protected List<T> getPreferredTerms(){
+               if (customPreferredTerms != null){
+                       return customPreferredTerms;
+               }
+               return getTermManager().getPreferredTerms(termClass);
+       }
 
        /**
         * May be overridden by derived classes if the desired label string does not
@@ -231,8 +258,13 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
                return term.getLabel(CdmStore.getDefaultLanguage());
        }
 
+       /**
+        * 
+        * 
+        * @param term
+        */
        private void createTermNotInPreferredTerms(T term) {
-               List<T> preferredTerms = preferredTerms();
+               List<T> preferredTerms = getPreferredTerms();
 
                preferredTerms.add(term);
 
@@ -288,7 +320,7 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
                if (event != null
                                && PreferencesUtil.PREFERRED_TERMS_CHANGE.equals(event
                                                .getProperty())) {
-                       populateTerms(preferredTerms());
+                       populateTerms(getPreferredTerms());
                }
        }
 
@@ -329,4 +361,35 @@ public abstract class AbstractTermComboElement<T extends DefinedTermBase>
        protected TermManager getTermManager() {
                return CdmStore.getTermManager();
        }
+       
+       /**
+        * 
+        * @return
+        */
+       public int getVisibleItemCount(){
+               return combo.getVisibleItemCount();
+       }
+       
+       /**
+        * 
+        * @param count
+        */
+       public void setVisibleItemCount(int count){
+               combo.setVisibleItemCount(count);
+       }
+
+       /**
+        * <p>A {@link List} of term objects may be passed to this combo box. In this case, the default behaviour
+        * of displaying the preferred terms for the T type will be overridden and the combo will only display the 
+        * given terms. Also, any previous selection will be reseted.</p>
+        * 
+        * <p>To return to the default of displaying the preferred terms, simply pass <code>null</code>.</p>
+        * 
+        * @param terms a {@link List} of T objects or <code>null</code> for default preferred terms
+        */
+       public void setTerms(List<T> terms) {
+               setSelection(null);
+               customPreferredTerms = terms;
+               populateTerms(customPreferredTerms);
+       }
 }
similarity index 98%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialog.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java
index 51de1b0543615a1cb86683820a9f8fde36053517..eaa7ae53c079ff48517a30a108048d208c1471dd 100644 (file)
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.dialogs;
+package eu.etaxonomy.taxeditor.ui.dialog;
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialog;
similarity index 97%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/UriDialog.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java
index 601847e640683910a6522636389fd46bfe7d07dc..1151df8f22bd9e7b6c5ee7f85cca145f79ad8ccd 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.dialogs;
+package eu.etaxonomy.taxeditor.ui.dialog;
 
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.lang.reflect.Field;
 import java.text.Collator;
@@ -67,6 +67,8 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        private Set<T> transientCdmObjects = new HashSet<T>();
        private String settings;        
        
+       protected T cdmBaseToBeFiltered;
+       
        /**
         * <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
         *
@@ -131,7 +133,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        /**
         * <p>getSelectionFromDialog</p>
         *
-        * @param dialog a {@link eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog} object.
+        * @param dialog a {@link eu.etaxonomy.taxeditor.ui.dialog.selection.AbstractFilteredCdmResourceSelectionDialog} object.
         * @param <TYPE> a TYPE object.
         * @return a TYPE object.
         */
@@ -217,6 +219,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        @Override
        public void refresh() {
                initModel();
+               filterExcludedObjects();
                super.refresh();
        }
        
@@ -488,4 +491,22 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
        
        /** {@inheritDoc} */
        public void update(CdmDataChangeMap changeEvents) {}
+
+       /**
+        * Don't want to add a taxon or synonym to itself so filter the list to remove the taxon in question
+        * so it is not available to add as a concept relation
+        */
+       private void filterExcludedObjects() {
+               if (model != null && cdmBaseToBeFiltered != null) {
+                       
+                       UuidAndTitleCache uuidAndTitleCacheToRemove = null;
+                                               
+                       for (UuidAndTitleCache uuidAndTitleCache : model){
+                               if ((cdmBaseToBeFiltered.getUuid()).equals(uuidAndTitleCache.getUuid())) {
+                                       uuidAndTitleCacheToRemove = uuidAndTitleCache;
+                               }                               
+                       }
+                       model.remove(uuidAndTitleCacheToRemove);
+               }
+       }
 }
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.util.UUID;
 
@@ -44,10 +44,11 @@ public class ClassificationSelectionDialog extends
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
+        * @param curentSelection 
         * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
         */
        public static Classification select(Shell shell,
-                       ConversationHolder conversation) {
+                       ConversationHolder conversation, Classification curentSelection) {
                ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(
                                shell, conversation, "Choose a Classification", false, "", null);
                return getSelectionFromDialog(dialog);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SelectionDialogFactory.java
new file mode 100644 (file)
index 0000000..2cab212
--- /dev/null
@@ -0,0 +1,117 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.dialog.selection;
+
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Institution;
+import eu.etaxonomy.cdm.model.agent.Person;
+import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.FeatureTree;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.occurrence.Collection;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
+import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+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.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 25, 2012
+ *
+ */
+public class SelectionDialogFactory {
+
+       public static <T extends ICdmBase> T getSelectionFromDialog(Class<T> clazz, Shell shell, ConversationHolder conversation, T curentSelection){
+               
+               if(clazz.equals(Taxon.class)){
+                       return (T) TaxonBaseSelectionDialog.selectTaxon(shell, conversation, (Taxon) curentSelection);
+               }
+               if(clazz.equals(Synonym.class)){
+                       return (T) TaxonBaseSelectionDialog.selectSynonym(shell, conversation);
+               }
+               if(clazz.equals(TaxonBase.class)){
+                       return (T) TaxonBaseSelectionDialog.selectTaxonBase(shell, conversation);
+               }
+               if(clazz.equals(Classification.class)){
+                       return (T) ClassificationSelectionDialog.select(shell, conversation, (Classification) curentSelection);
+               }
+               if(clazz.equals(TaxonNode.class)){
+                       return (T) TaxonNodeSelectionDialog.select(shell, conversation, null, null, (TaxonNode) curentSelection, null);
+               }
+               if(clazz.equals(Reference.class)){
+                       return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) curentSelection);
+               }
+               if(clazz.equals(TaxonNameBase.class)){
+                       return (T) NameSelectionDialog.select(shell, conversation, (TaxonNameBase) curentSelection);
+               }
+               if(clazz.equals(Team.class)){
+                       return (T) TeamSelectionDialog.select(shell, conversation, (Team) curentSelection);
+               }
+               if(clazz.equals(AgentBase.class)){
+                       return (T) AgentSelectionDialog.select(shell, conversation, (AgentBase) curentSelection);
+               }
+               if(clazz.equals(Feature.class)){
+                       return (T) FeatureSelectionDialog.select(shell, conversation, (Feature) curentSelection);
+               }
+               if(clazz.equals(FeatureTree.class)){
+                       return (T) FeatureTreeSelectionDialog.select(shell, conversation, (FeatureTree) curentSelection);
+               }
+               if(clazz.equals(PolytomousKey.class)){
+                       return (T) PolytomousKeySelectionDialog.select(shell, conversation, (PolytomousKey) curentSelection);
+               }
+               if(clazz.equals(PolytomousKeyNode.class)){
+                       StoreUtil.warningDialog("Not implemented yet", SelectionDialogFactory.class,
+                                       "This functionality is not implemented yet.");
+                       return null;
+               }
+               if(clazz.equals(DerivedUnitBase.class)){
+                       return (T) DerivedUnitSelectionDialog.select(shell, conversation, (DerivedUnitBase) curentSelection);
+               }
+               if(clazz.equals(FieldObservation.class)){
+                       return (T) FieldObservationSelectionDialog.select(shell, conversation, (FieldObservation) curentSelection);
+               }
+               if(clazz.equals(NamedArea.class)){
+                       return (T) NamedAreaSelectionDialog.select(shell, conversation, (NamedArea) curentSelection);
+               }
+               if(clazz.equals(Collection.class)){
+                       return (T) CollectionSelectionDialog.select(shell, conversation, (Collection) curentSelection);
+               }
+               if(clazz.equals(User.class)){
+                       return (T) UserSelectionDialog.select(shell, conversation, (User) curentSelection);
+               }
+               if (clazz.equals(Person.class)){
+                       return (T) PersonSelectionDialog.select(shell, conversation, (Person) curentSelection);
+               }
+               if(clazz.equals(Group.class)){
+                       return (T) GroupSelectionDialog.select(shell, conversation, (Group) curentSelection);
+               }
+               if(clazz.equals(Institution.class)){
+                       return (T) InstitutionSelectionDialog.select(shell, conversation, (Institution) curentSelection);
+               }
+                               
+               return null;
+       }
+       
+}
-// $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.ui.dialogs.filteredSelection;
-
-import java.util.UUID;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * <p>FilteredTaxonBaseSelectionDialog class.</p>
- *
- * @author n.hoffmann
- * @created Sep 21, 2009
- * @version 1.0
- */
-public class TaxonBaseSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {
-               
-       /**
-        * <p>select</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        */
-       public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {
-               TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,
-                               "Choose a taxon", false, null);
-               return getSelectionFromDialog(dialog);
-       }
-       
-       /**
-        * <p>select</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        */
-       public static Taxon selectTaxon(Shell shell, ConversationHolder conversation) {
-               TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,
-                               "Choose a taxon", false, null);
-               return (Taxon) getSelectionFromDialog(dialog);
-       }
-       
-       /**
-        * <p>select</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        */
-       public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {
-               TaxonBaseSelectionDialog dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,
-                               "Choose a taxon", false, null);
-               return (Synonym) getSelectionFromDialog(dialog);
-       }
-
-       private final Class<? extends TaxonBase> clazz;
-       
-       /**
-        * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param title a {@link java.lang.String} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param multi a boolean.
-        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        */
-       protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon) {
-               super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);
-               this.clazz = clazz;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected Control createExtendedContentArea(Composite parent) {
-               return null;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected TaxonBase getPersistentObject(UUID uuid) {
-               return CdmStore.getService(ITaxonService.class).load(uuid);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected void initModel() {
-               if(clazz == TaxonBase.class){
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();
-               }
-               else if(clazz == Taxon.class){
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();
-               }
-               else if(clazz == Synonym.class){
-                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();
-               }
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
-               return null;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected String getNewWizardLinkText() {
-               return null;
-       }
-}
+// $Id$\r
+/**\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.ui.dialog.selection;\r
+\r
+import java.util.UUID;\r
+\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.api.service.ITaxonService;\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.taxeditor.newWizard.AbstractNewEntityWizard;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+\r
+/**\r
+ * <p>FilteredTaxonBaseSelectionDialog class.</p>\r
+ *\r
+ * @author n.hoffmann\r
+ * @created Sep 21, 2009\r
+ * @version 1.0\r
+ */\r
+public class TaxonBaseSelectionDialog extends\r
+               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> {\r
+       \r
+               \r
+       /**\r
+        * <p>select</p>\r
+        *\r
+        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+        */\r
+       public static TaxonBase selectTaxonBase(Shell shell, ConversationHolder conversation) {\r
+               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(TaxonBase.class, shell, conversation,\r
+                               "Choose a taxon", false, null, null);\r
+               return getSelectionFromDialog(dialog);\r
+       }\r
+       \r
+       /**\r
+        * <p>select</p>\r
+        *\r
+        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+        */\r
+       public static Taxon selectTaxon(Shell shell, ConversationHolder conversation, Taxon taxonToBeFiltered) {\r
+               \r
+\r
+               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Taxon.class, shell, conversation,\r
+                               "Choose a taxon", false, null, taxonToBeFiltered);\r
+               return (Taxon) getSelectionFromDialog(dialog);\r
+       }\r
+       \r
+       /**\r
+        * <p>select</p>\r
+        *\r
+        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+        * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+        */\r
+       public static Synonym selectSynonym(Shell shell, ConversationHolder conversation) {\r
+               AbstractFilteredCdmResourceSelectionDialog<TaxonBase> dialog = new TaxonBaseSelectionDialog(Synonym.class, shell, conversation,\r
+                               "Choose a taxon", false, null, null);\r
+               return (Synonym) getSelectionFromDialog(dialog);\r
+       }\r
+\r
+       private final Class<? extends TaxonBase> clazz;\r
+       \r
+       /**\r
+        * <p>Constructor for FilteredTaxonBaseSelectionDialog.</p>\r
+        *\r
+        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.\r
+        * @param title a {@link java.lang.String} object.\r
+        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.\r
+        * @param multi a boolean.\r
+        * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.\r
+        */\r
+       protected TaxonBaseSelectionDialog(Class<? extends TaxonBase> clazz, Shell shell, ConversationHolder conversation, String title, boolean multi, TaxonBase taxon, TaxonBase taxonToBeFiltered) {\r
+               super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), taxon);\r
+               this.cdmBaseToBeFiltered = taxonToBeFiltered;\r
+\r
+               \r
+               \r
+               this.clazz = clazz;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected Control createExtendedContentArea(Composite parent) {\r
+               return null;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)\r
+        */\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected TaxonBase getPersistentObject(UUID uuid) {\r
+               return CdmStore.getService(ITaxonService.class).load(uuid);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()\r
+        */\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected void initModel() {\r
+               if(clazz == TaxonBase.class){\r
+                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCache();\r
+               }\r
+               else if(clazz == Taxon.class){\r
+                                               \r
+                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheTaxon();\r
+                       \r
+               }\r
+               else if(clazz == Synonym.class){\r
+                       model = CdmStore.getService(ITaxonService.class).getUuidAndTitleCacheSynonym();\r
+               }\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {\r
+               return null;\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected String getNewWizardLinkText() {\r
+               return null;\r
+       }\r
+}\r
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection;
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
 
 import java.util.List;
 import java.util.UUID;
@@ -58,10 +58,7 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
 
        private List<Classification> classifications;
        
-       private Classification selectedClassification;
-
-       private final Classification defaultClassification;
-       
+       private Classification selectedClassification;  
 
        /**
         * <p>Constructor for FilteredTaxonNodeSelectionDialog.</p>
@@ -84,7 +81,6 @@ public class TaxonNodeSelectionDialog extends AbstractFilteredCdmResourceSelecti
                if(classification != null){
                        selectedClassification = classification;
                }
-               defaultClassification = classification;
        }
 
 
similarity index 93%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmEntityWizardPage.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java
index 7ed3808a84c3370d589b54a4a3d2865e140b39d6..e04928fa8f31ed0575a4354fd6857df368c54c65 100644 (file)
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.apache.commons.lang.StringUtils;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -48,7 +48,7 @@ public abstract class AbstractCdmEntityWizardPage<T> extends WizardPage
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
@@ -91,12 +91,12 @@ public abstract class AbstractCdmEntityWizardPage<T> extends WizardPage
        @Override
        public void createControl(Composite parent) {
                ScrolledForm scrolledForm = formFactory.createScrolledForm(parent);
-               scrolledForm.getBody().setLayout(CdmFormFactory.LAYOUT());
+               scrolledForm.getBody().setLayout(LayoutConstants.LAYOUT());
 
                Composite control = formFactory.createComposite(scrolledForm.getBody());
-               control.setLayoutData(CdmFormFactory.FILL());
+               control.setLayoutData(LayoutConstants.FILL());
 
-               control.setLayout(CdmFormFactory.LAYOUT(2, false));
+               control.setLayout(LayoutConstants.LAYOUT(2, false));
                WizardPageRootElement rootElement = new WizardPageRootElement(
                                formFactory, control, getConversationHolder());
 
@@ -126,7 +126,7 @@ public abstract class AbstractCdmEntityWizardPage<T> extends WizardPage
         * Creates the detail element for this wizard page
         * 
         * @param rootElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @return a
         *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
similarity index 92%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java
index a1b3efb5610e8b0180027711e3f410d128f5d9d3..c0d3ca65a0ea018e0763d8d7d9556e4325662261 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.ConcurrentModificationException;
 import java.util.HashSet;
@@ -43,7 +43,7 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
        /**
         * <p>Constructor for AbstractCdmFormElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param layoutComposite a {@link org.eclipse.swt.widgets.Composite} object.
         */
        protected AbstractCdmFormElement(CdmFormFactory formFactory, Composite layoutComposite){
@@ -54,8 +54,8 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
        /**
         * <p>Constructor for AbstractCdmFormElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public AbstractCdmFormElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
                this(formFactory, formElement.getLayoutComposite());
@@ -66,7 +66,7 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
        /**
         * <p>Getter for the field <code>formFactory</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public CdmFormFactory getFormFactory() {
                return formFactory;
@@ -118,7 +118,7 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
        /**
         * <p>Getter for the field <code>parentElement</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public ICdmFormElement getParentElement(){
                return parentElement;
@@ -132,7 +132,7 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
        /**
         * <p>removeElement</p>
         *
-        * @param element a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param element a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        protected void removeElement(ICdmFormElement element){
                elements.remove(element);
@@ -273,7 +273,7 @@ public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter,
         *
         * It is good advice to check whether the PropertyChangeEvent is destined for the implementing composite.
         * Implementations should also check for null PropertyChangeEvents and return immediately in that case.
-        * @see eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+        * @see eu.etaxonomy.taxeditor.ui.element.ICdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
         */
        public void propertyChange(PropertyChangeEvent event) {
                // implement in subclasses
@@ -8,12 +8,13 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.ArrayList;
 import java.util.List;
 
 
+
 /**
  * <p>Abstract AbstractCdmFormElementWithErrors class.</p>
  *
@@ -28,8 +29,8 @@ public abstract class AbstractCdmFormElementWithErrors extends AbstractCdmFormEl
        /**
         * <p>Constructor for AbstractCdmFormElementWithErrors.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public AbstractCdmFormElementWithErrors(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
similarity index 87%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractFormSection.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
index 27e25d93a030ef01d3a876fd2ce2aea5691eb7a2..b245498e9ee82efbc0cfc3d715f0b7903c953434 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.ConcurrentModificationException;
 import java.util.HashSet;
@@ -25,6 +25,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.TypedListener;
 import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 import org.eclipse.ui.forms.widgets.ToggleHyperlink;
@@ -60,10 +61,6 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
        private ICdmFormElement parentElement;
 
-       private ConversationHolder conversation;
-
-       private boolean handlingPropertyChange;
-
        private Color persistentBackgroundColor;
 
        /**
@@ -76,16 +73,15 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * @param style
         *            a int.
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param <ENTITY>
         *            a ENTITY object.
         */
-       protected AbstractFormSection(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
+       protected AbstractFormSection(CdmFormFactory formFactory, ICdmFormElement parentElement,
                        int style) {
                super(parentElement.getLayoutComposite(), style);
 
@@ -93,14 +89,12 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
 
                this.formFactory = formFactory;
 
-               this.conversation = conversation;
-
-               this.setLayoutData(CdmFormFactory.FILL());
+               this.setLayoutData(LayoutConstants.FILL());
 
                Composite client = formFactory.createComposite(this, SWT.WRAP);
                client.setBackgroundMode(SWT.INHERIT_DEFAULT);
 
-               TableWrapLayout layout = CdmFormFactory.LAYOUT();
+               TableWrapLayout layout = LayoutConstants.LAYOUT();
                layout.bottomMargin = 10;
                layout.rightMargin = 5;
 
@@ -115,13 +109,13 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param selectionProvider
         *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
@@ -129,9 +123,9 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         *            a int.
         */
        protected AbstractFormSection(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       ICdmFormElement parentElement,
                        ISelectionProvider selectionProvider, int style) {
-               this(formFactory, conversation, parentElement, style);
+               this(formFactory, parentElement, style);
                this.selectionProvider = selectionProvider;
        }
 
@@ -196,7 +190,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * getSection
         * </p>
         * 
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *         object.
         */
        public AbstractFormSection<ENTITY> getSection() {
@@ -402,7 +396,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * </p>
         * 
         * @param element
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        protected void removeElement(ICdmFormElement element) {
@@ -454,7 +448,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * Getter for the field <code>parentElement</code>.
         * </p>
         * 
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public ICdmFormElement getParentElement() {
                return parentElement;
@@ -526,7 +520,7 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         * Getter for the field <code>formFactory</code>.
         * </p>
         * 
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public CdmFormFactory getFormFactory() {
                return formFactory;
@@ -556,10 +550,26 @@ public abstract class AbstractFormSection<ENTITY> extends Section implements
         *         object.
         */
        public ConversationHolder getConversationHolder() {
-               return conversation;
+               if(getParentElement() instanceof RootElement || getParentElement() == null){
+               
+                       IEditorPart activeEditor = StoreUtil.getActiveEditor();
+                       if(activeEditor instanceof IConversationEnabled){
+                               ConversationHolder conversation = ((IConversationEnabled) StoreUtil.getActiveEditor()).getConversationHolder();
+                               return conversation;
+                       }
+               }else if(getParentElement() instanceof IConversationEnabled){
+                       return ((IConversationEnabled) getParentElement()).getConversationHolder();
+               }
+               StoreUtil.errorDialog("Could not get conversation for AbstractFormSection", 
+                               getClass(), "There is an error in the implementation. There should have been an active editor but it wasn't", 
+                               new IllegalArgumentException());
+               return null;
+       
        }
 
        /** {@inheritDoc} */
        public void update(CdmDataChangeMap changeEvents) {
        }
+
+
 }
similarity index 88%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/BrowserElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BrowserElement.java
index e9211c32622b80a5bbdb8f0397aa676395deee5f..3664ed528399e07b6129fe58d2bb505b53a8cd0b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.net.URI;
 
@@ -12,6 +12,7 @@ import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.ui.forms.widgets.TableWrapData;
 
+
 /**
  * <p>BrowserElement class.</p>
  *
@@ -28,8 +29,8 @@ public class BrowserElement extends AbstractCdmFormElement implements ControlLis
         * <p>Constructor for BrowserElement.</p>
         *
         * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param imageUri a {@link java.net.URI} object.
         */
        protected BrowserElement(CdmFormFactory formFactory, ICdmFormElement parentElement, URI imageUri, int style) {
@@ -39,7 +40,7 @@ public class BrowserElement extends AbstractCdmFormElement implements ControlLis
                browser = new Browser(getLayoutComposite(), SWT.NONE);
                addControl(browser);
                
-               getLayoutComposite().setLayoutData(CdmFormFactory.FILL());
+               getLayoutComposite().setLayoutData(LayoutConstants.FILL());
                
 
                layoutBrowser();
@@ -54,7 +55,7 @@ public class BrowserElement extends AbstractCdmFormElement implements ControlLis
         * 
         */
        private void layoutBrowser() {
-               TableWrapData layoutData = CdmFormFactory.FILL();
+               TableWrapData layoutData = LayoutConstants.FILL();
                layoutData.heightHint = 1000;
                
                browser.setLayoutData(layoutData);
similarity index 73%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
index 7f71dc8bdf6ee611069eace92535056dff0b79d0..091dd7ee82ef577b09db3565542f9b8b8a846d8f 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -35,33 +35,27 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.IFormColors;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
 import org.eclipse.ui.internal.forms.widgets.FormFonts;
 import org.joda.time.Partial;
 import org.springframework.security.core.GrantedAuthority;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.agent.Institution;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.cdm.model.common.AnnotationType;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Credit;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.common.Extension;
-import eu.etaxonomy.cdm.model.common.ExtensionType;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.model.common.IDefinedTerm;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.MarkerType;
 import eu.etaxonomy.cdm.model.common.TimePeriod;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
@@ -70,64 +64,42 @@ import eu.etaxonomy.cdm.model.description.CommonTaxonName;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
 import eu.etaxonomy.cdm.model.description.KeyStatement;
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
 import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
 import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.cdm.model.description.Sex;
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.cdm.model.description.State;
 import eu.etaxonomy.cdm.model.description.StateData;
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
 import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
 import eu.etaxonomy.cdm.model.description.TaxonInteraction;
 import eu.etaxonomy.cdm.model.description.TextData;
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
 import eu.etaxonomy.cdm.model.location.Point;
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
 import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
 import eu.etaxonomy.cdm.model.occurrence.Specimen;
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-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.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.password.EditPasswordElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
 import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
+import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 import eu.etaxonomy.taxeditor.ui.section.EmptyElement;
 import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionDetailElement;
@@ -143,6 +115,8 @@ import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailElem
 import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.RefereneEntityDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
 import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
@@ -238,6 +212,8 @@ import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionElement;
@@ -256,60 +232,22 @@ import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ClassificationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureTreeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.FieldObservationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.GroupSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeyNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeySelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.SynonymSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonBaseSelectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TeamSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.UserSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
-import eu.etaxonomy.taxeditor.ui.term.AnnotationTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.DeterminationModifierComboElement;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ExtensionTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
-import eu.etaxonomy.taxeditor.ui.term.MarkerTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.MeasurementUnitComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ModifierComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NameTypeDesignationStatusComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NamedAreaTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalCodeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalStatusTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.PresenceAbsenceTermComboElement;
-import eu.etaxonomy.taxeditor.ui.term.PreservationMethodComboElement;
-import eu.etaxonomy.taxeditor.ui.term.RankComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceSystemComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.RightsTypeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.ScopeComboElement;
-import eu.etaxonomy.taxeditor.ui.term.SexComboElement;
-import eu.etaxonomy.taxeditor.ui.term.SpecimenTypeDesignationStatusComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StageComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StateComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StatisticalMeasureComboElement;
 
 /**
  * <p>
@@ -333,124 +271,6 @@ public class CdmFormFactory extends FormToolkit {
        private final int orientation = Window.getDefaultOrientation();
        private ISelectionProvider selectionProvider;
 
-       /**
-        * <p>
-        * LAYOUT
-        * </p>
-        * 
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
-        */
-       public static final TableWrapLayout LAYOUT() {
-               return LAYOUT(1, false);
-       }
-
-       /**
-        * <p>
-        * LAYOUT
-        * </p>
-        * 
-        * @param columns
-        *            a int.
-        * @param equalWidth
-        *            a boolean.
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
-        */
-       public static final TableWrapLayout LAYOUT(int columns, boolean equalWidth) {
-               TableWrapLayout layout = new TableWrapLayout();
-               layout.topMargin = 0;
-               layout.rightMargin = 0;
-               layout.bottomMargin = 0;
-               layout.leftMargin = 0;
-               layout.numColumns = columns;
-               layout.makeColumnsEqualWidth = equalWidth;
-               layout.verticalSpacing = 0;
-               layout.horizontalSpacing = 0;
-               return layout;
-       }
-
-       /**
-        * <p>
-        * FILL
-        * </p>
-        * 
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData FILL() {
-               return FILL(1, 1);
-       }
-
-       /**
-        * <p>
-        * FILL
-        * </p>
-        * 
-        * @param horizontalSpan
-        *            a int.
-        * @param verticalSpan
-        *            a int.
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData FILL(int horizontalSpan, int verticalSpan) {
-               TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
-                               TableWrapData.FILL_GRAB);
-               layoutData.colspan = horizontalSpan;
-               layoutData.rowspan = verticalSpan;
-               return layoutData;
-       }
-
-       /**
-        * <p>
-        * LEFT
-        * </p>
-        * 
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData LEFT() {
-               return new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
-       }
-
-       /**
-        * <p>
-        * RIGHT
-        * </p>
-        * 
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData RIGHT() {
-               return new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP);
-       }
-
-       /**
-        * <p>
-        * FILL_HORIZONTALLY
-        * </p>
-        * 
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData FILL_HORIZONTALLY() {
-               return FILL_HORIZONTALLY(1, 1);
-       }
-
-       /**
-        * <p>
-        * FILL_HORIZONTALLY
-        * </p>
-        * 
-        * @param horizontalSpan
-        *            a int.
-        * @param verticalSpan
-        *            a int.
-        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
-        */
-       public static final TableWrapData FILL_HORIZONTALLY(int horizontalSpan,
-                       int verticalSpan) {
-               TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
-                               TableWrapData.TOP);
-               layoutData.colspan = horizontalSpan;
-               layoutData.rowspan = verticalSpan;
-               return layoutData;
-       }
-
        /** Constant <code>EMPTY_SELECTION</code> */
        public static ISelection EMPTY_SELECTION = new ISelection() {
                @Override
@@ -459,6 +279,12 @@ public class CdmFormFactory extends FormToolkit {
                }
        };
        
+       /**
+        * 
+        * @author n.hoffmann
+        * @date Jan 25, 2010
+        *
+        */
        private class SelectionMouseHandler extends MouseAdapter {
                @Override
                public void mouseDown(MouseEvent e) {
@@ -466,6 +292,12 @@ public class CdmFormFactory extends FormToolkit {
                }
        }
 
+       /**
+        * 
+        * @author n.hoffmann
+        * @date Jan 25, 2010
+        *
+        */
        private class SelectionFocusHandler extends FocusAdapter {
                @Override
                public void focusGained(FocusEvent e) {
@@ -528,9 +360,9 @@ public class CdmFormFactory extends FormToolkit {
         * destroySelectionArbitrator(..)
         * 
         * @param entityElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *         object.
         */
        public SelectionArbitrator createSelectionArbitrator(
@@ -549,7 +381,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param selectionArbitrator
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *            object.
         */
        public void destroySelectionArbitrator(
@@ -580,7 +412,7 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param formElement
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement}
+        *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
         *            object.
         */
        public void adapt(AbstractCdmFormElement formElement) {
@@ -602,7 +434,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public void destroyElement(ICdmFormElement formElement) {
@@ -663,9 +495,9 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
        public TextWithLabelElement createMultilineTextWithLabel(
@@ -684,7 +516,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -695,7 +527,7 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement}
+        *         {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
         *         object.
         */
        public MultilanguageTextElement createMultiLanguageTextElement(
@@ -732,9 +564,9 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
        public TextWithLabelElement createTextWithLabelElement(
@@ -799,7 +631,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -807,7 +639,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link java.lang.Integer} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
         *         object.
         */
        public NumberWithLabelElement createIntegerTextWithLabelElement(
@@ -826,7 +658,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -834,7 +666,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a float.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
         *         object.
         */
        public NumberWithLabelElement createFloatTextWithLabelElement(
@@ -853,7 +685,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -862,7 +694,7 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement}
+        *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
         *         object.
         */
        public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
@@ -881,7 +713,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -892,7 +724,7 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement}
+        *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
         *         object.
         */
        public LanguageStringWithLabelElement createLanguageStringWithLabelElement(
@@ -911,13 +743,13 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param initialText
         *            a {@link java.lang.String} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
         *         object.
         */
        public TextWithLabelElement createTextElement(
@@ -935,7 +767,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param keyHeading
         *            a {@link java.lang.String} object.
@@ -943,7 +775,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link java.lang.String} object.
         * @param map
         *            a {@link java.util.Map} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.KeyValueViewerElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
         *         object.
         */
        public KeyValueViewerElement createKeyValueViewerElement(
@@ -956,10 +788,6 @@ public class CdmFormFactory extends FormToolkit {
                return element;
        }
 
-       public static enum TermComboType {
-               EXTENSIONTYPE, LANGUAGE, MARKERTYPE, NOMENCLATURALSTATUSTYPE, RANK, RIGHTSTYPE, NAMERELATIONSHIP, NAMEDAREATYPE, PRESENCEABSENCESTATUS, ANNOTATIONTYPE, NAMETYPEDESIGNATIONSTATUS, SPECIMENTYPEDESIGNATIONSTATUS, SEX, STAGE, PRESERVATION_METHOD, MEASUREMENT_UNIT, STATE, MODIFIER, STATISTICAL_MEASURE, SCOPE, EMPTY, DETERMINATION_MODIFIER, REFERENCE_SYSTEM
-       }
-
        /**
         * <p>
         * createTermComboElement
@@ -967,10 +795,10 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param termComboType
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType}
+        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -979,122 +807,19 @@ public class CdmFormFactory extends FormToolkit {
         *            object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
         *         object.
         */
-       public AbstractTermComboElement createTermComboElement(
-                       TermComboType termComboType, ICdmFormElement parentElement,
-                       String labelString, DefinedTermBase selection, int style) {
-               AbstractTermComboElement element = null;
-
-               switch (termComboType) {
-               case EMPTY:
-                       element = new EmptyComboElement<DefinedTermBase>(this,
-                                       parentElement, labelString, style);
-                       break;
-               case EXTENSIONTYPE:
-                       element = new ExtensionTypeComboElement(this, parentElement,
-                                       labelString, (ExtensionType) selection, style);
-                       break;
-               case LANGUAGE:
-                       element = new LanguageComboElement(this, parentElement,
-                                       labelString, (Language) selection, style);
-                       break;
-               case MARKERTYPE:
-                       element = new MarkerTypeComboElement(this, parentElement,
-                                       labelString, (MarkerType) selection, style);
-                       break;
-               case NOMENCLATURALSTATUSTYPE:
-                       element = new NomenclaturalStatusTypeComboElement(this,
-                                       parentElement, labelString,
-                                       (NomenclaturalStatusType) selection, style);
-                       break;
-               case RANK:
-                       element = new RankComboElement(this, parentElement, labelString,
-                                       (Rank) selection, style);
-                       break;
-               case RIGHTSTYPE:
-                       element = new RightsTypeComboElement(this, parentElement,
-                                       labelString, (RightsTerm) selection, style);
-                       break;
-               case NAMERELATIONSHIP:
-                       element = new NameRelationshipTypeComboElement(this, parentElement,
-                                       labelString, (NameRelationshipType) selection, style);
-                       break;
-               case NAMEDAREATYPE:
-                       element = new NamedAreaTypeComboElement(this, parentElement,
-                                       labelString, (NamedAreaType) selection, style);
-                       break;
-               case ANNOTATIONTYPE:
-                       element = new AnnotationTypeComboElement(this, parentElement,
-                                       labelString, (AnnotationType) selection, style);
-                       break;
-               case PRESENCEABSENCESTATUS:
-                       element = new PresenceAbsenceTermComboElement(this, parentElement,
-                                       labelString, (PresenceAbsenceTermBase) selection, style);
-                       break;
-               case NAMETYPEDESIGNATIONSTATUS:
-                       element = new NameTypeDesignationStatusComboElement(this,
-                                       parentElement, labelString,
-                                       (NameTypeDesignationStatus) selection, style);
-                       break;
-               case SPECIMENTYPEDESIGNATIONSTATUS:
-                       element = new SpecimenTypeDesignationStatusComboElement(this,
-                                       parentElement, labelString,
-                                       (SpecimenTypeDesignationStatus) selection, style);
-                       break;
-               case SEX:
-                       element = new SexComboElement(this, parentElement, labelString,
-                                       (Sex) selection, style);
-                       break;
-               case STAGE:
-                       element = new StageComboElement(this, parentElement, labelString,
-                                       (Stage) selection, style);
-                       break;
-               case PRESERVATION_METHOD:
-                       element = new PreservationMethodComboElement(this, parentElement,
-                                       labelString, (PreservationMethod) selection, style);
-                       break;
-               case MEASUREMENT_UNIT:
-                       element = new MeasurementUnitComboElement(this, parentElement,
-                                       labelString, (MeasurementUnit) selection, style);
-                       break;
-               case STATE:
-                       element = new StateComboElement(this, parentElement, labelString,
-                                       (State) selection, style);
-                       break;
-               case SCOPE:
-                       element = new ScopeComboElement(this, parentElement, labelString,
-                                       (Scope) selection, style);
-                       break;
-               case MODIFIER:
-                       element = new ModifierComboElement(this, parentElement,
-                                       labelString, (Modifier) selection, style);
-                       break;
-               case STATISTICAL_MEASURE:
-                       element = new StatisticalMeasureComboElement(this, parentElement,
-                                       labelString, (StatisticalMeasure) selection, style);
-                       break;
-               case DETERMINATION_MODIFIER:
-                       element = new DeterminationModifierComboElement(this,
-                                       parentElement, labelString,
-                                       (DeterminationModifier) selection, style);
-                       break;
-               case REFERENCE_SYSTEM:
-                       element = new ReferenceSystemComboElement(this, parentElement,
-                                       labelString, (ReferenceSystem) selection, style);
-                       break;
-               }
-
+       
+       public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(
+                       Class<T> termComboType, ICdmFormElement parentElement,
+                       String labelString, T selection, int style) {
+               TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString, selection, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
 
-       public static enum EnumComboType {
-               REFERENCETYPE, NOMENCLATURALCODE
-       }
-
        /**
         * <p>
         * createEnumComboElement
@@ -1102,31 +827,20 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param enumComboType
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType}
+        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
         * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
         *         object.
         */
-       public AbstractEnumComboElement createEnumComboElement(
-                       EnumComboType enumComboType, ICdmFormElement parentElement,
+       public <T extends IDefinedTerm> EnumComboElement<T> createEnumComboElement(
+                       Class<T> enumComboType, ICdmFormElement parentElement,
                        int style) {
-               AbstractEnumComboElement element = null;
-
-               switch (enumComboType) {
-               case REFERENCETYPE:
-                       element = new ReferenceTypeComboElement(this, parentElement,
-                                       "Reference Type", null, style);
-                       break;
-               case NOMENCLATURALCODE:
-                       element = new NomenclaturalCodeComboElement(this, parentElement,
-                                       "Nomenclatural Code", null, style);
-                       break;
-               }
+               EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
@@ -1142,9 +856,9 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.BrowserElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement} object.
         */
        public BrowserElement createBrowserElement(ICdmFormElement parentElement,
                        URI imageUri, int style) {
@@ -1161,13 +875,13 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param imageUri
         *            a {@link java.net.URI} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ImageElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
         */
        public ImageElement createImageElement(ICdmFormElement parentElement,
                        URI imageUri, int style) {
@@ -1190,11 +904,11 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param buttonLabel
         *            a {@link java.lang.String} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TextActionElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
         *         object.
         */
        public TextActionElement createTextActionElement(
@@ -1207,23 +921,13 @@ public class CdmFormFactory extends FormToolkit {
                return element;
        }
 
-       /**
-        * 
-        * @author n.hoffmann
-        * @created Mar 5, 2010
-        * @version 1.0
-        */
-       public static enum SelectionType {
-               AGENT, INSTITUTION, NAME, REFERENCE, TAXON_BASE, TAXON, SYNONYM, TEAM, AUTHOR_TEAM, PERSON, DERIVED_UNIT, FIELD_OBSERVATION, FEATURE_TREE, CLASSIFICATION, TAXON_NODE, COLLECTION, FEATURE, POLYTOMOUS_KEY, POLYTOMOUS_KEY_NODE, USER, GROUP
-       }
-
        /**
         * <p>
         * createCheckbox
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param label
         *            a {@link java.lang.String} object.
@@ -1231,7 +935,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a boolean.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.CheckboxElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement} object.
         */
        public CheckboxElement createCheckbox(ICdmFormElement parentElement,
                        String label, boolean initialState, int style) {
@@ -1247,7 +951,7 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @return the section widget
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         */
        public Section adapt(AbstractFormSection section) {
@@ -1321,7 +1025,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -1331,7 +1035,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a boolean.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
         *         object.
         */
        public ToggleableTextElement createToggleableTextField(
@@ -1351,7 +1055,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -1359,7 +1063,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
         *         object.
         */
        public TimePeriodElement createTimePeriodElement(
@@ -1380,11 +1084,11 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param point
         *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.PointElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
         */
        public PointElement createPointElement(ICdmFormElement parentElement,
                        Point point, int style) {
@@ -1401,11 +1105,11 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.DateDetailSection}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
         *         object.
         */
        public DateDetailSection createDateDetailSection(
@@ -1423,7 +1127,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -1431,7 +1135,7 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link org.joda.time.Partial} object.
         * @param style
         *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.PartialElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement} object.
         */
        public PartialElement createPartialElement(ICdmFormElement parentElement,
                        String labelString, Partial partial, int style) {
@@ -1508,7 +1212,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -1518,7 +1222,7 @@ public class CdmFormFactory extends FormToolkit {
                        int style) {
                Label separator = this.createSeparator(
                                parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
-               separator.setLayoutData(FILL_HORIZONTALLY());
+               separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                return separator;
        }
 
@@ -1528,7 +1232,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
@@ -1547,6 +1251,22 @@ public class CdmFormFactory extends FormToolkit {
                parentElement.addElement(element);
                return element;
        }
+       
+       /**
+        * @param cdmBaseSection
+        * @param object
+        * @param style
+        * @return
+        */
+       public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement,
+                       CdmBase entity, int style) {
+               CdmBaseElement element = new CdmBaseElement(this, parentElement,
+                               entity, style);
+               adapt(element);
+               parentElement.addElement(element);
+               return element;
+       }
+
 
        /**
         * <p>
@@ -1554,7 +1274,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -1569,6 +1289,18 @@ public class CdmFormFactory extends FormToolkit {
                adapt(section);
                return section;
        }
+       
+       /**
+        * @param parent
+        * @param i
+        * @return
+        */
+       public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
+               CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
+               parentElement.addElement(section);
+               adapt(section);
+               return section;
+       }
 
        /**
         * <p>
@@ -1576,7 +1308,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
         */
@@ -1594,7 +1326,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @return a
         *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
@@ -1614,7 +1346,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param parserProblem
         *            a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
@@ -1671,7 +1403,48 @@ public class CdmFormFactory extends FormToolkit {
                HYBRID, 
                USER, 
                GROUP, 
-               DETERMINATION
+               DETERMINATION, 
+               TAXON_RELATIONSHIP, 
+               REFERENCED_ENTITY, 
+               TERM_VOCABULARY,
+               NAMED_AREA, 
+               NAMED_AREA_LEVEL, 
+               USE_RECORD
+       }
+       
+       public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass,
+                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       ISelectionProvider selectionProvider, int style) {
+               
+               AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement, selectionProvider, style);
+                       
+               parentElement.addElement(section);
+               adapt(section);
+               return section;
+               
+       }
+       
+       /**
+        * @param definedTermClass
+        * @param formElement
+        * @param style
+        * @return
+        */
+       public AbstractCdmDetailElement createDefinedTermDetailElement(
+                       Class definedTermClass, AbstractCdmDetailSection parentElement,
+                       int style) {
+               AbstractCdmDetailElement element = null;
+               
+               if (NamedArea.class.isAssignableFrom(definedTermClass)){
+                       element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+               }
+               else {
+                       element = new DefinedTermDetailElement(this, parentElement);
+               }
+               
+               adapt(element);
+               parentElement.addElement(element);
+               return element;
        }
 
        /**
@@ -1681,10 +1454,10 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param detailType
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param selectionProvider
         *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
@@ -1693,7 +1466,7 @@ public class CdmFormFactory extends FormToolkit {
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *         object.
         */
        public AbstractFormSection createCdmDetailSection(DetailType detailType,
@@ -1817,7 +1590,29 @@ public class CdmFormFactory extends FormToolkit {
                case DETERMINATION:
                        section = new DeterminationDetailSection(this, conversation, parentElement,
                                        selectionProvider, style);
+                       break;
+               case TAXON_RELATIONSHIP:
+                       section = new TaxonRelationshipDetailSection(this, conversation, parentElement, 
+                                       selectionProvider, style);
+                       break;
+               case REFERENCED_ENTITY:
+                       section = new ReferencedEntityDetailSection(this, conversation, parentElement, 
+                                       selectionProvider, style);
+                       break;
+               case TERM_VOCABULARY:
+                       section = new TermVocabularyDetailSection(this, conversation, parentElement, 
+                                       selectionProvider, style);
+                       break;
+               case NAMED_AREA:
+                       section = new NamedAreaDetailSection(this, conversation, parentElement, 
+                                       selectionProvider, style);
+                       break;
+               case USE_RECORD:
+                       section = new UseRecordDetailSection(this, conversation, parentElement,
+                                       selectionProvider, style);
+                       break;
                }
+               
 
                if (section == null) {
                        throw new RuntimeException(
@@ -1829,6 +1624,8 @@ public class CdmFormFactory extends FormToolkit {
                return section;
        }
 
+       
+       
        /**
         * <p>
         * createCdmDetailElement
@@ -1836,12 +1633,12 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param detailType
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
         *            object.
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @return a
         *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement}
@@ -1935,6 +1732,25 @@ public class CdmFormFactory extends FormToolkit {
                case DETERMINATION:
                        element = new DeterminationDetailElement(this, parentElement);
                        break;
+               case TAXON_RELATIONSHIP:
+                       element = new TaxonRelationshipDetailElement(this, parentElement);
+                       break;
+               case REFERENCED_ENTITY:
+                       element = new RefereneEntityDetailElement(this, parentElement);
+                       break;
+               case TERM_VOCABULARY:
+                       element = new TermVocabularyDetailElement(this, parentElement);
+                       break;
+               case NAMED_AREA:
+                       element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+                       break;
+               case NAMED_AREA_LEVEL:
+                       element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
+                       break;
+               case USE_RECORD:
+                       //element = new UseRecordDetailElement(this, parentElement, style);
+                       element = new UseRecordDetailElement(this, parentElement);
+                       break;
                }
 
                if (element == null) {
@@ -1956,7 +1772,41 @@ public class CdmFormFactory extends FormToolkit {
         * @version 1.0
         */
        public static enum EntityDetailType {
-               TEAM, TEAMMEMBER, ANNOTATION, CREDIT, DESCRIPTIONELEMENTSOURCE, EXTENSION, MARKER, MEDIA, DESCRIPTIONELEMENTMEDIA, MEDIAREPRESENTATION, MEDIAREPRESENTATIONPART, MODIFIER, NOMENCLATURALSTATUS, NAME_RELATIONSHIP, PROTOLOG, RIGHTS, SOURCE, SCOPE, DESCRIPTIONSOURCE, TYPEDESIGNATION, STATE_DATA, STATISTICAL_MEASUREMENT_VALUE, DESCRIBED_SPECIMEN, COLLECTING_AREA, DETERMINATION_EVENT, SPECIMEN_COLLECTION, IDENTIFIABLE_SOURCE_COLLECTION, GEOGRAPHICAL_SCOPE, SCOPE_RESTRICTION, MEMBER, GRANTED_AUTHORITY, GROUPS_BY_USER, TAXONOMIC_SCOPE, DETERMINATION_CURRENT, DETERMINATION_HISTORY
+               TEAM, 
+               TEAMMEMBER, 
+               ANNOTATION, 
+               CREDIT, 
+               DESCRIPTIONELEMENTSOURCE, 
+               EXTENSION, 
+               MARKER, 
+               MEDIA, 
+               DESCRIPTIONELEMENTMEDIA, 
+               MEDIAREPRESENTATION, 
+               MEDIAREPRESENTATIONPART, 
+               MODIFIER, 
+               NOMENCLATURALSTATUS, 
+               NAME_RELATIONSHIP, 
+               PROTOLOG, 
+               RIGHTS, 
+               SOURCE, 
+               SCOPE, 
+               DESCRIPTIONSOURCE, 
+               TYPEDESIGNATION, 
+               STATE_DATA, 
+               STATISTICAL_MEASUREMENT_VALUE, 
+               DESCRIBED_SPECIMEN, 
+               COLLECTING_AREA, 
+               DETERMINATION_EVENT, 
+               SPECIMEN_COLLECTION, 
+               IDENTIFIABLE_SOURCE_COLLECTION, 
+               GEOGRAPHICAL_SCOPE, 
+               SCOPE_RESTRICTION, 
+               MEMBER, 
+               GRANTED_AUTHORITY, 
+               GROUPS_BY_USER, 
+               TAXONOMIC_SCOPE, 
+               DETERMINATION_CURRENT, 
+               DETERMINATION_HISTORY
        }
 
        /**
@@ -1966,7 +1816,7 @@ public class CdmFormFactory extends FormToolkit {
         * 
         * @param entityDetailType
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType}
+        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType}
         *            object.
         * @param style
         *            a int.
@@ -1974,9 +1824,9 @@ public class CdmFormFactory extends FormToolkit {
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *         object.
         */
        public AbstractFormSection createEntityDetailSection(
@@ -2135,7 +1985,7 @@ public class CdmFormFactory extends FormToolkit {
         * @param style
         *            a int.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param versionableEntity
         *            a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
@@ -2273,179 +2123,65 @@ public class CdmFormFactory extends FormToolkit {
 
        /**
         * <p>
-        * createSelectionElement
+        * Creates a selection element for the given type T.
+        * </p>
+        * <p>
+        *      <strong>Selection elements not handled by this method:</strong>
+        *      <ul>
+        *              <li>{@link TaxonNodeSelectionElement} see {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}</li>
+        *              <li>{@link NomenclaturalAuthorTeamSelectionElement} see {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}</li>
+        *      </ul>   
         * </p>
         * 
-        * @param selectionType
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType}
-        *            object.
+        * @param clazz
+        *                        a {@link Class} object of the type that you want the selection element to handle
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link ICdmFormElement}
         *            object.
         * @param labelString
-        *            a {@link java.lang.String} object.
+        *            a {@link String} object.
         * @param selectionType
         * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.common.IAnnotatableEntity}
-        *            object.
+        *            a {@link ICdmBase} object.
         * @param style
         *            a int.
         * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
+        *            a {@link ConversationHolder} object.
         * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement}
+        *         {@link EntitySelectionElement}
         *         object.
         */
-       public AbstractSelectionElement createSelectionElement(
-                       SelectionType selectionType, ConversationHolder conversation,
+       public <T extends ICdmBase> EntitySelectionElement<T> createSelectionElement(
+                       Class<T> clazz, ConversationHolder conversation,
                        ICdmFormElement parentElement, String labelString,
-                       ICdmBase selection, int mode, int style) {
-               AbstractSelectionElement element = null;
-
-               IAnnotatableEntity entity = (IAnnotatableEntity) HibernateProxyHelper
-                               .deproxy(selection);
-
-               switch (selectionType) {
-               case AGENT:
-                       element = new AgentSelectionElement(this, conversation,
-                                       parentElement, labelString, (TeamOrPersonBase) entity,
-                                       mode, style);
-                       break;
-               case PERSON:
-                       element = new PersonSelectionElement(this, conversation,
-                                       parentElement, labelString, (Person) entity, mode, style);
-                       break;
-               case TEAM:
-                       element = new TeamSelectionElement(this, conversation,
-                                       parentElement, labelString, (Team) entity, mode, style);
-                       break;
-               case AUTHOR_TEAM:
-                       element = new NomenclaturalAuthorTeamSelectionElement(this,
-                                       conversation, parentElement, labelString, (Team) entity,
-                                       mode, style);
-                       break;
-               case INSTITUTION:
-                       element = new InstitutionSelectionElement(this, conversation,
-                                       parentElement, labelString, (Institution) entity, mode,
-                                       style);
-                       break;
-               case NAME:
-                       element = new NameSelectionElement(this, conversation,
-                                       parentElement, labelString, (TaxonNameBase) entity, mode,
-                                       style);
-                       break;
-               case REFERENCE:
-                       element = new ReferenceSelectionElement(this, conversation,
-                                       parentElement, labelString, (Reference) entity, mode, style);
-                       break;
-               case TAXON_BASE:
-                       element = new TaxonBaseSelectionElement(this, conversation,
-                                       parentElement, labelString, (TaxonBase) entity, mode, style);
-                       break;
-               case TAXON:
-                       element = new TaxonSelectionElement(this, conversation,
-                                       parentElement, labelString, (Taxon) entity, mode, style);
-                       break;
-               case SYNONYM:
-                       element = new SynonymSelectionElement(this, conversation,
-                                       parentElement, labelString, (Synonym) entity, mode, style);
-                       break;
-               case DERIVED_UNIT:
-                       element = new DerivedUnitBaseSelectionElement(this, conversation,
-                                       parentElement, labelString, (DerivedUnitBase) entity, mode,
-                                       style);
-                       break;
-               case FIELD_OBSERVATION:
-                       element = new FieldObservationSelectionElement(this, conversation,
-                                       parentElement, labelString, (FieldObservation) entity,
-                                       mode, style);
-                       break;
-               case FEATURE_TREE:
-                       element = new FeatureTreeSelectionElement(this, conversation,
-                                       parentElement, labelString, (FeatureTree) entity, mode,
-                                       style);
-                       break;
-               case CLASSIFICATION:
-                       element = new ClassificationSelectionElement(this, conversation,
-                                       parentElement, labelString, (Classification) entity, mode,
-                                       style);
-                       break;
-               case TAXON_NODE:
-                       element = new TaxonNodeSelectionElement(this, conversation,
-                                       parentElement, labelString, (TaxonNode) entity, mode, style);
-                       break;
-               case COLLECTION:
-                       element = new CollectionSelectionElement(this, conversation,
-                                       parentElement, labelString, (Collection) entity, mode,
-                                       style);
-                       break;
-               case FEATURE:
-                       element = new FeatureSelectionElement(this, conversation,
-                                       parentElement, labelString, (Feature) entity, mode, style);
-                       break;
-               case POLYTOMOUS_KEY:
-                       element = new PolytomousKeySelectionElement(this, conversation,
-                                       parentElement, labelString, (PolytomousKey) entity, mode,
-                                       style);
-                       break;
-               case POLYTOMOUS_KEY_NODE:
-                       element = new PolytomousKeyNodeSelectionElement(this, conversation,
-                                       parentElement, labelString, (PolytomousKeyNode) entity,
-                                       mode, style);
-                       break;
-               case USER:
-                       element = new UserSelectionElement(this, conversation,
-                                       parentElement, labelString, (User) entity, mode, style);
-                       break;
-               case GROUP:
-                       element = new GroupSelectionElement(this, conversation,
-                                       parentElement, labelString, (Group) entity, mode, style);
-                       break;
-               default:
-                       new RuntimeException(
-                                       "There is no selection composite for the desired selection type.");
-                       break;
-               }
-
+                       T selection, int mode, int style) {
+               EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, conversation, parentElement, clazz, labelString, selection, mode, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-
-       /**
-        * <p>
-        * createNamedAreaSelectionElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement}
-        *         object.
-        */
-       public NamedAreaSelectionElement createNamedAreaSelectionElement(
-                       ICdmFormElement parentElement, ConversationHolder conversation,
-                       String labelString, NamedArea selection, int style) {
-               NamedAreaSelectionElement element = new NamedAreaSelectionElement(this,
-                               conversation, parentElement, labelString, selection,
-                               AbstractSelectionElement.NOTHING, style);
+       
+       public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
+                       ConversationHolder conversation,
+                       ICdmFormElement parentElement, String labelString,
+                       TaxonNode selection, int mode, int style) {
+               TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
                adapt(element);
                parentElement.addElement(element);
                return element;
        }
-
+       
+       public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
+                       ConversationHolder conversation,
+                       ICdmFormElement parentElement, String labelString,
+                       Team selection, int mode, int style) {
+               NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this, conversation, parentElement, labelString, selection, mode, style);
+               adapt(element);
+               parentElement.addElement(element);
+               return element;
+       }
+       
+       
        /** {@inheritDoc} */
        public LabelElement createLabel(ICdmFormElement parentElement, String text) {
                LabelElement labelElement = new LabelElement(this, parentElement, text);
@@ -2471,7 +2207,7 @@ public class CdmFormFactory extends FormToolkit {
         * </p>
         * 
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param entity
         *            a
@@ -2540,4 +2276,10 @@ public class CdmFormFactory extends FormToolkit {
                // text.addFocusListener(visibilityHandler);
                return text;
        }
+
+
+
+
+
+
 }
similarity index 97%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmPropertyChangeEvent.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmPropertyChangeEvent.java
index ffaa391ec61dc09ca8b5ac27e91dc0f107865aa0..6747ef7bbeba9625b13d125249d36627e4e1195c 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 
similarity index 91%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CheckboxElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CheckboxElement.java
index 99b04ade7822d7eb5806e8fa1aa2f35b6186ce90..7863f78fd8731fff63782052d05289decf1df4d2 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
@@ -37,8 +37,8 @@ public class CheckboxElement extends AbstractCdmFormElement implements Selection
         *
         * @param initialState a boolean.
         * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         */
        protected CheckboxElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, boolean initialState,
@@ -51,7 +51,7 @@ public class CheckboxElement extends AbstractCdmFormElement implements Selection
                }
                
                checkbox = formFactory.createButton(getLayoutComposite(), null, SWT.CHECK | style);
-               checkbox.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               checkbox.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                
                checkbox.setSelection(initialState);
                
similarity index 93%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/DateDetailSection.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java
index a7789dc8ec8effcfe8b9ec384b9527ef2a9af723..c54e04d0327bcee02c5d29920230bf9e69747e2c 100644 (file)
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.widgets.Text;
@@ -40,17 +40,17 @@ public class DateDetailSection extends AbstractFormSection<TimePeriod> {
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
         */
        protected DateDetailSection(CdmFormFactory formFactory,
                        ICdmFormElement parentElement, int style) {
-               super(formFactory, null, parentElement, style);
+               super(formFactory, parentElement, style);
 
                partialElement_start = formFactory.createPartialElement(this,
                                "Start: ", null, style);
@@ -60,12 +60,12 @@ public class DateDetailSection extends AbstractFormSection<TimePeriod> {
                text_parseText = formFactory.createTextWithLabelElement(this, "Parse",
                                null, style);
                text_parseText.getMainControl().setLayoutData(
-                               CdmFormFactory.FILL_HORIZONTALLY(6, 1));
+                               LayoutConstants.FILL_HORIZONTALLY(6, 1));
 
                text_freeText = formFactory.createTextWithLabelElement(this,
                                "Freetext", null, style);
                text_freeText.getMainControl().setLayoutData(
-                               CdmFormFactory.FILL_HORIZONTALLY(6, 1));
+                               LayoutConstants.FILL_HORIZONTALLY(6, 1));
 
                formFactory.addPropertyChangeListener(this);
        }
similarity index 88%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ICdmFormElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ICdmFormElement.java
index 9e192526587ab299c022076f4a021d76737d7879..a85aecfe7a158f56dc20fa50d1fe352ed7f132ff 100644 (file)
@@ -1,4 +1,4 @@
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 
 import java.util.List;
@@ -49,14 +49,14 @@ public interface ICdmFormElement extends IPropertyChangeEmitter, IPropertyChange
        /**
         * <p>addElement</p>
         *
-        * @param element a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param element a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public abstract void addElement(ICdmFormElement element);
        
        /**
         * <p>getParentElement</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public abstract ICdmFormElement getParentElement();
                
@@ -75,7 +75,7 @@ public interface ICdmFormElement extends IPropertyChangeEmitter, IPropertyChange
        /**
         * <p>containsFormElement</p>
         *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @return a boolean.
         */
        public boolean containsFormElement(ICdmFormElement formElement);
similarity index 71%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IErrorIntolerableElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IErrorIntolerableElement.java
index 5b53ce9ec40df838da8e42badc5c152c8f9a8eed..5a73673d4460aa816d4a7e74809df162f35e26c5 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 
 /**
@@ -23,21 +23,21 @@ public interface IErrorIntolerableElement {
        /**
         * <p>addExceptionHandler</p>
         *
-        * @param handler a {@link eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler} object.
+        * @param handler a {@link eu.etaxonomy.taxeditor.ui.element.IExceptionHandler} object.
         */
        public void addExceptionHandler(IExceptionHandler handler);
        
        /**
         * <p>removeExceptionHandler</p>
         *
-        * @param handler a {@link eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler} object.
+        * @param handler a {@link eu.etaxonomy.taxeditor.ui.element.IExceptionHandler} object.
         */
        public void removeExceptionHandler(IExceptionHandler handler);
 
        /**
         * <p>exceptionOccurred</p>
         *
-        * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+        * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
         */
        public void exceptionOccurred(CdmPropertyChangeEvent event);
        
similarity index 81%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IExceptionHandler.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IExceptionHandler.java
index 3ac64e99e70419a1606dd18a4aff75c667f3026a..b44168acaea411e9aaa8edf9f2e95d8d229136d0 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 
 /**
@@ -23,7 +23,7 @@ public interface IExceptionHandler {
        /**
         * <p>handleException</p>
         *
-        * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+        * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
         */
        void handleException(CdmPropertyChangeEvent event);
        
similarity index 67%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/IPropertyChangeEmitter.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/IPropertyChangeEmitter.java
index 6f6eb5f12f2d9d1dbde06620ff90f54c8f655d57..bc033c48ef5f9fee0fb3b7c33c8cbeb31b2c7a04 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 
 
@@ -15,7 +15,7 @@ public interface IPropertyChangeEmitter {
        /**
         * Notify registeres listeners of changed properties
         *
-        * @param event a {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent} object.
+        * @param event a {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent} object.
         */
        public void firePropertyChangeEvent(CdmPropertyChangeEvent event);
 }
similarity index 95%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectable.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectable.java
index 329107040f143b4dd93ed892d63ac4ebe093f410..0ae20c786c8102e9ea315b3ac0af7b6153862e78 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
similarity index 81%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectableElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ISelectableElement.java
index 2170cb30dc4f0ff0981b35b76f73b5d58368cf79..608206b020b307da3a07b916cb486e63a8862623 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 
 
@@ -24,7 +24,7 @@ public interface ISelectableElement {
        /**
         * Returns this elements selection arbitrator
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
         */
        public SelectionArbitrator getSelectionArbitrator();
 }
similarity index 94%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java
index 26fe98ee0ca2b0e3ccfb1edad4da4fb9b20b9b6b..92944ecead1facc71c809249b2e2664c1783b9af 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -51,8 +51,8 @@ public class ImageElement extends AbstractCdmFormElement implements PaintListene
        /**
         * <p>Constructor for ImageElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param imageUri a {@link java.net.URI} object.
         * @param style a int.
         */
@@ -60,7 +60,7 @@ public class ImageElement extends AbstractCdmFormElement implements PaintListene
                super(formFactory, parentElement);
                                
                container = new Composite(getLayoutComposite(), style);
-               container.setLayoutData(CdmFormFactory.FILL(2, 1));
+               container.setLayoutData(LayoutConstants.FILL(2, 1));
                
                container.addPaintListener(this);
        }
@@ -193,7 +193,7 @@ public class ImageElement extends AbstractCdmFormElement implements PaintListene
        /** {@inheritDoc} */
        @Override
        public void paintControl(PaintEvent e) {
-               TableWrapData layoutData = CdmFormFactory.FILL(2, 1);
+               TableWrapData layoutData = LayoutConstants.FILL(2, 1);
                Control control = (Control) e.widget;
                if(image != null){
                        Rectangle imageMaxBounds = calculateImageBounds(image, control);
similarity index 97%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyStatementElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyStatementElement.java
index f15f7d1971b2e15daa77bc994fba705b41685abb..f6f088ccd0c6fee0e7adfdfb72fbad64913d836b 100644 (file)
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 
similarity index 91%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyValueViewerElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/KeyValueViewerElement.java
index b5e6fc1fa0f1fbe3d5c625db53acb86d50eb094d..ec76a288cd8171a2914dba23f3e40b6cc1e0e6fe 100644 (file)
@@ -1,5 +1,5 @@
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.Map;
 import java.util.Map.Entry;
@@ -16,6 +16,7 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.ui.forms.widgets.TableWrapData;
 
+
 /**
  * <p>KeyValueViewerElement class.</p>
  *
@@ -31,8 +32,8 @@ public class KeyValueViewerElement extends AbstractCdmFormElement {
        /**
         * <p>Constructor for KeyValueViewerElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param keyHeading a {@link java.lang.String} object.
         * @param valueHeading a {@link java.lang.String} object.
         * @param map a {@link java.util.Map} object.
@@ -42,7 +43,7 @@ public class KeyValueViewerElement extends AbstractCdmFormElement {
                super(formFactory, formElement);
                
                label = formFactory.createLabel(getLayoutComposite(), "Meta Data");
-               label.setLayoutData(CdmFormFactory.FILL(2, 1));
+               label.setLayoutData(LayoutConstants.FILL(2, 1));
                addControl(label);
                
                tableViewer = new TableViewer(formElement.getLayoutComposite(), SWT.MULTI | SWT.H_SCROLL
@@ -51,7 +52,7 @@ public class KeyValueViewerElement extends AbstractCdmFormElement {
                
                createColumns(tableViewer, keyHeading, valueHeading);
                
-               TableWrapData layoutData = CdmFormFactory.FILL(2, 1);
+               TableWrapData layoutData = LayoutConstants.FILL(2, 1);
                layoutData.heightHint = 100;
                
                tableViewer.getControl().setLayoutData(layoutData);
similarity index 78%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LabelElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java
index 4ee9f50d516b589a8065f5de318b83d43527486d..1405ece32e5b942c09559304a4d409ce29416916 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Label;
@@ -29,15 +29,15 @@ public class LabelElement extends AbstractCdmFormElement {
        /**
         * <p>Constructor for LabelElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param text a {@link java.lang.String} object.
         */
        public LabelElement(CdmFormFactory formFactory, ICdmFormElement formElement, String text) {
                super(formFactory, formElement);
                
                label = formFactory.createLabel(getLayoutComposite(), text, SWT.WRAP);
-               label.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(label);
        }
 
similarity index 86%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/LanguageStringWithLabelElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LanguageStringWithLabelElement.java
index f2eae3c9bc26477ade7bb2fd93f2746690cdd31e..a9f326ccbe293a18da1f2f2b12cc70a5a8785c53 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.events.ModifyEvent;
 
@@ -29,8 +29,8 @@ public class LanguageStringWithLabelElement extends TextWithLabelElement {
        /**
         * <p>Constructor for LanguageStringWithLabelElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param languageString a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
         * @param style a int.
@@ -44,8 +44,8 @@ public class LanguageStringWithLabelElement extends TextWithLabelElement {
        /**
         * <p>Constructor for LanguageStringWithLabelElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param languageString a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
         * @param height a int.
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LayoutConstants.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LayoutConstants.java
new file mode 100644 (file)
index 0000000..48945dc
--- /dev/null
@@ -0,0 +1,140 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.element;
+
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+/**
+ * @author n.hoffmann
+ * @date Jan 25, 2012
+ *
+ */
+public class LayoutConstants {
+
+       /**
+        * <p>
+        * LAYOUT
+        * </p>
+        * 
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
+        */
+       public static final TableWrapLayout LAYOUT() {
+               return LayoutConstants.LAYOUT(1, false);
+       }
+
+       /**
+        * <p>
+        * LAYOUT
+        * </p>
+        * 
+        * @param columns
+        *            a int.
+        * @param equalWidth
+        *            a boolean.
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapLayout} object.
+        */
+       public static final TableWrapLayout LAYOUT(int columns, boolean equalWidth) {
+               TableWrapLayout layout = new TableWrapLayout();
+               layout.topMargin = 0;
+               layout.rightMargin = 0;
+               layout.bottomMargin = 0;
+               layout.leftMargin = 0;
+               layout.numColumns = columns;
+               layout.makeColumnsEqualWidth = equalWidth;
+               layout.verticalSpacing = 0;
+               layout.horizontalSpacing = 0;
+               return layout;
+       }
+
+       /**
+        * <p>
+        * FILL
+        * </p>
+        * 
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData FILL() {
+               return LayoutConstants.FILL(1, 1);
+       }
+
+       /**
+        * <p>
+        * FILL
+        * </p>
+        * 
+        * @param horizontalSpan
+        *            a int.
+        * @param verticalSpan
+        *            a int.
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData FILL(int horizontalSpan, int verticalSpan) {
+               TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
+                               TableWrapData.FILL_GRAB);
+               layoutData.colspan = horizontalSpan;
+               layoutData.rowspan = verticalSpan;
+               return layoutData;
+       }
+
+       /**
+        * <p>
+        * LEFT
+        * </p>
+        * 
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData LEFT() {
+               return new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
+       }
+
+       /**
+        * <p>
+        * RIGHT
+        * </p>
+        * 
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData RIGHT() {
+               return new TableWrapData(TableWrapData.RIGHT, TableWrapData.TOP);
+       }
+
+       /**
+        * <p>
+        * FILL_HORIZONTALLY
+        * </p>
+        * 
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData FILL_HORIZONTALLY() {
+               return LayoutConstants.FILL_HORIZONTALLY(1, 1);
+       }
+
+       /**
+        * <p>
+        * FILL_HORIZONTALLY
+        * </p>
+        * 
+        * @param horizontalSpan
+        *            a int.
+        * @param verticalSpan
+        *            a int.
+        * @return a {@link org.eclipse.ui.forms.widgets.TableWrapData} object.
+        */
+       public static final TableWrapData FILL_HORIZONTALLY(int horizontalSpan,
+                       int verticalSpan) {
+               TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB,
+                               TableWrapData.TOP);
+               layoutData.colspan = horizontalSpan;
+               layoutData.rowspan = verticalSpan;
+               return layoutData;
+       }
+
+}
similarity index 78%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/MultilanguageTextElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java
index 19fe700b279423b79caf266ae3317482c0f51009..b7ab20c35476cd8b3a141456596b19a3df32c544 100644 (file)
@@ -8,10 +8,11 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -27,10 +28,11 @@ import org.eclipse.swt.widgets.Button;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper;
+import eu.etaxonomy.taxeditor.model.DefaultTermComparator;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.translation.TranslationWizard;
 
 /**
@@ -46,12 +48,9 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                SelectionListener {
 
        private class OpenTranslationWizard extends SelectionAdapter {
-               private final Map<Language, LanguageString> multilanguageText;
-
-               public OpenTranslationWizard(
-                               Map<Language, LanguageString> multilanguageText) {
+               
+               public OpenTranslationWizard() {
                        super();
-                       this.multilanguageText = multilanguageText;
                }
 
                /*
@@ -63,6 +62,12 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                 */
                @Override
                public void widgetSelected(SelectionEvent e) {
+                       Map<Language, LanguageString> multilanguageText = getMultilanguageText();
+                       
+                       if (multilanguageText == null){
+                               StoreUtil.warningDialog("No text to transalte", getClass(), "The text is empty and therefore can not be translated");
+                       }
+                       
                        TranslationWizard wizard = new TranslationWizard(multilanguageText);
                        WizardDialog dialog = new WizardDialog(getLayoutComposite()
                                        .getShell(), wizard);
@@ -75,7 +80,7 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                }
        }
 
-       private EmptyComboElement<Language> combo_language;
+       private TermComboElement<Language> combo_language;
 
        protected LanguageStringWithLabelElement element_languageString;
 
@@ -89,10 +94,10 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -111,32 +116,38 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
 
                formFactory.addPropertyChangeListener(this);
 
-               element_languageString = formFactory
+               element_languageString = this.formFactory
                                .createLanguageStringWithLabelElement(formElement, labelString,
                                                null, textHeight, style);
 
                if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
-                       combo_language = (EmptyComboElement<Language>) formFactory
-                                       .createTermComboElement(TermComboType.EMPTY, formElement,
-                                                       "", null, style);
-                       combo_language.addSelectionListener(this);
-                       addControl(formFactory.createLabel(getLayoutComposite(), ""));
-                       button = formFactory.createButton(getLayoutComposite(),
-                                       "Open In Translation Editor", SWT.PUSH);
-                       addControl(button);
-                       button.setLayoutData(CdmFormFactory.RIGHT());
-                       button.addSelectionListener(new OpenTranslationWizard(
-                                       multilanguageText));
+                       createMultilanguageTextEditingElements(formElement,
+                                       multilanguageText, style);
                }
                setMultilanguageText(multilanguageText);
        }
 
+       private void createMultilanguageTextEditingElements(
+                       ICdmFormElement formElement,
+                       Map<Language, LanguageString> multilanguageText, int style) {
+               combo_language = formFactory
+                               .createTermComboElement(Language.class, formElement,
+                                               "", null, style);
+               combo_language.addSelectionListener(this);
+               addControl(formFactory.createLabel(getLayoutComposite(), ""));
+               button = formFactory.createButton(getLayoutComposite(),
+                               "Open In Translation Editor", SWT.PUSH);
+               addControl(button);
+               button.setLayoutData(LayoutConstants.RIGHT());
+               button.addSelectionListener(new OpenTranslationWizard());
+       }
+
        private List<Language> getLanguages() {
 
                ArrayList<Language> languageList = new ArrayList<Language>(
                                getMultilanguageText().keySet());
 
-               // TODO sort
+               Collections.sort(languageList, new DefaultTermComparator<Language>());
 
                return languageList;
        }
@@ -193,6 +204,7 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                        }
                        if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
                                combo_language.setTerms(getLanguages());
+                               button.setEnabled(false);
                        }
                        updateControls();
                }
@@ -210,7 +222,8 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                element_languageString.setLanguageString(preferredLanguageString);
                if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
                        combo_language.setSelection(preferredLanguageString.getLanguage());
-               }
+                       button.setEnabled(true);
+               }               
        }
 
        /**
similarity index 91%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java
index c3201544b78f353d8d8d62665359ab59246f0e58..eab43db6772d2cbfd646e48ef84aa47a030f5540 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -34,8 +34,8 @@ public class NumberWithLabelElement extends TextWithLabelElement {
        /**
         * <p>Constructor for NumberWithLabelElement.</p>
         *
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param initialInteger a {@link java.lang.Integer} object.
         * @param style a int.
@@ -50,8 +50,8 @@ public class NumberWithLabelElement extends TextWithLabelElement {
        /**
         * <p>Constructor for NumberWithLabelElement.</p>
         *
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param initialFloat a {@link java.lang.Float} object.
         * @param style a int.
similarity index 94%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PartialElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java
index 191f90f5b61088f0caf37288ef2832c40129eac4..efcc8541c23fb5fdeaf708a8d7436a868decba81 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.graphics.Color;
@@ -35,7 +35,7 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
        /**
         * <p>Constructor for PartialElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param formElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param style a int.
@@ -44,7 +44,7 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
                        ICdmFormElement formElement, String labelString, int style) {
                super(formFactory, formElement);
                
-               formElement.getLayoutComposite().setLayout(CdmFormFactory.LAYOUT(7, false));
+               formElement.getLayoutComposite().setLayout(LayoutConstants.LAYOUT(7, false));
                
                label = formFactory.createLabel(getLayoutComposite(), labelString);
                addControl(label);
similarity index 91%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/PointElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PointElement.java
index 6580325959295bfaeb4b836809a42227783ba739..6ed881b074fd789475e4bb170731b730c09d7d66 100644 (file)
@@ -8,16 +8,16 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.text.ParseException;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 
 import eu.etaxonomy.cdm.model.location.Point;
+import eu.etaxonomy.cdm.model.location.ReferenceSystem;
 import eu.etaxonomy.taxeditor.preference.Resources;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceSystemComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 
 /**
  * <p>
@@ -36,7 +36,7 @@ public class PointElement extends AbstractCdmFormElement implements
        private final TextWithLabelElement text_latitude;
        private final TextWithLabelElement text_longitude;
        private final NumberWithLabelElement number_errorRadius;
-       private final ReferenceSystemComboElement combo_referenceSystem;
+       private final TermComboElement<ReferenceSystem> combo_referenceSystem;
 
        private final TextWithLabelElement text_latitudeParsed;
 
@@ -48,10 +48,10 @@ public class PointElement extends AbstractCdmFormElement implements
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param point
         *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
@@ -76,8 +76,8 @@ public class PointElement extends AbstractCdmFormElement implements
                text_longitudeParsed.setEnabled(false);
                number_errorRadius = formFactory.createIntegerTextWithLabelElement(
                                formElement, "Error Radius (m)", null, style);
-               combo_referenceSystem = (ReferenceSystemComboElement) formFactory
-                               .createTermComboElement(TermComboType.REFERENCE_SYSTEM,
+               combo_referenceSystem = formFactory
+                               .createTermComboElement(ReferenceSystem.class,
                                                formElement, "Reference System", null, style);
 
                setPoint(point);
similarity index 87%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/RootElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RootElement.java
index 6d45a091e49b35f898558c5a45e13c02fd5268d7..9ac347446a917822c1a85b7b5af3dae912ce522e 100644 (file)
@@ -8,11 +8,12 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Composite;
 
+
 /**
  * <p>RootElement class.</p>
  *
@@ -25,7 +26,7 @@ public class RootElement extends AbstractCdmFormElement {
        /**
         * <p>Constructor for RootElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param layoutComposite a {@link org.eclipse.swt.widgets.Composite} object.
         */
        public RootElement(CdmFormFactory formFactory, Composite layoutComposite) {
similarity index 94%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/SelectionArbitrator.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/SelectionArbitrator.java
index f851b9e8ed80718779fe795ba2df6bc12abe47e2..3c2c784ee1d19becd11dd9717bc0b453766d26ba 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.HashSet;
 import java.util.Set;
@@ -48,7 +48,7 @@ public class SelectionArbitrator implements SelectionListener, ISelectionChanged
        /**
         * <p>Constructor for SelectionArbitrator.</p>
         *
-        * @param selectableComposite a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+        * @param selectableComposite a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
         */
        public SelectionArbitrator(IEntityElement selectableComposite){
                this.entityElement = selectableComposite;
@@ -118,7 +118,7 @@ public class SelectionArbitrator implements SelectionListener, ISelectionChanged
        /**
         * <p>Getter for the field <code>entityElement</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
         */
        public IEntityElement getEntityElement() {
                return entityElement;
@@ -127,7 +127,7 @@ public class SelectionArbitrator implements SelectionListener, ISelectionChanged
        /**
         * <p>setEntityComposite</p>
         *
-        * @param entityElement a {@link eu.etaxonomy.taxeditor.ui.forms.IEntityElement} object.
+        * @param entityElement a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement} object.
         */
        public void setEntityComposite(IEntityElement entityElement) {
                this.entityElement = entityElement;
similarity index 89%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextActionElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextActionElement.java
index d54f7627d3bdf90a43931f78fe63ed75a4f1620a..aadf8713ecf7f9d39922b558d6a607dc58415376 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -32,8 +32,8 @@ public class TextActionElement extends AbstractCdmFormElement implements ModifyL
         * <p>Constructor for TextActionElement.</p>
         *
         * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param buttonLabel a {@link java.lang.String} object.
         * @param initialText a {@link java.lang.String} object.
@@ -45,13 +45,13 @@ public class TextActionElement extends AbstractCdmFormElement implements ModifyL
                addControl(label);
                
                box = formFactory.createComposite(getLayoutComposite());
-               box.setLayout(CdmFormFactory.LAYOUT(2, false));
-               box.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               box.setLayout(LayoutConstants.LAYOUT(2, false));
+               box.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                addControl(box);
                
                text = toolkit.createText(box, "", style);
                addControl(text);
-               text.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               text.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                
                setText(CdmUtils.Nz(initialText));
                
similarity index 94%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TextWithLabelElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java
index ff1f7ace2de380e62bb80ace06ee366ac3c462f3..33263074f1bbd20b5b06ab5c2c113dc4c065710a 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyAdapter;
@@ -43,10 +43,10 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -66,7 +66,7 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements
                        label = formFactory.createLabel(getLayoutComposite(),
                                        CdmUtils.Nz(labelString), SWT.NULL);
                        addControl(label);
-                       label.setLayoutData(CdmFormFactory.LEFT());
+                       label.setLayoutData(LayoutConstants.LEFT());
                }
 
                int scrollStyle = textHeight == null ? SWT.NULL
@@ -104,7 +104,7 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements
                        });
                }
 
-               TableWrapData layoutData = CdmFormFactory.FILL();
+               TableWrapData layoutData = LayoutConstants.FILL();
                if (textHeight != null && textHeight > 0) {
                        (layoutData).heightHint = textHeight;
                }
similarity index 94%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/TimePeriodElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElement.java
index efa0275dcd00a5d1e01c3bbd3ef81bd62dac8ab9..9f9cc50713bb826c4e68537cbf759c1e699fe08f 100644 (file)
@@ -8,7 +8,7 @@
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.graphics.Color;
@@ -40,10 +40,10 @@ public class TimePeriodElement extends AbstractCdmFormElement implements ISelect
         * @param style
         *            a int.
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
similarity index 93%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ToggleableTextElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java
index aa3958aac81d71cbc1284d5a0bd74ac14f1f592e..e49ca357c33770df95031bc1371da1dcfbaf548d 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.util.HashSet;
 import java.util.Set;
@@ -50,8 +50,8 @@ public class ToggleableTextElement extends AbstractCdmFormElement implements Sel
         * <p>Constructor for ToggleableTextElement.</p>
         *
         * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param labelString a {@link java.lang.String} object.
         * @param initialText a {@link java.lang.String} object.
         * @param initialState a boolean.
@@ -64,14 +64,14 @@ public class ToggleableTextElement extends AbstractCdmFormElement implements Sel
                addControl(label);
                
                container = formFactory.createComposite(getLayoutComposite(), SWT.WRAP);                
-               container.setLayout(CdmFormFactory.LAYOUT(2, false));
-               container.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               container.setLayout(LayoutConstants.LAYOUT(2, false));
+               container.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                addControl(container);
                
                text_cache = formFactory.createText(container, initialText, SWT.WRAP | SWT.MULTI);
                addControl(text_cache);
                text_cache.addModifyListener(this);
-               text_cache.setLayoutData(CdmFormFactory.FILL());
+               text_cache.setLayoutData(LayoutConstants.FILL());
 
                // Don't accept carriage returns as input
                text_cache.addKeyListener( new KeyAdapter(){
similarity index 96%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/UriWithLabelElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java
index 1067f1820b9403dd6fbf5f3a21d7fd1bd59f4128..f4307ea87a4572da4b8f8f6e1df83c973e184556 100644 (file)
@@ -8,11 +8,12 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms;
+package eu.etaxonomy.taxeditor.ui.element;
 
 import java.net.URI;
 import java.net.URISyntaxException;
 
+
 /**
  * @author n.hoffmann
  * @created Dec 20, 2010
index 9ed8d98cfec449f4f643c3a7e9a5c5f7bf116fe8..9553a371987a93b830a462569334993ae54067a7 100644 (file)
@@ -27,9 +27,9 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
 
 import eu.etaxonomy.cdm.ext.openurl.OpenUrlReference;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ImageElement;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.ImageElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
 
 /**
  * @author n.hoffmann
@@ -49,8 +49,6 @@ public class OpenUrlReferencePage extends WizardPage implements SelectionListene
        private Button button_next;
        private Button button_previous;
 
-       private OpenUrlReference reference;
-
        private Composite container;
 
        private Label label_pageNumber; 
@@ -73,7 +71,7 @@ public class OpenUrlReferencePage extends WizardPage implements SelectionListene
                container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
                
                scrolledForm = getWizard().getFormFactory().createScrolledForm(container);
-               scrolledForm.getBody().setLayout(CdmFormFactory.LAYOUT(3, false));
+               scrolledForm.getBody().setLayout(LayoutConstants.LAYOUT(3, false));
                scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
                
                Composite buttonContainer = getWizard().getFormFactory().createComposite(container);
@@ -91,7 +89,7 @@ public class OpenUrlReferencePage extends WizardPage implements SelectionListene
                button_next.addSelectionListener(this);
                button_next.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false));
                
-               scrolledForm.getBody().setLayoutData(CdmFormFactory.FILL());
+               scrolledForm.getBody().setLayoutData(LayoutConstants.FILL());
                
                rootElement = new RootElement(getWizard().getFormFactory(), scrolledForm.getBody());
                
index 6d80ac09f036585361d0690c3788fd58145e5723..c508919a6e1c2b12486f70706dca101a986644db 100644 (file)
@@ -17,13 +17,13 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.editors.text.EditorsUI;
 
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * @author n.hoffmann
@@ -57,7 +57,7 @@ public class OpenUrlSelectorElement extends AbstractCdmFormElement implements Se
                addControl(label);
                
                button = formFactory.createButton(getLayoutComposite(), labelString, SWT.PUSH);
-               button.setLayoutData(CdmFormFactory.RIGHT());
+               button.setLayoutData(LayoutConstants.RIGHT());
                addControl(button);
                button.addSelectionListener(this);
        }
@@ -84,7 +84,7 @@ public class OpenUrlSelectorElement extends AbstractCdmFormElement implements Se
        /**
         * @return
         */
-       private String getDetail() {
+       public String getDetail() {
                return referenceDetail;
        }
        
index dacd714b58b8ee4585ddc3453b98e296d3d29dd0..12bcab92169b0318100cbe566bc56d8b9d09055a 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.cdm.ext.openurl.OpenUrlReference;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
  * @author n.hoffmann
similarity index 88%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/EditPasswordElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/EditPasswordElement.java
index 69a02543822eb2cc2e0f77896648e9a00709790e..2f91f4a5b91cb186f8988cb1c27d43e8820a67c8 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
 
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.SWT;
@@ -21,9 +21,10 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * @author n.hoffmann
@@ -54,7 +55,7 @@ public class EditPasswordElement extends AbstractCdmFormElement implements Selec
                String buttonLabelString = (labelString != null) ? labelString : "Change Password";
                
                button = formFactory.createButton(getLayoutComposite(), buttonLabelString, SWT.PUSH);
-               button.setLayoutData(CdmFormFactory.RIGHT());
+               button.setLayoutData(LayoutConstants.RIGHT());
                addControl(button);
                
                button.addSelectionListener(this);
similarity index 96%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizard.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java
index 987105702ee59c148a0e5700e7c466898e3520e0..552388243c882357d311c4ea9fe6bc39c2690549 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
 
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Display;
@@ -20,7 +20,7 @@ import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 
 /**
  * @author n.hoffmann
similarity index 89%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizardPage.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizardPage.java
index 34d7ee53493694a2515c488c06788c0c826cb20f..1fa087abd51780e4163f5811e81201e4dc137635 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.forms.password;
+package eu.etaxonomy.taxeditor.ui.password;
 
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.swt.SWT;
@@ -21,10 +21,11 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -44,6 +45,8 @@ public class PasswordWizardPage extends AbstractCdmEntityWizardPage<User> implem
        private TextWithLabelElement text_passwordRepeat;
        private PasswordValidator passwordValidator;
 
+       private UniqueUserNameValidator uniqueUsernameValidator;
+
        /**
         * @param formFactory
         * @param conversation
@@ -54,6 +57,7 @@ public class PasswordWizardPage extends AbstractCdmEntityWizardPage<User> implem
                super(formFactory, conversation, entity);
                
                passwordValidator = new PasswordValidator();
+               uniqueUsernameValidator = new UniqueUserNameValidator();
        }
 
        /* (non-Javadoc)
@@ -62,11 +66,11 @@ public class PasswordWizardPage extends AbstractCdmEntityWizardPage<User> implem
        @Override
        public void createControl(Composite parent) {
                Composite control = formFactory.createComposite(parent);
-               control.setLayoutData(CdmFormFactory.FILL());
+               control.setLayoutData(LayoutConstants.FILL());
                
                setPageComplete(false);
                
-               control.setLayout(CdmFormFactory.LAYOUT(2, false));
+               control.setLayout(LayoutConstants.LAYOUT(2, false));
                WizardPageRootElement rootElement = new WizardPageRootElement(formFactory, control, getConversationHolder());
                
                if(!CdmStore.getLoginManager().isAdmin()){
index f74436daf996cc1a22a5acddbe5d242827e2cefc..ff6292ab6f0ff8284ddb664a8066527e6b2808a5 100644 (file)
@@ -22,13 +22,13 @@ import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
 
 /**
  * <p>
@@ -45,8 +45,6 @@ public abstract class AbstractCdmDetailElement<T> extends
 
        private T entity;
 
-       private boolean enabled;
-
        private boolean irrelevant;
 
        /**
@@ -55,10 +53,10 @@ public abstract class AbstractCdmDetailElement<T> extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param <T>
         *            a T object.
@@ -122,7 +120,7 @@ public abstract class AbstractCdmDetailElement<T> extends
         * Sets all field to the given enablement state except the objects in
         * collection except
         * 
-        * @see eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement#setEnabled(boolean)
+        * @see eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement#setEnabled(boolean)
         * @param enabled
         *            a boolean.
         * @param except
@@ -171,7 +169,6 @@ public abstract class AbstractCdmDetailElement<T> extends
 
        /** {@inheritDoc} */
        public void setEnabled(boolean enabled) {
-               this.enabled = enabled;
                setEnabled(enabled, null);
        }
 
@@ -185,7 +182,7 @@ public abstract class AbstractCdmDetailElement<T> extends
         * Create all content elements
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param entity
         *            a T object.
@@ -262,7 +259,7 @@ public abstract class AbstractCdmDetailElement<T> extends
         * 
         * @param event
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent}
+        *            {@link eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent}
         *            object.
         */
        public void handleException(CdmPropertyChangeEvent event) {
index 7c07ce08cd6341d4605f7058f10a50134eaf3370..0d013aa17f49c7342744698dee0cb820bb4a4d2a 100644 (file)
@@ -22,12 +22,12 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 
 /**
  * <p>
@@ -50,13 +50,13 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param selectionProvider
         *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
@@ -68,7 +68,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends
        public AbstractCdmDetailSection(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
                        ISelectionProvider selectionProvider, int style) {
-               super(formFactory, conversation, parentElement, selectionProvider,
+               super(formFactory, parentElement, selectionProvider,
                                Section.CLIENT_INDENT | style);
 
                setText(getHeading());
@@ -77,6 +77,30 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends
 
                createControls(this, SWT.NULL);
        }
+       
+       public AbstractCdmDetailSection(CdmFormFactory formFactory, Class<ENTITY> clazz,
+                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       ISelectionProvider selectionProvider, int style) {
+               super(formFactory, parentElement, selectionProvider,
+                               Section.CLIENT_INDENT | style);
+               
+               setText(getHeading());
+
+               addExpansionListener(this);
+
+               createControlsByType(this, clazz, SWT.NULL);
+       }
+
+       /**
+        * @param abstractCdmDetailSection
+        * @param definedTermClass
+        * @param null1
+        */
+       protected void createControlsByType(
+                       AbstractCdmDetailSection<ENTITY> abstractCdmDetailSection,
+                       Class<ENTITY> entityClass, int style) {
+       }
+
 
        /**
         * <p>
@@ -108,7 +132,7 @@ public abstract class AbstractCdmDetailSection<ENTITY> extends
         * </p>
         * 
         * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType}
+        *         {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType}
         *         object.
         */
        protected abstract DetailType getDetailType();
index 10c72d532bb6c2cbd140bf256d4d57d69e4f98ce..ca1353b2c53d0de4301743261bc778221977301e 100644 (file)
@@ -17,7 +17,6 @@ import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Layout;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
@@ -25,12 +24,13 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.ImageResources;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * <p>
@@ -63,10 +63,10 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
         * @param style
         *            a int.
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a ENTITY object.
@@ -90,12 +90,12 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
                box.setBackgroundMode(SWT.INHERIT_DEFAULT);
                addControl(box);
 
-               TableWrapLayout boxLayout = CdmFormFactory.LAYOUT(2, false);
+               TableWrapLayout boxLayout = LayoutConstants.LAYOUT(2, false);
                boxLayout.topMargin = 4;
                boxLayout.bottomMargin = 4;
                box.setLayout(boxLayout);
 
-               box.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               box.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
 
                // box.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
 
@@ -106,15 +106,15 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
                setLayoutComposite(container);
 
                addControl(container);
-               Layout containerLayout = CdmFormFactory.LAYOUT(2, false);
+               Layout containerLayout = LayoutConstants.LAYOUT(2, false);
 
                container.setLayout(containerLayout);
-               container.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               container.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
 
                if (removeListener != null) {
                        button_remove = formFactory.createButton(box, null, SWT.PUSH);
                        addControl(button_remove);
-                       button_remove.setLayoutData(CdmFormFactory.RIGHT());
+                       button_remove.setLayoutData(LayoutConstants.RIGHT());
                        button_remove.setImage(ImageResources
                                        .getImage(ImageResources.TRASH_ICON));
                        button_remove.setToolTipText("Remove");
@@ -163,7 +163,7 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
         * </p>
         * 
         * @param element
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
index 9ee5eb3937efd71d202565ca44c66c1a80244e6d..1a9f43ee577c869e74cbd59b9fb1deb56d87e0f4 100644 (file)
@@ -5,7 +5,6 @@ package eu.etaxonomy.taxeditor.ui.section;
 
 import java.util.Collection;
 
-import org.apache.commons.collections.CollectionUtils;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -29,10 +28,9 @@ import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>Abstract AbstractEntityCollectionSection class.</p>
@@ -52,15 +50,15 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
         * <p>Constructor for AbstractEntityCollectionSection.</p>
         *
         * @param conversation 
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param title a {@link java.lang.String} object.
         * @param <ENTITY> a ENTITY object.
         * @param <ELEMENT> a ELEMENT object.
         */
        public AbstractEntityCollectionSection(CdmFormFactory formFactory, ConversationHolder conversation, ICdmFormElement parentElement, String title, int style) {
-               super(formFactory, conversation, parentElement, Section.CLIENT_INDENT | style);
+               super(formFactory, parentElement, Section.CLIENT_INDENT | style);
                this.title = title;
                this.setText(getTitleString());
                showToolbar();
@@ -115,7 +113,7 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
         */
        @Override
        public void setEntity(ENTITY entity) {
-               if(entity != null && hasCollectionChanged(entity)){
+               if(entity != null){
                        super.setEntity(entity);
                        internalUpdateSection(false);
                }
@@ -161,36 +159,6 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
                        firePropertyChangeEvent(this);
        }
 
-       /**
-        * Whether the entities specific collection changed
-        * 
-        * @param newEntity
-        * @return
-        */
-       private boolean hasCollectionChanged(ENTITY newEntity){
-
-               // return true on null
-               if(getEntity() == null || newEntity == null)    return true;    
-               
-               // if the entities differ the collection has changed
-               if(! getEntity().equals(newEntity)) return true;
-               
-               Collection<ELEMENT> oldCollection = getCollection(getEntity());
-               Collection<ELEMENT> newCollection = getCollection(newEntity);
-               
-               // return true on null
-               if(oldCollection == null || newCollection == null) return true;
-               
-               // if the collections are object equal, check if the content is equal, too
-               if(oldCollection.equals(newCollection)){
-               
-                       boolean equal = CollectionUtils.isEqualCollection(oldCollection, newCollection);
-                       // return true when collections are not equal
-                       return equal ? false : true;
-               }
-               return true;
-       }
-
        /**
         * Create the elements to be shown in this seciton client area 
         */
@@ -247,7 +215,7 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
         * @param backgroundColor a {@link org.eclipse.swt.graphics.Color} object.
         */
        protected void createElementComposite(ELEMENT element, SelectionListener removeListener, Color backgroundColor){
-               AbstractEntityCollectionElement formElement = formFactory.createEntityCollectionElement(this, element, removeListener, backgroundColor, SWT.NULL);
+               formFactory.createEntityCollectionElement(this, element, removeListener, backgroundColor, SWT.NULL);
        }
        
        /* (non-Javadoc)
index 4cd5efe012e137b8e70421cbe2d6fd45d70ededf..e29b656068f4dfa836fdf526b3c4ae2244f4a72d 100644 (file)
@@ -6,9 +6,9 @@ package eu.etaxonomy.taxeditor.ui.section;
 import java.util.Arrays;
 
 import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
 
 /**
  * @author n.hoffmann
index aa3b6162c15d027270227f197d36802949cba97d..e06c2bc570a5a0751ceac1ad28ed20aeafe45e99 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Label;
 
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>EmptyElement class.</p>
@@ -31,8 +31,8 @@ public class EmptyElement extends AbstractCdmFormElement{
         * <p>Constructor for EmptyElement.</p>
         *
         * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.common.VersionableEntity} object.
         */
        public EmptyElement(CdmFormFactory toolkit, ICdmFormElement parentElement, VersionableEntity entity, int style) {
index ea05922d34acb77ae001fa1a23826743d9a8119f..22dd6221148381d0a1e8c43f202a598f9e9d8dc7 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.agent;
 
 import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -32,7 +31,7 @@ public class InstitutionDetailElement extends
 
        // private InstitutionTypeSection section_institutionTypes;
 
-       private InstitutionSelectionElement selection_partOfInstitution;
+       private EntitySelectionElement<Institution> selection_partOfInstitution;
 
        /**
         * @param formFactory
@@ -58,11 +57,12 @@ public class InstitutionDetailElement extends
                text_code = formFactory.createTextWithLabelElement(formElement, "Code",
                                entity.getCode(), style);
                // section_institutionTypes
-               selection_partOfInstitution = (InstitutionSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.INSTITUTION,
+               selection_partOfInstitution = formFactory
+                               .createSelectionElement(Institution.class,
                                                getConversationHolder(), formElement, "Is Part Of",
                                                entity.getIsPartOf(),
-                                               InstitutionSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.DELETABLE, 
+                                               style);
        }
 
        /*
index 9003785e0f501680ce75fd60330206bf081e4cdd..bf510748c0b7c858abd7e245e24067f9e48c27e2 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index f3a8a00074584a3d92970ae263f67ffafa27176c..0c0656b635378414d3715fd4942d840c15d77104 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -46,7 +46,7 @@ public class InstitutionWizardPage extends
         * (eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<Institution> createElement(ICdmFormElement rootElement) {
                InstitutionDetailElement detailElement = (InstitutionDetailElement) formFactory
                                .createCdmDetailElement(DetailType.INSTITUTION, rootElement,
                                                SWT.NULL);
index e1a4360c1fcf9f0900828bc3c8d8b396d4e95927..5199df5fce2e6f8abe1e0cf8fd48cbc11457ec8c 100644 (file)
@@ -16,11 +16,10 @@ import java.util.Collection;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 
 /**
@@ -48,10 +47,10 @@ public class PersonDetailElement extends AbstractIdentifiableEntityDetailElement
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
index 46bbf8b59c9562d4497afed8ce774d1276a21b54..77e6277e6f8c7b9a549815400891b68fdc54bc6b 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class PersonDetailSection extends AbstractCdmDetailSection<Person>{
        /**
         * <p>Constructor for PersonDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index c67ac2220301c1c37a46169bbaf62490b5842ffe..75fecc33702b2672c26efc3af81e6e899037340c 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -32,7 +32,7 @@ public class PersonWizardPage extends AbstractCdmEntityWizardPage<Person> {
        /**
         * <p>Constructor for PersonWizardPage.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.agent.Person} object.
         */
index 976339182cfa77127d12866bd569b20ef03b722e..2462dd3c9b49f8787f330ac244735fe26aed7a7e 100644 (file)
@@ -15,11 +15,12 @@ import java.util.Arrays;
 import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 
 /**
@@ -43,10 +44,10 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<T
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -71,7 +72,7 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElement<T
                section_teamMembers = (TeamMemberSection) formFactory
                                .createEntityDetailSection(EntityDetailType.TEAMMEMBER,
                                                getConversationHolder(), formElement, Section.EXPANDED);
-               section_teamMembers.setLayoutData(CdmFormFactory
+               section_teamMembers.setLayoutData(LayoutConstants
                                .FILL_HORIZONTALLY(2, 1));
        }
 
index 6cf73bc46d086ff193d0713ce4b825a21753071c..8752f86de666a2aff7f3ab8144f93168040c94e7 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class TeamDetailSection extends AbstractCdmDetailSection<Team>{
        /**
         * <p>Constructor for TeamDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 493de9a7f5cedf40729a0904f01861d45e4efee2..103870d0e2bd364a6f444b2ded17adb72c6b8550 100644 (file)
@@ -14,13 +14,12 @@ import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -33,7 +32,7 @@ import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
  */
 public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
 
-       private PersonSelectionElement selection_person;
+       private EntitySelectionElement<Person> selection_person;
 
        /**
         * <p>
@@ -41,10 +40,10 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.agent.Person} object.
@@ -69,10 +68,11 @@ public class TeamMemberElement extends AbstractEntityCollectionElement<Person> {
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_person = (PersonSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.PERSON,
+               selection_person = formFactory
+                               .createSelectionElement(Person.class,
                                                getConversationHolder(), this, "Person", null,
-                                               PersonSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, 
+                                               style);
        }
 
        /*
index 3a73774cd2f715f664f7e36b4756cba3ee5b2973..5cc7743d878c0fefde03b0edff0217f862edf124 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -31,9 +31,9 @@ public class TeamMemberSection extends AbstractEntityCollectionSection<Team, Per
        /**
         * <p>Constructor for TeamMemberSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public TeamMemberSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 28944f7bca8d78810e5db9bd7f3fa1f070bb7f2d..77808b23d48950f7a7534cdbee30827db98923b7 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.agent;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,15 +30,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  */
 public class TeamOrPersonBaseDetailSection extends AbstractCdmDetailSection<TeamOrPersonBase> {
 
-       private static final Logger logger = Logger
-                       .getLogger(TeamOrPersonBaseDetailSection.class);
-
        /**
         * <p>Constructor for TeamOrPersonBaseDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 91bceab123bcba3a04ffc164afdaaab7de34aeec..bbabd642afbab04ce72d0afd09ebdc33b665bfb0 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -37,7 +37,7 @@ public class TeamWizardPage extends AbstractCdmEntityWizardPage<Team> {
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
index 25821d71a5b18f3ef8f566e9f076980bc19d76ec..b13cc94fcd5156c752b72a971458c50a7b47482f 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.classification;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -36,12 +34,9 @@ import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
 public class ClassificationDetailElement extends
                AbstractCdmDetailElement<Classification> {
 
-       private static final Logger logger = Logger
-                       .getLogger(ClassificationDetailElement.class);
-
        private TextWithLabelElement text_treeLabel;
 
-       private ReferenceSelectionElement selection_reference;
+       private EntitySelectionElement<Reference> selection_reference;
 
        private TextWithLabelElement text_microReference;
 
@@ -51,10 +46,10 @@ public class ClassificationDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public ClassificationDetailElement(CdmFormFactory formFactory,
@@ -77,11 +72,11 @@ public class ClassificationDetailElement extends
                text_treeLabel = formFactory.createTextWithLabelElement(formElement,
                                "Label", entity != null ? entity.getTitleCache() : null,
                                SWT.NULL);
-               selection_reference = (ReferenceSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.REFERENCE,
+               selection_reference = formFactory
+                               .createSelectionElement(Reference.class,
                                                getConversationHolder(), formElement, "Reference",
                                                entity != null ? entity.getReference() : null,
-                                               ReferenceSelectionElement.DEFAULT, SWT.NULL);
+                                               EntitySelectionElement.ALL, SWT.NULL);
                text_microReference = formFactory.createTextWithLabelElement(
                                formElement, "Reference Detail",
                                entity != null ? entity.getMicroReference() : null, SWT.NULL);
index aaa45514c9c18d7e9c71bd72565b8e3b9f353108..c3e67fe2e0d7bd2e16156e388b900b0279b43b9b 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class ClassificationDetailSection extends AbstractCdmDetailSection<Classi
        /**
         * <p>Constructor for ClassificationDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index b1974fce58036b11957757af4c070f69c95c547c..0f47182680bca1f9d9c8f0c1a7a006363abedc37 100644 (file)
@@ -14,11 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>
@@ -38,7 +37,7 @@ public class ClassificationWizardPage extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
index f45d1264796317b156b4ef13be94a63e8606c8c4..510aef97529ce5a737fa694bd127dfd5ed578505 100644 (file)
@@ -19,17 +19,13 @@ import eu.etaxonomy.cdm.model.taxon.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.taxeditor.parser.ParseHandler;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ClassificationSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
 
 /**
  * <p>
@@ -42,7 +38,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
  */
 public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode> {
 
-       private ClassificationSelectionElement selection_classification;
+       private EntitySelectionElement<Classification> selection_classification;
 
        private Classification classification;
 
@@ -50,7 +46,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode>
 
        private ITreeNode parentTreeNode;
 
-       private TaxonSelectionElement selection_reuseExistingTaxon;
+       private EntitySelectionElement<Taxon> selection_reuseExistingTaxon;
 
        private Taxon taxon;
 
@@ -62,7 +58,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode>
 
        private boolean complete;
 
-       private NameSelectionElement selection_reuseExistingName;
+       private EntitySelectionElement<TaxonNameBase> selection_reuseExistingName;
 
        /**
         * <p>
@@ -70,10 +66,10 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode>
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public TaxonNodeDetailElement(CdmFormFactory formFactory,
@@ -93,25 +89,24 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITreeNode>
        @Override
        protected void createControls(ICdmFormElement formElement,
                        ITreeNode entity, int style) {
-               selection_classification = (ClassificationSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.CLASSIFICATION,
+               selection_classification = formFactory
+                               .createSelectionElement(Classification.class,
                                                getConversationHolder(), formElement, "Classification",
-                                               null, ClassificationSelectionElement.DEFAULT, style);
-               selection_parentTaxonNode = (TaxonNodeSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.TAXON_NODE,
-                                               getConversationHolder(), formElement, "Parent", null,
-                                               TaxonNodeSelectionElement.DEFAULT, style);
-               selection_reuseExistingTaxon = (TaxonSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.TAXON,
+                                               null, EntitySelectionElement.DELETABLE, style);
+               selection_parentTaxonNode = formFactory
+                               .createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", null,
+                                               EntitySelectionElement.DELETABLE, style);
+               selection_reuseExistingTaxon = formFactory
+                               .createSelectionElement(Taxon.class,
                                                getConversationHolder(), formElement,
                                                "Reuse existing Taxon", null,
-                                               TaxonSelectionElement.DELETABLE, style);
+                                               EntitySelectionElement.NOTHING, style);
 
-               selection_reuseExistingName = (NameSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.NAME,
+               selection_reuseExistingName = formFactory
+                               .createSelectionElement(TaxonNameBase.class,
                                                getConversationHolder(), formElement,
                                                "Reuse existing name", null,
-                                               NameSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
 
                text_newTaxonName = formFactory.createTextWithLabelElement(formElement,
                                "New Taxon", "", style);
index 4489c373a0546504fbaafb779a914bd475b1feff..1460d9330e1d2d99e3b04d28ff15a3703cebed95 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -40,9 +40,9 @@ public class TaxonNodeDetailSection extends AbstractCdmDetailSection<TaxonNode>
        /**
         * <p>Constructor for TaxonNodeDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 5e5614d8bd0eb201f653de74e82a93cfad149e7d..4db6c49fc5f547c725ac36cb7fa11dbe93f2af18 100644 (file)
@@ -16,10 +16,10 @@ import org.eclipse.swt.SWT;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.taxon.ITreeNode;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 
 /**
  * <p>
@@ -38,7 +38,7 @@ public class TaxonNodeWizardPage extends AbstractCdmEntityWizardPage<ITreeNode>
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ReferencedEntityDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ReferencedEntityDetailSection.java
new file mode 100644 (file)
index 0000000..f0ade82
--- /dev/null
@@ -0,0 +1,45 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.section.common;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class ReferencedEntityDetailSection extends AbstractCdmDetailSection<ReferencedEntityBase>{
+
+       public ReferencedEntityDetailSection(CdmFormFactory formFactory,
+                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       ISelectionProvider selectionProvider, int style) {
+               super(formFactory, conversation, parentElement, selectionProvider, style);
+       }
+
+       @Override
+       protected DetailType getDetailType() {
+               return DetailType.REFERENCED_ENTITY;
+       }
+
+       @Override
+       public String getHeading() {
+               return "Reference";
+       }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java
new file mode 100644 (file)
index 0000000..69b1e1a
--- /dev/null
@@ -0,0 +1,58 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.section.common;
+
+import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class RefereneEntityDetailElement extends AbstractCdmDetailElement<ReferencedEntityBase>{
+
+       private EntitySelectionElement<Reference> selection_reference;
+       private TextWithLabelElement text_referenceDetail;
+
+       public RefereneEntityDetailElement(CdmFormFactory formFactory,
+                       ICdmFormElement formElement) {
+               super(formFactory, formElement);
+       }
+
+       @Override
+       protected void createControls(ICdmFormElement formElement,
+                       ReferencedEntityBase entity, int style) {
+               selection_reference = formFactory
+                               .createSelectionElement(Reference.class,
+                                               getConversationHolder(), formElement, "Reference",
+                                               entity.getCitation(),
+                                               EntitySelectionElement.ALL, style);
+               text_referenceDetail = formFactory.createTextWithLabelElement(
+                               formElement, "Reference Detail",
+                               entity.getCitationMicroReference(), style);
+       }
+
+       @Override
+       public void handleEvent(Object eventSource) {
+               if (eventSource == selection_reference) {
+                       getEntity().setCitation(selection_reference.getSelection());
+               } else if (eventSource == text_referenceDetail) {
+                       getEntity().setCitationMicroReference(
+                                       text_referenceDetail.getText());
+               }
+       }
+
+}
index 1b02a224a2b6a9fa5a58ebd4001699119a1134ed..f05ea9dd512d9e48dd9fa0e0aecb402896f5828f 100644 (file)
@@ -12,14 +12,13 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import org.eclipse.swt.events.SelectionListener;
 
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -33,7 +32,7 @@ import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
 public class DerivedUnitElement extends
                AbstractEntityCollectionElement<SpecimenOrObservationBase> {
 
-       private AbstractSelectionElement selection_derivedUnit;
+       private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
 
        /**
         * <p>
@@ -41,10 +40,10 @@ public class DerivedUnitElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a
@@ -72,8 +71,8 @@ public class DerivedUnitElement extends
        @Override
        public void createControls(ICdmFormElement element, int style) {
                selection_derivedUnit = formFactory.createSelectionElement(
-                               SelectionType.DERIVED_UNIT, getConversationHolder(), element,
-                               "Specimen", null, DerivedUnitBaseSelectionElement.DEFAULT,
+                               DerivedUnitBase.class, getConversationHolder(), element,
+                               "Specimen", null, EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE,
                                style);
        }
 
@@ -87,12 +86,15 @@ public class DerivedUnitElement extends
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-
+               if(eventSource == selection_derivedUnit){
+                       setEntity(selection_derivedUnit.getSelection());
+               }
        }
 
        /** {@inheritDoc} */
        @Override
        public void setEntity(SpecimenOrObservationBase entity) {
-
+               this.entity = entity;
        }
+
 }
index ca19c9f3f046081ec666db5c6a273ccda36d931f..374fd04b744fa29a7838a683b033b052ad3cf6e9 100644 (file)
@@ -14,10 +14,11 @@ import java.util.Collection;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.DerivedUnitSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -32,9 +33,9 @@ public class DescribedSpecimenSection extends AbstractEntityCollectionSection<Ta
        /**
         * <p>Constructor for DescribedSpecimenSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public DescribedSpecimenSection(CdmFormFactory formFactory,
@@ -53,7 +54,8 @@ public class DescribedSpecimenSection extends AbstractEntityCollectionSection<Ta
        /** {@inheritDoc} */
        @Override
        public SpecimenOrObservationBase createNewElement() {
-               return DerivedUnit.NewInstance();
+               DerivedUnitBase selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);
+               return selection;
        }
 
        /** {@inheritDoc} */
index a4b948615669e059bc9a282fb8e07903d592d4a6..709d02e7cd740f8954b4ee885c9ec1e0f9ad6352 100644 (file)
@@ -14,12 +14,11 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.FeatureTree;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureTreeSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>DescriptionDetailElement class.</p>
@@ -31,13 +30,13 @@ import eu.etaxonomy.taxeditor.ui.selection.FeatureTreeSelectionElement;
 public class DescriptionDetailElement extends AbstractCdmDetailElement<DescriptionBase> {
 
        private TextWithLabelElement detailDescription;
-       private FeatureTreeSelectionElement selection_featureTree;
+       private EntitySelectionElement<FeatureTree> selection_featureTree;
 
        /**
         * <p>Constructor for DescriptionDetailElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public DescriptionDetailElement(CdmFormFactory cdmFormFactory,
@@ -51,9 +50,13 @@ public class DescriptionDetailElement extends AbstractCdmDetailElement<Descripti
                detailDescription = formFactory.createMultilineTextWithLabel(this, "Label", 50, SWT.WRAP);
                detailDescription.setText(entity.getTitleCache());
                
-//             selection_featureTree = (FeatureTreeSelectionElement) formFactory.createSelectionElement(SelectionType.FEATURE_TREE, getConversationHolder(), formElement, "Feature Tree", null, style);
+               // TODO I initially thought that we can handle the entity's descriptive system with a feature tree 
+               // Since descriptiveSystem is a Set of Features that are present or allowed for the current description, 
+               // it is similar to a FeatureTree (you can get this information from a feature tree) but not the same.
+               // Please correct this once it is clear what descriptive system will be used for in CDM
+//             selection_featureTree = formFactory.createSelectionElement(FeatureTree.class, getConversationHolder(), formElement, "Feature Tree", null, EntitySelectionElement.ALL, style);
        }
-       
+               
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
index 75730c99658c63b8e0cfa74a3dc580e993d996ac..569ebb9b78584a2c62e3f56b59d962b2042a87d9 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -29,15 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  */
 public class DescriptionDetailSection extends AbstractCdmDetailSection<DescriptionBase> {
 
-       private static final Logger logger = Logger
-                       .getLogger(DescriptionDetailSection.class);
-
        /**
         * <p>Constructor for DescriptionDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 859eb72c2505f149c68f7f874e717b9b1916288f..5591416ff5177d31814e37bdaafd3efeaf4affc0 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement;
 
 /**
  * <p>DescriptionElementDetailElement class.</p>
@@ -28,16 +25,11 @@ import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDesc
 public class DescriptionElementDetailElement extends
                AbstractCdmDetailElement<DescriptionElementBase> {
 
-
-       private static final Logger logger = Logger
-                       .getLogger(DescriptionElementDetailElement.class);
-       private AbstractDetailedDescriptionDetailElement detailElement;
-
        /**
         * <p>Constructor for DescriptionElementDetailElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public DescriptionElementDetailElement(CdmFormFactory cdmFormFactory,
@@ -48,7 +40,7 @@ public class DescriptionElementDetailElement extends
        /** {@inheritDoc} */
        @Override
        protected void createControls(ICdmFormElement formElement, DescriptionElementBase entity, int style) {
-               detailElement = formFactory.createDetailedDescriptionDetailElement(formElement, entity, style);
+               formFactory.createDetailedDescriptionDetailElement(formElement, entity, style);
        }
        
        /** {@inheritDoc} */
index 463a5dc18dba282a357513ad5ce4f30be46291e9..8f43590dd54e9dec345fa2e0bd42c810f92a9dcd 100644 (file)
@@ -21,9 +21,9 @@ import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.TextData;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.description.operation.ChangeDescriptionElementType;
 
@@ -40,9 +40,9 @@ public class DescriptionElementDetailSection extends
        /**
         * <p>Constructor for DescriptionElementDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
@@ -91,9 +91,6 @@ public class DescriptionElementDetailSection extends
                
                toolBarManager.add(addAction);
                
-               ICdmFormElement parentElement = this.getParentElement();
-               
-               
                return toolBarManager.createControl(this);
        }
        
index a5ec37f961c58c74e7fc9cb263f7404c025205e5..10608b3b000f88dc24ec6805e2e15b6e293981c1 100644 (file)
@@ -12,14 +12,12 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -31,15 +29,13 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class DescriptionElementMediaSection extends
                AbstractEntityCollectionSection<DescriptionElementBase, Media> {
-       private static final Logger logger = Logger
-               .getLogger(DescriptionElementMediaSection.class);
        
        /**
         * <p>Constructor for DescriptionElementMediaSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public DescriptionElementMediaSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
index 58f39f8905ec1a585683420f0f5467798576e85b..b74c7bfe55e2115c7d06ed681f5b1d89e081d1ab 100644 (file)
@@ -14,14 +14,13 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -37,9 +36,7 @@ public class DescriptionElementSourceElement extends
                AbstractOriginalSourceElement<DescriptionElementSource> implements
                IEntityElement<DescriptionElementSource> {
 
-       private final SelectionArbitrator selectionArbitrator;
-
-       private NameSelectionElement selection_name;
+       private EntitySelectionElement<TaxonNameBase> selection_name;
 
        /**
         * <p>
@@ -47,7 +44,7 @@ public class DescriptionElementSourceElement extends
         * </p>
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param element
         *            a
@@ -58,14 +55,14 @@ public class DescriptionElementSourceElement extends
         * @param style
         *            a int.
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         */
        public DescriptionElementSourceElement(CdmFormFactory cdmFormFactory,
                        AbstractFormSection formElement, DescriptionElementSource element,
                        SelectionListener removeListener, int style) {
                super(cdmFormFactory, formElement, element, removeListener, style);
-               selectionArbitrator = formFactory.createSelectionArbitrator(this);
+               formFactory.createSelectionArbitrator(this);
        }
 
        /*
@@ -78,10 +75,10 @@ public class DescriptionElementSourceElement extends
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
                super.createControls(formElement, style);
-               selection_name = (NameSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.NAME,
+               selection_name = formFactory
+                               .createSelectionElement(TaxonNameBase.class,
                                                getConversationHolder(), formElement, "Name in Source",
-                                               null, NameSelectionElement.DEFAULT, SWT.NULL);
+                                               null, EntitySelectionElement.ALL, SWT.NULL);
        }
 
        /*
index 1bd4128fbc328c9202e0a2d48e2a47364f5a207f..b48b44aca277b40439ad5eb7ce83c56e83191bf9 100644 (file)
@@ -9,8 +9,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -25,9 +25,9 @@ public class DescriptionElementSourceSection extends AbstractEntityCollectionSec
        /**
         * <p>Constructor for DescriptionElementSourceSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public DescriptionElementSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style){
index e09132151018b13e1a1687bf61fb2dda4972ecab..a258802012349a9d8207f57b41dda3037798321a 100644 (file)
@@ -13,12 +13,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -32,7 +31,7 @@ import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
 public class DescriptionSourceElement extends
                AbstractEntityCollectionElement<Reference> {
 
-       private ReferenceSelectionElement selection_descriptionSource;
+       private EntitySelectionElement<Reference> selection_descriptionSource;
 
        /**
         * <p>
@@ -40,10 +39,10 @@ public class DescriptionSourceElement extends
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param element
         *            a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
@@ -62,10 +61,10 @@ public class DescriptionSourceElement extends
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_descriptionSource = (ReferenceSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.REFERENCE,
+               selection_descriptionSource = formFactory
+                               .createSelectionElement(Reference.class,
                                                getConversationHolder(), element, "Description Source",
-                                               null, ReferenceSelectionElement.DEFAULT, style);
+                                               null, EntitySelectionElement.ALL, style);
        }
 
        /** {@inheritDoc} */
index 6eab9b730f4f249bac3deb60a0ac198502b4e634..6e7e73d327b19cfe9c47484a7e517dfc5c7b5ba8 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -32,9 +32,9 @@ public class DescriptionSourceSection extends
        /**
         * <p>Constructor for DescriptionSourceSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public DescriptionSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
index 10b2c5a895c47018fe7bd4330d55ea6e7446b2b6..4485eb50b14e14ab1b0605b766766cfb63f437ef 100644 (file)
@@ -13,9 +13,9 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
@@ -30,8 +30,8 @@ public class GeoScopeElement extends AbstractEntityCollectionElement<NamedArea>
        /**
         * <p>Constructor for GeoScopeElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
index 2522700a1e47b0a4266dfbe132d9bd6cb0e35da8..b8a69e0ae77995b478bd5cc78bf82c7309cb38e9 100644 (file)
@@ -12,13 +12,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -30,16 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class GeoScopeSection extends AbstractEntityCollectionSection<TaxonDescription, NamedArea> {
        
-
-       private static final Logger logger = Logger
-                       .getLogger(GeoScopeSection.class);
-
        /**
         * <p>Constructor for GeoScopeSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public GeoScopeSection(CdmFormFactory formFactory,
index 53749d28a32fff258647e755f6efaa915bc3b78b..f82b59c3ce15d818c97ef1e5dc2ce8cf6d56416a 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
 
@@ -32,17 +31,14 @@ import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
  */
 public class MediaDetailsSection extends AbstractCdmDetailSection<Media> {
 
-
-       private static final Logger logger = Logger
-                       .getLogger(MediaDetailsSection.class);
        private MediaElement element_media;
 
        /**
         * <p>Constructor for MediaDetailsSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index acf9ff6211276d965d96bf822ac0a268d318ce9d..452d50bcb5c8e55d0153f411db6a37f116a85d66 100644 (file)
@@ -13,12 +13,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ModifierComboElement;
 
 /**
  * <p>ModifierElement class.</p>
@@ -29,13 +28,13 @@ import eu.etaxonomy.taxeditor.ui.term.ModifierComboElement;
  */
 public class ModifierElement extends AbstractEntityCollectionElement<Modifier> {
        
-       private ModifierComboElement combo_modifier;
+       private TermComboElement<Modifier> combo_modifier;
 
        /**
         * <p>Constructor for ModifierElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.Modifier} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -56,7 +55,7 @@ public class ModifierElement extends AbstractEntityCollectionElement<Modifier> {
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               combo_modifier = (ModifierComboElement) formFactory.createTermComboElement(TermComboType.MODIFIER, element, "Modifier", getEntity(), style);
+               combo_modifier = formFactory.createTermComboElement(Modifier.class, element, "Modifier", getEntity(), style);
        }
 
        /** {@inheritDoc} */
index 4b8053f6cc009973c1ab02abb1ac0b0378bdf088..3025ad0b3700f46f921475196a3d2774d3a09add 100644 (file)
@@ -12,13 +12,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.IModifiable;
 import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -30,16 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class ModifierSection extends AbstractEntityCollectionSection<IModifiable, Modifier> {
 
-
-       private static final Logger logger = Logger
-                       .getLogger(ModifierSection.class);
-
        /**
         * <p>Constructor for ModifierSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public ModifierSection(CdmFormFactory formFactory,
index 74503dee67ac9b0675670a8871d0e936d03f6062..c010da5b1f49ba91221da0b7a312202da840df7f 100644 (file)
@@ -26,9 +26,9 @@ import eu.etaxonomy.cdm.model.description.TextData;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -48,8 +48,8 @@ public class NaturalLanguageDetailElement extends AbstractCdmDetailElement<Taxon
        /**
         * <p>Constructor for NaturalLanguageDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public NaturalLanguageDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
index d576f5d5de7f721a6509db56ccb76ed2bde072bf..e073f7e3a38aeaea89c675187e88e89dee8a2c25 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -29,16 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  */
 public class NaturalLanguageSection extends AbstractCdmDetailSection<TaxonDescription> {
        
-
-       private static final Logger logger = Logger
-                       .getLogger(NaturalLanguageSection.class);
-
        /**
         * <p>Constructor for NaturalLanguageSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 181eb204b25cbe902ab9d8ec6f0541a8434fd0d9..448b567c18bd72f62fd477139f45c00bac089719 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ScopeComboElement;
 
 /**
  * <p>ScopeElement class.</p>
@@ -30,14 +28,13 @@ import eu.etaxonomy.taxeditor.ui.term.ScopeComboElement;
  */
 public class ScopeElement extends AbstractEntityCollectionElement<Scope> {
        
-       private static final Logger logger = Logger.getLogger(ScopeElement.class);
-       private ScopeComboElement combo_scope;
+       private TermComboElement<Scope> combo_scope;
 
        /**
         * <p>Constructor for ScopeElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.description.Scope} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -58,7 +55,7 @@ public class ScopeElement extends AbstractEntityCollectionElement<Scope> {
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               combo_scope = (ScopeComboElement) formFactory.createTermComboElement(TermComboType.SCOPE, element, "Scope", null, style);
+               combo_scope = formFactory.createTermComboElement(Scope.class, element, "Scope", null, style);
        }
 
        /** {@inheritDoc} */
index e3dd9c323bd23f24af4a8fa4370237a59141dc9d..04038711c033c4f783b3a42235c9f69f849d7ccf 100644 (file)
@@ -12,13 +12,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.Scope;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -30,15 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class ScopeSection extends AbstractEntityCollectionSection<TaxonDescription, Scope> {
 
-
-       private static final Logger logger = Logger.getLogger(ScopeSection.class);
-
        /**
         * <p>Constructor for ScopeSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public ScopeSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 26cb0719d07c05e380e3d29fe41ea50cd9c294de..f87cf6f88be30e63350b018b3d82bd64dc9f6054 100644 (file)
@@ -10,7 +10,6 @@
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.ui.forms.widgets.Section;
 
@@ -18,14 +17,14 @@ import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.description.State;
 import eu.etaxonomy.cdm.model.description.StateData;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
 
 /**
  * <p>StateDataElement class.</p>
@@ -36,17 +35,15 @@ import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
  */
 public class StateDataElement extends AbstractEntityCollectionElement<StateData> {
        
-       private static final Logger logger = Logger
-                       .getLogger(StateDataElement.class);
-       private AbstractTermComboElement<State> combo_state;
+       private TermComboElement<State> combo_state;
        private ModifierSection section_modifiers;
        private TextWithLabelElement text_modifyingText;
 
        /**
         * <p>Constructor for StateDataElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.StateData} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -70,9 +67,9 @@ public class StateDataElement extends AbstractEntityCollectionElement<StateData>
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               combo_state = formFactory.createTermComboElement(TermComboType.STATE, element, "State", null, style);
+               combo_state = formFactory.createTermComboElement(State.class, element, "State", null, style);
                section_modifiers = (ModifierSection) formFactory.createEntityDetailSection(EntityDetailType.MODIFIER, getConversationHolder(), element, Section.TWISTIE);
-               section_modifiers.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                text_modifyingText = formFactory.createTextWithLabelElement(element, "Modifying Text", null, style);
        }
 
@@ -83,7 +80,7 @@ public class StateDataElement extends AbstractEntityCollectionElement<StateData>
                        getEntity().setState(combo_state.getSelection());
                }
                if(eventSource == text_modifyingText){
-                       getEntity().addModifyingText(LanguageString.NewInstance(text_modifyingText.getText(), CdmStore.getDefaultLanguage()));
+                       getEntity().putModifyingText(LanguageString.NewInstance(text_modifyingText.getText(), CdmStore.getDefaultLanguage()));
                }
        }
 }
index db44b0cab1d7166e65e679c12d5fa35f4bb0e40f..07ea14414b9aa3c88558e624fa9d4b73ce8f1016 100644 (file)
@@ -12,13 +12,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.CategoricalData;
 import eu.etaxonomy.cdm.model.description.StateData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -30,16 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class StateDataSection extends AbstractEntityCollectionSection<CategoricalData, StateData> {
 
-
-       private static final Logger logger = Logger
-                       .getLogger(StateDataSection.class);
-
        /**
         * <p>Constructor for StateDataSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public StateDataSection(CdmFormFactory formFactory,
index 7293090986ee879147b8288089b7344c0fec4752..bddaddeebed5cdd630c468b0c1abd213e752e3d1 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.ui.forms.widgets.Section;
 
+import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
 import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.StatisticalMeasureComboElement;
 
 /**
  * <p>StatisticalMeasurementValueElement class.</p>
@@ -34,18 +34,15 @@ import eu.etaxonomy.taxeditor.ui.term.StatisticalMeasureComboElement;
 public class StatisticalMeasurementValueElement extends
                AbstractEntityCollectionElement<StatisticalMeasurementValue> {
        
-
-       private static final Logger logger = Logger
-                       .getLogger(StatisticalMeasurementValueElement.class);
        private NumberWithLabelElement number_value;
-       private StatisticalMeasureComboElement combo_type;
+       private TermComboElement<StatisticalMeasure> combo_type;
        private ModifierSection section_modifiers;
 
        /**
         * <p>Constructor for StatisticalMeasurementValueElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -69,9 +66,9 @@ public class StatisticalMeasurementValueElement extends
        @Override
        public void createControls(ICdmFormElement element, int style) {
                number_value = formFactory.createFloatTextWithLabelElement(element, "Value", 0, style);
-               combo_type = (StatisticalMeasureComboElement) formFactory.createTermComboElement(TermComboType.STATISTICAL_MEASURE, element, "Statistical Measure", null, style);
+               combo_type = formFactory.createTermComboElement(StatisticalMeasure.class, element, "Statistical Measure", null, style);
                section_modifiers = (ModifierSection) formFactory.createEntityDetailSection(EntityDetailType.MODIFIER, getConversationHolder(), element, Section.TWISTIE);
-               section_modifiers.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
        }
 
        /** {@inheritDoc} */
index f5628127b7fa7da4efeaf031cd1c3747f705b098..81fef0b58334108f451c32b3dd8d94760a277239 100644 (file)
@@ -12,13 +12,11 @@ package eu.etaxonomy.taxeditor.ui.section.description;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
 import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -31,16 +29,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 public class StatisticalMeasurementValueSection extends
                AbstractEntityCollectionSection<QuantitativeData, StatisticalMeasurementValue> {
        
-
-       private static final Logger logger = Logger
-                       .getLogger(StatisticalMeasurementValueSection.class);
-
        /**
         * <p>Constructor for StatisticalMeasurementValueSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public StatisticalMeasurementValueSection(CdmFormFactory formFactory,
index 4356d0f964fe1b8b69b57f2097e4718443c7c856..85c1461bbc4dce903f6b9b31d3abc7b517346dec 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description.detail;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -25,15 +23,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  * @version 1.0
  */
 public abstract class AbstractDetailedDescriptionDetailElement<T extends DescriptionElementBase> extends AbstractCdmDetailElement<T>{
-
-       private static final Logger logger = Logger
-                       .getLogger(AbstractDetailedDescriptionDetailElement.class);
        
        /**
         * <p>Constructor for AbstractDetailedDescriptionDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a T object.
         * @param style a int.
         * @param <T> a T object.
index 01e0f3b090bb13b66f90f5628914681c1aef7665..8a65b46b5042e3777968782f80094827a466784d 100644 (file)
@@ -6,10 +6,11 @@ package eu.etaxonomy.taxeditor.ui.section.description.detail;
 import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.model.description.CategoricalData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
 
 /**
@@ -26,8 +27,8 @@ public class CategoricalDataDetailElement extends AbstractDetailedDescriptionDet
        /**
         * <p>Constructor for CategoricalDataDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.CategoricalData} object.
         * @param style a int.
         */
@@ -43,7 +44,7 @@ public class CategoricalDataDetailElement extends AbstractDetailedDescriptionDet
                checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
                section_stateData = (StateDataSection) formFactory.createEntityDetailSection(EntityDetailType.STATE_DATA, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
                section_stateData.setEntity(entity);
-               section_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
        }
        
        /** {@inheritDoc} */
index 40673eca33256052ca19edc73d96eaa255e5d178..2cf643d510af2f4d07e0bb3b4310d01d6a1bb954 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description.detail;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.SWT;
 
+import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.description.CommonTaxonName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>CommonNameDetailElement class.</p>
@@ -29,20 +29,17 @@ import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
  * @version 1.0
  */
 public class CommonNameDetailElement extends AbstractDetailedDescriptionDetailElement<CommonTaxonName> {
-
-       private static final Logger logger = Logger
-                       .getLogger(CommonNameDetailElement.class);
        
-       private LanguageComboElement combo_language;
-       private NamedAreaSelectionElement selection_namedArea;
+       private TermComboElement<Language> combo_language;
+       private EntitySelectionElement<NamedArea> selection_namedArea;
        private TextWithLabelElement commonName;
 
        
        /**
         * <p>Constructor for CommonNameDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.CommonTaxonName} object.
         * @param style a int.
         */
@@ -55,11 +52,13 @@ public class CommonNameDetailElement extends AbstractDetailedDescriptionDetailEl
        @Override
        protected void createControls(ICdmFormElement formElement,
                        CommonTaxonName entity, int style) {
-               combo_language = (LanguageComboElement) formFactory.createTermComboElement(TermComboType.LANGUAGE, this, "Language", entity.getLanguage(), style);
-
-               selection_namedArea = formFactory.createNamedAreaSelectionElement(this, getConversationHolder(), "Area", entity.getArea(), style);
-               
                commonName = formFactory.createTextWithLabelElement(this, "Common Name", entity.getName(), SWT.WRAP);
+
+               combo_language = formFactory.createTermComboElement(Language.class, this, "Language", entity.getLanguage(), style);
+
+               selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+                               formElement, "Area",
+                               entity.getArea(), EntitySelectionElement.NOTHING, style);
        }
 
        /** {@inheritDoc} */
index a6836a9bd9b2a1262c2527c240b823913e2918f9..a4cb753439d963397c11fa6e2eb0a7fdc6d09da2 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.description.detail;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.description.Distribution;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.PresenceAbsenceTermComboElement;
+import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>DistributionDetailElement class.</p>
@@ -29,17 +28,15 @@ import eu.etaxonomy.taxeditor.ui.term.PresenceAbsenceTermComboElement;
 public class DistributionDetailElement extends
                AbstractDetailedDescriptionDetailElement<Distribution> {
 
-       private static final Logger logger = Logger
-                       .getLogger(DistributionDetailElement.class);
-       private NamedAreaSelectionElement selection_namedArea;
-       private PresenceAbsenceTermComboElement combo_presenceAbsence;
+       private EntitySelectionElement<NamedArea> selection_namedArea;
+       private TermComboElement<PresenceAbsenceTermBase> combo_presenceAbsence;
        
 
        /**
         * <p>Constructor for DistributionDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.Distribution} object.
         * @param style a int.
         */
@@ -52,9 +49,10 @@ public class DistributionDetailElement extends
        @Override
        protected void createControls(ICdmFormElement formElement,
                        Distribution entity, int style) {
-               selection_namedArea = formFactory.createNamedAreaSelectionElement(this, getConversationHolder(), "Area", entity.getArea(), style);
-               
-        combo_presenceAbsence = (PresenceAbsenceTermComboElement) formFactory.createTermComboElement(TermComboType.PRESENCEABSENCESTATUS, this, "Distribution Status", entity.getStatus(), style);
+               selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+                               formElement, "Area",
+                               entity.getArea(), EntitySelectionElement.NOTHING, style);
+        combo_presenceAbsence = formFactory.createTermComboElement(PresenceAbsenceTermBase.class, this, "Distribution Status", entity.getStatus(), style);
         
        }
 
index 14c7abe48f558a3a527d21628be8614163c54023..9fd82032e8a919903e84099ce1fc3658e0e22d71 100644 (file)
@@ -12,17 +12,16 @@ package eu.etaxonomy.taxeditor.ui.section.description.detail;
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -36,10 +35,8 @@ import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
 public class IndividualsAssociationDetailElement extends
                AbstractDetailedDescriptionDetailElement<IndividualsAssociation> {
 
-       private static final Logger logger = Logger
-                       .getLogger(IndividualsAssociationDetailElement.class);
        private TextWithLabelElement text_description;
-       private DerivedUnitBaseSelectionElement selection_derivedUnit;
+       private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
 
        /**
         * <p>
@@ -47,10 +44,10 @@ public class IndividualsAssociationDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param entity
         *            a
@@ -69,11 +66,11 @@ public class IndividualsAssociationDetailElement extends
        @Override
        protected void createControls(ICdmFormElement formElement,
                        IndividualsAssociation entity, int style) {
-               selection_derivedUnit = (DerivedUnitBaseSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.DERIVED_UNIT,
+               selection_derivedUnit = formFactory
+                               .createSelectionElement(DerivedUnitBase.class,
                                                getConversationHolder(), formElement, "Unit",
-                                               entity.getAssociatedSpecimenOrObservation(),
-                                               DerivedUnitBaseSelectionElement.DEFAULT, style);
+                                               CdmBase.deproxy(entity.getAssociatedSpecimenOrObservation(),DerivedUnitBase.class),
+                                               EntitySelectionElement.ALL, style);
 
                text_description = formFactory.createMultilineTextWithLabel(
                                formElement, "Description", 200, style);
@@ -92,8 +89,7 @@ public class IndividualsAssociationDetailElement extends
                        getEntity().setAssociatedSpecimenOrObservation(
                                        selection_derivedUnit.getEntity());
                } else if (eventSource == text_description) {
-                       getEntity().addDescription(text_description.getText(),
-                                       CdmStore.getDefaultLanguage());
+                       getEntity().putDescription(CdmStore.getDefaultLanguage(), text_description.getText());
                }
 
        }
index 146d4f527d809387e516bff388d00918e1dc6e56..11cbe80cf3cf9e3f311d1a0445e1c212269d9379 100644 (file)
@@ -5,13 +5,14 @@ package eu.etaxonomy.taxeditor.ui.section.description.detail;
 
 import org.eclipse.ui.forms.widgets.Section;
 
+import eu.etaxonomy.cdm.model.description.MeasurementUnit;
 import eu.etaxonomy.cdm.model.description.QuantitativeData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueSection;
-import eu.etaxonomy.taxeditor.ui.term.MeasurementUnitComboElement;
 
 /**
  * <p>QuantitativeDataDetailElement class.</p>
@@ -22,14 +23,14 @@ import eu.etaxonomy.taxeditor.ui.term.MeasurementUnitComboElement;
 public class QuantitativeDataDetailElement extends
                AbstractDetailedDescriptionDetailElement<QuantitativeData> {
 
-       private MeasurementUnitComboElement combo_mesaurementUnit;
+       private TermComboElement<MeasurementUnit> combo_mesaurementUnit;
        private StatisticalMeasurementValueSection section_statisticalMeasurementValues;
        
        /**
         * <p>Constructor for QuantitativeDataDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.QuantitativeData} object.
         * @param style a int.
         */
@@ -42,10 +43,10 @@ public class QuantitativeDataDetailElement extends
        @Override
        protected void createControls(ICdmFormElement formElement,
                        QuantitativeData entity, int style) {
-               combo_mesaurementUnit = (MeasurementUnitComboElement) formFactory.createTermComboElement(TermComboType.MEASUREMENT_UNIT, formElement, "Measurement Unit", entity.getUnit(), style);
+               combo_mesaurementUnit = formFactory.createTermComboElement(MeasurementUnit.class, formElement, "Measurement Unit", entity.getUnit(), style);
                section_statisticalMeasurementValues = (StatisticalMeasurementValueSection) formFactory.createEntityDetailSection(EntityDetailType.STATISTICAL_MEASUREMENT_VALUE, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
                section_statisticalMeasurementValues.setEntity(entity);
-               section_statisticalMeasurementValues.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
        }
        
        /* (non-Javadoc)
@@ -54,7 +55,11 @@ public class QuantitativeDataDetailElement extends
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-               
+               if(eventSource == combo_mesaurementUnit){
+                       getEntity().setUnit(combo_mesaurementUnit.getSelection());
+               }else if (eventSource == section_statisticalMeasurementValues){
+                       // FIXME
+               }
        }
 
 }
index 586d0b835ace8dac62359c7bdc983d20e0fbc868..95221da5ed233016a069d58aac987d7b470c7c35 100644 (file)
@@ -13,12 +13,12 @@ package eu.etaxonomy.taxeditor.ui.section.description.detail;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.description.TaxonInteraction;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -32,7 +32,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
 public class TaxonInteractionDetailElement extends
                AbstractDetailedDescriptionDetailElement<TaxonInteraction> {
 
-       private TaxonSelectionElement taxonSelection;
+       private EntitySelectionElement<Taxon> taxonSelection;
        private TextWithLabelElement interactionDescription;
 
        /**
@@ -41,10 +41,10 @@ public class TaxonInteractionDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.description.TaxonInteraction}
@@ -61,10 +61,10 @@ public class TaxonInteractionDetailElement extends
        @Override
        protected void createControls(ICdmFormElement formElement,
                        TaxonInteraction entity, int style) {
-               taxonSelection = (TaxonSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.TAXON,
-                                               getConversationHolder(), this, null,
-                                               entity.getTaxon2(), TaxonSelectionElement.DEFAULT,
+               taxonSelection = formFactory
+                               .createSelectionElement(Taxon.class,
+                                               getConversationHolder(), this, "Taxon",
+                                               entity.getTaxon2(), EntitySelectionElement.NOTHING,
                                                SWT.WRAP);
 
                interactionDescription = formFactory.createMultilineTextWithLabel(this,
@@ -79,8 +79,7 @@ public class TaxonInteractionDetailElement extends
                if (eventSource == taxonSelection) {
                        getEntity().setTaxon2(taxonSelection.getEntity());
                } else if (eventSource == interactionDescription) {
-                       getEntity().addDescription(interactionDescription.getText(),
-                                       CdmStore.getDefaultLanguage());
+                       getEntity().putDescription(CdmStore.getDefaultLanguage(), interactionDescription.getText());
                }
        }
 }
index bda5525a7c7c5a77f07cbeb752090a0ffad837ec..9e4fcbac72a38cdc1ff22a3eac7a670e1d12c298 100644 (file)
@@ -13,9 +13,9 @@ package eu.etaxonomy.taxeditor.ui.section.description.detail;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.description.TextData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement;
 
 /**
  * <p>TextDataDetailElement class.</p>
@@ -31,8 +31,8 @@ public class TextDataDetailElement extends AbstractDetailedDescriptionDetailElem
        /**
         * <p>Constructor for TextDataDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.description.TextData} object.
         * @param style a int.
         */
index 1ef89a156d4b7b028dfdfa4e845d2214985c09a1..e1110fb323656aab2ce2085ab0d4799d0afb81ed 100644 (file)
@@ -38,13 +38,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 public class ChangeDescriptionElementType extends AbstractPostOperation {
 
        private DescriptionElementBase sourceElement;
-       private DestinationType destinationType;
        private DescriptionElementBase destinationElement;
-
-       public enum DestinationType {
-               TextData,
-               Distribution
-       }
        
        /**
         * <p>Constructor for ChangeDescriptionElementType.</p>
@@ -111,7 +105,6 @@ public class ChangeDescriptionElementType extends AbstractPostOperation {
        @Override
        public IStatus redo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               // TODO Auto-generated method stub
                return null;
        }
 
@@ -122,7 +115,6 @@ public class ChangeDescriptionElementType extends AbstractPostOperation {
        @Override
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               // TODO Auto-generated method stub
                return null;
        }
 
index 228a3fe81fed892d60a21da6dc19142684853f02..52282366470f862d91649b740a1a6a520cfa81f5 100644 (file)
@@ -12,30 +12,25 @@ package eu.etaxonomy.taxeditor.ui.section.feature;
 
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Label;
 
 import eu.etaxonomy.cdm.common.UriUtils;
 import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.BrowserElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.BrowserElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -52,8 +47,8 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
        /**
         * <p>Constructor for FeatureDistributionDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public FeatureDistributionDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
@@ -88,7 +83,7 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                
                Label label = formFactory.createLabel(getLayoutComposite(), message, SWT.WRAP);
                addControl(label);
-               label.setLayoutData(CdmFormFactory.FILL(2, 1));
+               label.setLayoutData(LayoutConstants.FILL(2, 1));
        }
 
 
index 2ff2bfa9ac78dd5016b6e929752ea037417cef49..84aeb25ec64a58e5ca68f89d546a73679d2cc70b 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class FeatureDistributionDetailSection extends AbstractCdmDetailSection<F
        /**
         * <p>Constructor for FeatureDistributionDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 402c61bfda1fe54c628e60288140179430b269e6..e614cd2efbbb7e7b5a4428e13f2d9160489b632f 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.group;
 
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
 import org.springframework.security.core.GrantedAuthority;
 
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
index 23d40259d5e9635ca93fe6690e78557c090ac0b4..10a15547460fbc3498a68e5f0988d1a6a777ec2d 100644 (file)
@@ -17,8 +17,8 @@ import org.springframework.security.core.GrantedAuthority;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index e551a430ac824140b5cccbf6f6b0b18a156337b3..02db4e6985bdcc0c1a0f39099d072d22a726bd04 100644 (file)
@@ -11,9 +11,9 @@
 package eu.etaxonomy.taxeditor.ui.section.group;
 
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
index c7bc8a4a083d7be672c8a856bac469906817d214..9d66d8208c1c5cdb636b6c6475aa8d41a041b7c8 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index 42ef280fbd525e04858b7d367b01e3c052a45b0b..35a6292a342e153ffc519f5646f8b1afcf95b20a 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
index 612458e1edea6d286a3a68f1aeef15d0fec47e5c..1a828cb19fb054e659840644306709ea9ec9ce7f 100644 (file)
@@ -13,12 +13,11 @@ package eu.etaxonomy.taxeditor.ui.section.group;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.UserSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -27,7 +26,7 @@ import eu.etaxonomy.taxeditor.ui.selection.UserSelectionElement;
  */
 public class MemberDetailElement extends AbstractEntityCollectionElement<User> {
 
-       private UserSelectionElement selection_user;
+       private EntitySelectionElement<User> selection_user;
 
        /**
         * @param formFactory
@@ -63,10 +62,10 @@ public class MemberDetailElement extends AbstractEntityCollectionElement<User> {
         */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_user = (UserSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.USER,
+               selection_user = formFactory
+                               .createSelectionElement(User.class,
                                                getConversationHolder(), element, "Member", entity,
-                                               UserSelectionElement.EDITABLE, style);
+                                               EntitySelectionElement.EDITABLE, style);
        }
 
        /*
index cbf43110335b3e5913c7cb46264bcb4def97566e..da46215e4e0ac4351b8061488c4ae2ef82dfe031 100644 (file)
@@ -15,9 +15,9 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.UserSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.UserSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index 02f0803b13677cf7e8e1f3eb46721b01af925929..13e9035108738ce54ea04034e951069d8da06993 100644 (file)
@@ -8,8 +8,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.IIdentificationKey;
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index 39d9594521e9432f12a37d10b85540bf7996383b..90feceb607acea88c47e41cf94ea43870edd8776 100644 (file)
@@ -6,11 +6,9 @@ package eu.etaxonomy.taxeditor.ui.section.key;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
 
 /**
index a6c6908acc3b35b1f4bf6a0739fb33cae8eb02e4..390de78b72ce361b96f01beec1150c73eab65777 100644 (file)
@@ -7,9 +7,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index defd67798f5bcdf08149bf547662fc0d3e8d7cf6..504563b01468ddbb01d2a7398f29000ff7009a46 100644 (file)
@@ -3,18 +3,16 @@
  */
 package eu.etaxonomy.taxeditor.ui.section.key;
 
+import eu.etaxonomy.cdm.model.description.Feature;
+import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.KeyStatementElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.KeyStatementElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.FeatureSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeyNodeSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.PolytomousKeySelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -25,13 +23,13 @@ public class PolytomousKeyNodeDetailElement extends
 
        private KeyStatementElement element_statement;
 
-       private FeatureSelectionElement selection_feature;
+       private EntitySelectionElement<Feature> selection_feature;
 
-       private TaxonSelectionElement selection_taxon;
+       private EntitySelectionElement<Taxon> selection_taxon;
 
-       private PolytomousKeySelectionElement selection_subkey;
+       private EntitySelectionElement<PolytomousKey> selection_subkey;
 
-       private PolytomousKeyNodeSelectionElement selection_otherNode;
+       private EntitySelectionElement<PolytomousKeyNode> selection_otherNode;
 
        private KeyStatementElement element_question;
 
@@ -56,35 +54,35 @@ public class PolytomousKeyNodeDetailElement extends
                        element_question = formFactory.createKeyStatementElement(
                                        formElement, "Question", parent.getQuestion(), 50, style);
 
-                       selection_feature = (FeatureSelectionElement) formFactory
-                                       .createSelectionElement(SelectionType.FEATURE,
+                       selection_feature = formFactory
+                                       .createSelectionElement(Feature.class,
                                                        getConversationHolder(), formElement, "Feature",
                                                        parent.getFeature(),
-                                                       FeatureSelectionElement.DEFAULT, style);
+                                                       EntitySelectionElement.EDITABLE | EntitySelectionElement.DELETABLE, style);
                }
 
                element_statement = formFactory.createKeyStatementElement(formElement,
                                "Statement", entity.getStatement(), 50, style);
 
                if (entity.isLeaf()) {
-                       selection_taxon = (TaxonSelectionElement) formFactory
-                                       .createSelectionElement(SelectionType.TAXON,
+                       selection_taxon = formFactory
+                                       .createSelectionElement(Taxon.class,
                                                        getConversationHolder(), formElement, "Taxon",
-                                                       entity.getTaxon(), TaxonSelectionElement.DELETABLE,
+                                                       entity.getTaxon(), EntitySelectionElement.NOTHING,
                                                        style);
                }
 
-               selection_subkey = (PolytomousKeySelectionElement) formFactory
-                               .createSelectionElement(SelectionType.POLYTOMOUS_KEY,
+               selection_subkey = formFactory
+                               .createSelectionElement(PolytomousKey.class,
                                                getConversationHolder(), formElement, "Subkey",
                                                entity.getSubkey(),
-                                               PolytomousKeySelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.DELETABLE, style);
 
-               selection_otherNode = (PolytomousKeyNodeSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.POLYTOMOUS_KEY_NODE,
+               selection_otherNode = formFactory
+                               .createSelectionElement(PolytomousKeyNode.class,
                                                getConversationHolder(), formElement, "Other Node",
                                                entity.getOtherNode(),
-                                               PolytomousKeyNodeSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.DELETABLE, style);
 
                formFactory.createMultiLanguageTextElement(formElement,
                                "Modifying Text", entity.getModifyingText(), 50, style);
index db99a991786acfd6a1303aa40756bf13ccc4e15a..fdfa6470970409575b0751e4f4ebc0155b50aa73 100644 (file)
@@ -7,9 +7,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index cac2c9d668c6b6a3aae90c267e25bac5ccbca14a..dcc723ef614c28a221deb19fd003db0270898cec 100644 (file)
@@ -8,8 +8,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index fb3b341f587ee76fc69056c2a3b7863ef6622dbe..bd732e883626de28a36240e9a8220ba17b53668c 100644 (file)
@@ -15,9 +15,9 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -62,7 +62,7 @@ public class TaxonomicScopeSection extends
        @Override
        public Taxon createNewElement() {
                Taxon selection = TaxonBaseSelectionDialog.selectTaxon(getShell(),
-                               getConversationHolder());
+                               getConversationHolder(), null);
 
                return selection;
        }
index a012172d96935babe8e21a216ffca6ba3fa5befb..6d790a5ef585765111a9a53ed85c3fcbfba9e560 100644 (file)
@@ -17,18 +17,17 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.HttpException;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.editors.text.EditorsUI;
 
 import eu.etaxonomy.cdm.common.media.ImageInfo;
 import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ImageElement;
-import eu.etaxonomy.taxeditor.ui.forms.KeyValueViewerElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ImageElement;
+import eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
 
 /**
  * <p>ImageFileElement class.</p>
@@ -56,8 +55,8 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
        /**
         * <p>Constructor for ImageFileElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.media.ImageFile} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -88,13 +87,13 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
                text_height.setInteger(entity.getHeight());
                text_width.setInteger(entity.getWidth());
                try {
-                       showImage(entity.getUri());             
+                       loadImage(entity.getUri(), false);              
                } catch (Exception e) {
                        handleException(e);
                }
        }
        
-       private void showImage(URI uri) throws IOException, HttpException{
+       private void loadImage(URI uri, boolean updateDimensions) throws IOException, HttpException{
                element_image.initImageUri(uri);
                
                element_image.loadImage(postRunnable );
@@ -106,16 +105,21 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
                
                ImageInfo imageInfo = ImageInfo.NewInstanceWithMetaData(uri, 10000);
                                
-               text_size.setText(FileUtils.byteCountToDisplaySize(imageInfo.getLength()));
-               // KLUDGE this is not save for very large files, because of the int cast. But then, I don't think we will handle such large files in the near future
-               getEntity().setSize((int) imageInfo.getLength());
+               element_keyValue.setInput(imageInfo.getMetaData());
                
-               text_height.setInteger(imageInfo.getHeight());
-               getEntity().setHeight(imageInfo.getHeight());
+               if(updateDimensions){
+                       text_size.setText(FileUtils.byteCountToDisplaySize(imageInfo.getLength()));
+                       // KLUDGE this is not save for very large files, because of the int cast. 
+                       // But then, I don't think we will handle such large files in the near future
+                       getEntity().setSize((int) imageInfo.getLength());
                        
-               text_width.setInteger(imageInfo.getWidth());
-               getEntity().setWidth(imageInfo.getWidth());
-               element_keyValue.setInput(imageInfo.getMetaData());
+                       text_height.setInteger(imageInfo.getHeight());
+                       getEntity().setHeight(imageInfo.getHeight());
+                               
+                       text_width.setInteger(imageInfo.getWidth());
+                       getEntity().setWidth(imageInfo.getWidth());
+               }
+               
                
                element_messages.setText("");
        }
@@ -134,7 +138,7 @@ public class ImageFileElement extends MediaRepresentationPartElement<ImageFile>
                                getEntity().setUri(uri);
                                
                                
-                               showImage(getEntity().getUri());
+                               loadImage(getEntity().getUri(), true);
                                
                                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
                        } catch (Exception e) {
index dc853ed0358ef053f802171abf258b90f3a84d0a..1d49eae8412a5644c74b71922cce523e56594dfe 100644 (file)
@@ -6,20 +6,20 @@ package eu.etaxonomy.taxeditor.ui.section.media;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -33,7 +33,7 @@ import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
 public class MediaElement extends AbstractEntityCollectionElement<Media> {
 
        private MediaRepresentationSection section_mediaRepresentation;
-       private AgentSelectionElement selection_artist;
+       private EntitySelectionElement<AgentBase> selection_artist;
        private LanguageStringWithLabelElement text_description;
        private LanguageStringWithLabelElement text_title;
 
@@ -43,7 +43,7 @@ public class MediaElement extends AbstractEntityCollectionElement<Media> {
         * </p>
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param element
         *            a {@link eu.etaxonomy.cdm.model.media.Media} object.
@@ -52,7 +52,7 @@ public class MediaElement extends AbstractEntityCollectionElement<Media> {
         * @param style
         *            a int.
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         */
        public MediaElement(CdmFormFactory cdmFormFactory,
@@ -73,17 +73,17 @@ public class MediaElement extends AbstractEntityCollectionElement<Media> {
        public void createControls(ICdmFormElement element, int style) {
                text_title = formFactory.createLanguageStringWithLabelElement(element,
                                "Title", null, style);
-               selection_artist = (AgentSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.AGENT,
+               selection_artist = formFactory
+                               .createSelectionElement(AgentBase.class,
                                                getConversationHolder(), element, "Artist", null,
-                                               AgentSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
                text_description = formFactory.createLanguageStringWithLabelElement(
                                element, "Description", null, 100, style);
                section_mediaRepresentation = (MediaRepresentationSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.MEDIAREPRESENTATION,
                                                getConversationHolder(), element, style);
-               section_mediaRepresentation.setLayoutData(CdmFormFactory
+               section_mediaRepresentation.setLayoutData(LayoutConstants
                                .FILL_HORIZONTALLY(2, 1));
        }
 
index 1958ba58727099a41c11cd435f17d88bfbca2485..0bff02bf355ec1787fa0531b967604264c7f5022 100644 (file)
@@ -22,11 +22,12 @@ import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
@@ -45,8 +46,8 @@ public class MediaRepresentationElement extends AbstractEntityCollectionElement<
        /**
         * <p>Constructor for MediaRepresentationElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.media.MediaRepresentation} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -67,7 +68,7 @@ public class MediaRepresentationElement extends AbstractEntityCollectionElement<
                text_mimeType = formFactory.createTextWithLabelElement(element, "Mime Type", null, style);
                text_suffix = formFactory.createTextWithLabelElement(element, "Suffix", null, style);
                section_mediaRepresentationPart = (MediaRepresentationPartSection) formFactory.createEntityDetailSection(EntityDetailType.MEDIAREPRESENTATIONPART, getConversationHolder(), element, style);
-               section_mediaRepresentationPart.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_mediaRepresentationPart.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
        }
 
        /** {@inheritDoc} */
@@ -125,11 +126,5 @@ public class MediaRepresentationElement extends AbstractEntityCollectionElement<
                                StoreUtil.error(getClass(), e);
                        }
                }
-               
-               
-       }
-       
-       private String getMimeType(URI uri){
-               return null;
        }
 }
index 756661cba9f6a8c1a35b20632fcb2b97c90cde19..45d44c50733af89948b20e8da1900c82f2cb64ef 100644 (file)
@@ -17,12 +17,12 @@ import org.apache.commons.lang.StringUtils;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
@@ -43,8 +43,8 @@ public class MediaRepresentationPartElement<T extends MediaRepresentationPart> e
        /**
         * <p>Constructor for AbstractMediaRepresentationPartElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a T object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
index a1207657bda9dd3175b7f6f09a130a69237e9f82..e191040b963d1c41a438d565c1da9e5d191e2b44 100644 (file)
@@ -9,9 +9,9 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -26,9 +26,9 @@ public class MediaRepresentationPartSection extends
        /**
         * <p>Constructor for MediaRepresentationPartSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public MediaRepresentationPartSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
index fda9be848b31e7352ccea986d6e25a462013a910..33587e9f6851002582849488412bb0a6377c140f 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -31,9 +31,9 @@ public class MediaRepresentationSection extends AbstractEntityCollectionSection<
        /**
         * <p>Constructor for MediaRepresentationSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public MediaRepresentationSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
index c6b27b711ed68fb4dca69d76e737391c7ffab7fd..ab7011da484fa901eb6156ca430a4979d7a122a0 100644 (file)
@@ -9,8 +9,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
 import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -24,9 +24,9 @@ public class MediaSection extends AbstractEntityCollectionSection<IdentifiableMe
        /**
         * <p>Constructor for MediaSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public MediaSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 463bba89210b8e93d62bea5dd2cf5afca68f01cf..99506c5638abeec786b9fbfcb14547b0cc693133 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.name;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
 
 /**
@@ -29,16 +28,14 @@ import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityEl
  */
 public abstract class AbstractTypeDesignationElement<T extends TypeDesignationBase> extends AbstractReferencedEntityElement<T> {
 
-       private static final Logger logger = Logger
-                       .getLogger(AbstractTypeDesignationElement.class);
        protected CheckboxElement checkbox_notDesignated;
        
 
        /**
         * <p>Constructor for AbstractTypeDesignationElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a T object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
index f210ebd88101f48375fafe766507a63f50f46456..aa03fae0b12bb65b0dda4ea73c45597407929fbc 100644 (file)
@@ -13,16 +13,15 @@ package eu.etaxonomy.taxeditor.ui.section.name;
 import java.util.Arrays;
 
 import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
+import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.taxeditor.model.AuthorHelper;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
 
 /**
@@ -38,10 +37,10 @@ public class AuthorshipDetailElement extends
        AbstractIdentifiableEntityDetailElement<NonViralName> implements
                IEnableableFormElement {
 
-       private AbstractSelectionElement selection_exBasionymAuthorTeam;
-       private AbstractSelectionElement selection_basionymAuthorTeam;
-       private AbstractSelectionElement selection_exCombinationAuthorTeam;
-       private AbstractSelectionElement selection_combinationAuthorTeam;
+       private NomenclaturalAuthorTeamSelectionElement selection_exBasionymAuthorTeam;
+       private NomenclaturalAuthorTeamSelectionElement selection_basionymAuthorTeam;
+       private NomenclaturalAuthorTeamSelectionElement selection_exCombinationAuthorTeam;
+       private NomenclaturalAuthorTeamSelectionElement selection_combinationAuthorTeam;
 
        /**
         * <p>
@@ -49,10 +48,10 @@ public class AuthorshipDetailElement extends
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -69,30 +68,29 @@ public class AuthorshipDetailElement extends
                toggleable_cache = formFactory.createToggleableTextField(this,
                                "Authorship Cache", entity.getAuthorshipCache(),
                                entity.isProtectedAuthorshipCache(), style);
-
-               selection_combinationAuthorTeam = formFactory.createSelectionElement(
-                               SelectionType.AUTHOR_TEAM, getConversationHolder(),
+               selection_combinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+                               getConversationHolder(),
                                formElement, "Author",
                                AuthorHelper.getAuthor(entity.getCombinationAuthorTeam()),
-                               NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+                               EntitySelectionElement.ALL, style);
                addElement(selection_combinationAuthorTeam);
-               selection_exCombinationAuthorTeam = formFactory.createSelectionElement(
-                               SelectionType.AUTHOR_TEAM, getConversationHolder(),
+               selection_exCombinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+                               getConversationHolder(),
                                formElement, "Ex Author",
                                AuthorHelper.getAuthor(entity.getExCombinationAuthorTeam()),
-                               NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+                               EntitySelectionElement.ALL, style);
                addElement(selection_exCombinationAuthorTeam);
-               selection_basionymAuthorTeam = formFactory.createSelectionElement(
-                               SelectionType.AUTHOR_TEAM, getConversationHolder(),
+               selection_basionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+                               getConversationHolder(),
                                formElement, "Basionym Author",
                                AuthorHelper.getAuthor(entity.getBasionymAuthorTeam()),
-                               NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+                               EntitySelectionElement.ALL, style);
                addElement(selection_basionymAuthorTeam);
-               selection_exBasionymAuthorTeam = formFactory.createSelectionElement(
-                               SelectionType.AUTHOR_TEAM, getConversationHolder(),
+               selection_exBasionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+                               getConversationHolder(),
                                formElement, "Ex Basionym Author",
                                AuthorHelper.getAuthor(entity.getExBasionymAuthorTeam()),
-                               NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+                               EntitySelectionElement.ALL, style);
                addElement(selection_exBasionymAuthorTeam);
        }
 
@@ -102,8 +100,7 @@ public class AuthorshipDetailElement extends
                if (getEntity() == null) {
                        setEntity(NonViralName.NewInstance(null));
                }
-               NonViralName nonViralName = getEntity();
-
+               
                super.updateContent();
                toggleable_cache.setEnabled(getEntity().isProtectedAuthorshipCache());
 
index c79dfd807cc5e0bb1ee1c5f5843b1a63dd54ca8f..7fba074cd955d3b01b3917ce0afeeb8a6d05d765 100644 (file)
@@ -16,9 +16,9 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -36,9 +36,9 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection<NonViralNa
        /**
         * <p>Constructor for AuthorshipDetailSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         */
index 6cb687c411a2783fd522a7a138aa37e66a8c502c..1dfab3c0fab21bdee4211abd386bc21fcbffbf53 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.name;
 
 import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
index cf653f578c31797d01eb0f140ec338e4885aa085..77fb8fe00c420f43c7e1bf5b6788faa641d42847 100644 (file)
@@ -17,9 +17,9 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
index 0a32e59cfc4e1e65ca91f39778683b991d879945..f628e9e26cb2b2b359cbfc8f9c9dc20cf64aa93d 100644 (file)
@@ -15,21 +15,21 @@ import java.util.Arrays;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.model.name.BotanicalName;
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.ZoologicalName;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
 
 /**
  * <p>NameDetailElement class.</p>
@@ -40,7 +40,7 @@ import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
  */
 public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<NonViralName> implements ISelectableElement, IEnableableFormElement{
 
-       private AbstractTermComboElement<Rank> combo_rank;
+       private TermComboElement<Rank> combo_rank;
        private TextWithLabelElement text_appendedPhrase;
        private TextWithLabelElement text_uninomial;
        private TextWithLabelElement text_infragenericEpithet;
@@ -56,8 +56,8 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
        /**
         * <p>Constructor for NameDetailElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public NameDetailElement(CdmFormFactory cdmFormFactory, ICdmFormElement formElement,
@@ -75,8 +75,8 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
                
                toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
                
-               combo_rank = formFactory.createTermComboElement(TermComboType.RANK, this, "Rank", nonViralName.getRank(), style);
-
+               combo_rank = formFactory.createTermComboElement(Rank.class, this, "Rank", nonViralName.getRank(), style);
+               
                createGenusOrUninomialControls(this, nonViralName, style);
                createInfragenerericEpithetControls(this, nonViralName, style);
                createSpecificEpithetControls(this, nonViralName, style);
@@ -120,13 +120,16 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
 
        private void createSpecificNameParts(ICdmFormElement formElement,
                        NonViralName nonViralName, int style) {
-               switch(nonViralName.getNomenclaturalCode()){
-               case ICBN:
-                       createBotanicalNameParts(formElement, nonViralName, style);
-                       break;
-               case ICZN:
-                       createZoologicalNameParts(formElement, nonViralName, style);
-                       break;
+               NomenclaturalCode code = nonViralName.getNomenclaturalCode();
+               if (code != null){
+                       switch(nonViralName.getNomenclaturalCode()){
+                       case ICBN:
+                               createBotanicalNameParts(formElement, nonViralName, style);
+                               break;
+                       case ICZN:
+                               createZoologicalNameParts(formElement, nonViralName, style);
+                               break;
+                       }
                }
        }
        
@@ -211,7 +214,7 @@ public class NameDetailElement extends AbstractIdentifiableEntityDetailElement<N
        /**
         * <p>Getter for the field <code>selectionArbitrator</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
         */
        public SelectionArbitrator getSelectionArbitrator() {
                return selectionArbitrator;
index f1d41d64de4ac6b5ba89112398ad0f6da9de87c0..1b18a4562e5071ced863e21f0a2cde729e28204f 100644 (file)
@@ -16,9 +16,9 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -36,9 +36,9 @@ public class NameDetailSection extends AbstractCdmDetailSection<NonViralName> im
        /**
         * <p>Constructor for NameDetailSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         */
index 847a889b808add93995e147938eea455ece2106a..c0e1988f12835da72320f10db48eeb7127f2869e 100644 (file)
@@ -15,15 +15,16 @@ import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
 
 import eu.etaxonomy.cdm.model.name.NameRelationship;
+import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>NameRelationshipDetailElement class.</p>
@@ -35,15 +36,15 @@ import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
 public class NameRelationshipDetailElement extends AbstractReferencedEntityElement<NameRelationship>{
 
        private TextWithLabelElement text_ruleConsidered;
-       private AbstractSelectionElement selection_toName;
-       private NameRelationshipTypeComboElement combo_relationshipType;
+       private EntitySelectionElement selection_toName;
+       private TermComboElement<NameRelationshipType> combo_relationshipType;
        private LabelElement label;
 
        /**
         * <p>Constructor for NameRelationshipDetailElement.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
@@ -90,7 +91,12 @@ public class NameRelationshipDetailElement extends AbstractReferencedEntityEleme
                else if(eventSource == text_ruleConsidered){
                        getEntity().setRuleConsidered(text_ruleConsidered.getText());
                }
-               // referenced entity fields
+               else if(eventSource == selection_reference){
+                       getEntity().setCitation(selection_reference.getSelection());
+               }
+               else if(eventSource == text_referenceDetail){
+                       getEntity().setCitationMicroReference(text_referenceDetail.getText());
+               }
        }
        
        /** {@inheritDoc} */
index 7f824791f02deba3856be86c1a7db42a7f6e6541..d28f45adc8a89cec3ce84862784a2c6195137460 100644 (file)
@@ -22,8 +22,8 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -41,9 +41,9 @@ public class NameRelationshipDetailSection extends AbstractEntityCollectionSecti
        /**
         * <p>Constructor for NameRelationshipDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public NameRelationshipDetailSection(CdmFormFactory formFactory, ConversationHolder conversation,
index ba2cd292280afc7bdaed16e4604e58ac325c5aa8..e7abd566679c0d621c5bf055a824bccf816f85c3 100644 (file)
@@ -10,7 +10,6 @@
 
 package eu.etaxonomy.taxeditor.ui.section.name;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.wizard.Wizard;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -35,12 +34,9 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
         * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
         */
        public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
-               this.callingSection = callingSection;
+               NameRelationshipWizard.callingSection = callingSection;
        }
-       
-       private static final Logger logger = Logger
-                       .getLogger(NameRelationshipWizard.class);
-       
+               
        private NameRelationshipWizardPage page;
 
        /** {@inheritDoc} */
index 3acdf74bbffe90fc80010c1b1e7c869716d15687..162626a0428b719f2d427ca1fdd711b6943e7a16 100644 (file)
@@ -19,12 +19,11 @@ import org.eclipse.swt.widgets.Composite;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.NameRelationshipType;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameRelationshipTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -40,11 +39,9 @@ public class NameRelationshipWizardPage extends WizardPage implements
 
        private final CdmFormFactory formFactory;
 
-       private NameSelectionElement selection_relatedTo;
+       private EntitySelectionElement<TaxonNameBase> selection_relatedTo;
 
-       private NameRelationshipTypeComboElement combo_relationshipType;
-
-       private final NameRelationshipDetailSection callingSection;
+       private TermComboElement<NameRelationshipType> combo_relationshipType;
 
        private final TaxonNameBase entity;
 
@@ -69,7 +66,6 @@ public class NameRelationshipWizardPage extends WizardPage implements
                super("NameRelationshipWizardPage");
                setTitle("New Name Relationship");
                setDescription(callingSection.getEntity().getTitleCache());
-               this.callingSection = callingSection;
                this.entity = callingSection.getEntity();
                this.formFactory = callingSection.getFormFactory();
 
@@ -90,19 +86,18 @@ public class NameRelationshipWizardPage extends WizardPage implements
 
                Composite control = formFactory.createComposite(parent);
 
-               control.setLayout(CdmFormFactory.LAYOUT(2, false));
+               control.setLayout(LayoutConstants.LAYOUT(2, false));
 
                rootElement = new RootElement(formFactory, control);
 
-               combo_relationshipType = (NameRelationshipTypeComboElement) formFactory
-                               .createTermComboElement(TermComboType.NAMERELATIONSHIP,
+               combo_relationshipType = formFactory.createTermComboElement(NameRelationshipType.class,
                                                rootElement, "Name Relationship Type", null, SWT.NULL);
 
-               selection_relatedTo = (NameSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.NAME,
+               selection_relatedTo = formFactory
+                               .createSelectionElement(TaxonNameBase.class,
                                                ((NameRelationshipWizard) getWizard())
                                                                .getConversationHolder(), rootElement,
-                                               "Related to", null, NameSelectionElement.DEFAULT,
+                                               "Related to", null, EntitySelectionElement.ALL,
                                                SWT.NULL);
 
                setControl(control);
index 6de937e7ee5109713a9f3a2e6363e305c3b7c6f6..6d4c33854f93d5e7efa40c4ab40298dd14d2429b 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.name;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.NameTypeDesignationStatusComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -38,12 +35,10 @@ import eu.etaxonomy.taxeditor.ui.term.NameTypeDesignationStatusComboElement;
 public class NameTypeDesignationElement extends
                AbstractTypeDesignationElement<NameTypeDesignation> {
 
-       private static final Logger logger = Logger
-                       .getLogger(NameTypeDesignationElement.class);
        private CheckboxElement checkbox_rejectedType;
        private CheckboxElement checkbox_conservedType;
-       private NameSelectionElement selection_typeName;
-       private NameTypeDesignationStatusComboElement combo_typeStatus;
+       private EntitySelectionElement<TaxonNameBase> selection_typeName;
+       private TermComboElement<NameTypeDesignationStatus> combo_typeStatus;
 
        /**
         * <p>
@@ -51,10 +46,10 @@ public class NameTypeDesignationElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.name.NameTypeDesignation}
@@ -78,13 +73,12 @@ public class NameTypeDesignationElement extends
                                "Rejected Type", false, style);
                checkbox_conservedType = formFactory.createCheckbox(formElement,
                                "Conserved Type", false, style);
-               selection_typeName = (NameSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.NAME,
+               selection_typeName = formFactory
+                               .createSelectionElement(TaxonNameBase.class,
                                                getConversationHolder(), formElement, "Name", null,
-                                               NameSelectionElement.DEFAULT, style);
-               combo_typeStatus = (NameTypeDesignationStatusComboElement) formFactory
-                               .createTermComboElement(
-                                               TermComboType.NAMETYPEDESIGNATIONSTATUS, formElement,
+                                               EntitySelectionElement.ALL, style);
+               combo_typeStatus = formFactory.createTermComboElement(
+                               NameTypeDesignationStatus.class, formElement,
                                                "Designation Status", null, style);
 
                super.createControls(formElement, style);
index 516f254bf647a37608793d68eb39c8affc8049fb..937f08a90fafd140fc32513cfdda4ab2671fc971 100644 (file)
@@ -14,16 +14,15 @@ import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
 
 /**
  * <p>NomenclaturalStatusElement class.</p>
@@ -34,7 +33,7 @@ import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
  */
 public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<NomenclaturalStatus> implements IEntityElement<NomenclaturalStatus>, ISelectableElement{
 
-       private AbstractTermComboElement<NomenclaturalStatusType> nomenclaturalStatusTypeCombo;
+       private TermComboElement<NomenclaturalStatusType> nomenclaturalStatusTypeCombo;
        
        private TextWithLabelElement ruleConsideredText;
        
@@ -43,11 +42,11 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
        /**
         * <p>Constructor for NomenclaturalStatusElement.</p>
         *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatus} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public NomenclaturalStatusElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement,
                        NomenclaturalStatus element, SelectionListener removeListener, int style) {
@@ -61,7 +60,7 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               nomenclaturalStatusTypeCombo = formFactory.createTermComboElement(TermComboType.NOMENCLATURALSTATUSTYPE, this, "Nomenclatural Status Type", null, style);
+               nomenclaturalStatusTypeCombo = formFactory.createTermComboElement(NomenclaturalStatusType.class, this, "Nomenclatural Status Type", null, style);
                ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
                
                super.createControls(element, style);
@@ -81,7 +80,7 @@ public class NomenclaturalStatusElement extends AbstractReferencedEntityElement<
        /**
         * <p>Getter for the field <code>selectionArbitrator</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
         */
        public SelectionArbitrator getSelectionArbitrator() {
                return selectionArbitrator;
index 1a8d5a05c4702cc67f87fee74b668dec7be44d86..643804afb8873baa99b588570ae7871111fef163 100644 (file)
@@ -18,8 +18,8 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -37,9 +37,9 @@ public class NomenclaturalStatusSection extends AbstractEntityCollectionSection<
        /**
         * <p>Constructor for NomenclaturalStatusSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public NomenclaturalStatusSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement,
index d15dd2eb8c8d3c552d31c4c6bf16126e629d4469..55662b2d56b7870597dc735d34b92724ea0d3ebd 100644 (file)
@@ -14,14 +14,15 @@ import java.util.Arrays;
 
 import org.eclipse.ui.forms.widgets.Section;
 
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.NomenclaturalCodeComboElement;
 
 /**
  * <p>
@@ -37,7 +38,7 @@ public class NonViralNameDetailElement extends
 
        private NameDetailSection section_name;
        private AuthorshipDetailSection section_author;
-       private NomenclaturalCodeComboElement combo_nomenclaturalCode;
+       private EnumComboElement<NomenclaturalCode> combo_nomenclaturalCode;
        private HybridDetailSection section_hybrid;
 
        /**
@@ -46,10 +47,10 @@ public class NonViralNameDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public NonViralNameDetailElement(CdmFormFactory formFactory,
@@ -74,29 +75,29 @@ public class NonViralNameDetailElement extends
                                "Cache", entity.getTitleCache(), entity.isProtectedTitleCache()
                                                || entity.isProtectedFullTitleCache(), style);
 
-               combo_nomenclaturalCode = (NomenclaturalCodeComboElement) formFactory
-                               .createEnumComboElement(EnumComboType.NOMENCLATURALCODE,
+               combo_nomenclaturalCode = formFactory
+                               .createEnumComboElement(NomenclaturalCode.class,
                                                formElement, style);
                combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
 
                section_name = (NameDetailSection) formFactory.createCdmDetailSection(
                                DetailType.SCIENTIFICNAME, getConversationHolder(),
                                formElement, null, Section.TWISTIE | Section.EXPANDED);
-               section_name.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_name);
                addElement(section_name);
                section_author = (AuthorshipDetailSection) formFactory
                                .createCdmDetailSection(DetailType.AUTHORSHIP,
                                                getConversationHolder(), formElement, null,
                                                Section.TWISTIE | Section.EXPANDED);
-               section_author.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_author);
                addElement(section_author);
                
                section_hybrid = (HybridDetailSection) formFactory.createCdmDetailSection(DetailType.HYBRID, 
                                                getConversationHolder(), formElement, null, 
                                                Section.TWISTIE);
-               section_hybrid.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_hybrid);
                addElement(section_hybrid);
        }
index 3271866ff149389527235fa20fad6b5e5cb1bd8f..6657d7a744bcefa27ca3337d414b6239d25525d7 100644 (file)
@@ -21,10 +21,10 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -43,9 +43,9 @@ public class NonViralNameDetailSection extends AbstractCdmDetailSection<NonViral
        /**
         * <p>Constructor for NonViralNameDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index a6c52e0ac76f9d1df36f3f8e8f50b21df2c15b3f..4603f031d019265fda97ab9977e2f023980f12dc 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.name;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -30,15 +29,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class NonViralNameWizardPage extends AbstractCdmEntityWizardPage<NonViralName> {
 
-
-       private static final Logger logger = Logger
-                       .getLogger(NonViralNameWizardPage.class);
        private NonViralNameDetailElement nameElement;
 
        /**
         * <p>Constructor for NonViralNameWizardPage.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.name.NonViralName} object.
         */
@@ -50,7 +46,7 @@ public class NonViralNameWizardPage extends AbstractCdmEntityWizardPage<NonViral
        
        /** {@inheritDoc} */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<NonViralName> createElement(ICdmFormElement rootElement) {
                nameElement = (NonViralNameDetailElement) formFactory.createCdmDetailElement(DetailType.NONVIRALNAME, rootElement, SWT.NULL);
                nameElement.setEntity(entity);
                return nameElement;
index 7a6111e8c718f81c429f328b8ff935ca4f862e13..ed29e2f45be45f923899faf0cf622916dcf1b44d 100644 (file)
@@ -23,15 +23,14 @@ import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
-import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
@@ -50,16 +49,14 @@ public class ProtologueElement extends AbstractEntityCollectionElement<Descripti
        private Media media;
        private MediaRepresentation mediaRepresentation;
 
-       private OpenUrlSelectorElement element_openUrl;
-
        /**
         * <p>Constructor for ProtologueElement.</p>
         *
         * @param element a {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         */
        public ProtologueElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, DescriptionElementBase element,
                        SelectionListener removeListener, int style) {
@@ -75,7 +72,7 @@ public class ProtologueElement extends AbstractEntityCollectionElement<Descripti
        public void createControls(ICdmFormElement element, int style) {
                protologueUriText = formFactory.createTextWithLabelElement(this, "Protologue URI", "", style);
 
-               element_openUrl = formFactory.createOpenUrlSelectorElement(element, "Query BHL for Reference Image", this, style);
+               formFactory.createOpenUrlSelectorElement(element, "Query BHL for Reference Image", this, style);
        }
 
        /* (non-Javadoc)
@@ -113,7 +110,7 @@ public class ProtologueElement extends AbstractEntityCollectionElement<Descripti
        /**
         * <p>Getter for the field <code>selectionArbitrator</code>.</p>
         *
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator} object.
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator} object.
         */
        public SelectionArbitrator getSelectionArbitrator() {
                return selectionArbitrator;
index 80dee4defe476051e02bc4d91f6288c624c02b0a..4f4e24f5f651787624160966e96b9ab3cbc62f35 100644 (file)
@@ -21,8 +21,8 @@ import eu.etaxonomy.cdm.model.description.TextData;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -40,8 +40,8 @@ public class ProtologueSection extends AbstractEntityCollectionSection<TaxonName
        /**
         * <p>Constructor for ProtologueSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
index f7bb967bbb764f38fc57174e505f19bd3350d845..1fd7f9a170234d6c4bf5dcf0ed96fa3a23281ecc 100644 (file)
@@ -15,15 +15,14 @@ import org.eclipse.swt.events.SelectionListener;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.SpecimenTypeDesignationStatusComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -37,8 +36,8 @@ import eu.etaxonomy.taxeditor.ui.term.SpecimenTypeDesignationStatusComboElement;
 public class SpecimenTypeDesignationElement extends
                AbstractTypeDesignationElement<SpecimenTypeDesignation> {
 
-       private SpecimenTypeDesignationStatusComboElement combo_typeStatus;
-       private DerivedUnitBaseSelectionElement selection_typeSpecimen;
+       private TermComboElement<SpecimenTypeDesignationStatus> combo_typeStatus;
+       private EntitySelectionElement<DerivedUnitBase> selection_typeSpecimen;
        private TextWithLabelElement text_specimenTypeText;
 
        /**
@@ -47,10 +46,10 @@ public class SpecimenTypeDesignationElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation}
@@ -69,13 +68,12 @@ public class SpecimenTypeDesignationElement extends
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
-               selection_typeSpecimen = (DerivedUnitBaseSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.DERIVED_UNIT,
-                                               getConversationHolder(), formElement, "Unit", null,
-                                               DerivedUnitBaseSelectionElement.DEFAULT, style);
-               combo_typeStatus = (SpecimenTypeDesignationStatusComboElement) formFactory
-                               .createTermComboElement(
-                                               TermComboType.SPECIMENTYPEDESIGNATIONSTATUS,
+               selection_typeSpecimen = formFactory
+                               .createSelectionElement(DerivedUnitBase.class,
+                                               getConversationHolder(), formElement, "Specimen", null,
+                                               EntitySelectionElement.ALL, style);
+               combo_typeStatus = formFactory
+                               .createTermComboElement(SpecimenTypeDesignationStatus.class,
                                                formElement, "Designation Status", null, style);
 
                super.createControls(formElement, style);
index 8b40d8a0b2dbe6c7e03c83f1cef8762d31b3c2e7..7d280ec9598d9dd4502f8cecb86fe888089916df 100644 (file)
@@ -13,6 +13,7 @@ package eu.etaxonomy.taxeditor.ui.section.name;
 import java.util.Collection;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
 import eu.etaxonomy.cdm.model.name.NonViralName;
@@ -21,8 +22,11 @@ import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -40,9 +44,9 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
        /**
         * <p>Constructor for TypeDesignationSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public TypeDesignationSection(CdmFormFactory formFactory, ConversationHolder conversation,
@@ -53,7 +57,7 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
        /** {@inheritDoc} */
        @Override
        public void addElement(TypeDesignationBase element) {
-               getEntity().addTypeDesignation(element, false);
+               getEntity().addTypeDesignation(element, PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES));
        }
 
        /** {@inheritDoc} */
@@ -87,7 +91,9 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
        /** {@inheritDoc} */
        @Override
        public void removeElement(TypeDesignationBase element) {
-               getEntity().removeTypeDesignation(element);
+               boolean removeTypeDesignationFromAllTypifiedNames = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES);
+               TaxonNameBase entity = removeTypeDesignationFromAllTypifiedNames ? null : getEntity();
+               CdmStore.getService(INameService.class).deleteTypeDesignation(entity, element);
        }
 
        /*
index caaa50eb59318a52eee7f05b1fbb998cddd6b14f..7fc9405420bb9b7974e3ad1b2902192ff1fb4456 100644 (file)
@@ -13,8 +13,8 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index dac1c02405d193d89762deb12b028c23879fd24e..589764a84c9d11da23dc53dbcc73ce244755fc2b 100644 (file)
@@ -12,15 +12,15 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import org.eclipse.swt.events.SelectionListener;
 
+import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.EventBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -34,7 +34,7 @@ import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
 public abstract class AbstractEventDetailElement<T extends EventBase> extends
                AbstractEntityCollectionElement<T> {
 
-       protected AgentSelectionElement selection_agent;
+       protected EntitySelectionElement<AgentBase> selection_agent;
        protected TextWithLabelElement text_description;
        protected TimePeriodElement element_timePeriod;
 
@@ -44,10 +44,10 @@ public abstract class AbstractEventDetailElement<T extends EventBase> extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a T object.
@@ -89,10 +89,10 @@ public abstract class AbstractEventDetailElement<T extends EventBase> extends
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_agent = (AgentSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.AGENT,
+               selection_agent = formFactory
+                               .createSelectionElement(AgentBase.class,
                                                getConversationHolder(), element, "Actor", null,
-                                               AgentSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
                element_timePeriod = formFactory.createTimePeriodElement(element,
                                "Time Period", null, style);
                text_description = formFactory.createTextWithLabelElement(element,
index 98c342a039ac63fafa6cb38358ea1882e86b3ce5..d1fc2a0ff8c614ae99c82e80801c336457a76e86 100644 (file)
@@ -15,9 +15,9 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NamedAreaSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.NamedAreaSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -33,9 +33,9 @@ public class CollectingAreasDetailSection extends
        /**
         * <p>Constructor for CollectingAreasDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public CollectingAreasDetailSection(CdmFormFactory formFactory,
index de99a1fba2a7323454b6bd3fb0041ca6a177aa77..1e7acca7c00f3fe720dd01bc608d086e89c21eab 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
+import eu.etaxonomy.cdm.model.agent.Institution;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -42,9 +41,9 @@ public class CollectionDetailElement extends
 
        private TextWithLabelElement text_townOrLocation;
 
-       private InstitutionSelectionElement selection_institute;
+       private EntitySelectionElement<Institution> selection_institute;
 
-       private CollectionSelectionElement selection_superCollection;
+       private EntitySelectionElement<Collection> selection_superCollection;
 
        /**
         * <p>
@@ -52,10 +51,10 @@ public class CollectionDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public CollectionDetailElement(CdmFormFactory formFactory,
@@ -88,16 +87,16 @@ public class CollectionDetailElement extends
                text_townOrLocation = formFactory.createTextWithLabelElement(
                                formElement, "Town Or Location", entity.getTownOrLocation(),
                                style);
-               selection_institute = (InstitutionSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.INSTITUTION,
+               selection_institute = formFactory
+                               .createSelectionElement(Institution.class,
                                                getConversationHolder(), formElement, "Institute",
                                                entity.getInstitute(),
-                                               InstitutionSelectionElement.DEFAULT, style);
-               selection_superCollection = (CollectionSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.COLLECTION,
+                                               EntitySelectionElement.ALL, style);
+               selection_superCollection = formFactory
+                               .createSelectionElement(Collection.class,
                                                getConversationHolder(), formElement,
                                                "Super Collection", entity.getSuperCollection(),
-                                               CollectionSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
        }
 
        /*
index b3408ba516975ecd901a653520eab68de15887bb..9c9574b310ccd2c7a535b823e71bd0dda3749075 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -32,7 +32,7 @@ public class CollectionWizardPage extends AbstractCdmEntityWizardPage<Collection
        /**
         * <p>Constructor for CollectionWizardPage.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
         */
@@ -55,7 +55,7 @@ public class CollectionWizardPage extends AbstractCdmEntityWizardPage<Collection
         */
        /** {@inheritDoc} */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<Collection> createElement(ICdmFormElement rootElement) {
                CollectionDetailElement collectionDetailElement = (CollectionDetailElement) formFactory.createCdmDetailElement(DetailType.COLLECTION, rootElement, SWT.NULL);
                collectionDetailElement.setEntity(entity);
                return collectionDetailElement;
index f3e9ffb50c3609907d4820662cb6cb8d1e5b031c..34f1cbbcc2b2a3b05c392f1ca94c658796673ee9 100644 (file)
@@ -24,8 +24,8 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
 import eu.etaxonomy.taxeditor.model.ImageResources;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * @author n.hoffmann
index 2ee211722c6d9a365ef98a88a5654b30dbb0969e..8422ed5d958656970fb44e6c26698f2738505a55 100644 (file)
@@ -14,17 +14,18 @@ import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.MethodNotSupportedByDerivedUnitTypeException;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.PreservationMethodComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -44,28 +45,26 @@ public class DerivedUnitBaseDetailElement extends
 
        private TextWithLabelElement text_catalogNumber;
 
-       private NameSelectionElement selection_storedUnder;
+       private EntitySelectionElement<TaxonNameBase> selection_storedUnder;
 
        private TextWithLabelElement text_exsicatum;
 
-       private PreservationMethodComboElement combo_preservationMethod;
+       private TermComboElement<PreservationMethod> combo_preservationMethod;
 
        private SpecimenCollectionDetailSection section_duplicates;
 
        private SourceCollectionDetailSection section_source;
 
-       private TextWithLabelElement text_collectorsNumber;
-
        /**
         * <p>
         * Constructor for DerivedUnitBaseDetailElement.
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public DerivedUnitBaseDetailElement(CdmFormFactory formFactory,
@@ -91,18 +90,17 @@ public class DerivedUnitBaseDetailElement extends
                                                entity.getCatalogNumber(), style);
 
                try {
-                       combo_preservationMethod = (PreservationMethodComboElement) formFactory
-                                       .createTermComboElement(TermComboType.PRESERVATION_METHOD,
+                       combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class,
                                                        formElement, "Preservation Method",
                                                        entity.getPreservationMethod(), style);
                } catch (MethodNotSupportedByDerivedUnitTypeException e) {
                        // we ignore this
                        StoreUtil.info(e.getMessage());
                }
-               selection_storedUnder = (NameSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.NAME,
+               selection_storedUnder = formFactory
+                               .createSelectionElement(TaxonNameBase.class,
                                                getConversationHolder(), formElement, "Stored Under",
-                                               entity.getStoredUnder(), NameSelectionElement.DEFAULT,
+                                               entity.getStoredUnder(), EntitySelectionElement.ALL,
                                                style);
 
                try {
@@ -118,14 +116,14 @@ public class DerivedUnitBaseDetailElement extends
                                                EntityDetailType.SPECIMEN_COLLECTION,
                                                getConversationHolder(), formElement, Section.TWISTIE);
                section_duplicates
-                               .setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+                               .setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_duplicates.setEntity(entity);
 
                section_source = (SourceCollectionDetailSection) formFactory
                                .createEntityDetailSection(
                                                EntityDetailType.IDENTIFIABLE_SOURCE_COLLECTION,
                                                getConversationHolder(), formElement, Section.TWISTIE);
-               section_source.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_source.setEntity(entity);
        }
 
index f15e6a49f2b6caaa6c1bffedb8ba878bbfedc222..931596b948d31a3948500e29b39376b437794c9b 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class DerivedUnitBaseDetailSection extends AbstractCdmDetailSection<Deriv
        /**
         * <p>Constructor for DerivedUnitBaseDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index b9470a610997115e41eb28e740ec783d1a5ceba7..3524daad56d4285c53e69b2f18106bc92944e827 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -51,7 +51,7 @@ public class DerivedUnitBaseWizardPage extends AbstractCdmEntityWizardPage<Deriv
         * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                DerivedUnitBaseDetailElement detailElement = (DerivedUnitBaseDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT, rootElement, SWT.NULL);
                detailElement.setEntity(getEntity());           
                return detailElement;
index 103fa93c71ca2e28f265c473ec9b1a5e2050321e..937ee2113f1ce93f8dd64e40613ef5acab178ddc 100644 (file)
@@ -17,9 +17,10 @@ import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
@@ -44,8 +45,8 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
        /**
         * <p>Constructor for DerivedUnitFacadeDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public DerivedUnitFacadeDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
@@ -119,22 +120,22 @@ public class DerivedUnitFacadeDetailElement extends AbstractCdmDetailElement<Der
                        DerivedUnitBase entity, int style) {
                
                section_general = (GeneralDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT_GENERAL, getConversationHolder(), formElement, null, Section.TWISTIE | Section.EXPANDED);
-               section_general.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_general.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_general);
                addElement(section_general);
                
                section_gatheringEvent = (GatheringEventDetailSection) formFactory.createCdmDetailSection(DetailType.GATHERING_EVENT, getConversationHolder(), formElement, null, Section.TWISTIE);
-               section_gatheringEvent.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_gatheringEvent.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_gatheringEvent);
                addElement(section_gatheringEvent);
                
                section_fieldObservation = (FieldObservationDetailSection) formFactory.createCdmDetailSection(DetailType.FIELD_OBSERVATION, getConversationHolder(), formElement, null, Section.TWISTIE);
-               section_fieldObservation.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_fieldObservation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_fieldObservation);
                addElement(section_fieldObservation);
                
                section_derivedUnitBase = (DerivedUnitBaseDetailSection) formFactory.createCdmDetailSection(DetailType.DERIVED_UNIT, getConversationHolder(), formElement, null, Section.TWISTIE);
-               section_derivedUnitBase.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_derivedUnitBase.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(section_derivedUnitBase);
                addElement(section_derivedUnitBase);
        }
index d416f998bf1cb5932e44f9ef0f6c93bfbfd52a11..c099a4d204c77f4ad3828fcba8924c3a32f14bf3 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
-import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -29,16 +28,12 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  */
 public class DerivedUnitFacadeDetailSection extends AbstractCdmDetailSection<DerivedUnitBase> {
        
-
-       private static final Logger logger = Logger
-                       .getLogger(DerivedUnitFacadeDetailSection.class);
-
        /**
         * <p>Constructor for DerivedUnitFacadeDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 609d577884f45a456f9851146d1decd4cf691f3d..7fdfd02f1cd44679b30ea2eef66fa6fd83a70ef2 100644 (file)
@@ -13,9 +13,10 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -49,14 +50,14 @@ public class DeterminationDetailElement extends AbstractCdmDetailElement<Derived
                                .createEntityDetailSection(
                                                EntityDetailType.DETERMINATION_CURRENT,
                                                getConversationHolder(), formElement, Section.EXPANDED);
-               section_currentDetermination.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_currentDetermination.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_currentDetermination.setEntity(entity);
                
                section_determinationHistory = (DeterminationHistoryDetailSection) formFactory
                                                                                        .createEntityDetailSection(
                                                                                                        EntityDetailType.DETERMINATION_HISTORY,
                                                                                                        getConversationHolder(), formElement, Section.TWISTIE);
-               section_determinationHistory.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
+               section_determinationHistory.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                section_determinationHistory.setEntity(entity);
                
        }
index 1fdfa604a26be3fa8f51219a6ded64d67ea5466f..bdd7200942a4f3d9c18e3ef6e903bb86a98e6aa3 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index 8c51a2d869ddd043ca6e593bb5ffc289673e6907..92c0533da12c8f334ac831132f0c58674a54ae81 100644 (file)
@@ -13,15 +13,14 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonBaseSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.DeterminationModifierComboElement;
+import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -35,9 +34,9 @@ import eu.etaxonomy.taxeditor.ui.term.DeterminationModifierComboElement;
 public class DeterminationEventDetailElement extends
                AbstractEventDetailElement<DeterminationEvent> {
 
-       private DeterminationModifierComboElement combo_determinationModifier;
+       private TermComboElement<DeterminationModifier> combo_determinationModifier;
        private CheckboxElement checkbox_preferredFlag;
-       private TaxonBaseSelectionElement selection_taxonBase;
+       private EntitySelectionElement<TaxonBase> selection_taxonBase;
 
        // private TODO a set of references
 
@@ -47,10 +46,10 @@ public class DeterminationEventDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.occurrence.DeterminationEvent}
@@ -92,10 +91,10 @@ public class DeterminationEventDetailElement extends
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_taxonBase = (TaxonBaseSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.TAXON_BASE,
+               selection_taxonBase = formFactory
+                               .createSelectionElement(TaxonBase.class,
                                                getConversationHolder(), element, "Taxon", null,
-                                               TaxonSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.NOTHING, style);
                
 
                // TODO set of references
@@ -106,8 +105,7 @@ public class DeterminationEventDetailElement extends
                selection_agent.setLabel("Determined by");
                
                
-               combo_determinationModifier = (DeterminationModifierComboElement) formFactory
-               .createTermComboElement(TermComboType.DETERMINATION_MODIFIER,
+               combo_determinationModifier = formFactory.createTermComboElement(DeterminationModifier.class,
                                element, "Modifier", null, style);
        }
 
index 7cb2fe9d85fcf04cd0e3af13deb1aa1064241856..89a0d0bde2e259ba7bc70df1a558896b5ffbfe3f 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * @author n.hoffmann
index 735fac83d2bab8ec912bf502e754210f218cc5dc..d2467e24a2edfa641e2386847ef15940acb61b09 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.description.Sex;
+import eu.etaxonomy.cdm.model.description.Stage;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.term.SexComboElement;
-import eu.etaxonomy.taxeditor.ui.term.StageComboElement;
 
 /**
  * <p>FieldObservationDetailElement class.</p>
@@ -41,15 +40,15 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
 
        private NumberWithLabelElement number_individualCount;
 
-       private SexComboElement combo_sex;
+       private TermComboElement<Sex> combo_sex;
 
-       private StageComboElement combo_lifeStage;
+       private TermComboElement<Stage> combo_lifeStage;
        
        /**
         * <p>Constructor for FieldObservationDetailElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         */
        public FieldObservationDetailElement(CdmFormFactory formFactory,
                        ICdmFormElement formElement) {
@@ -67,8 +66,8 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                text_fieldNotes = formFactory.createTextWithLabelElement(formElement, "Field Notes", entity.getFieldNotes(), style);
                
                number_individualCount = formFactory.createIntegerTextWithLabelElement(formElement, "Individual Count", entity.getIndividualCount(), style);
-               combo_lifeStage = (StageComboElement) formFactory.createTermComboElement(TermComboType.STAGE, formElement, "Life Stage", entity.getLifeStage(), style);
-               combo_sex = (SexComboElement) formFactory.createTermComboElement(TermComboType.SEX, formElement, "Sex", entity.getSex(), style);
+               combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style);
+               combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style);
        }
 
        /** {@inheritDoc} */
index 32e64f570f049ee35f53296103eda33381bc2fbf..7869c7dcb5cd159b025fc5b3f5190eaa92c32e35 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class FieldObservationDetailSection extends AbstractCdmDetailSection<Deri
        /**
         * <p>Constructor for FieldObservationDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 8b9ee4e97ff5361a08ea83a4a8ccfa2994723278..803e713553d42d9276d42fc7322972761971c536 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -51,7 +51,7 @@ public class FieldObservationWizardPage extends AbstractCdmEntityWizardPage<Deri
         * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                FieldObservationDetailElement detailElement = (FieldObservationDetailElement) formFactory.createCdmDetailElement(DetailType.FIELD_OBSERVATION, rootElement, SWT.NONE);
                detailElement.setEntity(getEntity());
                return detailElement;
index 7a604d344929fd01868721c129ffe63e8ba4c6b4..38eabcf2ea28696c934bef3911a361504d53d177 100644 (file)
@@ -15,12 +15,12 @@ import org.eclipse.ui.forms.widgets.Section;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -57,10 +57,10 @@ public class GatheringEventDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         */
        public GatheringEventDetailElement(CdmFormFactory formFactory,
@@ -107,7 +107,7 @@ public class GatheringEventDetailElement extends
                section_collectingAreas = (CollectingAreasDetailSection) formFactory
                                .createEntityDetailSection(EntityDetailType.COLLECTING_AREA,
                                                getConversationHolder(), formElement, Section.TWISTIE);
-               section_collectingAreas.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(
+               section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(
                                2, 1));
                section_collectingAreas.setEntity(entity);
        }
index 2551f41f780376162c1f1e72feb6abb5d33ff179..9673eaa0ce9a57bfc6993e97c68800504c61dfd6 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
@@ -31,9 +31,9 @@ public class GatheringEventDetailSection extends AbstractCdmDetailSection<Derive
        /**
         * <p>Constructor for GatheringEventDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 71a5a86e0ea18c4becf2b99ff02b9d27334c3b52..54dd833b140ad02f8779378c97c072328ae87a4a 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -51,7 +51,7 @@ public class GatheringEventWizardPage extends AbstractCdmEntityWizardPage<Derive
         * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                GatheringEventDetailElement detailElement = (GatheringEventDetailElement) formFactory.createCdmDetailElement(DetailType.GATHERING_EVENT, rootElement, SWT.NULL);
                detailElement.setEntity(getEntity());
                return detailElement;
index 0be5d022e3a179a8b3e99c570b741f3528165705..5951b23dbd878800e94853747e7b0ef71896c146 100644 (file)
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.LanguageString;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.PointElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.occurrence.Collection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.PointElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.CollectionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -37,14 +36,14 @@ public class GeneralDetailElement extends
 
        private ToggleableTextElement toggleableText_titleCache;
 
-       private NamedAreaSelectionElement selection_country;
+       private EntitySelectionElement<NamedArea> selection_country;
        private LanguageStringWithLabelElement languageText_locality;
        private PointElement element_point;
        private NumberWithLabelElement number_elevation;
        private TimePeriodElement element_date;
-       private AgentSelectionElement selection_collector;
+       private EntitySelectionElement<AgentBase> selection_collector;
        private TextWithLabelElement text_collectingNumber;
-       private CollectionSelectionElement selection_collection;
+       private EntitySelectionElement<Collection> selection_collection;
        private TextWithLabelElement text_barcode;
 
        /**
@@ -70,9 +69,9 @@ public class GeneralDetailElement extends
                                formElement, "Title Cache", entity.getTitleCache(),
                                entity.isProtectedTitleCache(), style);
 
-               selection_country = formFactory.createNamedAreaSelectionElement(
-                               formElement, getConversationHolder(), "Country",
-                               entity.getCountry(), style);
+               selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+                               formElement, "Country",
+                               entity.getCountry(), EntitySelectionElement.NOTHING, style);
                languageText_locality = formFactory
                                .createLanguageStringWithLabelElement(formElement, "Locality",
                                                entity.getLocality(), style);           
@@ -83,18 +82,18 @@ public class GeneralDetailElement extends
                                entity.getAbsoluteElevation(), style);
                element_date = formFactory.createTimePeriodElement(formElement, "Date",
                                entity.getGatheringPeriod(), style);
-               selection_collector = (AgentSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.AGENT,
+               selection_collector = formFactory
+                               .createSelectionElement(AgentBase.class,
                                                getConversationHolder(), formElement, "Collector",
-                                               entity.getCollector(), AgentSelectionElement.DEFAULT,
+                                               entity.getCollector(), EntitySelectionElement.ALL,
                                                style);
                text_collectingNumber = formFactory.createTextWithLabelElement(formElement,
                                "Collecting number", entity.getFieldNumber(), style);
-               selection_collection = (CollectionSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.COLLECTION,
+               selection_collection = formFactory
+                               .createSelectionElement(Collection.class,
                                                getConversationHolder(), formElement, "Collection",
                                                entity.getCollection(),
-                                               CollectionSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
                text_barcode = formFactory.createTextWithLabelElement(formElement,
                                "Barcode", entity.getBarcode(), style);
        }
index 4b6235b6c5428fd5373054072c339966b2686902..10c56b57c5ae3788260e79f4bf4f587800a99e41 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index c4a5299a8dbf88d5eeb843ff5e83b21efd417219..9b1224a0d87f83d08c126604d8914f9f175f0740 100644 (file)
@@ -14,10 +14,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -50,9 +50,10 @@ public class GeneralWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitFa
         * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
                GeneralDetailElement detailElement = (GeneralDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT_GENERAL, rootElement, SWT.NULL);
                detailElement.setEntity(getEntity());
+               checkComplete();
                return detailElement;
        }
 
index 6af90afd8039302657a0382b37141dad8b7f40bb..021e68273a1e4a55b9d9ee22fb117bed846cbe8f 100644 (file)
@@ -13,11 +13,11 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -31,7 +31,7 @@ import eu.etaxonomy.taxeditor.ui.selection.NamedAreaSelectionElement;
 public class NamedAreaDetailElement extends
                AbstractEntityCollectionElement<NamedArea> {
 
-       private NamedAreaSelectionElement selection_namedArea;
+       private EntitySelectionElement<NamedArea> selection_namedArea;
 
        /**
         * <p>
@@ -39,10 +39,10 @@ public class NamedAreaDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
@@ -79,9 +79,10 @@ public class NamedAreaDetailElement extends
         */
        /** {@inheritDoc} */
        @Override
-       public void createControls(ICdmFormElement element, int style) {
-               selection_namedArea = formFactory.createNamedAreaSelectionElement(
-                               element, getConversationHolder(), "Area", null, style);
+       public void createControls(ICdmFormElement formElement, int style) {
+               selection_namedArea = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
+                               formElement, "Area",
+                               null, EntitySelectionElement.NOTHING, style);
        }
 
        /*
index d9454c3833e44e092d9ac546a06aff95f31e8aa5..157480d4c45405d32c992c98183c3e82ca97061b 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -32,9 +32,9 @@ public class SourceCollectionDetailSection extends
        /**
         * <p>Constructor for SourceCollectionDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public SourceCollectionDetailSection(CdmFormFactory formFactory,
index 1a846f44984e08ae2412205b59f25b4dd0afe12a..75c131ed073947b9428f34790f61b741342c57f0 100644 (file)
@@ -12,13 +12,13 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import org.eclipse.swt.events.SelectionListener;
 
+import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -32,7 +32,7 @@ import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement;
 public class SpecimenCollectionDetailElement extends
                AbstractEntityCollectionElement<Specimen> {
 
-       private DerivedUnitBaseSelectionElement selection_derivedUnit;
+       private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
 
        /**
         * <p>
@@ -40,10 +40,10 @@ public class SpecimenCollectionDetailElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a {@link eu.etaxonomy.cdm.model.occurrence.Specimen} object.
@@ -82,10 +82,10 @@ public class SpecimenCollectionDetailElement extends
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_derivedUnit = (DerivedUnitBaseSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.DERIVED_UNIT,
+               selection_derivedUnit = formFactory
+                               .createSelectionElement(DerivedUnitBase.class,
                                                getConversationHolder(), element, "Derived Unit", null,
-                                               DerivedUnitBaseSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, style);
        }
 
        /*
index 192249c98a800bb2ed1ba78eab1c78589ca16673..d4c0910df4779a4387ee392848146975890b6edb 100644 (file)
@@ -15,8 +15,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.occurrence.Specimen;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -32,9 +32,9 @@ public class SpecimenCollectionDetailSection extends
        /**
         * <p>Constructor for SpecimenCollectionDetailSection.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public SpecimenCollectionDetailSection(CdmFormFactory formFactory,
index 0177ee3ade8617e7d07e76d218635f1a71f82e07..977e56d64c9a29b1f5972074356fa2243d183275 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.reference;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -32,9 +30,7 @@ import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
 public class NomenclaturalReferenceDetailElement extends
                AbstractCdmDetailElement<TaxonNameBase> {
 
-       private static final Logger logger = Logger
-                       .getLogger(NomenclaturalReferenceDetailElement.class);
-       private ReferenceSelectionElement selection_nomenclaturalReference;
+       private EntitySelectionElement<Reference> selection_nomenclaturalReference;
        private TextWithLabelElement text_referenceDetail;
 
        /**
@@ -43,10 +39,10 @@ public class NomenclaturalReferenceDetailElement extends
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -60,11 +56,11 @@ public class NomenclaturalReferenceDetailElement extends
        @Override
        protected void createControls(ICdmFormElement formElement,
                        TaxonNameBase entity, int style) {
-               selection_nomenclaturalReference = (ReferenceSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.REFERENCE,
+               selection_nomenclaturalReference = formFactory
+                               .createSelectionElement(Reference.class,
                                                getConversationHolder(), formElement, "Reference",
-                                               entity.getNomenclaturalReference(),
-                                               ReferenceSelectionElement.DEFAULT, style);
+                                               (Reference) entity.getNomenclaturalReference(),
+                                               EntitySelectionElement.ALL, style);
                text_referenceDetail = formFactory.createTextWithLabelElement(
                                formElement, "Reference Detail",
                                entity.getNomenclaturalMicroReference(), style);
index 565d8728c5b92f68ad70eb2feca8420c430e887e..d9a824f9cd0184a61da1d7d9b202a5a295f9be67 100644 (file)
@@ -17,9 +17,9 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -38,9 +38,9 @@ public class NomenclaturalReferenceDetailSection extends
        /**
         * <p>Constructor for NomenclaturalReferenceDetailSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 1b7beb78192df669cbc299f1364d375b890afb6e..cf7035e835fe603451779d3f07815447b5e30f9a 100644 (file)
@@ -17,28 +17,25 @@ import java.util.List;
 
 import org.eclipse.swt.SWT;
 
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.agent.Institution;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 import eu.etaxonomy.cdm.model.reference.ReferenceType;
 import eu.etaxonomy.taxeditor.model.AuthorHelper;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EnumComboType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IErrorIntolerableElement;
-import eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.TimePeriodElement;
-import eu.etaxonomy.taxeditor.ui.forms.ToggleableTextElement;
-import eu.etaxonomy.taxeditor.ui.forms.UriWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IErrorIntolerableElement;
+import eu.etaxonomy.taxeditor.ui.element.IExceptionHandler;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.InstitutionSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ReferenceTypeComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -66,13 +63,13 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
        private TextWithLabelElement text_title;
        private TextWithLabelElement text_volume;
        private UriWithLabelElement text_uri;
-       private AgentSelectionElement selection_authorTeam;
+       private EntitySelectionElement<AgentBase> selection_authorTeam;
        private TimePeriodElement element_timePeriod;
-       private ReferenceSelectionElement selection_inReference;
-       private InstitutionSelectionElement selection_institution;
-       private ReferenceTypeComboElement combo_referenceType;
+       private EntitySelectionElement<Reference> selection_inReference;
+       private EntitySelectionElement<Institution> selection_institution;
+       private EnumComboElement<ReferenceType> combo_referenceType;
 
-       private ReferenceSelectionElement selection_inSeries;
+       private EntitySelectionElement<Reference> selection_inSeries;
 
        /**
         * <p>
@@ -80,10 +77,10 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -108,8 +105,7 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                                "Reference Cache", entity.getTitleCache(),
                                entity.isProtectedTitleCache(), style);
 
-               combo_referenceType = (ReferenceTypeComboElement) formFactory
-                               .createEnumComboElement(EnumComboType.REFERENCETYPE,
+               combo_referenceType = formFactory.createEnumComboElement(ReferenceType.class,
                                                formElement, style);
 
                combo_referenceType.setSelection(entity.getType());
@@ -119,11 +115,11 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                                "Title", entity.getTitle(), style);
 
                // author team
-               selection_authorTeam = (AgentSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.AGENT,
+               selection_authorTeam = formFactory
+                               .createSelectionElement(AgentBase.class,
                                                getConversationHolder(), formElement, "Author",
                                                AuthorHelper.getAuthor(entity.getAuthorTeam()),
-                                               AgentSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
 
                ReferenceType referenceType = entity.getType();
 
@@ -215,11 +211,11 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                }
 
                if (createInReferenceWidget) {
-                       selection_inReference = (ReferenceSelectionElement) formFactory
-                                       .createSelectionElement(SelectionType.REFERENCE,
+                       selection_inReference = formFactory
+                                       .createSelectionElement(Reference.class,
                                                        getConversationHolder(), element, label,
                                                        reference.getInReference(),
-                                                       ReferenceSelectionElement.DEFAULT, style);
+                                                       EntitySelectionElement.ALL, style);
                }
        }
 
@@ -278,20 +274,20 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
 
                if (referenceType.equals(ReferenceType.Report)) {
                        // institution
-                       selection_institution = (InstitutionSelectionElement) formFactory
-                                       .createSelectionElement(SelectionType.INSTITUTION,
+                       selection_institution = formFactory
+                                       .createSelectionElement(Institution.class,
                                                        getConversationHolder(), element, "Institution",
                                                        reference.getInstitution(),
-                                                       InstitutionSelectionElement.DEFAULT, style);
+                                                       EntitySelectionElement.ALL, style);
                }
 
                if (referenceType.equals(ReferenceType.Thesis)) {
                        // school
-                       selection_institution = (InstitutionSelectionElement) formFactory
-                                       .createSelectionElement(SelectionType.INSTITUTION,
+                       selection_institution = formFactory
+                                       .createSelectionElement(Institution.class,
                                                        getConversationHolder(), element, "School",
                                                        reference.getSchool(),
-                                                       InstitutionSelectionElement.DEFAULT, style);
+                                                       EntitySelectionElement.ALL, style);
                }
 
                if (referenceType.equals(ReferenceType.Proceedings)) {
@@ -342,11 +338,11 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
        private void createPrintedUnitControls(ICdmFormElement element,
                        ReferenceType referenceType, Reference reference, int style) {
                // in series
-               selection_inSeries = (ReferenceSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.REFERENCE,
+               selection_inSeries = formFactory
+                               .createSelectionElement(Reference.class,
                                                getConversationHolder(), element, "In Series",
-                                               reference.getInSeries(),
-                                               ReferenceSelectionElement.DEFAULT, style);
+                                               (Reference) reference.getInSeries(),
+                                               EntitySelectionElement.ALL, style);
 
                // editor
                text_editor = formFactory.createTextWithLabelElement(element, "Editor",
index a4862e28c6a3235c5732a85d693c59185e75a26d..c04bad78fde5ae27840db5a81cc3359312b91d2f 100644 (file)
@@ -18,9 +18,9 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -38,9 +38,9 @@ public class ReferenceDetailSection extends AbstractCdmDetailSection<Reference>
        /**
         * <p>Constructor for ReferenceBaseDetailSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         */
index 0940ba532edaacf7946f092f64ae12defe3edf77..bfd30b9e7e6b12295420953602204ef9495b83d5 100644 (file)
@@ -14,12 +14,12 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IExceptionHandler;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IExceptionHandler;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -34,7 +34,7 @@ public class ReferenceWizardPage extends AbstractCdmEntityWizardPage<Reference>
        /**
         * <p>Constructor for ReferenceBaseWizardPage.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
         */
@@ -48,7 +48,7 @@ public class ReferenceWizardPage extends AbstractCdmEntityWizardPage<Reference>
         * @see eu.etaxonomy.taxeditor.forms.CdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
         */
        /** {@inheritDoc} */
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement){
+       public AbstractCdmDetailElement<Reference> createElement(ICdmFormElement rootElement){
                ReferenceDetailElement referenceElement = (ReferenceDetailElement) formFactory.createCdmDetailElement(DetailType.REFERENCEBASE, rootElement, SWT.NULL);
                referenceElement.addExceptionHandler(this);
                referenceElement.setEntity(entity);
index 8006ca61dcd2ecc13427d823cc1b57640194d6e9..e004ba3f3ba908682ffb4d47da0599c8f97d9c8f 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 
 /**
  * <p>Abstract AbstractOriginalSourceElement class.</p>
@@ -27,16 +26,14 @@ import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
  * @version 1.0
  */
 public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase> extends AbstractReferencedEntityElement<T> {
-       private static final Logger logger = Logger
-                       .getLogger(AbstractOriginalSourceElement.class);
        protected TextWithLabelElement text_idInSource;
        protected TextWithLabelElement text_idNamespace;
 
        /**
         * <p>Constructor for AbstractOriginalSourceElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a T object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
index 62384d464cb2e95b73c44773866bb37c891ff7c3..c77b5379e1ee2abed1c92d242b0a76eb25bc2a72 100644 (file)
@@ -14,13 +14,13 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -34,7 +34,7 @@ import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
 public abstract class AbstractReferencedEntityElement<T extends ReferencedEntityBase>
                extends AbstractEntityCollectionElement<T> {
 
-       protected ReferenceSelectionElement selection_reference;
+       protected EntitySelectionElement<Reference> selection_reference;
        protected TextWithLabelElement text_referenceDetail;
 
        protected TextWithLabelElement text_originaleNameString;
@@ -47,10 +47,10 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param entity
         *            a T object.
@@ -77,10 +77,10 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
-               selection_reference = (ReferenceSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.REFERENCE,
+               selection_reference = formFactory
+                               .createSelectionElement(Reference.class,
                                                getConversationHolder(), formElement, "Reference",
-                                               null, ReferenceSelectionElement.DEFAULT, style);
+                                               null, EntitySelectionElement.ALL, style);
                text_referenceDetail = formFactory.createTextWithLabelElement(
                                formElement, "Reference Detail", null, SWT.NULL);
                if (hasOriginalNameString)
index 295b8132c5754205ce4976db49514bf00c1a35f3..760abcf48c6cd7fe5ba68beda8a3ad61eb2d5373 100644 (file)
@@ -6,13 +6,13 @@ package eu.etaxonomy.taxeditor.ui.section.supplemental;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.Annotation;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.cdm.model.common.AnnotationType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AnnotationTypeComboElement;
 
 /**
  * <p>AnnotationElement class.</p>
@@ -23,15 +23,15 @@ import eu.etaxonomy.taxeditor.ui.term.AnnotationTypeComboElement;
 public class AnnotationElement extends AbstractEntityCollectionElement<Annotation>{
 
        private TextWithLabelElement text;
-       private AnnotationTypeComboElement combo_annotationType;
+       private TermComboElement<AnnotationType> combo_annotationType;
 
        /**
         * <p>Constructor for AnnotationElement.</p>
         *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param annotation a {@link eu.etaxonomy.cdm.model.common.Annotation} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         */
        public AnnotationElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Annotation annotation, SelectionListener removeListener, int style) {
@@ -44,7 +44,7 @@ public class AnnotationElement extends AbstractEntityCollectionElement<Annotatio
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               combo_annotationType = (AnnotationTypeComboElement) formFactory.createTermComboElement(TermComboType.ANNOTATIONTYPE, this, "Annotation Type", null, style);
+               combo_annotationType = formFactory.createTermComboElement(AnnotationType.class, this, "Annotation Type", null, style);
                
                text = formFactory.createMultilineTextWithLabel(this, "Annotation", 100, style);
        }
index 70af38fc490ea781a14a29e4e0ec793c393aceb4..2a7fff5d2bdfde8d75d2ea6afdaa4cbf52779539 100644 (file)
@@ -11,8 +11,8 @@ import eu.etaxonomy.cdm.model.common.Annotation;
 import eu.etaxonomy.cdm.model.common.AnnotationType;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -27,9 +27,9 @@ public class AnnotationSection extends AbstractEntityCollectionSection<Annotatab
        /**
         * <p>Constructor for AnnotationSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public AnnotationSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseElement.java
new file mode 100644 (file)
index 0000000..6cc79a1
--- /dev/null
@@ -0,0 +1,66 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.supplemental;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 24 Jan 2012\r
+ *\r
+ */\r
+public class CdmBaseElement extends AbstractCdmFormElement implements IEntityElement<CdmBase>{\r
+\r
+       private TextWithLabelElement text_uuid;\r
+       private TextWithLabelElement text_objectId;\r
+       private CdmBase entity;\r
+       /**\r
+        * @param formFactory\r
+        * @param formElement\r
+        */\r
+       public CdmBaseElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement, CdmBase entity, int style) {\r
+               \r
+               super(formFactory, formElement);\r
+               text_uuid = formFactory.createTextWithLabelElement(formElement, "UUID", null, style);           \r
+               text_objectId = formFactory.createTextWithLabelElement(formElement, "Object ID", null, style);\r
+               setEntity(entity);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.element.ISelectable#setSelected(boolean)\r
+        */\r
+       @Override\r
+       public void setSelected(boolean selected) {\r
+               // this entity element is not likely to get selected\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.element.IEntityElement#getEntity()\r
+        */\r
+       @Override\r
+       public CdmBase getEntity() {\r
+               return entity;\r
+       }\r
+\r
+       \r
+       public void setEntity(CdmBase entity) {\r
+               \r
+               this.entity = entity;                   \r
+               \r
+               text_uuid.setText(entity != null ? entity.getUuid().toString() : "");   \r
+               text_objectId.setText(entity != null ? entity.getId()+"" : "");\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/CdmBaseSection.java
new file mode 100644 (file)
index 0000000..a030893
--- /dev/null
@@ -0,0 +1,47 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.supplemental;\r
+\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 24 Jan 2012\r
+ *\r
+ */\r
+public class CdmBaseSection extends AbstractFormSection<CdmBase> {\r
+       \r
+       private CdmBaseElement cdmBaseElement;\r
+\r
+       /**\r
+        * @param formFactory\r
+        * @param parentElement\r
+        * @param selectionProvider\r
+        * @param style\r
+        */\r
+       public CdmBaseSection(CdmFormFactory formFactory,\r
+                       ICdmFormElement parentElement,\r
+                       int style) {\r
+\r
+               super(formFactory, parentElement, style);\r
+               cdmBaseElement = formFactory.createCdmBaseElement(this, null, style);\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void setEntity(CdmBase entity) {\r
+               super.setEntity(entity);\r
+               cdmBaseElement.setEntity(entity);\r
+       }\r
+\r
+}\r
index cd949ca28f2ee73f151ebc3b9ee0e5cc36ce35c3..28ad8a039b0e2eedd6dc5cec3c3dfc5784b95491 100644 (file)
@@ -5,14 +5,14 @@ package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
 import org.eclipse.swt.events.SelectionListener;
 
+import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.Credit;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -25,7 +25,7 @@ import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
  */
 public class CreditElement extends AbstractEntityCollectionElement<Credit> {
 
-       private AgentSelectionElement agentSelection;
+       private EntitySelectionElement<AgentBase> agentSelection;
        private TextWithLabelElement text;
 
        /**
@@ -34,12 +34,12 @@ public class CreditElement extends AbstractEntityCollectionElement<Credit> {
         * </p>
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param style
         *            a int.
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param credit
         *            a {@link eu.etaxonomy.cdm.model.common.Credit} object.
@@ -62,10 +62,10 @@ public class CreditElement extends AbstractEntityCollectionElement<Credit> {
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               agentSelection = (AgentSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.AGENT,
+               agentSelection = formFactory
+                               .createSelectionElement(AgentBase.class,
                                                getConversationHolder(), this, "Agent", null,
-                                               AgentSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.ALL, style);
                text = formFactory.createMultilineTextWithLabel(this, "Text", 100,
                                style);
        }
index ba5b8495806971b332a528ada8a5a2ad72540793..87738015ca12f384bc271a704d290a61ec6292a7 100644 (file)
@@ -9,8 +9,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Credit;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -25,9 +25,9 @@ public class CreditSection extends AbstractEntityCollectionSection<IdentifiableE
        /**
         * <p>Constructor for CreditSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public CreditSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index c62db242ac007488156821d2e250ead1f650cfed..184aa6f75608348291bda195c8f48be3d3f7959d 100644 (file)
@@ -8,13 +8,13 @@ import org.eclipse.swt.events.SelectionListener;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.Extension;
 import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.ExtensionTypeComboElement;
 
 /**
  * <p>ExtensionElement class.</p>
@@ -25,17 +25,17 @@ import eu.etaxonomy.taxeditor.ui.term.ExtensionTypeComboElement;
  */
 public class ExtensionElement extends AbstractEntityCollectionElement<Extension> {
 
-       private ExtensionTypeComboElement combo_extensionType;
+       private TermComboElement<ExtensionType> combo_extensionType;
        private TextWithLabelElement text_extensionValue;
        
        /**
         * <p>Constructor for ExtensionElement.</p>
         *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.common.Extension} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public ExtensionElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Extension element,
                        SelectionListener removeListener, int style) {
@@ -48,9 +48,9 @@ public class ExtensionElement extends AbstractEntityCollectionElement<Extension>
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               combo_extensionType = (ExtensionTypeComboElement) formFactory.createTermComboElement(TermComboType.EXTENSIONTYPE, this, null, null, style);
+               combo_extensionType = formFactory.createTermComboElement(ExtensionType.class, this, null, null, style);
                text_extensionValue = formFactory.createTextWithLabelElement(element, null, null, style);
-               text_extensionValue.getLayoutComposite().setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               text_extensionValue.getLayoutComposite().setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
        }
 
        /* (non-Javadoc)
index 3178e86bdb652fd163c4efc73e517deeb7e00e81..92712b3d8ad81becaab073a90688d79c0b3e23f7 100644 (file)
@@ -9,8 +9,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Extension;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -24,9 +24,9 @@ public class ExtensionSection extends AbstractEntityCollectionSection<Identifiab
        /**
         * <p>Constructor for ExtensionSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public ExtensionSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 8c5f93b24d713c2d1c07fe9cb2ab01bdf0e579d5..22c5ce664e5698596803359ef15f8e42e3677e51 100644 (file)
@@ -7,9 +7,9 @@ package eu.etaxonomy.taxeditor.ui.section.supplemental;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>HeadlineSection class.</p>
@@ -22,13 +22,13 @@ public class HeadlineSection extends AbstractFormSection<ICdmBase> {
        /**
         * <p>Constructor for HeadlineSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public HeadlineSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement,
                        int style) {
-               super(cdmFormFactory, null, parentElement, style);
+               super(cdmFormFactory, parentElement, style);
        }
        
        /** {@inheritDoc} */
@@ -36,6 +36,7 @@ public class HeadlineSection extends AbstractFormSection<ICdmBase> {
        public void setEntity(ICdmBase cdmBase) {
                ICdmBase entity = (ICdmBase) HibernateProxyHelper.deproxy(cdmBase);
                super.setEntity(entity);
+
                setText(entity.getClass().getSimpleName() + (entity instanceof IdentifiableEntity ? ": " + ((IdentifiableEntity) entity).getTitleCache() : ""));
                layout();
        }
index 08506012ba02446f130db199e18328711787bcf3..f21ad121d5e8f125f47d6d7d8d18c55b11eacc51 100644 (file)
@@ -6,9 +6,9 @@ package eu.etaxonomy.taxeditor.ui.section.supplemental;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>IdentifiableSourceElement class.</p>
@@ -22,11 +22,11 @@ public class IdentifiableSourceElement extends AbstractOriginalSourceElement<Ide
        /**
         * <p>Constructor for IdentifiableSourceElement.</p>
         *
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         * @param element a {@link eu.etaxonomy.cdm.model.common.IdentifiableSource} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         */
        public IdentifiableSourceElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, IdentifiableSource element,
                        SelectionListener removeListener, int style) {
index 7c70ac19a28c0d089de70855ae71b1a60e2ceec2..62b04b7e8f7eca49dad51a5494faba106f7c33da 100644 (file)
@@ -7,13 +7,12 @@ import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
 
 /**
  * <p>MarkerElement class.</p>
@@ -30,15 +29,15 @@ public class MarkerElement extends AbstractEntityCollectionElement<Marker>{
         * @param element a {@link eu.etaxonomy.cdm.model.common.Marker} object.
         * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         */
        public MarkerElement(CdmFormFactory cdmFormFactory, AbstractFormSection formElement, Marker element,
                        SelectionListener removeListener, int style) {
                super(cdmFormFactory, formElement, element, removeListener, null, style);
        }
        
-       private AbstractTermComboElement<MarkerType> combo_markerType;
+       private TermComboElement<MarkerType> combo_markerType;
        private CheckboxElement checkbox_markerState;
 
 
@@ -49,7 +48,7 @@ public class MarkerElement extends AbstractEntityCollectionElement<Marker>{
        @Override
        public void createControls(ICdmFormElement element, int style) {
                checkbox_markerState = formFactory.createCheckbox(this, null, false, style);
-               combo_markerType = formFactory.createTermComboElement(TermComboType.MARKERTYPE, this, null, null, style);
+               combo_markerType = formFactory.createTermComboElement(MarkerType.class, this, null, null, style);
        }
 
        /* (non-Javadoc)
index ef1739018247ae863528d509ea00e2e0b92ee56d..3906eb36896989c3e65bdeb5ffe8d586fdb8dee5 100644 (file)
@@ -9,8 +9,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
 import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -24,9 +24,9 @@ public class MarkerSection extends AbstractEntityCollectionSection<AnnotatableEn
        /**
         * <p>Constructor for MarkerSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public MarkerSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 6570a1360da8296bf902466df3a91f7da48bbae6..376afb8ec480326363efd3e1e7a9cf01ae5adf22 100644 (file)
@@ -8,16 +8,13 @@ import org.eclipse.swt.events.SelectionListener;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.media.Rights;
 import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
-import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -30,13 +27,17 @@ import eu.etaxonomy.taxeditor.ui.term.AbstractTermComboElement;
  */
 public class RightsElement extends AbstractEntityCollectionElement<Rights> {
 
+       private TermComboElement<RightsTerm> combo_rightsType;
+       private EntitySelectionElement<AgentBase> selection_agent;
+       private TextWithLabelElement text;
+       
        /**
         * <p>
         * Constructor for RightsElement.
         * </p>
         * 
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param element
         *            a {@link eu.etaxonomy.cdm.model.media.Rights} object.
@@ -45,7 +46,7 @@ public class RightsElement extends AbstractEntityCollectionElement<Rights> {
         * @param style
         *            a int.
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         */
        public RightsElement(CdmFormFactory cdmFormFactory,
@@ -54,9 +55,6 @@ public class RightsElement extends AbstractEntityCollectionElement<Rights> {
                super(cdmFormFactory, formElement, element, removeListener, null, style);
        }
 
-       private AbstractTermComboElement<RightsTerm> combo_rightsType;
-       private AbstractSelectionElement<AgentBase> selection_agent;
-       private TextWithLabelElement text;
 
        /*
         * (non-Javadoc)
@@ -69,10 +67,10 @@ public class RightsElement extends AbstractEntityCollectionElement<Rights> {
        @Override
        public void createControls(ICdmFormElement element, int style) {
                combo_rightsType = formFactory.createTermComboElement(
-                               TermComboType.RIGHTSTYPE, this, "Rights Type", null, style);
+                               RightsTerm.class, this, "Rights Type", null, style);
                selection_agent = formFactory.createSelectionElement(
-                               SelectionType.AGENT, getConversationHolder(), this, "Agent",
-                               null, AgentSelectionElement.DEFAULT, style);
+                               AgentBase.class, getConversationHolder(), this, "Agent",
+                               null, EntitySelectionElement.ALL, style);
                text = formFactory.createMultilineTextWithLabel(this, "Text", 100,
                                style);
        }
index f798065883ce57a2966d5c71205a980985723846..02d1b4eba00c7d75c31c947d7f93fb369624f6ba 100644 (file)
@@ -8,8 +8,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -23,9 +23,9 @@ public class RightsSection extends AbstractEntityCollectionSection<IdentifiableE
        /**
         * <p>Constructor for RightsSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public RightsSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index aa3393d621a33f6398234668e459f4346ebc3e0f..a176ae026cebd6531277cc66fd3f899d5ffce591 100644 (file)
@@ -8,8 +8,8 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
@@ -24,9 +24,9 @@ public class SourceSection extends AbstractEntityCollectionSection<IIdentifiable
        /**
         * <p>Constructor for SourceSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
        public SourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
index 773f39980eed799074611b6561a6a9680b51818c..353a1dae300a6190e657c48567561b5244159ab1 100644 (file)
@@ -17,11 +17,12 @@ import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 
 /**
  * <p>VersionElement class.</p>
@@ -35,35 +36,28 @@ public class VersionElement extends AbstractCdmFormElement implements IEntityEle
        private Label label_created;
        private Label label_updated;
        
-       private TextWithLabelElement text_uuid;
-       private TextWithLabelElement text_objectId;
+       
        private VersionableEntity entity;
-       private boolean showDebug;
        
        /**
         * <p>Constructor for VersionElement.</p>
         *
         * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param entity a {@link eu.etaxonomy.cdm.model.common.VersionableEntity} object.
         */
-       public VersionElement(CdmFormFactory toolkit, ICdmFormElement parentElement, VersionableEntity entity, int style) {
-               super(toolkit, parentElement);
-               
-               showDebug = PreferencesUtil.getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DEBUG_INFORMATION);
-                               
-               label_created = toolkit.createLabel(getLayoutComposite(), null);
-               label_created.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+       public VersionElement(CdmFormFactory formFactory, ICdmFormElement parentElement, VersionableEntity entity, int style) {
+               super(formFactory, parentElement);
+                       
+               label_created = formFactory.createLabel(getLayoutComposite(), null, style);
+               label_created.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
 
-               label_updated = toolkit.createLabel(getLayoutComposite(), null);
-               label_updated.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               label_updated = formFactory.createLabel(getLayoutComposite(), null, style);
+               label_updated.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                
-               if(showDebug){
-                       text_uuid = toolkit.createTextWithLabelElement(parentElement, "UUID", null, style);
-                       
-                       text_objectId = toolkit.createTextWithLabelElement(parentElement, "Object ID", null, style);
-               }
+               
+               setEntity(entity);
        }
        
        /**
@@ -75,24 +69,20 @@ public class VersionElement extends AbstractCdmFormElement implements IEntityEle
 
                this.entity = entity;
                
-               String createdString = "Created "
-                               + dateFormat(entity.getCreated())
-                               + " by " + userFormat(entity.getCreatedBy());                   
-               label_created.setText(createdString);
-
-               String updatedString = "Updated "
-                               + dateFormat(entity.getUpdated())
-                               + " by " + userFormat(entity.getUpdatedBy());
-               label_updated.setText(updatedString);
-               
-               
+               String createdString = "";
+               String updatedString = "";
                
-               if(showDebug){
-                       text_uuid.setText(entity.getUuid().toString());
-                       
-                       text_objectId.setText(entity.getId()+"");
+               if(entity != null){
+                       createdString = "Created "
+                                       + dateFormat(entity.getCreated())
+                                       + " by " + userFormat(entity.getCreatedBy());                   
+                       updatedString = "Updated "
+                                       + dateFormat(entity.getUpdated())
+                                       + " by " + userFormat(entity.getUpdatedBy());
                }
                
+               label_created.setText(createdString);
+               label_updated.setText(updatedString);
        }
        
        private String dateFormat(DateTime dateTime){
index 58cbef452db2f80746736097bd3f2f730678413c..6e51fbe79913046ba7e281d09de1d52976c42fa7 100644 (file)
 
 package eu.etaxonomy.taxeditor.ui.section.supplemental;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>VersionSection class.</p>
@@ -26,19 +24,19 @@ import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
  */
 public class VersionSection extends AbstractFormSection<VersionableEntity>{
 
-       private static final Logger logger = Logger.getLogger(VersionSection.class);
        private VersionElement versionElement;
        
+       
        /**
         * <p>Constructor for VersionSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
         */
        public VersionSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement,
                        int style) {
-               super(cdmFormFactory, null, parentElement, style);
+               super(cdmFormFactory, parentElement, style);
                versionElement = cdmFormFactory.createVersionElement(this, null, style);
        }
        
index e82ff7b62617924d911a1fd79f3a4c075b32ca01..ae5aa351493c99fcf0ec47cebe4ecf74280d7079 100644 (file)
@@ -19,9 +19,9 @@ import org.eclipse.swt.widgets.Label;
 
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>ParsingMessageElement class.</p>
@@ -39,8 +39,8 @@ public class ParsingMessageElement extends AbstractCdmFormElement {
        /**
         * <p>Constructor for ParsingMessageElement.</p>
         *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param parserProblem a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem} object.
         * @param style a int.
         */
index e2b13db95918a5402f211dc80fe40ab5b53d421d..af0d316cf39b659ef73810b7035e3d73ef52d129 100644 (file)
@@ -19,9 +19,9 @@ import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -43,9 +43,9 @@ public class ParsingMessagesSection extends AbstractCdmDetailSection<NonViralNam
        /**
         * <p>Constructor for ParsingMessagesSection.</p>
         *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         * @param style a int.
         */
index 6e4db38f83f4aaec41dd400bda5346e9343b33d0..ad76f3bf5c9cd2b605cc2725c3647eb8f2239c47 100644 (file)
@@ -15,16 +15,15 @@ import java.util.Arrays;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 
+import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * <p>
@@ -41,7 +40,7 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
 
        private CheckboxElement checkbox_useNameCache;
 
-       private ReferenceSelectionElement selection_secundum;
+       private EntitySelectionElement<Reference> selection_secundum;
 
        private TextWithLabelElement text_appendedPhrase;
 
@@ -55,10 +54,10 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
         * </p>
         * 
         * @param cdmFormFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param style
         *            a int.
@@ -76,10 +75,10 @@ public class TaxonBaseDetailElement extends AbstractIdentifiableEntityDetailElem
                                "Title Cache", entity.getTitleCache(),
                                entity.isProtectedTitleCache(), style);
 
-               selection_secundum = (ReferenceSelectionElement) formFactory
-               .createSelectionElement(SelectionType.REFERENCE,
+               selection_secundum = formFactory
+               .createSelectionElement(Reference.class,
                                getConversationHolder(), formElement, "Secundum",
-                               entity.getSec(), ReferenceSelectionElement.DEFAULT,
+                               entity.getSec(), EntitySelectionElement.ALL,
                                style);
                
                text_appendedPhrase = formFactory.createTextWithLabelElement(
index 7be6719f1aea725afca7cc5b2686c31c146742b2..8ba2e34493164cfece42ac545f70b434259a599c 100644 (file)
@@ -15,9 +15,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 
@@ -35,9 +35,9 @@ public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase>
        /**
         * <p>Constructor for TaxonBaseDetailSection.</p>
         *
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
         * @param style a int.
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
         * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
         */
index e15057367fb1ed84e68d5e7096ac429dffcaa062..b28944f2a4d22b80d7559f0b62fcc7cfeca79e96 100644 (file)
@@ -13,12 +13,11 @@ package eu.etaxonomy.taxeditor.ui.section.taxon;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -27,7 +26,7 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonSelectionElement;
  */
 public class TaxonDetailElement extends AbstractEntityCollectionElement<Taxon> {
 
-       private TaxonSelectionElement selection_taxon;
+       private EntitySelectionElement<Taxon> selection_taxon;
 
        /**
         * @param formFactory
@@ -63,10 +62,10 @@ public class TaxonDetailElement extends AbstractEntityCollectionElement<Taxon> {
         */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_taxon = (TaxonSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.TAXON,
+               selection_taxon = formFactory
+                               .createSelectionElement(Taxon.class,
                                                getConversationHolder(), element, "Taxon", null,
-                                               TaxonSelectionElement.NOTHING, style);
+                                               EntitySelectionElement.NOTHING, style);
        }
 
        /*
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java
new file mode 100644 (file)
index 0000000..7b04da4
--- /dev/null
@@ -0,0 +1,81 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.section.taxon;
+
+import org.eclipse.ui.IEditorInput;
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<TaxonRelationship> {
+
+       private TermComboElement<TaxonRelationshipTypeInverseContainer> combo_taxonRelationshipType;
+       
+       private EntitySelectionElement<Taxon> selection_relatedTaxon;
+       
+       public TaxonRelationshipDetailElement(CdmFormFactory formFactory,
+                       ICdmFormElement formElement) {
+               super(formFactory, formElement);
+       }
+
+       @Override
+       protected void createControls(ICdmFormElement formElement,
+                       TaxonRelationship entity, int style) {
+               combo_taxonRelationshipType = formFactory.createTermComboElement(
+                               TaxonRelationshipTypeInverseContainer.class, 
+                               formElement, "Relationship Type", 
+                               getTaxonRelationshipTypeInverseContainer(), style);
+               combo_taxonRelationshipType.setEnabled(false);
+               selection_relatedTaxon = formFactory.createSelectionElement(
+                               Taxon.class, getConversationHolder(), 
+                               formElement, "Related Taxon", getRelatedTaxon(), 
+                               EntitySelectionElement.SELECTABLE, style);
+       }
+       
+       private Taxon getRelatedTaxon() {
+               return TaxonRelationshipTypeInverseContainer.RelatedTaxon(getSourceTaxon(), getEntity());
+       }
+
+       private TaxonRelationshipTypeInverseContainer getTaxonRelationshipTypeInverseContainer(){
+               return TaxonRelationshipTypeInverseContainer.CreateFromSource(getSourceTaxon(), getEntity());
+       }
+       
+       private Taxon getSourceTaxon(){
+               IEditorInput editorInput = StoreUtil.getActiveEditorInput();
+               return (Taxon) editorInput.getAdapter(Taxon.class);
+       }
+
+       @Override
+       public void handleEvent(Object eventSource) {
+               if (eventSource == selection_relatedTaxon){
+                       boolean inverse = getTaxonRelationshipTypeInverseContainer().isInverse();
+                       Taxon relatedTaxon = selection_relatedTaxon.getEntity();
+                       if(inverse){
+                               getEntity().setFromTaxon(relatedTaxon);
+                       }else{
+                               getEntity().setToTaxon(relatedTaxon);
+                       }
+               }
+               firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailSection.java
new file mode 100644 (file)
index 0000000..262a9eb
--- /dev/null
@@ -0,0 +1,44 @@
+// $Id$
+/**
+* Copyright (C) 2009 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.ui.section.taxon;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author n.hoffmann
+ * @date Dec 1, 2011
+ *
+ */
+public class TaxonRelationshipDetailSection extends AbstractCdmDetailSection<TaxonRelationship>{
+
+       public TaxonRelationshipDetailSection(CdmFormFactory formFactory,
+                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       ISelectionProvider selectionProvider, int style) {
+               super(formFactory, conversation, parentElement, selectionProvider, style);
+       }
+
+       @Override
+       protected DetailType getDetailType() {
+               return DetailType.TAXON_RELATIONSHIP;
+       }
+
+       @Override
+       public String getHeading() {
+               return "Taxon Relationship";
+       }
+
+}
index e1ac1c32f3021220c84624e691896148b54bbf9d..061fb8afa46282bba8ab8872cdd0e5969711650d 100644 (file)
@@ -3,12 +3,11 @@ package eu.etaxonomy.taxeditor.ui.section.user;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.GroupSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * 
@@ -19,7 +18,7 @@ import eu.etaxonomy.taxeditor.ui.selection.GroupSelectionElement;
 public class GroupsByUserDetailElement extends
                AbstractEntityCollectionElement<Group> {
 
-       private GroupSelectionElement selection_group;
+       private EntitySelectionElement<Group> selection_group;
 
        /**
         * @param formFactory
@@ -55,10 +54,10 @@ public class GroupsByUserDetailElement extends
         */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_group = (GroupSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.GROUP,
+               selection_group = formFactory
+                               .createSelectionElement(Group.class,
                                                getConversationHolder(), element, "Group", getEntity(),
-                                               GroupSelectionElement.DEFAULT, style);
+                                               EntitySelectionElement.NOTHING, style);
        }
 
        /*
index c891c639dec2ddf01b39b6738b29315858cbabf4..75f83615adc1b7ccf7d2f26f9589c856d4b34484 100644 (file)
@@ -8,9 +8,9 @@ import java.util.Collection;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.GroupSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.GroupSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
index 10d3edf92a5355651505f27330335b7a13467852..ad14db124aaa8cbd95178152583c78e3c9411297 100644 (file)
@@ -3,18 +3,15 @@
  */
 package eu.etaxonomy.taxeditor.ui.section.user;
 
-import eu.etaxonomy.cdm.api.service.IUserService;
+import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.password.EditPasswordElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
  * @author n.hoffmann
@@ -23,9 +20,8 @@ import eu.etaxonomy.taxeditor.ui.selection.PersonSelectionElement;
 public class UserDetailElement extends AbstractCdmDetailElement<User> {
 
        private TextWithLabelElement text_username;
-       private EditPasswordElement element_editPassword;
        private TextWithLabelElement text_emailAdress;
-       private PersonSelectionElement selection_person;
+       private EntitySelectionElement<Person> selection_person;
        private CheckboxElement checkbox_credentialsNonExpired;
        private CheckboxElement checkbox_enabled;
        private CheckboxElement checkbox_accountNonLocked;
@@ -50,7 +46,7 @@ public class UserDetailElement extends AbstractCdmDetailElement<User> {
                                "Username", entity.getUsername(), style);
 
                if (userIsAuthenticated() || CdmStore.getLoginManager().isAdmin()) {
-                       element_editPassword = formFactory.createEditPasswordElement(
+                       formFactory.createEditPasswordElement(
                                        formElement, "Change Password", getConversationHolder(),
                                        entity, style);
                }
@@ -58,10 +54,13 @@ public class UserDetailElement extends AbstractCdmDetailElement<User> {
                text_emailAdress = formFactory.createTextWithLabelElement(formElement,
                                "Email Adress", entity.getEmailAddress(), style);
 
-               selection_person = (PersonSelectionElement) formFactory
-                               .createSelectionElement(SelectionType.PERSON,
-                                               getConversationHolder(), formElement, "Person",
-                                               entity.getPerson(), PersonSelectionElement.DEFAULT,
+               selection_person = formFactory
+                               .createSelectionElement(Person.class,
+                                               getConversationHolder(), 
+                                               formElement, 
+                                               "Person",
+                                               entity.getPerson(), 
+                                               EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE,
                                                style);
 
                checkbox_accountNonExpired = formFactory.createCheckbox(formElement,
index c72b39224f1ae32359c26cf815c2763f22a426e6..e1010d885b8509bfd72987cba837cb213eaa92ef 100644 (file)
@@ -10,9 +10,9 @@ import org.eclipse.jface.viewers.ISelectionProvider;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
 
 /**
index 08f561ce805d7b4cdd7515dfa0d99b24326b943f..3c82fbe956124e1db7840248c3ad18f0e3f71a6a 100644 (file)
@@ -7,10 +7,10 @@ import org.eclipse.swt.SWT;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -29,7 +29,7 @@ public class UserDetailWizardPage extends AbstractCdmEntityWizardPage<User> {
         * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement)
         */
        @Override
-       public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+       public AbstractCdmDetailElement<User> createElement(ICdmFormElement rootElement) {
                UserDetailElement userElement = (UserDetailElement) formFactory.createCdmDetailElement(DetailType.USER, rootElement, SWT.NULL);
                userElement.setEntity(getEntity());
                return userElement;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailElement.java
new file mode 100644 (file)
index 0000000..32d0281
--- /dev/null
@@ -0,0 +1,613 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.ui.section.userecords;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+import java.util.ListIterator;\r
+import java.util.Map;\r
+import java.util.Set;\r
+import org.apache.log4j.Logger;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.LanguageString;\r
+import eu.etaxonomy.cdm.model.common.Marker;\r
+import eu.etaxonomy.cdm.model.description.CategoricalData;\r
+import eu.etaxonomy.cdm.model.description.Modifier;\r
+import eu.etaxonomy.cdm.model.description.State;\r
+import eu.etaxonomy.cdm.model.description.StateData;\r
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.store.TermStore;\r
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;\r
+\r
\r
+/**\r
+ * The context manager mediates context start/stop and workbench shutdowns to all registered listeners.\r
+ *\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseRecordDetailElement extends\r
+               AbstractCdmDetailElement<CategoricalData> implements SelectionListener {\r
+\r
+       private static final Logger logger = Logger\r
+                       .getLogger(UseRecordDetailElement.class);\r
+\r
+       private TermComboElement<State> combo_UseCategory;\r
+       private TermComboElement<State> combo_UseSubCategory;\r
+       private TermComboElement<Modifier> combo_PlantPart;\r
+       private TermComboElement<Modifier> combo_Country;\r
+       private TermComboElement<Modifier> combo_HumanGroup;\r
+       private TermComboElement<Modifier> combo_EthnicGroup;\r
+\r
+       public UseRecordDetailElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement) {\r
+               super(formFactory, formElement);\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected void createControls(ICdmFormElement formElement,\r
+                       CategoricalData entity, int style) {\r
+\r
+               combo_UseCategory = formFactory.createTermComboElement(State.class,     this, UsageTermCollection.useCategoryVocabularyLabel, null, style);\r
+               combo_UseCategory.addSelectionListener(this);\r
+               combo_UseSubCategory = formFactory.createTermComboElement(State.class, this, UsageTermCollection.useSubCategoryVocabularyLabel, null, style);\r
+               combo_PlantPart = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.plantPartLabel, null, style);\r
+               combo_HumanGroup = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.humanGroupLabel, null, style);\r
+               combo_HumanGroup.addSelectionListener(this);\r
+               combo_EthnicGroup = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.ethnicGroupLabel, null, style);\r
+               combo_Country   = formFactory.createTermComboElement(Modifier.class, this, UsageTermCollection.countryLabel, null, style);\r
+               \r
+\r
+               List<State> termsUseCategory = setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false));\r
+               combo_UseCategory.setTerms(termsUseCategory);\r
+               combo_UseCategory.setSelection(stateSelection(UsageTermCollection.useCategoryVocabularyLabel));\r
+               \r
+               List<State> termsSubCategory = setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false), combo_UseCategory.getSelection());\r
+               \r
+               if (termsSubCategory != null) {\r
+                       combo_UseSubCategory.setTerms(termsSubCategory);\r
+                       combo_UseSubCategory.setSelection(stateSelection(UsageTermCollection.useSubCategoryVocabularyLabel));\r
+                       combo_UseSubCategory.setEnabled(true);\r
+               }\r
+               else {\r
+                       combo_UseSubCategory.setEnabled(false);\r
+               }\r
+               \r
+               List<Modifier> plantPartsToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.plantPartLabel);\r
+               combo_PlantPart.setTerms(plantPartsToAdd);\r
+               combo_PlantPart.setSelection(modifierSelection(UsageTermCollection.plantPartLabel));\r
+               \r
+               List<Modifier> countriesToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.countryLabel);\r
+               combo_Country.setTerms(countriesToAdd);\r
+               combo_Country.setSelection(modifierSelection(UsageTermCollection.countryLabel));\r
+               \r
+               List<Modifier> humanGroupToAdd = setModifierComboTerms(TermStore.getTerms(Modifier.class, null, false), UsageTermCollection.humanGroupLabel);\r
+               combo_HumanGroup.setTerms(humanGroupToAdd);\r
+               combo_HumanGroup.setSelection(modifierSelection(UsageTermCollection.humanGroupLabel));\r
+               \r
+               List<Modifier> ethnicGroupToAdd = setEthnicGroupComboTerms(TermStore.getTerms(Modifier.class, null, false), combo_HumanGroup.getSelection());\r
+               if (ethnicGroupToAdd != null) {\r
+                       combo_EthnicGroup.setTerms(ethnicGroupToAdd);\r
+                       combo_EthnicGroup.setSelection(modifierSelection(UsageTermCollection.ethnicGroupLabel));\r
+                       combo_EthnicGroup.setEnabled(true);\r
+               } else {\r
+                       combo_EthnicGroup.setEnabled(false);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Returns the select modifier\r
+        * @param comboCategory\r
+        * @return\r
+        */\r
+       private Modifier modifierSelection(String comboCategory) {\r
+               if(!getEntity().getModifiers().isEmpty()) {\r
+                       for (Modifier modifier : getEntity().getModifiers()) {\r
+                               if(GetVocabularyType(modifier, comboCategory)) {\r
+                                       return modifier;\r
+                               }\r
+                       }\r
+               } else {\r
+                       return null;\r
+               }\r
+               return null;\r
+               \r
+       }\r
+       \r
+       /**\r
+        * Returns the selected state\r
+        * @param comboCategory\r
+        * @return\r
+        */\r
+       private State stateSelection(String comboCategory) {\r
+               if (!getEntity().getStates().isEmpty()) {\r
+                       for (StateData statedata : getEntity().getStates()) {\r
+                               if (statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {\r
+                                       String testString = statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText();\r
+                                       if(testString.equals(comboCategory)) {\r
+                                               if(statedata.getState() !=null) {\r
+                                                       return statedata.getState();\r
+                                               }\r
+                                       }\r
+                               }                               \r
+                       }\r
+               }\r
+               else {\r
+                       return null;\r
+               }\r
+               return null;\r
+               \r
+       }\r
+       \r
+       /**\r
+        * This function sets the combo terms (Besides EthnicGroup\r
+        * @param listOfTerms\r
+        * @param modType\r
+        * @return\r
+        */\r
+       private List<Modifier> setModifierComboTerms(List<Modifier> listOfTerms, String modType) {\r
+               List<Modifier> termsToAdd = new ArrayList<Modifier>();\r
+               for (Modifier term : listOfTerms) {\r
+\r
+                       if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(modType))) {\r
+                               termsToAdd.add(term);\r
+                       }\r
+                       else if ((term.getVocabulary() != null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(modType))) {\r
+                               termsToAdd.add(term);\r
+                       }\r
+               }\r
+               \r
+               return termsToAdd;\r
+       }\r
+       \r
+\r
+       /**\r
+        * This function sets the Use Category combo term\r
+        * @param listOfTerms\r
+        * @return\r
+        */\r
+       private List<State> setUseCategoryComboTerms(List<State> listOfTerms) {\r
+               List<State> termsToAdd = new ArrayList<State>();\r
+               for (State term : listOfTerms) {\r
+\r
+                       if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+                               termsToAdd.add(term);\r
+                       }\r
+                       else if ((term.getVocabulary() !=null) && (term.getPartOf() == null) && (term.getVocabulary().getTitleCache().equals(UsageTermCollection.useCategoryVocabularyLabel))) {\r
+                               termsToAdd.add(term);\r
+                       }\r
+               }\r
+               return termsToAdd;\r
+\r
+       }\r
+\r
+       /**\r
+        * This function sets the Use SubCategory combo term\r
+        * @param listOfTerms\r
+        * @param selectedUseCategory\r
+        * @return\r
+        */\r
+       private List<State> setUseCategoryComboTerms(List<State> listOfTerms,\r
+                       State selectedUseCategory) {\r
+               List<State> termsToAdd = new ArrayList<State>();\r
+               if (combo_UseCategory.getSelection() != null) {\r
+                       \r
+                       for (State term : listOfTerms) {\r
+                               if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(selectedUseCategory.getTitleCache()))) {\r
+                                       termsToAdd.add(term);\r
+                               }\r
+                               else if ((term.getVocabulary() !=null) && (term.getVocabulary().getTitleCache().equals(selectedUseCategory.getTitleCache()))) {\r
+                                       termsToAdd.add(term);\r
+                               }\r
+       \r
+                       }\r
+               }\r
+               else if (!getEntity().getStates().isEmpty()) {\r
+                       for (StateData stateData : getEntity().getStates()) {\r
+                               if (stateData.getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {\r
+                                       if ((stateData.getState() != null) && (stateData.getModifyingText().get(CdmStore.getDefaultLanguage()).getText() == UsageTermCollection.useCategoryVocabularyLabel)) {\r
+                                               for (State term : listOfTerms) {\r
+                                                       if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(stateData.getState().getTitleCache()))) {\r
+                                                               termsToAdd.add(term);\r
+                                                       } else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(stateData.getState().getTitleCache()))) {\r
+                                                               termsToAdd.add(term);\r
+                                                       }\r
+                                               }\r
+                                               \r
+                                       }\r
+                               }\r
+                       }\r
+                       \r
+               }\r
+                       \r
+               else {\r
+                       return null;\r
+               }\r
+\r
+               return termsToAdd;\r
+       }\r
+       \r
+       \r
+       /**\r
+        * This function sets the EthnicGroup combo term\r
+        * @param listOfTerms\r
+        * @param selectedHumangroup\r
+        * @return\r
+        */\r
+       private List<Modifier> setEthnicGroupComboTerms(List<Modifier> listOfTerms,\r
+                       Modifier selectedHumangroup) {\r
+               List<Modifier> termsToAdd = new ArrayList<Modifier>();\r
+               if (combo_HumanGroup.getSelection() != null) {\r
+                       for (Modifier term : listOfTerms) {\r
+       \r
+                               if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(selectedHumangroup.getTitleCache()))) {\r
+                                       termsToAdd.add(term);\r
+                               }\r
+                               else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(selectedHumangroup.getTitleCache()))) {\r
+                                       termsToAdd.add(term);\r
+                               }\r
+                       }\r
+               }\r
+               else if (!getEntity().getModifiers().isEmpty()) {\r
+                       for (Modifier modifier : getEntity().getModifiers()) {\r
+                               if (modifier.getMarkers() != null) {\r
+                                       for (Marker marker : modifier.getMarkers()) {\r
+                                               if(marker.getMarkerType().getTitleCache().equals(UsageTermCollection.humanGroupLabel)) {\r
+                                                       for (Modifier term : listOfTerms) {\r
+                                                               if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(modifier.getTitleCache()))) {\r
+                                                                       termsToAdd.add(modifier);\r
+                                                               } else if ((term.getVocabulary() != null) && (term.getVocabulary().getTitleCache().equals(modifier.getTitleCache()))) {\r
+                                                                       termsToAdd.add(modifier);\r
+                                                               }\r
+                                                       }\r
+                                                       \r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               } else {\r
+                       return null;\r
+               }\r
+               \r
+               return termsToAdd;\r
+       }\r
+\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void handleEvent(Object eventSource) {\r
+               if (eventSource == combo_UseCategory) {\r
+                       if (combo_UseCategory.getSelection() != null) {\r
+                               boolean isChanged = false;\r
+                               boolean isUseCategoryChanged = false;\r
+                               if (!getEntity().getStates().isEmpty()) {\r
+                                       for (StateData useCategoryStateDataCheck : getEntity().getStates()) {\r
+                                               Map<Language, LanguageString> modText = useCategoryStateDataCheck.getModifyingText();\r
+                                               if(modText.get(CdmStore.getDefaultLanguage()) != null && modText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+                                                       if(!useCategoryStateDataCheck.getState().getTitleCache().equals(combo_UseCategory.getSelection().getTitleCache())) {\r
+                                                               isUseCategoryChanged = true;\r
+                                                       }\r
+                                                       \r
+                                               }\r
+                                       }\r
+                                       ListIterator<StateData> itrExistingStates = getEntity().getStates().listIterator();\r
+                                       while(itrExistingStates.hasNext()) {\r
+                                               StateData existingStateData = itrExistingStates.next();\r
+                                               Map<Language, LanguageString> modifyingText = existingStateData\r
+                                                               .getModifyingText();\r
+                                               if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+                                                       if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
+                                                               isChanged = true;\r
+                                                               if(!existingStateData.getState().getTitleCache().equals(combo_UseCategory.getSelection().getTitleCache())) {\r
+                                                                       itrExistingStates.remove();\r
+                                                                       StateData stateData = StateData.NewInstance(combo_UseCategory.getSelection());\r
+                                                                       stateData.setState(combo_UseCategory.getSelection());\r
+                                                                       stateData.putModifyingText(CdmStore.getDefaultLanguage(),UsageTermCollection.useCategoryVocabularyLabel);\r
+                                                                       itrExistingStates.add(stateData);\r
+                                                                       \r
+                                                               }\r
+                                                       } else if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel) && isUseCategoryChanged == true) {\r
+                                                               itrExistingStates.remove();\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                               \r
+                               \r
+                               if (isChanged == false) {\r
+                                       StateData stateData = StateData\r
+                                                       .NewInstance(combo_UseCategory.getSelection());\r
+                                       stateData.setState(combo_UseCategory.getSelection());\r
+                                       stateData.putModifyingText(CdmStore.getDefaultLanguage(), UsageTermCollection.useCategoryVocabularyLabel);\r
+                                       getEntity().addState(stateData);\r
+                               }\r
+                               \r
+                               combo_UseSubCategory.setEnabled(true);\r
+       \r
+                       }\r
+                       else {\r
+                               if (!getEntity().getStates().isEmpty()) {\r
+                                       Iterator<StateData> itr = getEntity().getStates().iterator();\r
+                                       while(itr.hasNext()) {\r
+                                               StateData stateToRemove = itr.next();\r
+                                               itr.remove();\r
+                                       }\r
+                                       List<State> termsSubCategory = new ArrayList<State>();\r
+                                       State emptyState = State.NewInstance();\r
+                                       termsSubCategory.add(emptyState);\r
+                                       combo_UseSubCategory.setTerms(termsSubCategory);\r
+                                       combo_UseSubCategory.setEnabled(false);\r
+                               }\r
+                       }\r
+               }\r
+                       \r
+               if (eventSource == combo_UseSubCategory) {\r
+                       if (combo_UseSubCategory.getSelection() != null) {\r
+                               boolean isChanged = false;\r
+                               if (!getEntity().getStates().isEmpty()) {\r
+                                       ListIterator<StateData> itrExistingStates = getEntity().getStates().listIterator();\r
+                                       while(itrExistingStates.hasNext()) {\r
+                                               StateData existingStateData = itrExistingStates.next();\r
+                                               Map<Language, LanguageString> modifyingText = existingStateData\r
+                                                               .getModifyingText();\r
+                                               if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+                                                       if (modifyingText.get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+                                                               isChanged = true;\r
+                                                               if(!existingStateData.getState().getTitleCache().equals(combo_UseSubCategory.getSelection().getTitleCache())) {\r
+                                                                       itrExistingStates.remove();\r
+                                                                       StateData stateData = StateData.NewInstance(combo_UseSubCategory.getSelection());\r
+                                                                       stateData.setState(combo_UseSubCategory.getSelection());\r
+                                                                       stateData.putModifyingText(CdmStore.getDefaultLanguage(),UsageTermCollection.useSubCategoryVocabularyLabel);\r
+                                                                       itrExistingStates.add(stateData);\r
+                                                               }\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                               \r
+                               if (isChanged == false){\r
+                                       StateData stateData = StateData\r
+                                                       .NewInstance(combo_UseSubCategory.getSelection());\r
+                                       stateData.setState(combo_UseSubCategory.getSelection());\r
+                                       stateData.putModifyingText(CdmStore.getDefaultLanguage(), UsageTermCollection.useSubCategoryVocabularyLabel);\r
+                                       getEntity().addState(stateData);\r
+                               }\r
+       \r
+                       } else {\r
+                               if (!getEntity().getStates().isEmpty()) {\r
+                                       Iterator<StateData> itrStateData = getEntity().getStates().iterator();\r
+                                       while(itrStateData.hasNext()) {\r
+                                               StateData existingStateData = itrStateData.next();\r
+                                               Map<Language, LanguageString> modifyingText = existingStateData\r
+                                                               .getModifyingText();\r
+\r
+                                               if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+                                                       if (modifyingText.get(CdmStore.getDefaultLanguage()).getText() == UsageTermCollection.useSubCategoryVocabularyLabel) {\r
+                                                               itrStateData.remove();\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               if (eventSource == combo_PlantPart) {\r
+                       if (combo_PlantPart.getSelection() != null) {\r
+                               Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+                               while (itrExistingModifiers.hasNext()) {\r
+                                       Modifier modifier = itrExistingModifiers.next();\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
+                                               itrExistingModifiers.remove();\r
+                                       }\r
+                                               \r
+                               }       \r
+                               Modifier plantPart = combo_PlantPart.getSelection();\r
+                               getEntity().addModifier(plantPart);\r
+                       } else {\r
+                               Set<Modifier> modifiers = getEntity().getModifiers();\r
+                               if(!modifiers.isEmpty()) {\r
+                                       Iterator<Modifier> itr = modifiers.iterator();\r
+                                       while (itr.hasNext()) {\r
+                                               Modifier currentMod = itr.next();\r
+                                               if(GetVocabularyType(currentMod, UsageTermCollection.plantPartLabel)) {\r
+                                                       itr.remove();\r
+                                               }\r
+                                       }\r
+                               }\r
+                               \r
+                       }\r
+               }\r
+               if (eventSource == combo_Country) {\r
+                       if (combo_Country.getSelection() != null) {\r
+                               Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+                               while (itrExistingModifiers.hasNext()) {\r
+                                       Modifier modifier = itrExistingModifiers.next();\r
+                                       if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
+                                               itrExistingModifiers.remove();\r
+                                       }\r
+                                               \r
+                               }\r
+                               Modifier country = combo_Country.getSelection();\r
+                               getEntity().addModifier(country);\r
+                       } else {\r
+                               Set<Modifier> modifiers = getEntity().getModifiers();\r
+                               if(!modifiers.isEmpty()) {\r
+                                       Iterator<Modifier> itr = modifiers.iterator();\r
+                                       while (itr.hasNext()) {\r
+                                               Modifier currentMod = itr.next();\r
+                                               if(GetVocabularyType(currentMod, UsageTermCollection.countryLabel)) {\r
+                                                       itr.remove();\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               if (eventSource == combo_HumanGroup) {\r
+                       if (combo_HumanGroup.getSelection() != null) {\r
+                               boolean isHumanGroupChanged = true;\r
+                               for (Modifier modToCheck: getEntity().getModifiers()) {\r
+                                       if(modToCheck.equals(combo_HumanGroup.getSelection()) && (GetVocabularyType(modToCheck, UsageTermCollection.humanGroupLabel))) {\r
+                                               isHumanGroupChanged = false;\r
+                               }\r
+                               \r
+                                       \r
+                               }\r
+                               Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+                               while (itrExistingModifiers.hasNext()) {\r
+                                       Modifier modifier = itrExistingModifiers.next();\r
+                                       if((GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel) || GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) && isHumanGroupChanged) {\r
+                                               itrExistingModifiers.remove();\r
+                                       }\r
+                                               \r
+                               }       \r
+                               if(isHumanGroupChanged){\r
+                                       Modifier humanGroup = combo_HumanGroup.getSelection();\r
+                                       getEntity().addModifier(humanGroup);\r
+                               }\r
+                               combo_EthnicGroup.setEnabled(true);\r
+                       } else {\r
+                               Set<Modifier> modifiers = getEntity().getModifiers();\r
+                               if(!modifiers.isEmpty()) {\r
+                                       Iterator<Modifier> itr = modifiers.iterator();\r
+                                       while (itr.hasNext()) {\r
+                                               Modifier currentMod = itr.next();\r
+                                               if(GetVocabularyType(currentMod, UsageTermCollection.humanGroupLabel) || GetVocabularyType(currentMod, UsageTermCollection.ethnicGroupLabel)) {\r
+                                                       itr.remove();\r
+                                               }\r
+                                       }\r
+                               }\r
+                               List<Modifier> emptyListToResetComboBox = new ArrayList<Modifier>();\r
+                               Modifier emptyMod = Modifier.NewInstance();\r
+                               emptyListToResetComboBox.add(emptyMod);\r
+                               combo_EthnicGroup.setTerms(emptyListToResetComboBox);\r
+                               combo_EthnicGroup.setEnabled(false);\r
+                               \r
+                       }\r
+               }\r
+               if (eventSource == combo_EthnicGroup) {\r
+                       if (combo_EthnicGroup.getSelection() != null) {\r
+                               Iterator<Modifier> itrExistingModifiers = getEntity().getModifiers().iterator();\r
+                                       while (itrExistingModifiers.hasNext()) {\r
+                                               Modifier modifier = itrExistingModifiers.next();\r
+                                               if(GetVocabularyType(modifier, combo_HumanGroup.getSelection().getTitleCache())) {\r
+                                                       itrExistingModifiers.remove();\r
+                                               }\r
+                                               \r
+                                       }       \r
+                                       Modifier ethnicGroup = combo_EthnicGroup.getSelection();\r
+                                       getEntity().addModifier(ethnicGroup);\r
+                       } else {\r
+                               Set<Modifier> modifiers = getEntity().getModifiers();\r
+                               if(!modifiers.isEmpty()) {\r
+                                       \r
+                                       Iterator<Modifier> itr = modifiers.iterator();\r
+                                       while (itr.hasNext()) {\r
+                                               Modifier currentMod = itr.next();\r
+                                               if(GetVocabularyType(currentMod, UsageTermCollection.ethnicGroupLabel)) {\r
+                                                       itr.remove();\r
+                                               }\r
+                                       }\r
+                                       \r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       \r
+       \r
+\r
+       /**\r
+        * This function Checks the vocabulary type\r
+        * @param term\r
+        * @param vocabularyExpected\r
+        * @return\r
+        */\r
+       private boolean GetVocabularyType(Modifier term, String vocabularyExpected) {\r
+               if ((term.getPartOf() != null)  && (term.getPartOf().getTitleCache().equals(vocabularyExpected))) {\r
+                       return true;\r
+               }\r
+               else if ((term.getVocabulary() != null) && (term.getPartOf()==null) && (term.getVocabulary().getTitleCache().equals(vocabularyExpected))) {\r
+                       return true;\r
+               }\r
+               else if ((vocabularyExpected.equals(UsageTermCollection.ethnicGroupLabel))  && ((term.getPartOf() != null))) {\r
+                       return true;\r
+               }\r
+       return false;\r
+       }\r
+       \r
+       \r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void setEntity(CategoricalData entity) {\r
+               super.setEntity(entity);\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void widgetSelected(SelectionEvent e) {\r
+               Object eventSource = e.getSource();\r
+               for (Object object: combo_UseCategory.getControls()) {\r
+                       if (object == eventSource) {\r
+                               State selectedUseCategory = combo_UseCategory.getSelection();\r
+                               if (selectedUseCategory != null) {\r
+                                       combo_UseSubCategory.setTerms(setUseCategoryComboTerms(TermStore.getTerms(State.class, null, false),selectedUseCategory));\r
+                               \r
+                                       if (!getEntity().getStates().isEmpty()) {\r
+                                               Iterator<StateData> itrExistingState = getEntity().getStates().iterator();\r
+                                               while(itrExistingState.hasNext()) {\r
+                                                       StateData existingStateData = (StateData) itrExistingState.next();\r
+                                                       Map<Language, LanguageString> modifyingText = existingStateData.getModifyingText();\r
+                                                       if (modifyingText.get(CdmStore.getDefaultLanguage()) != null) {\r
+                                                               if (modifyingText.get(CdmStore.getDefaultLanguage())\r
+                                                                               .getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
+                                                                       combo_UseSubCategory.setSelection(stateSelection(UsageTermCollection.useSubCategoryVocabularyLabel));\r
+                                                               }\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               for (Object object: combo_HumanGroup.getControls()) {\r
+                       if (object == eventSource) {\r
+                               Modifier selectedHumanGroup = combo_HumanGroup.getSelection();\r
+                               if (selectedHumanGroup != null) {\r
+                                       combo_EthnicGroup.setTerms(setEthnicGroupComboTerms(TermStore.getTerms(Modifier.class, null, false), selectedHumanGroup));\r
+                                       if (!getEntity().getModifiers().isEmpty()) {\r
+                                               Iterator<Modifier> iterModifiers = getEntity().getModifiers().iterator();\r
+                                               while (iterModifiers.hasNext()) {\r
+                                                       Modifier existingModifier = iterModifiers.next();\r
+                                                       if(GetVocabularyType(existingModifier, UsageTermCollection.ethnicGroupLabel)) {\r
+                                                               combo_EthnicGroup.setSelection(modifierSelection(UsageTermCollection.ethnicGroupLabel));\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                                       \r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public void widgetDefaultSelected(SelectionEvent e) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/userecords/UseRecordDetailSection.java
new file mode 100644 (file)
index 0000000..9539289
--- /dev/null
@@ -0,0 +1,60 @@
+/**\r
+* Copyright (C) 2011 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
+package eu.etaxonomy.taxeditor.ui.section.userecords;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.description.DescriptionElementBase;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * UseRecordDetailSection Class\r
+ * @author a.theys     \r
+ * @created mar 13, 2012\r
+ * @version 1.0\r
+ */\r
+public class UseRecordDetailSection extends AbstractCdmDetailSection<DescriptionElementBase> {\r
+       \r
+       /**Constructor for class UseRecordDetailSection\r
+        * \r
+        * @param cdmFormFactory\r
+        * @param conversation\r
+        * @param parentElement\r
+        * @param selectionProvider\r
+        * @param style\r
+        */\r
+       public UseRecordDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,\r
+                       ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {\r
+               super(cdmFormFactory, conversation, parentElement, selectionProvider, style);\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected DetailType getDetailType() {\r
+               return DetailType.USE_RECORD;\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       public String getHeading() {\r
+               return "Use Record";\r
+       }\r
+       \r
+       /** {@inheritDoc} */\r
+       @Override\r
+       protected void setSectionTitle() {\r
+               this.setText(getHeading() + ": " + getEntity().getFeature().getLabel(CdmStore.getDefaultLanguage()));\r
+               setTextClient(createToolbar());\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java
new file mode 100644 (file)
index 0000000..2f90fbb
--- /dev/null
@@ -0,0 +1,89 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import eu.etaxonomy.cdm.model.common.Representation;\r
+import eu.etaxonomy.cdm.model.common.TermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester;\r
+import eu.etaxonomy.taxeditor.store.CdmStore;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;\r
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public abstract class AbstractTermBaseDetailElement<T extends TermBase> extends AbstractCdmDetailElement<T> {\r
+\r
+       protected TextWithLabelElement text_label;\r
+       protected TextWithLabelElement text_description;\r
+       protected UriWithLabelElement uri_uri;\r
+       protected TextWithLabelElement text_abbreviatedLabel;\r
+       \r
+       /**\r
+        * @param formFactory\r
+        * @param formElement\r
+        */\r
+       public AbstractTermBaseDetailElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement) {\r
+               super(formFactory, formElement);\r
+       }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)\r
+        */\r
+       @Override\r
+       protected void createControls(ICdmFormElement formElement,\r
+                       T entity, int style) {\r
+               Representation representation = getEntity().getRepresentation(CdmStore.getDefaultLanguage());\r
+               \r
+               if(representation == null){\r
+                       formFactory.createLabel(formElement, "No represantation for the current default Language");\r
+                       return;\r
+               }\r
+               \r
+               text_label = formFactory.createTextWithLabelElement(formElement, "Label", representation.getLabel(), style);\r
+               text_abbreviatedLabel = formFactory.createTextWithLabelElement(formElement, "Abbrev. Label", representation.getAbbreviatedLabel(), style);\r
+               text_description = formFactory.createMultilineTextWithLabel(formElement, "Description", 100, style);\r
+               text_description.setText(representation.getDescription());\r
+               uri_uri = formFactory.createUriWithLabelElement(formElement, "URI", getEntity().getUri(), style);\r
+               \r
+       }\r
+\r
+       @Override\r
+       public void setEntity(T entity) {\r
+               super.setEntity(entity);\r
+               setEnabled(TermBasePropertyTester.isModifiable(entity));\r
+       }\r
+       \r
+       protected void handleRepresentation(Object eventSource){\r
+               Representation representation = getEntity().getRepresentation(CdmStore.getDefaultLanguage());\r
+               \r
+               if (representation == null){\r
+                       return;\r
+               }\r
+               \r
+               if (eventSource == text_label){\r
+                       representation.setLabel(text_label.getText());\r
+               }else if (eventSource == text_abbreviatedLabel){\r
+                       representation.setAbbreviatedLabel(text_abbreviatedLabel.getText());\r
+               }else if (eventSource == text_description){\r
+                       representation.setText(text_description.getText());\r
+               }\r
+       }\r
+\r
+       public abstract TermVocabulary getVocabulary();\r
+               \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java
new file mode 100644 (file)
index 0000000..f6b7aed
--- /dev/null
@@ -0,0 +1,49 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class DefinedTermDetailElement<T extends DefinedTermBase> extends AbstractTermBaseDetailElement<T> {\r
+       \r
+       /**\r
+        * @param formFactory\r
+        * @param formElement\r
+        */\r
+       public DefinedTermDetailElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement) {\r
+               super(formFactory, formElement);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+        */\r
+       @Override\r
+       public void handleEvent(Object eventSource) {\r
+               handleRepresentation(eventSource);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#getVocabularyMarkers()\r
+        */\r
+       @Override\r
+       public TermVocabulary getVocabulary() {\r
+               return getEntity() != null ? getEntity().getVocabulary() : null;\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailSection.java
new file mode 100644 (file)
index 0000000..1e3b307
--- /dev/null
@@ -0,0 +1,73 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+import org.eclipse.ui.forms.widgets.TableWrapLayout;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class DefinedTermDetailSection<T extends DefinedTermBase> extends AbstractCdmDetailSection<T> {\r
+\r
+       /**\r
+        * @param formFactory\r
+        * @param definedTermClass \r
+        * @param conversation\r
+        * @param parentElement\r
+        * @param selectionProvider\r
+        * @param style\r
+        */\r
+       public DefinedTermDetailSection(CdmFormFactory formFactory,\r
+                       Class<T> definedTermClass, ConversationHolder conversation, ICdmFormElement parentElement,\r
+                       ISelectionProvider selectionProvider, int style) {\r
+               super(formFactory, definedTermClass, conversation, parentElement, selectionProvider, style);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+        */\r
+       @Override\r
+       protected DetailType getDetailType() {\r
+               return null;\r
+       }\r
+       \r
+       @Override\r
+       protected void createControlsByType(\r
+                       AbstractCdmDetailSection<T> abstractCdmDetailSection,\r
+                       Class<T> clazz, int style) {\r
+               TableWrapLayout layout = (TableWrapLayout) getLayoutComposite()\r
+                               .getLayout();\r
+               layout.topMargin = 10;\r
+               layout.numColumns = 2;\r
+\r
+               getLayoutComposite().setLayout(layout);\r
+               detailElement = formFactory.createDefinedTermDetailElement(clazz,\r
+                               abstractCdmDetailSection, style);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+        */\r
+       @Override\r
+       public String getHeading() {\r
+               return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailElement.java
new file mode 100644 (file)
index 0000000..3f7a77e
--- /dev/null
@@ -0,0 +1,90 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import java.net.URISyntaxException;\r
+\r
+import eu.etaxonomy.cdm.model.common.Language;\r
+import eu.etaxonomy.cdm.model.common.Representation;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaType;\r
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaDetailElement extends DefinedTermDetailElement<NamedArea> {\r
+\r
+       // level\r
+       // type\r
+       private TermComboElement<NamedAreaType> combo_namedAreaType;\r
+       private TermComboElement<NamedAreaLevel> combo_namedAreaLevel;\r
+       // validPeriod\r
+       private TimePeriodElement timePeriod_validPeriod;\r
+       \r
+       /**\r
+        * @param formFactory\r
+        * @param formElement\r
+        */\r
+       public NamedAreaDetailElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement) {\r
+               super(formFactory, formElement);\r
+       }\r
+       \r
+       public void createControls(ICdmFormElement formElement, NamedArea entity, int style) {\r
+               super.createControls(formElement, entity, style);\r
+               \r
+               timePeriod_validPeriod = formFactory.createTimePeriodElement(formElement, "Valid Period", getEntity().getValidPeriod(), style);\r
+               combo_namedAreaType = formFactory.createTermComboElement(NamedAreaType.class, formElement, "Named Area Type", getEntity().getType(), style);\r
+               combo_namedAreaLevel = formFactory.createTermComboElement(NamedAreaLevel.class, formElement, "Named Area Level", getEntity().getLevel(), style);\r
+               \r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+        */\r
+       @Override\r
+       public void handleEvent(Object eventSource) {\r
+               \r
+               if (eventSource == text_label) {\r
+                       getEntity().setLabel(text_label.getText());\r
+                       getEntity().setTitleCache(null);\r
+               } else if (eventSource == text_description) {\r
+                       \r
+                       Representation representation = getEntity().getRepresentation(Language.DEFAULT());\r
+                       representation.setText(text_description.getText());\r
+                       \r
+               } else if (eventSource == uri_uri) {\r
+                       \r
+                       try {\r
+                               getEntity().setUri(uri_uri.getUri());\r
+                       } catch (URISyntaxException e) {\r
+                               \r
+                               e.printStackTrace();\r
+                       }\r
+               } else if (eventSource == timePeriod_validPeriod) {\r
+                       getEntity().setValidPeriod(timePeriod_validPeriod.getTimePeriod());\r
+               } else if (eventSource == combo_namedAreaType) {\r
+                       getEntity().setType(combo_namedAreaType.getSelection());\r
+               } else if (eventSource == combo_namedAreaLevel) {\r
+                       getEntity().setLevel(combo_namedAreaLevel.getSelection());\r
+               }\r
+               \r
+               \r
+       }\r
+\r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaDetailSection.java
new file mode 100644 (file)
index 0000000..c824285
--- /dev/null
@@ -0,0 +1,60 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.location.NamedArea;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class NamedAreaDetailSection extends AbstractCdmDetailSection<NamedArea> {\r
+\r
+       /**\r
+        * @param formFactory\r
+        * @param conversation\r
+        * @param parentElement\r
+        * @param selectionProvider\r
+        * @param style\r
+        */\r
+       public NamedAreaDetailSection(CdmFormFactory formFactory,\r
+                       ConversationHolder conversation, ICdmFormElement parentElement,\r
+                       ISelectionProvider selectionProvider, int style) {\r
+               super(formFactory, conversation, parentElement, selectionProvider, style);\r
+\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+        */\r
+       @Override\r
+       protected DetailType getDetailType() {\r
+               \r
+               return DetailType.NAMED_AREA;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+        */\r
+       @Override\r
+       public String getHeading() {\r
+               \r
+               return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/NamedAreaLevelDetailSection.java
new file mode 100644 (file)
index 0000000..cf6394e
--- /dev/null
@@ -0,0 +1,56 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.location.NamedAreaLevel;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 4 Jan 2012\r
+ *\r
+ */\r
+public class NamedAreaLevelDetailSection extends AbstractCdmDetailSection<NamedAreaLevel> {\r
+\r
+       /**\r
+        * @param formFactory\r
+        * @param parentElement\r
+        * @param style\r
+        */\r
+       public NamedAreaLevelDetailSection(CdmFormFactory formFactory,\r
+                       ConversationHolder conversation, ICdmFormElement parentElement,\r
+                       ISelectionProvider selectionProvider, int style) {\r
+               super(formFactory, conversation, parentElement, selectionProvider, style);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+        */\r
+       @Override\r
+       protected DetailType getDetailType() {\r
+               \r
+               return DetailType.NAMED_AREA_LEVEL;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+        */\r
+       @Override\r
+       public String getHeading() {\r
+               return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java
new file mode 100644 (file)
index 0000000..de79af5
--- /dev/null
@@ -0,0 +1,79 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import java.net.URISyntaxException;\r
+\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class TermVocabularyDetailElement extends AbstractTermBaseDetailElement<TermVocabulary> {\r
+\r
+       private UriWithLabelElement uri_uriTermSource;\r
+       /**\r
+        * @param formFactory\r
+        * @param formElement\r
+        */\r
+       public TermVocabularyDetailElement(CdmFormFactory formFactory,\r
+                       ICdmFormElement formElement) {\r
+               super(formFactory, formElement);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)\r
+        */\r
+       @Override\r
+       protected void createControls(ICdmFormElement formElement,\r
+                       TermVocabulary entity, int style) {\r
+               \r
+               super.createControls(formElement, entity, style);\r
+               uri_uriTermSource = formFactory.createUriWithLabelElement(formElement, "Term Source URI", getEntity().getTermSourceUri(), style);\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)\r
+        */\r
+       @Override\r
+       public void handleEvent(Object eventSource) {\r
+               \r
+               handleRepresentation(eventSource);\r
+               \r
+               if (eventSource == uri_uri) {\r
+                       try {\r
+                               getEntity().setUri(uri_uri.getUri());\r
+                       } catch (URISyntaxException e) {\r
+                               StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
+                       }\r
+               } else if (eventSource == uri_uriTermSource) {\r
+                       try {\r
+                               getEntity().setTermSourceUri(uri_uriTermSource.getUri());\r
+                       } catch (URISyntaxException e) {\r
+                               StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#getVocabularyMarkers()\r
+        */\r
+       @Override\r
+       public TermVocabulary getVocabulary() {\r
+               return getEntity();\r
+       }\r
+\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailSection.java
new file mode 100644 (file)
index 0000000..18f10bf
--- /dev/null
@@ -0,0 +1,68 @@
+// $Id$\r
+/**\r
+* Copyright (C) 2009 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
+package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
+\r
+import org.eclipse.jface.viewers.ISelectionProvider;\r
+\r
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
+import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;\r
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;\r
+\r
+/**\r
+ * @author l.morris\r
+ * @date 20 Dec 2011\r
+ *\r
+ */\r
+public class TermVocabularyDetailSection extends\r
+               AbstractCdmDetailSection<TermVocabulary> {\r
+\r
+       /**\r
+        * @param formFactory\r
+        * @param conversation\r
+        * @param parentElement\r
+        * @param selectionProvider\r
+        * @param style\r
+        */\r
+       public TermVocabularyDetailSection(CdmFormFactory formFactory,\r
+                       ConversationHolder conversation, ICdmFormElement parentElement,\r
+                       ISelectionProvider selectionProvider, int style) {\r
+               super(formFactory, conversation, parentElement, selectionProvider, style);\r
+               // TODO Auto-generated constructor stub\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()\r
+        */\r
+       @Override\r
+       protected DetailType getDetailType() {\r
+               \r
+               return DetailType.TERM_VOCABULARY;\r
+       }\r
+\r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()\r
+        */\r
+       @Override\r
+       public String getHeading() {\r
+               \r
+               return "Vocabulary: "+ (getEntity() != null ? getEntity().getLabel() : "");\r
+       }\r
+       \r
+       /* (non-Javadoc)\r
+        * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#setSectionTitle()\r
+        */\r
+       @Override\r
+       protected void setSectionTitle() {\r
+               setText(getHeading());\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AgentSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AgentSelectionElement.java
deleted file mode 100644 (file)
index 62afd68..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.AgentBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AgentSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * AgentSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Jun 22, 2010
- * @version 1.0
- */
-public class AgentSelectionElement extends AbstractSelectionElement<AgentBase> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for AgentSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
-        * @param style
-        *            a int.
-        */
-       public AgentSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, AgentBase entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               AgentBase newSelection = AgentSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElement.java
deleted file mode 100644 (file)
index 592455f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.ClassificationSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * ClassificationSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Sep 27, 2010
- * @version 1.0
- */
-public class ClassificationSelectionElement extends
-               AbstractSelectionElement<Classification> {
-
-       public static final int DEFAULT = DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for ClassificationSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
-        * @param style
-        *            a int.
-        */
-       public ClassificationSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Classification entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Classification newSelection = ClassificationSelectionDialog.select(
-                               getShell(), getConversationHolder());
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/CollectionSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/CollectionSelectionElement.java
deleted file mode 100644 (file)
index 806b44f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.Collection;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.CollectionSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * CollectionSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Oct 13, 2010
- * @version 1.0
- */
-public class CollectionSelectionElement extends
-               AbstractSelectionElement<Collection> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for CollectionSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.occurrence.Collection} object.
-        * @param style
-        *            a int.
-        */
-       public CollectionSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Collection entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Collection newSelection = CollectionSelectionDialog.select(getShell(),
-                               getConversationHolder(), getEntity());
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/DerivedUnitBaseSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/DerivedUnitBaseSelectionElement.java
deleted file mode 100644 (file)
index 4e8c21c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.DerivedUnitSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * DerivedUnitBaseSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Jun 17, 2010
- * @version 1.0
- */
-public class DerivedUnitBaseSelectionElement extends
-               AbstractSelectionElement<DerivedUnitBase> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for DerivedUnitBaseSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase}
-        *            object.
-        * @param style
-        *            a int.
-        */
-       public DerivedUnitBaseSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, DerivedUnitBase entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               DerivedUnitBase newSelection = DerivedUnitSelectionDialog.select(
-                               getShell(), getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
index c0f2985638ba084484f02f4bebbc4bfe4f89f221..7c2da263c727d4019e6e7fb5441488db986f9ce2 100644 (file)
@@ -28,9 +28,10 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.model.TextHelper;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage;
 import eu.etaxonomy.taxeditor.ui.section.agent.PersonWizardPage;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamWizardPage;
@@ -55,7 +56,7 @@ import eu.etaxonomy.taxeditor.ui.section.user.UserDetailWizardPage;
 public class EditFromSelectionWizard extends Wizard implements
                SelectionListener {
 
-       private final AbstractSelectionElement selectionElement;
+       private final EntitySelectionElement selectionElement;
 
        /**
         * <p>
@@ -64,12 +65,12 @@ public class EditFromSelectionWizard extends Wizard implements
         * 
         * @param selectionElement
         *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement}
+        *            {@link eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement}
         *            object.
         */
-       public EditFromSelectionWizard(AbstractSelectionElement selectionElement) {
+       public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
                this.selectionElement = selectionElement;
-               this.setWindowTitle("Edit Entity");
+               this.setWindowTitle(String.format("Edit %s", TextHelper.deproxyClassName(selectionElement.getEntity().getClass())));
        }
 
        /** {@inheritDoc} */
similarity index 79%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
index e04d8dabb1d0d2e41e6e0ef8e8b331fb02faada0..ec948a901f3a1f9d3215d45e550106c3031d0b27 100644 (file)
@@ -18,21 +18,24 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.common.CdmUtils;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.IEntityElement;
-import eu.etaxonomy.taxeditor.ui.forms.ILabeledElement;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectable;
-import eu.etaxonomy.taxeditor.ui.forms.ISelectableElement;
-import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
+import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
+import eu.etaxonomy.taxeditor.ui.element.ILabeledElement;
+import eu.etaxonomy.taxeditor.ui.element.ISelectable;
+import eu.etaxonomy.taxeditor.ui.element.ISelectableElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
 
 /**
  * <p>
@@ -44,19 +47,19 @@ import eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator;
  * @version 1.0
  * @param <T>
  */
-public abstract class AbstractSelectionElement<T> extends
+public class EntitySelectionElement<T extends ICdmBase> extends
                AbstractCdmFormElement implements SelectionListener,
                IEnableableFormElement, ISelectableElement, IEntityElement<T>,
                ILabeledElement, IConversationEnabled, ISelectable {
 
        /**
-        * bitmask to set
+        * Bitmask for configuring functionality of selection element
         */
        public static final int NOTHING = 0; // 000
        public static final int EDITABLE = 1 << 0; // 001
        public static final int DELETABLE = 1 << 1; // 010
        public static final int SELECTABLE = 1 << 2; // 100
-       public static final int ALL = (int) Math.pow(2, 3); // 111
+       public static final int ALL = EDITABLE | DELETABLE | SELECTABLE; // 111
 
        protected T entity;
 
@@ -79,6 +82,7 @@ public abstract class AbstractSelectionElement<T> extends
        private final boolean isDeletable;
 
        private final ConversationHolder conversation;
+       private Class<T> clazz;
 
        /**
         * <p>
@@ -86,12 +90,12 @@ public abstract class AbstractSelectionElement<T> extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            TODO
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
@@ -108,20 +112,20 @@ public abstract class AbstractSelectionElement<T> extends
         * @param <T>
         *            a T object.
         */
-       public AbstractSelectionElement(CdmFormFactory formFactory,
+       public EntitySelectionElement(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
                        String labelString, T entity, int mode, int style) {
                super(formFactory, parentElement);
 
                this.isEditable = (mode & EDITABLE) == EDITABLE;
                this.isDeletable = (mode & DELETABLE) == DELETABLE;
-
+               boolean isSelectable = (mode & SELECTABLE) == SELECTABLE;
+               
                this.labelString = labelString;
 
                this.conversation = conversation;
 
-               if (((mode & SELECTABLE) == SELECTABLE)
-                               && formFactory.getSelectionProvider() != null) {
+               if (isSelectable && formFactory.getSelectionProvider() != null) {
                        selectionArbitrator = formFactory.createSelectionArbitrator(this);
                }
 
@@ -129,6 +133,13 @@ public abstract class AbstractSelectionElement<T> extends
 
                setEntity(entity);
        }
+       
+       public EntitySelectionElement(CdmFormFactory formFactory,
+                       ConversationHolder conversation, ICdmFormElement parentElement, Class<T> clazz,
+                       String labelString, T entity, int mode, int style) {
+               this(formFactory, conversation, parentElement, labelString, entity, mode, style);
+               this.clazz = clazz;
+       }
 
        private void createControls(Composite parent, int style) {
 
@@ -147,15 +158,15 @@ public abstract class AbstractSelectionElement<T> extends
                        columns += 1;
                }
 
-               selectableComposite.setLayout(CdmFormFactory.LAYOUT(columns, false));
-               selectableComposite.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               selectableComposite.setLayout(LayoutConstants.LAYOUT(columns, false));
+               selectableComposite.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
 
                addControl(selectableComposite);
 
                text = formFactory.createLabel(selectableComposite, null, SWT.WRAP);
                addControl(text);
 
-               text.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               text.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
                text.setBackground(StoreUtil
                                .getColor(Resources.COLOR_TEXT_DISABLED_BACKGROUND));
 
@@ -164,6 +175,7 @@ public abstract class AbstractSelectionElement<T> extends
                button_selection.setImage(ImageResources
                                .getImage(ImageResources.BROWSE_ICON));
                button_selection.setToolTipText("Browse existing");
+               
                addControl(button_selection);
                button_selection.addSelectionListener(this);
 
@@ -188,6 +200,11 @@ public abstract class AbstractSelectionElement<T> extends
                }
        }
 
+       public void widgetSelected(SelectionEvent e) {
+               T selection = SelectionDialogFactory.getSelectionFromDialog(clazz, getShell(), getConversationHolder(), getEntity());
+               setSelectionInternal(selection);
+       }
+       
        /**
         * Return the selected object
         * 
@@ -312,7 +329,7 @@ public abstract class AbstractSelectionElement<T> extends
         * Getter for the field <code>selectionArbitrator</code>.
         * </p>
         * 
-        * @return a {@link eu.etaxonomy.taxeditor.ui.forms.SelectionArbitrator}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
         *         object.
         */
        @Override
@@ -341,9 +358,9 @@ public abstract class AbstractSelectionElement<T> extends
 
        private class DeleteListener extends SelectionAdapter {
 
-               private final AbstractSelectionElement<T> selectionElement;
+               private final EntitySelectionElement<T> selectionElement;
 
-               public DeleteListener(AbstractSelectionElement<T> selectionElement) {
+               public DeleteListener(EntitySelectionElement<T> selectionElement) {
                        this.selectionElement = selectionElement;
                }
 
@@ -357,9 +374,9 @@ public abstract class AbstractSelectionElement<T> extends
 
        private class EditListener extends SelectionAdapter {
 
-               private final AbstractSelectionElement<T> selectionElement;
+               private final EntitySelectionElement<T> selectionElement;
 
-               public EditListener(AbstractSelectionElement<T> selectionElement) {
+               public EditListener(EntitySelectionElement<T> selectionElement) {
                        this.selectionElement = selectionElement;
                }
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureSelectionElement.java
deleted file mode 100644 (file)
index 80654f6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class FeatureSelectionElement extends AbstractSelectionElement<Feature> {
-
-       public static final int DEFAULT = EDITABLE | DELETABLE;
-
-       /**
-        * 
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param style
-        */
-       public FeatureSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Feature entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Feature newSelection = FeatureSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureTreeSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FeatureTreeSelectionElement.java
deleted file mode 100644 (file)
index 2cbf4ae..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureTreeSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * FeatureTreeSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Sep 17, 2010
- * @version 1.0
- */
-public class FeatureTreeSelectionElement extends
-               AbstractSelectionElement<FeatureTree> {
-
-       public static final int DEFAULT = DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for FeatureTreeSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.description.FeatureTree}
-        *            object.
-        * @param style
-        *            a int.
-        */
-       public FeatureTreeSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, FeatureTree entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               FeatureTree newSelection = FeatureTreeSelectionDialog.select(
-                               getShell(), getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java
deleted file mode 100644 (file)
index 69a7abf..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FieldObservationSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * FieldObservationSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Jun 17, 2010
- * @version 1.0
- */
-public class FieldObservationSelectionElement extends
-               AbstractSelectionElement<FieldObservation> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for FieldObservationSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation}
-        *            object.
-        * @param style
-        *            a int.
-        */
-       public FieldObservationSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, FieldObservation entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               FieldObservation newSelection = FieldObservationSelectionDialog.select(
-                               getShell(), getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/GroupSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/GroupSelectionElement.java
deleted file mode 100644 (file)
index bf58be1..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.GroupSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Mar 10, 2011
- * @version 1.0
- */
-public class GroupSelectionElement extends AbstractSelectionElement<Group> {
-
-       public static final int DEFAULT = NOTHING;
-
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param isEditable
-        * @param isSelectable
-        * @param isDeletable
-        * @param style
-        */
-       public GroupSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Group entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Group newSelection = GroupSelectionDialog.select(getShell(),
-                               getConversationHolder(), getEntity());
-               setSelectionInternal(newSelection);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
-        */
-       @Override
-       protected String getTitle() {
-               return (getEntity() != null) ? getEntity().getName() : "UNTITLED GROUP";
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/InstitutionSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/InstitutionSelectionElement.java
deleted file mode 100644 (file)
index 37ab0c7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.InstitutionSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * InstitutionSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Nov 17, 2009
- * @version 1.0
- */
-public class InstitutionSelectionElement extends
-               AbstractSelectionElement<Institution> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for InstitutionSelectionElement.
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.agent.Institution} object.
-        * @param style
-        *            a int.
-        * @param toolkit
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        */
-       public InstitutionSelectionElement(CdmFormFactory toolkit,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Institution selection, int mode, int style) {
-               super(toolkit, conversation, parentElement, labelString, selection,
-                               mode, style);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Institution newSelection = InstitutionSelectionDialog.select(
-                               getShell(), getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElement.java
deleted file mode 100644 (file)
index db11d00..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NameSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * NameSelectionElement class.
- * </p>
- * 
- * @author nho
- * @version $Id: $
- */
-public class NameSelectionElement extends
-               AbstractSelectionElement<TaxonNameBase> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for NameSelectionElement.
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
-        * @param style
-        *            a int.
-        * @param toolkit
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        */
-       public NameSelectionElement(CdmFormFactory toolkit,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, TaxonNameBase selection, int mode, int style) {
-               super(toolkit, conversation, parentElement, labelString, selection,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               TaxonNameBase newSelection = NameSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NamedAreaSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/NamedAreaSelectionElement.java
deleted file mode 100644 (file)
index 74b2a58..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NamedAreaSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * NamedAreaSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class NamedAreaSelectionElement extends
-               AbstractSelectionElement<NamedArea> {
-
-       public static final int DEFAULT = NOTHING;
-
-       /**
-        * <p>
-        * Constructor for NamedAreaSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
-        * @param style
-        *            a int.
-        */
-       public NamedAreaSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, NamedArea entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               NamedArea newSelection = NamedAreaSelectionDialog.select(
-                               getLayoutComposite().getShell(), getConversationHolder(),
-                               entity);
-               setSelectionInternal(newSelection);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected String getTitle() {
-               return (entity != null) ? NamedArea.labelWithLevel(entity,
-                               CdmStore.getDefaultLanguage()) : "";
-       }
-}
index a3ef4fecb6f9f9a6c3057440ecaee5bad7e32669..ca90432a5ff9621a29b9d5b84c2f8540327a760b 100644 (file)
@@ -14,9 +14,9 @@ import org.eclipse.swt.events.SelectionEvent;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.NomenclaturalAuthorTeamSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.NomenclaturalAuthorTeamSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
  * <p>
@@ -28,7 +28,7 @@ import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
  * @version 1.0
  */
 public class NomenclaturalAuthorTeamSelectionElement extends
-               AbstractSelectionElement<Team> {
+               EntitySelectionElement<Team> {
 
        public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
 
@@ -38,13 +38,13 @@ public class NomenclaturalAuthorTeamSelectionElement extends
         * </p>
         * 
         * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
         *            object.
         * @param conversation
         *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
         *            object.
         * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
         * @param labelString
         *            a {@link java.lang.String} object.
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PersonSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PersonSelectionElement.java
deleted file mode 100644 (file)
index 386cd99..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.PersonSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * PersonSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created May 12, 2010
- * @version 1.0
- */
-public class PersonSelectionElement extends AbstractSelectionElement<Person> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE;
-
-       /**
-        * <p>
-        * Constructor for PersonSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.agent.Person} object.
-        * @param style
-        *            a int.
-        */
-       public PersonSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Person entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Person newSelection = PersonSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeyNodeSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeyNodeSelectionElement.java
deleted file mode 100644 (file)
index bf080b3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class PolytomousKeyNodeSelectionElement extends
-               AbstractSelectionElement<PolytomousKeyNode> {
-
-       public static final int DEFAULT = DELETABLE;
-
-       /**
-        * 
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param style
-        */
-       public PolytomousKeyNodeSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, PolytomousKeyNode entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               StoreUtil.warningDialog("Not implemented yet", getClass(),
-                               "This functionality is not implemented yet.");
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeySelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/PolytomousKeySelectionElement.java
deleted file mode 100644 (file)
index 690eadb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.PolytomousKeySelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 3, 2010
- * @version 1.0
- */
-public class PolytomousKeySelectionElement extends
-               AbstractSelectionElement<PolytomousKey> {
-
-       public static final int DEFAULT = EDITABLE | DELETABLE;
-
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param isEditable
-        * @param isSelectable
-        * @param isDeletable
-        * @param style
-        */
-       public PolytomousKeySelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, PolytomousKey entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               PolytomousKey newSelection = PolytomousKeySelectionDialog.select(
-                               getShell(), getConversationHolder(), entity);
-
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ReferenceSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/ReferenceSelectionElement.java
deleted file mode 100644 (file)
index 18629c9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.IReferenceService;
-import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.ReferenceSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * ReferenceSelectionElement class.
- * </p>
- * 
- * @author n.hofmann
- * @version $Id: $
- */
-public class ReferenceSelectionElement extends
-               AbstractSelectionElement<Reference> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for ReferenceSelectionElement.
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
-        *            object.
-        * @param style
-        *            a int.
-        * @param toolkit
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        */
-       public ReferenceSelectionElement(CdmFormFactory toolkit,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Reference selection, int mode, int style) {
-               super(toolkit, conversation, parentElement, labelString, selection,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Reference newSelection = ReferenceSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-
-               setSelectionInternal(newSelection);
-               
-//             Reference freshlyLoadedSelection = null;
-//             if (newSelection != null)
-//                     freshlyLoadedSelection = CdmStore.getService(
-//                                     IReferenceService.class).load(newSelection.getUuid());
-//
-//             setSelectionInternal(freshlyLoadedSelection);
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/SynonymSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/SynonymSelectionElement.java
deleted file mode 100644 (file)
index 477484d..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 9, 2010
- * @version 1.0
- */
-public class SynonymSelectionElement extends AbstractSelectionElement<Synonym> {
-
-       public static final int DEFAULT = SELECTABLE | DELETABLE;
-
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param isEditable
-        * @param isSelectable
-        * @param isDeletable
-        * @param style
-        */
-       public SynonymSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Synonym entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Synonym newSelection = TaxonBaseSelectionDialog.selectSynonym(
-                               getShell(), getConversationHolder());
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java
deleted file mode 100644 (file)
index 8eeed9a..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * TaxonBaseSelectionElement class.
- * </p>
- * 
- * @author nho
- * @version $Id: $
- */
-public class TaxonBaseSelectionElement extends
-               AbstractSelectionElement<TaxonBase> {
-
-       public static final int DEFAULT = DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for TaxonBaseSelectionElement.
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
-        * @param style
-        *            a int.
-        * @param toolkit
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        */
-       public TaxonBaseSelectionElement(CdmFormFactory toolkit,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, TaxonBase selection, int mode, int style) {
-               super(toolkit, conversation, parentElement, labelString, selection,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               TaxonBase newSelection = TaxonBaseSelectionDialog.selectTaxonBase(
-                               getShell(), getConversationHolder());
-               setSelectionInternal(newSelection);
-       }
-
-}
index 5be0d3ac67b346b54e4cd329de5457eec3238b05..150ed77d18673817b75d0b36d452b7097522a094 100644 (file)
@@ -1,13 +1,12 @@
 // $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.
- */
-
+* Copyright (C) 2009 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.ui.selection;
 
 import org.eclipse.swt.events.SelectionEvent;
@@ -16,53 +15,37 @@ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 
 /**
- * <p>
- * TaxonNodeSelectionElement class.
- * </p>
- * 
  * @author n.hoffmann
- * @created Sep 27, 2010
- * @version 1.0
+ * @date Jan 26, 2012
+ *
  */
-public class TaxonNodeSelectionElement extends
-               AbstractSelectionElement<TaxonNode> {
+public class TaxonNodeSelectionElement extends EntitySelectionElement<TaxonNode> {
 
-       public static final int DEFAULT = DELETABLE;
        private Classification classification;
-
-       /**
-        * <p>
-        * Constructor for TaxonNodeSelectionElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
-        * @param style
-        *            a int.
-        */
+       
        public TaxonNodeSelectionElement(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
                        String labelString, TaxonNode entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
+               super(formFactory, conversation, parentElement, labelString, entity, mode,
+                               style);
        }
-
+       
+       /**
+        * @return
+        */
+       public Classification getClassification() {
+               return classification;
+       }
+       
+       public void setClassification(Classification classification){
+               this.classification = classification;
+       }
+       
        /*
         * (non-Javadoc)
         * 
@@ -77,18 +60,7 @@ public class TaxonNodeSelectionElement extends
                                getConversationHolder(), "Select parent taxon", null, null, getClassification());
                setSelectionInternal(newSelection);
        }
-
-       /**
-        * @return
-        */
-       public Classification getClassification() {
-               return classification;
-       }
        
-       public void setClassification(Classification classification){
-               this.classification = classification;
-       }
-
        /*
         * (non-Javadoc)
         * 
@@ -104,4 +76,5 @@ public class TaxonNodeSelectionElement extends
                }
                return super.getTitle();
        }
+
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElement.java
deleted file mode 100644 (file)
index cb16944..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonBaseSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Dec 9, 2010
- * @version 1.0
- */
-public class TaxonSelectionElement extends AbstractSelectionElement<Taxon> {
-
-       public static final int DEFAULT = NOTHING;
-
-       /**
-        * 
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param mode
-        * @param style
-        */
-       public TaxonSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Taxon entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Taxon newSelection = TaxonBaseSelectionDialog.selectTaxon(getShell(),
-                               getConversationHolder());
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TeamSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TeamSelectionElement.java
deleted file mode 100644 (file)
index 46cc8e7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TeamSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>
- * TeamSelectionElement class.
- * </p>
- * 
- * @author n.hoffmann
- * @created Apr 30, 2010
- * @version 1.0
- */
-public class TeamSelectionElement extends AbstractSelectionElement<Team> {
-
-       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
-
-       /**
-        * <p>
-        * Constructor for TeamSelectionElement.
-        * </p>
-        * 
-        * @param toolkit
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
-        *            object.
-        * @param conversation
-        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.agent.Team} object.
-        * @param style
-        *            a int.
-        */
-       public TeamSelectionElement(CdmFormFactory toolkit,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, Team selection, int mode, int style) {
-               super(toolkit, conversation, parentElement, labelString, selection,
-                               mode, style);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               Team newSelection = TeamSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/UserSelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/UserSelectionElement.java
deleted file mode 100644 (file)
index fc5d27d..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// $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.ui.selection;
-
-import org.eclipse.swt.events.SelectionEvent;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.UserSelectionDialog;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * @author n.hoffmann
- * @created Mar 10, 2011
- * @version 1.0
- */
-public class UserSelectionElement extends AbstractSelectionElement<User> {
-
-       public static final int DEFAULT = NOTHING;
-
-       /**
-        * @param formFactory
-        * @param conversation
-        * @param parentElement
-        * @param labelString
-        * @param entity
-        * @param isEditable
-        * @param isSelectable
-        * @param isDeletable
-        * @param style
-        */
-       public UserSelectionElement(CdmFormFactory formFactory,
-                       ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, User entity, int mode, int style) {
-               super(formFactory, conversation, parentElement, labelString, entity,
-                               mode, style);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
-        * .events.SelectionEvent)
-        */
-       @Override
-       public void widgetSelected(SelectionEvent e) {
-               User newSelection = UserSelectionDialog.select(getShell(),
-                               getConversationHolder(), entity);
-               setSelectionInternal(newSelection);
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
-        */
-       @Override
-       protected String getTitle() {
-               return (entity != null) ? entity.getUsername() : "NO USER";
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AnnotationTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/AnnotationTypeComboElement.java
deleted file mode 100644 (file)
index f0368c8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.AnnotationType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>AnnotationTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 12, 2010
- * @version 1.0
- */
-public class AnnotationTypeComboElement extends AbstractTermComboElement<AnnotationType> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for AnnotationTypeComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.common.AnnotationType} object.
-        * @param style a int.
-        */
-       public AnnotationTypeComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       AnnotationType selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<AnnotationType> preferredTerms() {
-               return getTermManager().getPreferredAnnotationTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/DeterminationModifierComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/DeterminationModifierComboElement.java
deleted file mode 100644 (file)
index 6a60893..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>DeterminationModifierComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Oct 14, 2010
- * @version 1.0
- */
-public class DeterminationModifierComboElement extends AbstractTermComboElement<DeterminationModifier> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for DeterminationModifierComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.occurrence.DeterminationModifier} object.
-        * @param style a int.
-        */
-       public DeterminationModifierComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       DeterminationModifier selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<DeterminationModifier> preferredTerms() {
-               return getTermManager().getPreferredDeterminationModifiers();
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/EmptyComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/EmptyComboElement.java
deleted file mode 100644 (file)
index 83647e7..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// $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.ui.term;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>EmptyComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 29, 2010
- * @version 1.0
- */
-public class EmptyComboElement<T extends DefinedTermBase> extends AbstractTermComboElement<T> {
-
-       private static final int VISIBLE_ITEMS = 20;
-       
-       private List<T> genericTerms = new ArrayList<T>();
-       
-       /**
-        * <p>Constructor for EmptyComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param style a int.
-        * @param <T> a T object.
-        */
-       public EmptyComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       int style) {
-               super(formFactory, parentElement, labelString, null, VISIBLE_ITEMS, style);
-       }
-
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<T> preferredTerms() {
-               return genericTerms != null ? genericTerms : new ArrayList<T>();
-       }
-
-
-       /**
-        * <p>setTerms</p>
-        *
-        * @param terms a {@link java.util.List} object.
-        */
-       public void setTerms(List<T> terms) {
-               if(terms == null){
-                       throw new IllegalArgumentException("List of terms may not be null");
-               }
-               
-               this.genericTerms = terms;
-               propertyChange(new PropertyChangeEvent(this, PreferencesUtil.PREFERRED_TERMS_CHANGE, this.genericTerms, terms));
-       }       
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ExtensionTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ExtensionTypeComboElement.java
deleted file mode 100644 (file)
index 145d570..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.ExtensionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ExtensionTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class ExtensionTypeComboElement extends AbstractTermComboElement<ExtensionType> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for ExtensionTypeComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.common.ExtensionType} object.
-        * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public ExtensionTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString,
-                       ExtensionType selection, int style) {
-               super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<ExtensionType> preferredTerms() {
-               return getTermManager().getPreferredExtensionTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/LanguageComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/LanguageComboElement.java
deleted file mode 100644 (file)
index 0ba64e0..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>LanguageComboElement class.</p>
- *
- * @author n.hoffmann
- * @version $Id: $
- */
-public class LanguageComboElement extends AbstractTermComboElement<Language> {
-
-       private static final int VISIBLE_ITEMS = 20;
-
-       /**
-        * <p>Constructor for LanguageComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.common.Language} object.
-        * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public LanguageComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString, Language selection, int style) {
-               super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<Language> preferredTerms() {
-               return getTermManager().getPreferredLanguages();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MarkerTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MarkerTypeComboElement.java
deleted file mode 100644 (file)
index 715685d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.common.MarkerType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>MarkerTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class MarkerTypeComboElement extends AbstractTermComboElement<MarkerType> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for MarkerTypeComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.common.MarkerType} object.
-        * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public MarkerTypeComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
-                       MarkerType selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<MarkerType> preferredTerms() {
-               return getTermManager().getPreferredMarkerTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MeasurementUnitComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/MeasurementUnitComboElement.java
deleted file mode 100644 (file)
index 01b6617..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 
- */
-package eu.etaxonomy.taxeditor.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.MeasurementUnit;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>MeasurementUnitComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class MeasurementUnitComboElement extends AbstractTermComboElement<MeasurementUnit> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for MeasurementUnitComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.MeasurementUnit} object.
-        * @param style a int.
-        */
-       public MeasurementUnitComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       MeasurementUnit selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<MeasurementUnit> preferredTerms() {
-               return getTermManager().getPreferredMeasurementUnits();
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ModifierComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ModifierComboElement.java
deleted file mode 100644 (file)
index 8cd8071..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Modifier;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ModifierComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class ModifierComboElement extends AbstractTermComboElement<Modifier> {
-       
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for ModifierComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.Modifier} object.
-        * @param style a int.
-        */
-       public ModifierComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       Modifier selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<Modifier> preferredTerms() {
-               return getTermManager().getPreferredModifiers();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameRelationshipTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameRelationshipTypeComboElement.java
deleted file mode 100644 (file)
index c16bae6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NameRelationshipType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NameRelationshipTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Mar 19, 2010
- * @version 1.0
- */
-public class NameRelationshipTypeComboElement extends AbstractTermComboElement<NameRelationshipType> {
-
-       private static final int VISIBLE_ITEMS = 10;
-
-       /**
-        * <p>Constructor for NameRelationshipTypeComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.name.NameRelationshipType} object.
-        * @param style a int.
-        */
-       public NameRelationshipTypeComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, NameRelationshipType selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<NameRelationshipType> preferredTerms() {
-               return getTermManager().getPreferredNameRelationshipTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameTypeDesignationStatusComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NameTypeDesignationStatusComboElement.java
deleted file mode 100644 (file)
index 53f5c28..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NameTypeDesignationStatusComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 17, 2010
- * @version 1.0
- */
-public class NameTypeDesignationStatusComboElement extends
-               AbstractTermComboElement<NameTypeDesignationStatus> {
-       
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for NameTypeDesignationStatusComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus} object.
-        * @param style a int.
-        */
-       public NameTypeDesignationStatusComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       NameTypeDesignationStatus selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<NameTypeDesignationStatus> preferredTerms() {
-               return getTermManager().getPreferredNameTypeDesignationStatus();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NamedAreaTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NamedAreaTypeComboElement.java
deleted file mode 100644 (file)
index 5b0a375..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.location.NamedAreaType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NamedAreaTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class NamedAreaTypeComboElement extends AbstractTermComboElement<NamedAreaType> {
-       
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for NamedAreaTypeComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.location.NamedAreaType} object.
-        * @param style a int.
-        */
-       public NamedAreaTypeComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       NamedAreaType selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<NamedAreaType> preferredTerms() {
-               return getTermManager().getPreferredNamedAreaTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalCodeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalCodeComboElement.java
deleted file mode 100644 (file)
index e27371b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// $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.ui.term;
-
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NomenclaturalCodeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Mar 16, 2010
- * @version 1.0
- */
-public class NomenclaturalCodeComboElement extends AbstractEnumComboElement<NomenclaturalCode> {
-       
-       /**
-        * <p>Constructor for NomenclaturalCodeComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param nomenclaturalCode a {@link eu.etaxonomy.cdm.model.name.NomenclaturalCode} object.
-        * @param style a int.
-        */
-       public NomenclaturalCodeComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, NomenclaturalCode nomenclaturalCode, int style) {
-               super(formFactory, parentElement, labelString);
-       }
-
-       /**
-        * <p>populateTypes</p>
-        */
-       protected void populateTypes() {
-               for(NomenclaturalCode nomenclaturalCode : NomenclaturalCode.values()){
-                       elementTypeList.add(nomenclaturalCode);
-                       combo.add(nomenclaturalCode.name());
-               }
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalStatusTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/NomenclaturalStatusTypeComboElement.java
deleted file mode 100644 (file)
index 4e30806..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>NomenclaturalStatusTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 5, 2009
- * @version 1.0
- */
-public class NomenclaturalStatusTypeComboElement extends
-               AbstractTermComboElement<NomenclaturalStatusType> {
-       
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for NomenclaturalStatusTypeComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatusType} object.
-        * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public NomenclaturalStatusTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement,
-                       String labelString, NomenclaturalStatusType selection, int style) {
-               super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<NomenclaturalStatusType> preferredTerms() {
-               return getTermManager().getPreferredNomenclaturalStatusTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PresenceAbsenceTermComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PresenceAbsenceTermComboElement.java
deleted file mode 100644 (file)
index b03ed89..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>PresenceAbsenceTermComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 11, 2010
- * @version 1.0
- */
-public class PresenceAbsenceTermComboElement extends
-               AbstractTermComboElement<PresenceAbsenceTermBase> {
-       
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for PresenceAbsenceTermComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase} object.
-        * @param style a int.
-        */
-       public PresenceAbsenceTermComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       PresenceAbsenceTermBase selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<PresenceAbsenceTermBase> preferredTerms() {
-               return getTermManager().getPreferredPresenceAbsenceTerms();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PreservationMethodComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/PreservationMethodComboElement.java
deleted file mode 100644 (file)
index 20f4fbb..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>PreservationMethodComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 25, 2010
- * @version 1.0
- */
-public class PreservationMethodComboElement extends AbstractTermComboElement<PreservationMethod> {
-       
-       private static final int VISIBLE_ITEMS = 5;     
-       
-       /**
-        * <p>Constructor for PreservationMethodComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.occurrence.PreservationMethod} object.
-        * @param style a int.
-        */
-       public PreservationMethodComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       PreservationMethod selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<PreservationMethod> preferredTerms() {
-               return getTermManager().getPreferredPreservationMethods();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RankComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RankComboElement.java
deleted file mode 100644 (file)
index 4be334a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>RankComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 5, 2009
- * @version 1.0
- */
-public class RankComboElement extends AbstractTermComboElement<Rank> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for RankComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.name.Rank} object.
-        * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public RankComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString,
-                       Rank selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<Rank> preferredTerms() {
-               return getTermManager().getPreferredRanks();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceSystemComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceSystemComboElement.java
deleted file mode 100644 (file)
index 6a0e9d4..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.location.ReferenceSystem;
-import eu.etaxonomy.taxeditor.store.TermStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ReferenceSystemComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Oct 15, 2010
- * @version 1.0
- */
-public class ReferenceSystemComboElement extends AbstractTermComboElement<ReferenceSystem> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for ReferenceSystemComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.location.ReferenceSystem} object.
-        * @param style a int.
-        */
-       public ReferenceSystemComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       ReferenceSystem selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<ReferenceSystem> preferredTerms() {
-               return TermStore.getReferenceSystems();
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ReferenceTypeComboElement.java
deleted file mode 100644 (file)
index 5d0eb02..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// $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.ui.term;
-
-import eu.etaxonomy.cdm.model.reference.ReferenceType;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ReferenceTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class ReferenceTypeComboElement extends AbstractEnumComboElement<ReferenceType>{
-
-       /**
-        * <p>Constructor for ReferenceTypeComboElement.</p>
-        *
-        * @param style a int.
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param referenceType a {@link eu.etaxonomy.cdm.model.reference.ReferenceType} object.
-        */
-       public ReferenceTypeComboElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, ReferenceType referenceType, int style) {
-               super(formFactory, parentElement, labelString);
-       }
-
-       /**
-        * <p>populateTypes</p>
-        */
-       protected void populateTypes() {
-               for(ReferenceType referenceType : ReferenceType.values()){
-                       elementTypeList.add(referenceType);
-                       combo.add(referenceType.getMessage(CdmStore.getDefaultLanguage()));
-               }
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RightsTypeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/RightsTypeComboElement.java
deleted file mode 100644 (file)
index 9c0d585..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.media.RightsTerm;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>RightsTypeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Nov 16, 2009
- * @version 1.0
- */
-public class RightsTypeComboElement extends AbstractTermComboElement<RightsTerm> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for RightsTypeComboElement.</p>
-        *
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.media.RightsTerm} object.
-        * @param style a int.
-        * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        */
-       public RightsTypeComboElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString,
-                       RightsTerm selection, int style) {
-               super(toolkit, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.termcombos.AbstractTermComboComposite#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<RightsTerm> preferredTerms() {
-               return getTermManager().getPreferredRightsTypes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ScopeComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/ScopeComboElement.java
deleted file mode 100644 (file)
index d64d75e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Scope;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>ScopeComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 17, 2010
- * @version 1.0
- */
-public class ScopeComboElement extends AbstractTermComboElement<Scope> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for ScopeComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.Scope} object.
-        * @param style a int.
-        */
-       public ScopeComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, Scope selection,
-                       int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<Scope> preferredTerms() {
-               return getTermManager().getPreferredScopes();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SexComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SexComboElement.java
deleted file mode 100644 (file)
index fad77d9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// $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.ui.term;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Sex;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>SexComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 24, 2010
- * @version 1.0
- */
-public class SexComboElement extends AbstractTermComboElement<Sex> {
-
-       private static final int VISIBLE_ITEMS = 2;
-       
-       /**
-        * <p>Constructor for SexComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.Sex} object.
-        * @param style a int.
-        */
-       public SexComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, Sex selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<Sex> preferredTerms() {
-               List<Sex> list = new ArrayList<Sex>();
-               list.add(Sex.FEMALE());
-               list.add(Sex.MALE());
-               return list;
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SpecimenTypeDesignationStatusComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/SpecimenTypeDesignationStatusComboElement.java
deleted file mode 100644 (file)
index 86e7c3e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>SpecimenTypeDesignationStatusComboElement class.</p>
- *
- * @author n.hoffmann
- * @created May 17, 2010
- * @version 1.0
- */
-public class SpecimenTypeDesignationStatusComboElement extends
-               AbstractTermComboElement<SpecimenTypeDesignationStatus> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for SpecimenTypeDesignationStatusComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus} object.
-        * @param style a int.
-        */
-       public SpecimenTypeDesignationStatusComboElement(
-                       CdmFormFactory formFactory, ICdmFormElement parentElement,
-                       String labelString, SpecimenTypeDesignationStatus selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<SpecimenTypeDesignationStatus> preferredTerms() {
-               return getTermManager().getPreferredSpecimenTypeDesignationStatus();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StageComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StageComboElement.java
deleted file mode 100644 (file)
index ad598b9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.Stage;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StageComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Jun 25, 2010
- * @version 1.0
- */
-public class StageComboElement extends AbstractTermComboElement<Stage> {
-       
-       private static final int VISIBLE_ITEMS = 5;
-       
-       /**
-        * <p>Constructor for StageComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.Stage} object.
-        * @param style a int.
-        */
-       public StageComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, Stage selection,
-                       int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected List<Stage> preferredTerms() {
-               return getTermManager().getPreferredStages();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StateComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StateComboElement.java
deleted file mode 100644 (file)
index c55f64e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.State;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StateComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class StateComboElement extends AbstractTermComboElement<State> {
-
-       private static final int VISIBLE_ITEMS = 10;
-       
-       /**
-        * <p>Constructor for StateComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.State} object.
-        * @param style a int.
-        */
-       public StateComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString, State selection,
-                       int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       
-       /** {@inheritDoc} */
-       @Override
-       protected List<State> preferredTerms() {
-               return getTermManager().getPreferredStates();
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StatisticalMeasureComboElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/term/StatisticalMeasureComboElement.java
deleted file mode 100644 (file)
index 38f2704..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// $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.ui.term;
-
-import java.util.List;
-
-import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-
-/**
- * <p>StatisticalMeasureComboElement class.</p>
- *
- * @author n.hoffmann
- * @created Sep 15, 2010
- * @version 1.0
- */
-public class StatisticalMeasureComboElement extends AbstractTermComboElement<StatisticalMeasure> {
-
-       private static final int VISIBLE_ITEMS = 5;
-       
-       /**
-        * <p>Constructor for StatisticalMeasureComboElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param selection a {@link eu.etaxonomy.cdm.model.description.StatisticalMeasure} object.
-        * @param style a int.
-        */
-       public StatisticalMeasureComboElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, String labelString,
-                       StatisticalMeasure selection, int style) {
-               super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
-       }
-       /** {@inheritDoc} */
-       @Override
-       protected List<StatisticalMeasure> preferredTerms() {
-               return getTermManager().getPreferredStatisticalMeasures();
-       }
-}
index 64578f8ee2e612e10ae8c5cde6f23f8c97f0e271..c2699cbba507c3372fdcc90c36618b8a6b3ecfe2 100644 (file)
@@ -60,7 +60,7 @@ public class GoogleLanguageApiWrapper implements ITranslationServiceWrapper {
                else if(language.equals(Language.GERMAN())){
                        return com.google.api.translate.Language.GERMAN;
                }
-               else if(language.equals(Language.SPANISH_CATALAN())){
+               else if(language.equals(Language.SPANISH_CASTILIAN())){
                        return com.google.api.translate.Language.SPANISH;
                }
                else if(language.equals(Language.AFRIKAANS())){
index b27deeacf68c4f0c8903e8ac3715cea176602500..bdf4837e91a557b9eb511d4ca7fb983b4f3166d6 100644 (file)
@@ -16,7 +16,8 @@ import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * <p>TranslationMetaDataWizardPage class.</p>
@@ -47,9 +48,9 @@ public class TranslationMetaDataWizardPage extends WizardPage {
        public void createControl(Composite parent) {
                Composite control = formFactory.createComposite(parent);
 //             control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
-               control.setLayout(CdmFormFactory.LAYOUT(1, false));
+               control.setLayout(LayoutConstants.LAYOUT(1, false));
                SashForm sash = new SashForm(control, SWT.HORIZONTAL);
-               sash.setLayoutData(CdmFormFactory.FILL());
+               sash.setLayoutData(LayoutConstants.FILL());
                
                setControl(control);
        }
index dd079db6e55e2063c50d9bdc387a88bacc1d81f5..93c48b11f0ac99906713b3646919d88271b2577e 100644 (file)
@@ -57,6 +57,12 @@ public class TranslationWizard extends Wizard {
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
+               LanguageString languageString = page.getTargetLanguageString();
+               
+               if (!languageString.getText().equals("")) {
+                       multilanguageText.put(languageString.getLanguage(), languageString);
+               }
+               
                return true;
        }
        
index 1113625a0e73215530db43a7c7cdf928188db58d..0eb7c6c6ea9283a3be39515e4f70ec4604a49d69 100644 (file)
@@ -21,7 +21,6 @@ import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 
@@ -30,14 +29,13 @@ import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.MultilanguageTextElement;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.term.EmptyComboElement;
-import eu.etaxonomy.taxeditor.ui.term.LanguageComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
 
 /**
  * <p>TranslationWizardPage class.</p>
@@ -56,11 +54,11 @@ public class TranslationWizardPage extends WizardPage{
        
        private CdmFormFactory formFactory;
 
-       private EmptyComboElement<Language> combo_sourceLanguage;
+       private TermComboElement<Language> combo_sourceLanguage;
 
        private LanguageStringWithLabelElement text_source;
 
-       private LanguageComboElement combo_targetLanguage;
+       private TermComboElement<Language> combo_targetLanguage;
 
        private LanguageStringWithLabelElement text_target;
        
@@ -75,6 +73,7 @@ public class TranslationWizardPage extends WizardPage{
                setTitle("Add or edit translations.");
                this.multilanguageText = multilanguageText;
                formFactory = new CdmFormFactory(Display.getCurrent());
+               setPageComplete(false);
        }
 
        /* (non-Javadoc)
@@ -85,17 +84,17 @@ public class TranslationWizardPage extends WizardPage{
        public void createControl(Composite parent) {
                Composite control = formFactory.createComposite(parent);
 //             control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
-               control.setLayout(CdmFormFactory.LAYOUT(2, true));
+               control.setLayout(LayoutConstants.LAYOUT(2, true));
                
                Composite leftContainer = formFactory.createComposite(control);
-               leftContainer.setLayoutData(CdmFormFactory.FILL());
-               leftContainer.setLayout(CdmFormFactory.LAYOUT(1, false));
+               leftContainer.setLayoutData(LayoutConstants.FILL());
+               leftContainer.setLayout(LayoutConstants.LAYOUT(1, false));
 //             leftContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
                RootElement leftRoot = new RootElement(formFactory, leftContainer);
                
                Composite rightContainer = formFactory.createComposite(control);
-               rightContainer.setLayoutData(CdmFormFactory.FILL());
-               rightContainer.setLayout(CdmFormFactory.LAYOUT(1, false));
+               rightContainer.setLayoutData(LayoutConstants.FILL());
+               rightContainer.setLayout(LayoutConstants.LAYOUT(1, false));
 //             rightContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
                RootElement rightRoot = new RootElement(formFactory, rightContainer);
                
@@ -131,7 +130,8 @@ public class TranslationWizardPage extends WizardPage{
         */
        private void createLeftControls(ICdmFormElement element){
                
-               combo_sourceLanguage = (EmptyComboElement<Language>) formFactory.createTermComboElement(TermComboType.EMPTY, element, null, null, SWT.NULL);
+               combo_sourceLanguage = formFactory.createTermComboElement(Language.class, element, null, null, SWT.NULL);
+               
                combo_sourceLanguage.setTerms(getLanguages());
                
                combo_sourceLanguage.addSelectionListener(new SelectionAdapter() {
@@ -158,7 +158,7 @@ public class TranslationWizardPage extends WizardPage{
         * @param element
         */
        private void createRightControls(ICdmFormElement element){
-               combo_targetLanguage = (LanguageComboElement) formFactory.createTermComboElement(TermComboType.LANGUAGE, element, null, null, SWT.NULL);
+               combo_targetLanguage = formFactory.createTermComboElement(Language.class, element, null, null, SWT.NULL);
                
                combo_targetLanguage.addSelectionListener(new SelectionAdapter() {
                        /* (non-Javadoc)
@@ -167,13 +167,18 @@ public class TranslationWizardPage extends WizardPage{
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                Language language = combo_targetLanguage.getSelection();
+                               
+                               if (language == null){
+                                       return;
+                               }
+                               
+                               setPageComplete(true);
                                LanguageString languageString;
                                
                                if(multilanguageText.containsKey(language)){
                                        languageString = multilanguageText.get(language);
                                }else{
                                        languageString = LanguageString.NewInstance("", language);
-                                       multilanguageText.put(language, languageString);
                                }
                                
                                text_target.setLanguageString(languageString);
@@ -182,30 +187,39 @@ public class TranslationWizardPage extends WizardPage{
                
                text_target = formFactory.createLanguageStringWithLabelElement(element, null, null, TEXT_HEIGHT, SWT.NULL);
                
-               Button button_translationService = formFactory.createButton(element.getLayoutComposite(), "Translate", SWT.PUSH);
-               button_translationService.addSelectionListener(new SelectionAdapter() {
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
-                       @Override
-                       public void widgetSelected(SelectionEvent event) {
-                               ITranslationServiceWrapper service = new GoogleLanguageApiWrapper();
-                               String translatedText;
-                               try {
-                                       String text = text_source.getText();
-                                       Language sourceLanguage = text_source.getLanguageString().getLanguage();
-                                       Language targetLanguage = combo_targetLanguage.getSelection();
-                                       
-                                       translatedText = service.translate(text, sourceLanguage, targetLanguage);
-                                       text_target.setText(translatedText);
-                               } catch (LanguageNotSupportedException e) {
-                                       StoreUtil.warningDialog("Language not supported", TranslationWizardPage.class, e.getMessage());
-                               } catch (Exception e){
-                                       StoreUtil.warningDialog("Error translating text", TranslationWizardPage.class, e.getMessage());
-                               }
-                               
-                       }
-               });
+               //
+               // The automated translation did rely on the Google Translate API. Unfortunately this service is not free anymore.
+               // See http://code.google.com/apis/language/translate/overview.html
+               //
+//             Button button_translationService = formFactory.createButton(element.getLayoutComposite(), "Translate", SWT.PUSH);
+//             button_translationService.addSelectionListener(new SelectionAdapter() {
+//                     /* (non-Javadoc)
+//                      * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+//                      */
+//                     @Override
+//                     public void widgetSelected(SelectionEvent event) {
+//                             ITranslationServiceWrapper service = new GoogleLanguageApiWrapper();
+//                             String translatedText;
+//                             try {
+//                                     String text = text_source.getText();
+//                                     Language sourceLanguage = text_source.getLanguageString().getLanguage();
+//                                     Language targetLanguage = combo_targetLanguage.getSelection();
+//                                     
+//                                     if(targetLanguage == null){
+//                                             StoreUtil.warningDialog("Please select a target language", TranslationWizardPage.class, "Please select a language from the combo box at the right.");
+//                                             return;
+//                                     }
+//                                     
+//                                     translatedText = service.translate(text, sourceLanguage, targetLanguage);
+//                                     text_target.setText(translatedText);
+//                             } catch (LanguageNotSupportedException e) {
+//                                     StoreUtil.warningDialog("Language not supported", TranslationWizardPage.class, "The chosen language is not supported by the translation service.");
+//                             } catch (Exception e){
+//                                     StoreUtil.warningDialog("Error translating text", TranslationWizardPage.class, e.getMessage());
+//                             }
+//                             
+//                     }
+//             });
        }
 
        
@@ -216,7 +230,15 @@ public class TranslationWizardPage extends WizardPage{
        private List<Language> getLanguages(){
                Set<Language> languageSet = MultilanguageTextHelper.getLanguages(multilanguageText);
                
-               List<Language> languageList = new ArrayList<Language>(languageSet);
+               List<Language> languageList = new ArrayList<Language>();
+               // protect against corrupt language sets
+               for (Language language : languageSet){
+                       if (language != null){
+                               languageList.add(language);
+                       }else{
+                               StoreUtil.warningDialog("Empty languages", getClass(), "The multilanguage string contains invalid data. Please contact the administrator of you datasource.");
+                       }
+               }               
                                
                return languageList;
        }
@@ -229,4 +251,12 @@ public class TranslationWizardPage extends WizardPage{
        public void dispose() {
                super.dispose();
        }
+
+       /**
+        * @return 
+        * 
+        */
+       public LanguageString getTargetLanguageString() {
+               return text_target.getLanguageString();
+       }
 }
index a395a7dd2b3cf4646033e9f5f281421943ee2dfd..43f6be1269bea7b836d3ecbbcdbaa09ef9604ee6 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchPart;
 
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
@@ -66,8 +65,6 @@ public abstract class AbstractAccountViewPart<T> extends AbstractCdmViewPart {
                }
        }
        
-       private ConversationHolder conversation;
-       
        protected TableViewer viewer;
        
        private IContextListener contextListener;
index b663c387e9367890af752e1f797d3e60452a58c4..2a019c07d46fd032af85d7ac9a7724c73bfc5384 100644 (file)
@@ -23,9 +23,10 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
 import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
 
 /**
@@ -78,7 +79,7 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
                
                body = scrolledForm.getBody();
                
-               body.setLayout(CdmFormFactory.LAYOUT());
+               body.setLayout(LayoutConstants.LAYOUT());
                
                rootElement = new RootElement(formFactory, body);
        }
@@ -225,7 +226,7 @@ public abstract class AbstractCdmDataViewer extends Viewer implements ISelection
        /**
         * <p>addPart</p>
         *
-        * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
+        * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
         */
        protected void addPart(AbstractFormSection section){
                CdmSectionPart sectionPart = new CdmSectionPart(section);
index e75e6d1adcad0b36d45751d15351721503ebf43f..afa592fa171aa06f0426f840532ede686655fd36 100644 (file)
@@ -33,10 +33,6 @@ public abstract class AbstractCdmEditorViewPart extends AbstractCdmViewPart {
 
                super.createPartControl(parent);
 
-               // show viewer if there is an open editor
-               // if(getEditor() != null){
-               // showViewer(getEditor(), new StructuredSelection(getInitialInput()));
-               // }
        }
 
        /**
index e84c11ea886f383b00742cd6557d55bfb5e14973..5a48d1831a3802a1037a7c9bb4b34e1a5727c224 100644 (file)
@@ -132,7 +132,7 @@ public abstract class AbstractCdmViewPart extends ViewPart implements ISelection
        public void setFocus() {
                if(getConversationHolder() != null){
                        getConversationHolder().bind();
-               }
+               }       
                getViewer().getControl().setFocus();    
        }
        
index 9c3097df4bd2b6a6ce70950d95f414c90d985c97..f64a6b59b6166b19eaad75e2dfaa3784d0979017 100644 (file)
@@ -66,6 +66,9 @@ public class CdmMetaDataAwareDataSourceContainer {
                        running = dataSource.testConnection();
                } catch (Exception e) {
                        running = false;
+                       for(MetaDataPropertyName metaDataPropertyName : MetaDataPropertyName.values()){
+                               metaDataMap.put(metaDataPropertyName, DEFAULT_ENTRY);                                   
+                       }
                }
                
                try {
@@ -114,7 +117,7 @@ public class CdmMetaDataAwareDataSourceContainer {
         */
        public boolean isDataSourceCompatible(){
                String version = metaDataMap.get(MetaDataPropertyName.DB_SCHEMA_VERSION);
-               return version == null ? false : CdmMetaData.isDbSchemaVersionCompatible(version);
+               return version == null || version.equals(DEFAULT_ENTRY) ? false : CdmMetaData.isDbSchemaVersionCompatible(version);
        }
 
        /**
index 4f10e1ee263c594c5ef7df435bb7b70090d777b4..bb240e89c9878e260d90a4ed75b747ab0f40ecae 100644 (file)
@@ -49,7 +49,7 @@ abstract class AbstractDataSourceHandler extends AbstractHandler {
         * @return a {@link eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer} object.
         */
        protected CdmMetaDataAwareDataSourceContainer getSelectedDataSourceContainer(ExecutionEvent event){
-               ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+               ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
                CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) ((StructuredSelection) menuSelection).getFirstElement();
                return container;
        }
index a2bc1af6cb4bb6645ed957670c7315214547bed2..ff812e4d4b5651ee61d98bbc66417dabd035a7ba 100644 (file)
@@ -45,19 +45,21 @@ public class ChangeConnectionHandler extends AbstractHandler {
                                return null;
                        }
                        
-                       if(!container.isRunning()){
+                       try {
+                               container.getDataSource().testConnection();
+                               boolean confirmed = StoreUtil.confirmDialog("Confirm Datasource Connection", "Do you really want to connect to this datasource?\n\n"
+                                               + container.getDataSource().getName());
+                               
+                               if(confirmed){
+                                       CdmDataSourceRepository.changeDataSource(container.getDataSource());
+                               }
+                       } catch (Exception e) {
                                StoreUtil.warningDialog("Chosen datasource is not available", this, "This could mean that either the database server is " +
                                                "not running or the machine is not reachable.\n\n" +
                                                "Please also make sure that you are connected to the network when trying to connect to a remote datasource.");
+                               StoreUtil.warn(getClass(), e);
                                return null;
-                       }
-                       
-                       boolean confirmed = StoreUtil.confirmDialog("Confirm Datasource Connection", "Do you really want to connect to this datasource?\n\n"
-                                       + container.getDataSource().getName());
-                       
-                       if(confirmed){
-                               CdmDataSourceRepository.changeDataSource(container.getDataSource());
-                       }
+                       } 
                }
                
                return null;
index 491235fb56a1d3902a9fddb5fe84e0343792820f..41391059cf680ccf95c9444e0ef001ffc7e9a292 100644 (file)
@@ -13,8 +13,6 @@ package eu.etaxonomy.taxeditor.view.datasource.handler;
 import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer;
 
 /**
index 7bfc465b252483912ced60feb64d30976843939b..36c9696406d8ddb1cf9c36bc6b339994704b06ed 100644 (file)
@@ -45,7 +45,9 @@ public class EditDataSourceHandler extends AbstractDataSourceHandler {
                if(result == IStatus.OK){
                        CdmDataSourceViewPart view = (CdmDataSourceViewPart) StoreUtil.getView(CdmDataSourceViewPart.ID, false);
                        if(view != null){
+                               container.getMetaDataFromDataSource();
                                view.getViewer().update(new CdmMetaDataAwareDataSourceContainer[]{container}, null);
+
                        }       
                }
                
index d173e34fda3137f417e8828165c7f200dd274169..159f4d84642ee0854ba2a67ac64be442521cc203 100644 (file)
@@ -22,9 +22,8 @@ import eu.etaxonomy.taxeditor.model.IElementHasDetails;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.IDerivedUnitFacadeDetailSection;
 
@@ -48,7 +47,7 @@ public class CdmSectionPart<T> extends SectionPart implements
         * </p>
         * 
         * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
         *            object.
         * @param <T>
         *            a T object.
@@ -85,7 +84,7 @@ public class CdmSectionPart<T> extends SectionPart implements
                }
 
                formSection.setEntity((T) input);
-
+               
                return true;
        }
 
index 8183d13ea5be1d22f5455af2d1f4aed3d0f3cb3c..f4c2c58051ebf20cfed6d2ea370d3939f8cabd2f 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 /**
- * Copyright (C) 2007 EDIT
+ * Copyright (C) 2011 EDIT
  * European Distributed Institute of Taxonomy 
  * http://www.e-taxonomy.eu
  * 
@@ -10,6 +10,8 @@
 
 package eu.etaxonomy.taxeditor.view.detail;
 
+import java.util.Set;
+
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.swt.SWT;
@@ -18,11 +20,17 @@ import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
+import eu.etaxonomy.cdm.api.service.ITermService;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.Team;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.model.description.CategoricalData;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
 import eu.etaxonomy.cdm.model.description.PolytomousKey;
@@ -32,17 +40,22 @@ import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+
+import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
 import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
@@ -61,7 +74,6 @@ import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
-import eu.etaxonomy.taxeditor.ui.section.name.HybridDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
@@ -76,8 +88,11 @@ import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailS
 import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
 import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
 import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
 
@@ -92,12 +107,6 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
  */
 public class DetailsViewer extends AbstractCdmDataViewer {
 
-       private enum VIEW_PART {
-               TAXON, NAME, REFEERENCE, TEAM, PERSON, DESCRIPTION, DESCRIPTION_ELEMENT, EMPTY, IMAGE_GALLERY, MEDIA, TEAM_OR_PERSON_BASE, DERIVED_UNIT, FEATURE_DISTRIBUTION, POLYTOMOUS_KEY, POLYTOMOUS_KEY_NODE, USER, GROUP
-       }
-
-       private VIEW_PART currentViewPart;
-
        private ISelection selection;
 
        /**
@@ -161,111 +170,95 @@ public class DetailsViewer extends AbstractCdmDataViewer {
        @Override
        protected void showParts() {
                if (getInput() instanceof TaxonBase) {
-                       if (currentViewPart != VIEW_PART.TAXON) {
-                               createTaxonSections(rootElement);
-                               currentViewPart = VIEW_PART.TAXON;
-
-                               // preserve a pointer to the AbstractNameComposite
-                               // MultiPageTaxonEditor editor =
-                               // EditorUtil.getActiveMultiPageTaxonEditor();
-                               // if(editor != null){
-                               // TaxonNameEditor page = (TaxonNameEditor)
-                               // editor.getPage(Page.NAME);
-                               // for(AbstractGroupedContainer container :
-                               // page.getGroupedContainers()){
-                               // if(container.getData() == getInput()){
-                               // sourceContainer = container;
-                               // }
-                               // }
-                               // }
-                       }
+                       createTaxonSections(rootElement);
+
                } else if (getInput() instanceof NonViralName) {
-                       if (currentViewPart != VIEW_PART.NAME) {
-                               createNameSections(rootElement);
-                               currentViewPart = VIEW_PART.NAME;
-                       }
+                       createNameSections(rootElement);
+
                } else if (getInput() instanceof Reference) {
-                       if (currentViewPart != VIEW_PART.REFEERENCE) {
-                               createReferenceSections(rootElement);
-                               currentViewPart = VIEW_PART.REFEERENCE;
-                       }
+                       createReferenceSections(rootElement);
+
                } else if (getInput() instanceof Team) {
-                       if (currentViewPart != VIEW_PART.TEAM) {
-                               createTeamDetailSection(rootElement);
-                               currentViewPart = VIEW_PART.TEAM;
-                       }
+                       createTeamDetailSection(rootElement);
+
                } else if (getInput() instanceof Person) {
-                       if (currentViewPart != VIEW_PART.PERSON) {
-                               createPersonDetailSection(rootElement);
-                               currentViewPart = VIEW_PART.PERSON;
-                       }
+                       createPersonDetailSection(rootElement);
+
                } else if (getInput() instanceof TeamOrPersonBase) {
-                       // fallback
-                       if (currentViewPart != VIEW_PART.TEAM_OR_PERSON_BASE) {
-                               createTeamOrPersonBaseDetailSection(rootElement);
-                               currentViewPart = VIEW_PART.TEAM_OR_PERSON_BASE;
-                       }
+                       createTeamOrPersonBaseDetailSection(rootElement);
+
                } else if (getInput() instanceof DescriptionBase) {
-                       if (((DescriptionBase) getInput()).isImageGallery()) {
-                               if (currentViewPart != VIEW_PART.IMAGE_GALLERY) {
-                                       createImageGallerySection(rootElement);
-                                       currentViewPart = VIEW_PART.IMAGE_GALLERY;
+                       Set<Marker> descriptionMarkers = ((DescriptionBase) getInput()).getMarkers();
+                       MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+                       Boolean isUseDescription = false;
+                       for (Marker marker : descriptionMarkers) {
+                               if (marker.getMarkerType().equals(useMarkertype)) {
+                                       isUseDescription = true;
                                }
+                       }
+                       if (((DescriptionBase) getInput()).isImageGallery()) {
+                               createImageGallerySection(rootElement);
+
+                       } else if (isUseDescription) { 
+                               createUseDescriptionSection(rootElement);
                        } else {
-                               if (currentViewPart != VIEW_PART.DESCRIPTION) {
-                                       createDescriptionSection(rootElement);
-                                       currentViewPart = VIEW_PART.DESCRIPTION;
-                               }
+                               createDescriptionSection(rootElement);
+
                        }
                } else if (getInput() instanceof DescriptionElementBase) {
-                       if (currentViewPart != VIEW_PART.DESCRIPTION_ELEMENT) {
+                       Set<Marker> descriptionMarkers = ((DescriptionElementBase) getInput()).getInDescription().getMarkers();
+                       MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType);
+                       Boolean isUseDescription = false;
+                       for (Marker marker : descriptionMarkers) {
+                               if (marker.getMarkerType().equals(useMarkertype)) {
+                                       isUseDescription = true;
+                               }
+                       }
+                       
+                       if (isUseDescription == true && getInput() instanceof CategoricalData ) {
+                               createUseRecordSection(rootElement);
+                       }
+                       else {
                                createDescriptionElementSection(rootElement);
-                               currentViewPart = VIEW_PART.DESCRIPTION_ELEMENT;
                        }
+
                } else if (getInput() instanceof Media) {
-                       if (currentViewPart != VIEW_PART.MEDIA) {
-                               createMediaElementSection(rootElement);
-                               currentViewPart = VIEW_PART.MEDIA;
-                       }
+                       createMediaElementSection(rootElement);
+
                } else if (getInput() instanceof DerivedUnitFacade) {
-                       if (currentViewPart != VIEW_PART.DERIVED_UNIT) {
-                               createDerivedUnitBaseElementSection(rootElement);
-                               currentViewPart = VIEW_PART.DERIVED_UNIT;
-                       }
+                       createDerivedUnitBaseElementSection(rootElement);
+
                } else if (getInput() instanceof FeatureNodeContainer) {
-                       if (currentViewPart != VIEW_PART.FEATURE_DISTRIBUTION) {
-                               createFeatureDistributionSection(rootElement);
-                               currentViewPart = VIEW_PART.FEATURE_DISTRIBUTION;
-                       }
+                       createFeatureDistributionSection(rootElement);
+
                } else if (getInput() instanceof PolytomousKey) {
-                       if (currentViewPart != VIEW_PART.POLYTOMOUS_KEY) {
-                               createPolytomousKeySection(rootElement);
-                               currentViewPart = VIEW_PART.POLYTOMOUS_KEY;
-                       }
+                       createPolytomousKeySection(rootElement);
+
                } else if ((getInput() instanceof PolytomousKeyNode)
                                || (getInput() instanceof PolytomousKeyRelationship)) {
-                       if (currentViewPart != VIEW_PART.POLYTOMOUS_KEY_NODE) {
-                               createPolytomousKeyNodeSection(rootElement);
-                               currentViewPart = VIEW_PART.POLYTOMOUS_KEY_NODE;
-                       }
+                       createPolytomousKeyNodeSection(rootElement);
+
                } else if (getInput() instanceof User) {
-                       if (currentViewPart != VIEW_PART.USER) {
-                               createUserSection(rootElement);
-                               currentViewPart = VIEW_PART.USER;
-                       }
+                       createUserSection(rootElement);
+
                } else if (getInput() instanceof Group) {
-                       if (currentViewPart != VIEW_PART.GROUP) {
-                               createGroupSection(rootElement);
-                               currentViewPart = VIEW_PART.GROUP;
-                       }
+                       createGroupSection(rootElement);
+
+               } else if (getInput() instanceof TaxonRelationship) {
+                       createTaxonRelationshipSection(rootElement);
+
+               } else if (getInput() instanceof TermVocabulary) {
+                       createTermVocabularySection(rootElement);
+
+               } else if (getInput() instanceof DefinedTermBase) {
+                       createDefinedTermSection(rootElement);
                } else {
                        destroySections();
-                       currentViewPart = VIEW_PART.EMPTY;
                }
-
                layout();
        }
 
+       
        /**
         * @param rootElement
         */
@@ -317,6 +310,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                fireSelectionChanged(selectionChangedEvent);
        }
 
+       /**
+        * createTaxonSections(RootElement parent)
+        * @param parent
+        */
        private void createTaxonSections(RootElement parent) {
                destroySections();
 
@@ -378,6 +375,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(parsingMessagesSection);
        }
 
+       /**
+        * createNameSections
+        * @param parent
+        */
        private void createNameSections(RootElement parent) {
                destroySections();
                NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory
@@ -426,6 +427,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(nameRelationshipSection);
        }
 
+       /**
+        * createReferenceSections
+        * @param parent
+        */
        private void createReferenceSections(RootElement parent) {
                destroySections();
 
@@ -437,6 +442,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(referenceDetailSection);
        }
 
+       /**
+        * createTeamOrPersonBaseDetailSection
+        * @param parent
+        */
        private void createTeamOrPersonBaseDetailSection(RootElement parent) {
                destroySections();
                TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = (TeamOrPersonBaseDetailSection) formFactory
@@ -447,6 +456,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(teamOrPersonBaseDetailSection);
        }
 
+       /**
+        * createTeamDetailSection
+        * @param parent
+        */
        private void createTeamDetailSection(RootElement parent) {
                destroySections();
                TeamDetailSection teamDetailSection = (TeamDetailSection) formFactory
@@ -456,7 +469,11 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                addPart(teamDetailSection);
        }
-
+       
+       /**
+        * createPersonDetailSection
+        * @param parent
+        */
        private void createPersonDetailSection(RootElement parent) {
                destroySections();
                PersonDetailSection personDetailSection = (PersonDetailSection) formFactory
@@ -466,6 +483,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(personDetailSection);
        }
 
+       /**
+        * createDescriptionElementSection
+        * @param parent
+        */
        private void createDescriptionElementSection(RootElement parent) {
                destroySections();
 
@@ -495,6 +516,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(descriptionElementMediaSection);
        }
 
+       /**
+        * createDescriptionSection
+        * @param parent
+        */
        private void createDescriptionSection(RootElement parent) {
                destroySections();
                DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
@@ -535,6 +560,32 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(descriptionSourceSection);
                addPart(scopeSection);
        }
+       
+       /**
+        * Creates the use Description section
+        * @param parent
+        */
+       private void createUseDescriptionSection(RootElement parent) {
+               destroySections();
+               DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
+                               .createCdmDetailSection(DetailType.DESCRIPTION,
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+               DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
+                               .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
+                                               getConversationHolder(), parent, Section.TWISTIE
+                                                               | Section.EXPANDED);
+
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+               addPart(descriptionDetailSection);
+               addPart(descriptionSourceSection);
+               
+       }
+
 
        /**
         * @param rootElement
@@ -548,6 +599,11 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                addPart(descriptionDetailSection);
        }
+       
+       /**
+        * createMediaElementSection
+        * @param parent
+        */
 
        private void createMediaElementSection(RootElement parent) {
                destroySections();
@@ -559,6 +615,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(mediaDetailSection);
        }
 
+       /**
+        * createDerivedUnitBaseElementSection
+        * @param parent
+        */
        private void createDerivedUnitBaseElementSection(RootElement parent) {
                destroySections();
 
@@ -584,14 +644,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = (DerivedUnitBaseDetailSection) formFactory
                                .createCdmDetailSection(DetailType.DERIVED_UNIT,
                                                getConversationHolder(), parent, this, Section.TWISTIE);
-               
-               Object getBoolean;
+
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               
+
                DeterminationDetailSection determinationDetailSection = (DeterminationDetailSection) formFactory
-                               .createCdmDetailSection(DetailType.DETERMINATION, 
+                               .createCdmDetailSection(DetailType.DETERMINATION,
                                                getConversationHolder(), parent, this, Section.TWISTIE);
-               
 
                addPart(generalDetailSection);
                addPart(gatheringEventDetailSection);
@@ -647,6 +705,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(taxonomicScopeSection);
        }
 
+       /**
+        * createPolytomousKeyNodeSection
+        * @param parent
+        */
        private void createPolytomousKeyNodeSection(RootElement parent) {
                destroySections();
 
@@ -657,7 +719,30 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
                addPart(polytomousKeyNodeDetailSection);
        }
+       
+       /**
+        * create the UseRecordSection
+        * @param parent
+        */
+       private void createUseRecordSection(RootElement parent) {
+               destroySections();
+
+               UseRecordDetailSection descriptionUseRecordSection = (UseRecordDetailSection) formFactory
+                               .createCdmDetailSection(DetailType.USE_RECORD,
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+
+               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+               
+               addPart(descriptionUseRecordSection);
+               
+               
+       }
 
+       /**
+        * createUserSection
+        * @param parent
+        */
        private void createUserSection(RootElement parent) {
                destroySections();
 
@@ -674,4 +759,51 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                addPart(userDetailSection);
                addPart(groupByUserDetailSection);
        }
+
+       /**
+        * createTaxonRelationshipSection
+        * @param parent
+        */
+       private void createTaxonRelationshipSection(RootElement parent) {
+               destroySections();
+
+               TaxonRelationshipDetailSection taxonRelationshipDetailSection = (TaxonRelationshipDetailSection) formFactory
+                               .createCdmDetailSection(DetailType.TAXON_RELATIONSHIP,
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+
+               ReferencedEntityDetailSection referencedEntityBaseDetailSection = (ReferencedEntityDetailSection) formFactory
+                               .createCdmDetailSection(DetailType.REFERENCED_ENTITY,
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+               addPart(taxonRelationshipDetailSection);
+               addPart(referencedEntityBaseDetailSection);
+       }
+
+       /**
+        * @param rootElement
+        */
+       private void createTermVocabularySection(RootElement parent) {
+               destroySections();
+
+               TermVocabularyDetailSection termVocabularyDetailSection = (TermVocabularyDetailSection) formFactory
+                               .createCdmDetailSection(DetailType.TERM_VOCABULARY,
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+               addPart(termVocabularyDetailSection);
+       }
+
+       /**
+        * createDefinedTermSection
+        * @param parent
+        */
+       private void createDefinedTermSection(RootElement parent) {
+               destroySections();
+
+               AbstractFormSection definedTermDetailSection = formFactory
+                               .createDefinedTermDetailSection(getInput().getClass(),
+                                               getConversationHolder(), parent, this, Section.TWISTIE
+                                                               | Section.EXPANDED);
+               addPart(definedTermDetailSection);
+       }
 }
index dc6e56fa3eb1cb275e404661e6e8f59ba5fb4362..36a2d9b31d1d79dd9f47cf61de05c6df849a1c0e 100644 (file)
@@ -19,15 +19,18 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
 import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
 import eu.etaxonomy.taxeditor.model.IElementHasDetails;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.RootElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.RootElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
@@ -48,15 +51,7 @@ import eu.etaxonomy.taxeditor.view.detail.DetailsViewer;
  */
 public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISelectionChangedListener {
 
-       private enum VIEW_PART{
-               VersionableEntity, 
-               AnnotatableEntity, 
-               IdentifiableEntity, 
-               IdentifiableMediaEntity,
-               EMPTY;
-       }
-       
-       private VIEW_PART currentViewPart;
+       private boolean showDebug;
 
        
        /**
@@ -95,6 +90,8 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
        @Override
        protected void showParts() {
                
+               showDebug = PreferencesUtil.getPreferenceStore().getBoolean(PreferencesUtil.SHOW_DEBUG_INFORMATION);
+                               
                Object input;
                
                if(getInput() instanceof IElementHasDetails){
@@ -103,45 +100,41 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
                        input = getInput();
                }
                
-               if(input instanceof IdentifiableMediaEntity){
-                       if(currentViewPart != VIEW_PART.IdentifiableMediaEntity){
-                               currentViewPart = VIEW_PART.IdentifiableMediaEntity;
-                               createIdentifiableMediaSections(rootElement);
-                       }
-               }else if(input instanceof IdentifiableEntity){
-                       if(currentViewPart != VIEW_PART.IdentifiableEntity){
-                               currentViewPart = VIEW_PART.IdentifiableEntity;
-                               createIdentifiableSections(rootElement);
-                       }
-               }else if(input instanceof AnnotatableEntity){
-                       if(currentViewPart != VIEW_PART.AnnotatableEntity){
-                               currentViewPart = VIEW_PART.AnnotatableEntity;
+               destroySections();
+               //1. Headline
+               createHeadlineSection(rootElement);
+               //2. Annotatable entitiy
+               if(input instanceof AnnotatableEntity){ 
                                createAnnotationSections(rootElement);
-                       }
-               }else if(input instanceof VersionableEntity){
-                       if(currentViewPart != VIEW_PART.VersionableEntity){
-                               currentViewPart = VIEW_PART.VersionableEntity;
-                               createHeadlineSection(rootElement);
-                       }
-               }else{
-                       currentViewPart = VIEW_PART.EMPTY;
+               }
+               //3. Identifiable entity
+               if(input instanceof IdentifiableEntity){
+                       createIdentifiableSections(rootElement);
+               }
+               //4. Identifiable media entity
+               if(input instanceof IdentifiableMediaEntity){
+                       createIdentifiableMediaSections(rootElement);                   
+               }
+               //5. Versionable
+               if(input instanceof VersionableEntity){
+                               createVersionSection(rootElement);
+               }       
+               //6. CdmBase
+               if(showDebug){
+                       createCdmBaseSection(rootElement);
                }
                
                layout();
        }
-       
+
+
+
        private void createHeadlineSection(RootElement parent){
-               destroySections();
                HeadlineSection headlineSection = formFactory.createHeadlineSection(parent);
                addPart(headlineSection);
-               
-               if(currentViewPart == VIEW_PART.VersionableEntity){
-                       createVersionSection(parent);
-               }
        }
        
        private void createAnnotationSections(RootElement parent){
-               createHeadlineSection(parent);
                AnnotationSection annotationSection = (AnnotationSection) 
                        formFactory.createEntityDetailSection(EntityDetailType.ANNOTATION, getConversationHolder(), parent, Section.TWISTIE);
                
@@ -154,14 +147,9 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
                
                addPart(annotationSection);
                addPart(markerSection);
-               
-               if(currentViewPart == VIEW_PART.AnnotatableEntity){
-                       createVersionSection(parent);
-               }
        }
 
-       private void createIdentifiableSections(RootElement parent){
-               createAnnotationSections(parent);               
+       private void createIdentifiableSections(RootElement parent){            
                CreditSection creditSection = (CreditSection) 
                        formFactory.createEntityDetailSection(EntityDetailType.CREDIT, getConversationHolder(), parent, Section.TWISTIE);
                
@@ -187,23 +175,15 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
                addPart(rightsSection);
                addPart(sourceSection);
                
-               if(currentViewPart == VIEW_PART.IdentifiableEntity){
-                       createVersionSection(parent);
-               }
        }
        
        private void createIdentifiableMediaSections(RootElement parent){
-               createIdentifiableSections(parent);
                MediaSection mediaSection = (MediaSection) 
                        formFactory.createEntityDetailSection(EntityDetailType.MEDIA, getConversationHolder(), parent, Section.TWISTIE);
                
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                
                addPart(mediaSection);
-               
-               if(currentViewPart == VIEW_PART.IdentifiableMediaEntity){
-                       createVersionSection(parent);
-               }
        }
        
        private void createVersionSection(RootElement parent){          
@@ -211,6 +191,15 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
                addPart(versionSection);
        }
        
+       /**
+        * @param rootElement
+        */
+       private void createCdmBaseSection(RootElement parent) {
+               
+               CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, Section.NO_TITLE | Section.EXPANDED);
+               addPart(cdmBaseSection);
+       }
+       
        /*
         * (non-Javadoc)
         * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
@@ -220,7 +209,6 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
                if(event.getSource() instanceof DetailsViewer){
                        if(event.getSelection() == CdmFormFactory.EMPTY_SELECTION){
                                setInput(null);
-                               currentViewPart = VIEW_PART.EMPTY;
                                return;
                        }
                        
index 8db6310aedc59ecbc1df649b39323765b1fc61bf..12d3a7cdd6d733338f1e108848d412f566620e95 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src/test/java"/>
        <classpathentry kind="src" path="src/main/resources"/>
-       <classpathentry kind="output" path="bin"/>
+       <classpathentry kind="output" path="target/classes"/>
 </classpath>
index b61e872f72a9a62945cd34258e2e046384c442f2..e392ea141b999f93e258045433f826bbc6ca0b3b 100644 (file)
@@ -1,8 +1,8 @@
-#Thu Mar 31 16:21:36 CEST 2011\r
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
-org.eclipse.jdt.core.compiler.compliance=1.5\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.5\r
+#Wed Oct 05 13:31:15 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
index bc6fbe4df78f33a1f5a09d026c1c916826f9ad2f..0af0c2d141c943b4af3feb37552bcc5308c65818 100644 (file)
@@ -2,17 +2,25 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: eu.etaxonomy.taxeditor.test
 Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 3.0.10.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: EDIT
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.apache.log4j;bundle-version="1.2.13",
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.apache.log4j,
+ org.eclipse.ui;bundle-version="3.6.2",
  org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.swt;bundle-version="3.6.2",
- org.eclipse.swtbot.eclipse.core;bundle-version="2.0.4",
- org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.4",
- org.eclipse.swtbot.junit4_x;bundle-version="2.0.4",
- org.junit;bundle-version="4.8.1",
- org.eclipse.ui.ide;bundle-version="3.6.2",
- org.hamcrest;bundle-version="1.1.0"
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.5",
+ org.eclipse.swtbot.eclipse.finder,
+ org.eclipse.swtbot.junit4_x,
+ org.hamcrest,
+ org.eclipse.ui.ide,
+ org.junit4,
+ eu.etaxonomy.taxeditor.application;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.bulkeditor;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.cdmlib;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.editor;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.help;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.navigation;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.printpublisher;bundle-version="3.0.6",
+ eu.etaxonomy.taxeditor.store;bundle-version="3.0.6"
 Eclipse-RegisterBuddy: org.apache.log4j
index dbd5f74b823e90447121ebe2fdd097c8d0cb9990..137d6a59ccc7ed4073b31469643cef499bfe3f0a 100644 (file)
@@ -1,4 +1,3 @@
-source.. = src_/
-output.. = bin/
+source.. = src/test/java/
 bin.includes = META-INF/,\
                .
index b1625329f14c63e0d37236e12d02406cc1d54377..f4adadba77060dd627c9dd8990e9669b2f9f1165 100644 (file)
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">\r
-<booleanAttribute key="append.args" value="true"/>\r
-<booleanAttribute key="askclear" value="false"/>\r
-<booleanAttribute key="automaticAdd" value="true"/>\r
-<booleanAttribute key="automaticValidate" value="false"/>\r
-<stringAttribute key="bootstrap" value=""/>\r
-<stringAttribute key="checked" value="[NONE]"/>\r
-<booleanAttribute key="clearConfig" value="true"/>\r
-<booleanAttribute key="clearws" value="true"/>\r
-<booleanAttribute key="clearwslog" value="true"/>\r
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>\r
-<booleanAttribute key="default" value="true"/>\r
-<booleanAttribute key="includeOptional" value="true"/>\r
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">\r
-<listEntry value="/eu.etaxonomy.taxeditor.test/src/test/java"/>\r
-</listAttribute>\r
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
-<listEntry value="2"/>\r
-</listAttribute>\r
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=eu.etaxonomy.taxeditor.test/src\/test\/java"/>\r
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>\r
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>\r
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>\r
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="eu.etaxonomy.taxeditor.test"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>\r
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256M -Xmx768M -XX:MaxPermSize=512M"/>\r
-<stringAttribute key="pde.version" value="3.3"/>\r
-<stringAttribute key="product" value="eu.etaxonomy.taxeditor.application.product"/>\r
-<booleanAttribute key="show_selected_only" value="false"/>\r
-<booleanAttribute key="tracing" value="false"/>\r
-<booleanAttribute key="useCustomFeatures" value="false"/>\r
-<booleanAttribute key="useDefaultConfig" value="true"/>\r
-<booleanAttribute key="useDefaultConfigArea" value="false"/>\r
-<booleanAttribute key="useProduct" value="true"/>\r
-</launchConfiguration>\r
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="true"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/eu.etaxonomy.taxeditor.test/src/test/java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="2"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=eu.etaxonomy.taxeditor.test/src\/test\/java"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="eu.etaxonomy.taxeditor.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256M -Xmx768M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/eu.etaxonomy.taxeditor.test/pom.xml b/eu.etaxonomy.taxeditor.test/pom.xml
new file mode 100644 (file)
index 0000000..cbabcdb
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project>\r
+\r
+       <parent>\r
+               <groupId>eu.etaxonomy</groupId>\r
+               <artifactId>taxeditor-parent</artifactId>\r
+               <version>3.0.12-SNAPSHOT</version>\r
+       </parent>\r
+       <modelVersion>4.0.0</modelVersion>\r
+       <artifactId>eu.etaxonomy.taxeditor.test</artifactId>\r
+       <packaging>eclipse-test-plugin</packaging>\r
+       <name>UI Test Bundle</name>\r
+       <description>Holds all UI tests for the Taxonomic Editor</description>\r
+       <!-- <repositories> -->\r
+       <!-- <repository> -->\r
+       <!-- <id>ganymede</id> -->\r
+       <!-- <layout>p2</layout> -->\r
+       <!-- <url>http://download.eclipse.org/releases/galileo</url> -->\r
+       <!-- </repository> -->\r
+       <!-- <repository> -->\r
+       <!-- <id>swtbot</id> -->\r
+       <!-- <layout>p2</layout> -->\r
+       <!-- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site</url> -->\r
+       <!-- </repository> -->\r
+       <!-- </repositories> -->\r
+\r
+       <build>\r
+               <plugins>\r
+                       <plugin>\r
+                               <groupId>org.eclipse.tycho</groupId>\r
+                               <artifactId>tycho-maven-plugin</artifactId>\r
+                               <version>${tycho.version}</version>\r
+                               <extensions>true</extensions>\r
+                       </plugin>\r
+                       <plugin>\r
+                               <groupId>org.eclipse.tycho</groupId>\r
+                               <artifactId>target-platform-configuration</artifactId>\r
+                               <version>${tycho.version}</version>\r
+                               <configuration>\r
+                                       <resolver>p2</resolver>\r
+                               </configuration>\r
+                       </plugin>\r
+                       <plugin>\r
+                               <groupId>org.eclipse.tycho</groupId>\r
+                               <artifactId>tycho-surefire-plugin</artifactId>\r
+                               <version>${tycho.version}</version>\r
+                               <configuration>\r
+                                       <useUIHarness>true</useUIHarness>\r
+                                       <useUIThread>false</useUIThread>\r
+                                       <includes>\r
+                                               <include>**/*Test.java</include>\r
+                                       </includes>\r
+                                       <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>\r
+                       <application>eu.etaxonomy.taxeditor.application.application</application>\r
+                                       <!-- <dependency>
+                                               <type>p2-installable-unit</type>
+                                               <artifactId>eu.etaxonomy.taxeditor.product</artifactId>
+                                               <version>0.0.0</version>
+                                       </dependency> -->\r
+                               </configuration>\r
+                       </plugin>\r
+                       <!-- <plugin>
+                       <groupId>org.eclipse.tycho</groupId>
+                       <artifactId>maven-osgi-test-plugin</artifactId>
+                       <version>${tycho.version}</version>
+                       <configuration>
+                       <useUIHarness>true</useUIHarness>
+                       <useUIThread>false</useUIThread>
+                       <product>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</product>
+                       <application>org.eclipse.ui.ide.workbench</application>
+                       <dependencies>
+                       <dependency>
+                       <type>p2-installable-unit</type>
+                       <artifactId>eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product</artifactId>
+                       <version>0.0.0</version>
+                       </dependency>
+                       </dependencies>
+                       </configuration>
+                       </plugin> -->\r
+               </plugins>\r
+       </build>\r
+</project>
\ No newline at end of file
similarity index 73%
rename from eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java
rename to eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java
index cb49f1f043fe81d3fced8a82497d2deb4edcb6cd..0dc9065267426971ed1f9a6f79b42a9dd61050a6 100644 (file)
@@ -1,10 +1,12 @@
-package eu.etaxonomy.taxeditor.test;\r
+package eu.etaxonomy.taxeditor.application.menu.general;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
 import org.junit.Test;\r
 \r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
 /**\r
- * Open all new menus\r
+ * Open all "General -> New" menus\r
  * \r
  * @author n.hoffmann\r
  *\r
@@ -14,48 +16,48 @@ public class NewMenuTest extends AbstractEditorTest {
        @Test\r
        public void canOpenNewWizardForTaxon(){\r
                openNewWizardFor("Taxon");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
 \r
        @Test\r
        public void canOpenNewWizardForReference(){\r
                openNewWizardFor("Reference");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
        \r
        @Test\r
        public void canOpenNewWizardForName(){\r
                openNewWizardFor("Name");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
        \r
        @Test\r
        public void canOpenNewWizardForTeam(){\r
                openNewWizardFor("Team");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
        \r
        @Test\r
        public void canOpenNewWizardForPerson(){\r
                openNewWizardFor("Person");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
        @Test\r
        public void canOpenNewWizardForSpecimen(){\r
                openNewWizardFor("Specimen");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
        \r
        \r
        @Test\r
        public void canOpenNewWizardForClassification(){\r
                openNewWizardFor("Classification");\r
-               cancel();\r
+               utils.cancel();\r
        }\r
 \r
        private void openNewWizardFor(String entity) {\r
similarity index 72%
rename from eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java
rename to eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java
index d73aa5bcc5a54f068f031f866e175f3da5ae426a..6d4dac58c945cd11c6a03da2b499e8f444c74bdd 100644 (file)
@@ -1,7 +1,7 @@
 /**\r
  * \r
  */\r
-package eu.etaxonomy.taxeditor.test;\r
+package eu.etaxonomy.taxeditor.navigation.navigator.contextmenu;\r
 \r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
@@ -9,6 +9,9 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
 import org.junit.Before;\r
 import org.junit.Test;\r
 \r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+import eu.etaxonomy.taxeditor.test.ContextMenuHelper;\r
+\r
 /**\r
  * @author n.hoffmann\r
  *\r
@@ -21,8 +24,8 @@ public class ClassificationTest extends AbstractEditorTest {
        @Before\r
        public void setup() {\r
                super.setup();\r
-               navigatorView = view("Taxon Navigator");\r
-               tree = tree(navigatorView.getWidget());\r
+               navigatorView = utils.view("Taxon Navigator");\r
+               tree = utils.tree(navigatorView.getWidget());\r
        }\r
        \r
        @Test\r
@@ -30,7 +33,7 @@ public class ClassificationTest extends AbstractEditorTest {
                tree.select(0);\r
                ContextMenuHelper.clickContextMenu(tree, "Delete");\r
                bot.waitUntil(Conditions.shellIsActive("Confirm Deletion"));\r
-               bot.button("OK").click();\r
+               utils.ok();\r
        }\r
        \r
        @Test\r
@@ -39,6 +42,6 @@ public class ClassificationTest extends AbstractEditorTest {
                ContextMenuHelper.clickContextMenu(tree, "New", "Classification");\r
                bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
                bot.textWithLabel("Label").setText("Classification");\r
-               bot.button("Finish").click();\r
+               utils.finish();\r
        }\r
 }\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java
new file mode 100644 (file)
index 0000000..1c09585
--- /dev/null
@@ -0,0 +1,55 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.newWizard;\r
+\r
+import junit.framework.Assert;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;\r
+import org.junit.Test;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NewTaxonWizardTest extends AbstractEditorTest {\r
+\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Test\r
+       public void unalteredDialogCanNotBefinished() {\r
+               boolean finishIsEnabled = bot.button("Finish").isEnabled();\r
+               Assert.assertEquals(false, finishIsEnabled);\r
+               utils.cancel();\r
+       }\r
+       \r
+       @Test\r
+       public void canCreateNewTaxonMinimal(){\r
+               utils.openFilteredSelection(0, "Choose a Classification");\r
+\r
+               SWTBotButton okButton = bot.button(1);\r
+               bot.text(0).setText("?");\r
+               bot.waitUntil(Conditions.widgetIsEnabled(okButton));\r
+               utils.ok();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+               String newTaxonName = "Test taxon Smartbert";\r
+               bot.textWithLabel("New Taxon").setText(newTaxonName);\r
+               bot.waitUntil(Conditions.widgetIsEnabled(bot.button("Finish")));\r
+               utils.finish();\r
+               \r
+//             bot.waitUntil(Conditions.waitForEditor(WithPartId.withPartId(MultiPageTaxonEditor.ID)));\r
+//             Assert.assertEquals(newTaxonName, bot.activeEditor().getTitle());\r
+       }\r
+       \r
+       \r
+\r
+       \r
+}\r
index f6da7727e270ae6a867c1058ab4c74b2aedf9c90..78a24ab76e8d9819c9f9ab75e063755b84fc4751 100644 (file)
@@ -3,19 +3,10 @@
  */\r
 package eu.etaxonomy.taxeditor.test;\r
 \r
-import java.util.List;\r
-\r
-import org.eclipse.swt.widgets.Tree;\r
-import org.eclipse.swt.widgets.Widget;\r
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;\r
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;\r
 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;\r
-import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;\r
 import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;\r
 import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;\r
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;\r
 import org.junit.Before;\r
 import org.junit.runner.RunWith;\r
 \r
@@ -28,48 +19,34 @@ public abstract class AbstractEditorTest {
        \r
        protected SWTWorkbenchBot bot;\r
        \r
+       public SwtBotUtils utils;\r
+       \r
        @Before\r
        public void setup() {\r
                bot = new SWTWorkbenchBot();\r
                SWTBotPreferences.TIMEOUT = 300000;\r
+               utils = new SwtBotUtils(bot);\r
+               \r
+               // unfortunately swt bot is not available at the time this is set up\r
+//             if("Choose a nomenclatural code".equals(getActiveShellHeadline())){\r
+//                     ok();\r
+//                     bot.waitUntil(Conditions.shellIsActive("Nomenclatural code set"));\r
+//                     ok();\r
+//             }\r
                \r
-               String activeText = bot.activeShell().getText();\r
-               if(activeText.equals("Connecting to datasource: cdm")){\r
-                       bot.waitUntil(Conditions.shellIsActive("Login"));\r
-                       bot.button("Cancel").click();\r
+               if("Connecting to datasource: cdm".equals(utils.getActiveShellHeadline())){\r
+                       performLogin();\r
                }\r
        }\r
-\r
-       \r
-       /**\r
-        * @return\r
-        * @throws WidgetNotFoundException\r
-        */\r
-       public SWTBotTree tree(Widget widget) throws WidgetNotFoundException {\r
-               List<Tree> controls = new ChildrenControlFinder(widget).findControls(WidgetMatcherFactory.widgetOfType(Tree.class));\r
-               if (controls.isEmpty())\r
-                       throw new WidgetNotFoundException("Could not find any tree");\r
-               SWTBotTree tree = new SWTBotTree((Tree) controls.get(0));\r
-               return tree;\r
-       }\r
-\r
-       /**\r
-        * @return\r
-        * @throws WidgetNotFoundException\r
-        */\r
-       public SWTBotView view(String title) throws WidgetNotFoundException {\r
-               return bot.viewByTitle(title);\r
-       }\r
        \r
-       public void cancel() {\r
-               clickButton("Cancel");\r
+       private void performLogin(){\r
+               bot.waitUntil(Conditions.shellIsActive("Login"));\r
+               bot.textWithLabel("Username").setText("admin");\r
+               bot.textWithLabel("Password").setText("00000");\r
+               bot.button("OK").click();\r
        }\r
        \r
-       public void ok() {\r
-               clickButton("OK");\r
-       }\r
+\r
        \r
-       public void clickButton(String label) {\r
-               bot.button(label).click();\r
-       }\r
+\r
 }\r
index 37371d05ce14176faaac19f572ba515ac0f17567..8fe523c707fe7aea274ea6b68fbdf176a2fefaf7 100644 (file)
@@ -24,9 +24,9 @@ public class ContextMenuHelper {
         * Clicks the context menu matching the text.\r
         *\r
         * @param text\r
-        * the text on the context menu.\r
+        *              the text on the context menu.\r
         * @throws WidgetNotFoundException\r
-        * if the widget is not found.\r
+        *              if the widget is not found.\r
         */\r
        public static void clickContextMenu(final AbstractSWTBot<?> bot,\r
                        final String... texts) {\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java
deleted file mode 100644 (file)
index e9ac066..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package eu.etaxonomy.taxeditor.test;\r
-\r
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.junit.Test;\r
-\r
-\r
-public class LoginTest extends AbstractEditorTest{\r
-               \r
-       @Test\r
-       public void canLoginAsAdmin() throws Exception {\r
-               bot.menu("General").menu("Login").click();\r
-               bot.waitUntil(Conditions.shellIsActive("Login"));\r
-               bot.textWithLabel("Username").setText("admin");\r
-               bot.textWithLabel("Password").setText("0000");\r
-               bot.button("Cancel").click();\r
-       }\r
-       \r
-}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java
deleted file mode 100644 (file)
index 7fc285c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/**\r
- * \r
- */\r
-package eu.etaxonomy.taxeditor.test;\r
-\r
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
-import org.junit.After;\r
-import org.junit.Ignore;\r
-import org.junit.Test;\r
-\r
-/**\r
- * @author n.hoffmann\r
- *\r
- */\r
-public class NewTaxonWizardTest extends AbstractEditorTest {\r
-\r
-       @Override\r
-       public void setup() {\r
-               super.setup();\r
-               bot.menu("General").menu("New").menu("Taxon").click();\r
-               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
-       }\r
-       \r
-       @Ignore\r
-       @Test\r
-       public void canSelectClassification() {\r
-               bot.button("Browse existing").click();\r
-               bot.waitUntil(Conditions.shellIsActive("Choose a Classification"));\r
-       }\r
-       \r
-       @After\r
-       public void tearDown() {\r
-               clickButton("Finish");\r
-       }\r
-}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java
new file mode 100644 (file)
index 0000000..b2d7c45
--- /dev/null
@@ -0,0 +1,83 @@
+package eu.etaxonomy.taxeditor.test;\r
+\r
+import java.util.List;\r
+\r
+import org.eclipse.osgi.internal.loader.FilteredSourcePackage;\r
+import org.eclipse.swt.widgets.Tree;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;\r
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;\r
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;\r
+import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;\r
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;\r
+\r
+public class SwtBotUtils {\r
+       \r
+       private SWTWorkbenchBot bot;\r
+       \r
+       public SwtBotUtils(SWTWorkbenchBot bot) {\r
+               this.bot = bot;\r
+       }\r
+       \r
+       /**\r
+        * @return\r
+        * @throws WidgetNotFoundException\r
+        */\r
+       public SWTBotTree tree(Widget widget) throws WidgetNotFoundException {\r
+               List<Tree> controls = new ChildrenControlFinder(widget).findControls(WidgetMatcherFactory.widgetOfType(Tree.class));\r
+               if (controls.isEmpty())\r
+                       throw new WidgetNotFoundException("Could not find any tree");\r
+               SWTBotTree tree = new SWTBotTree((Tree) controls.get(0));\r
+               return tree;\r
+       }\r
+       \r
+       /**\r
+        * \r
+        * @param index the index of the SelectionElement\r
+        * @param dialogName the title of the expected dialog\r
+        */\r
+       public void openFilteredSelection(int index, String dialogName){\r
+               SWTBotButton existing = bot.buttonWithTooltip("Browse existing", index);\r
+               existing.click();\r
+               bot.waitUntil(Conditions.shellIsActive(dialogName));\r
+       }\r
+\r
+       /**\r
+        * @return\r
+        * @throws WidgetNotFoundException\r
+        */\r
+       public SWTBotView view(String title) throws WidgetNotFoundException {\r
+               return getBot().viewByTitle(title);\r
+       }\r
+       \r
+       public void cancel() {\r
+               clickButton("Cancel");\r
+       }\r
+       \r
+       public void ok() {\r
+               clickButton("OK");\r
+       }\r
+       \r
+       public void finish() {\r
+               clickButton("Finish");\r
+       }\r
+       \r
+       public void clickButton(String label) {\r
+               getBot().button(label).click();\r
+       }\r
+       \r
+       public String getActiveShellHeadline(){\r
+               return getBot().activeShell().getText();\r
+       }\r
+\r
+       public SWTWorkbenchBot getBot() {\r
+               return bot;\r
+       }\r
+\r
+       public void setBot(SWTWorkbenchBot bot) {\r
+               this.bot = bot;\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java
new file mode 100644 (file)
index 0000000..2905ba5
--- /dev/null
@@ -0,0 +1,27 @@
+package eu.etaxonomy.taxeditor.ui.dialogs;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+\r
+public class LoginDialogTest extends AbstractEditorTest{\r
+               \r
+       @Test\r
+       public void canLoginAsAdmin() throws Exception {\r
+               bot.menu("General").menu("Login").click();\r
+               bot.waitUntil(Conditions.shellIsActive("Login"));\r
+               bot.textWithLabel("Username").setText("admin");\r
+               bot.textWithLabel("Password").setText("00000");\r
+               utils.ok();\r
+       }\r
+       \r
+       @Test\r
+       public void canCancelLogin() throws Exception {\r
+               bot.menu("General").menu("Login").click();\r
+               bot.waitUntil(Conditions.shellIsActive("Login"));\r
+               utils.cancel();\r
+       }\r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java
new file mode 100644 (file)
index 0000000..adccccf
--- /dev/null
@@ -0,0 +1,27 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.junit.After;\r
+\r
+import eu.etaxonomy.taxeditor.test.AbstractEditorTest;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public abstract class AbstractSelectionElementTest extends AbstractEditorTest{\r
+\r
+       \r
+\r
+       @After\r
+       public void tearDown() {\r
+               utils.cancel();\r
+       }\r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java
new file mode 100644 (file)
index 0000000..245f934
--- /dev/null
@@ -0,0 +1,30 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class ClassificationSelectionElementTest extends AbstractSelectionElementTest{\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Test\r
+       public void canSelectClassification() {\r
+               utils.openFilteredSelection(0, "Choose a Classification");\r
+               utils.cancel();\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java
new file mode 100644 (file)
index 0000000..a8b653c
--- /dev/null
@@ -0,0 +1,26 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NameSelectionElementTest extends AbstractSelectionElementTest {\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Test\r
+       public void canSelectName() {\r
+               utils.openFilteredSelection(3, "Choose a name");\r
+               utils.cancel();\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java
new file mode 100644 (file)
index 0000000..2b29c87
--- /dev/null
@@ -0,0 +1,27 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class TaxonNodeSelectionElementTest extends AbstractSelectionElementTest {\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Test\r
+       public void canSelectTaxon() {\r
+               utils.openFilteredSelection(1, "Select parent taxon");\r
+               utils.cancel();\r
+       }\r
+       \r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java
new file mode 100644 (file)
index 0000000..af84076
--- /dev/null
@@ -0,0 +1,30 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.ui.selection;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * This test will only test the selection element itself. The test may have to start other \r
+ * dialogs open windows before to get at the selection element. Any errors on the way \r
+ * should be handled by different tests.\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class TaxonSelectionElementTest extends AbstractSelectionElementTest {\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Test\r
+       public void canSelectTaxon() {\r
+               utils.openFilteredSelection(2, "Choose a taxon");\r
+               utils.cancel();\r
+       }\r
+}\r
index 0a27fa01d665fccbbf944f39884c6b606e8fa218..4a714859db8a73d0b36e42824382e92f453734ad 100644 (file)
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.0.6.qualifier" useFeatures="true" includeLaunchers="true">
-
-   <aboutInfo>
-      <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
-      <text>
-         %productBlurb
-      </text>
-   </aboutInfo>
-
-   <configIni use="default">
-   </configIni>
-
-   <launcherArgs>
-      <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080</programArgs>
-      <vmArgs>-Xmx512M -XX:MaxPermSize=256M</vmArgs>
-      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
-   </launcherArgs>
-
-   <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
-
-   <splash
-      location="eu.etaxonomy.taxeditor.application"
-      startupProgressRect="5,447,366,15"
-      startupMessageRect="7,432,360,20"
-      startupForegroundColor="000000" />
-   <launcher name="TaxonomicEditor">
-      <solaris/>
-      <win useIco="false">
-         <bmp/>
-      </win>
-   </launcher>
-
-   <vm>
-   </vm>
-
-   <license>
-        <url>http://www.mozilla.org/MPL/</url>
-        <text>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?pde version="3.5"?>\r
+\r
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.0.12.qualifier" useFeatures="true" includeLaunchers="true">\r
+\r
+   <aboutInfo>\r
+      <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>\r
+      <text>\r
+         %productBlurb\r
+      </text>\r
+   </aboutInfo>\r
+\r
+   <configIni use="default">\r
+   </configIni>\r
+\r
+   <launcherArgs>\r
+      <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080</programArgs>\r
+      <vmArgs>-Xmx512M -XX:MaxPermSize=256M</vmArgs>\r
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>\r
+   </launcherArgs>\r
+\r
+   <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>\r
+\r
+   <splash\r
+      location="eu.etaxonomy.taxeditor.application"\r
+      startupProgressRect="5,447,366,15"\r
+      startupMessageRect="7,432,360,20"\r
+      startupForegroundColor="000000" />\r
+   <launcher name="TaxonomicEditor">\r
+      <solaris/>\r
+      <win useIco="false">\r
+         <bmp/>\r
+      </win>\r
+   </launcher>\r
+\r
+   <vm>\r
+   </vm>\r
+\r
+   <license>\r
+        <url>http://www.mozilla.org/MPL/</url>\r
+        <text>\r
    The contents of this file are subject to the Mozilla Public License Version 1.1 (the &amp;quot;License&amp;quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 http://www.mozilla.org/MPL/
 
-Software distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
-         </text>
-   </license>
-
-   <plugins>
-   </plugins>
-
-   <features>
-      <feature id="eu.etaxonomy.taxeditor.feature" version="3.0.6.qualifier"/>
-   </features>
-
-   <configurations>
-      <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="4" />
-   </configurations>
-
-</product>
+Software distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.\r
+         </text>\r
+   </license>\r
+\r
+   <plugins>\r
+   </plugins>\r
+\r
+   <features>\r
+      <feature id="eu.etaxonomy.taxeditor.feature"/>\r
+   </features>\r
+\r
+   <configurations>\r
+      <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="4" />\r
+   </configurations>\r
+\r
+</product>\r
index 6724529f30273f58123da66ca9f45a8b2c65541c..73d0bbd110b78879e157f557920d43becad95208 100644 (file)
@@ -3,26 +3,19 @@
        <parent>
                <groupId>eu.etaxonomy</groupId>
                <artifactId>taxeditor-parent</artifactId>
-               <version>3.0.6-SNAPSHOT</version>
+               <version>3.0.12-SNAPSHOT</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
        <artifactId>eu.etaxonomy.taxeditor</artifactId>
-       <!-- packaging>eclipse-application</packaging -->
        <packaging>eclipse-repository</packaging>
 
-       <name>EDIT Taxonomic Editor</name>
+       <name>EDIT Taxonomic Editor Product</name>
        <description>The EDIT Taxonomic Desktop Editor</description>
        <url>http://wp5.e-taxonomy.eu/taxeditor</url>
 
        <build>
                <plugins>
-                       <!-- plugin> <groupId>org.sonatype.tycho</groupId> <artifactId>maven-osgi-packaging-plugin</artifactId> 
-                               <version>${tycho.version}</version> <configuration> <environments> <environment> 
-                               <os>macosx</os> <ws>cocoa</ws> <arch>x86</arch> </environment> <environment> 
-                               <os>linux</os> <ws>gtk</ws> <arch>x86</arch> </environment> <environment> 
-                               <os>win32</os> <ws>win32</ws> <arch>x86</arch> </environment> </environments> 
-                               </configuration> </plugin -->
                        <plugin>
                                <groupId>org.eclipse.tycho</groupId>
                                <artifactId>tycho-p2-director-plugin</artifactId>
                                                </goals>
                                        </execution>
                                </executions>
+                               <configuration>
+                                       <products>
+                                               <product>
+                                                       <id>eu.etaxonomy.taxeditor.product</id>
+                                                       <rootFolder>EDIT Taxonomic Editor</rootFolder>
+                                               </product>
+                                       </products>
+                               </configuration>
                        </plugin>
                </plugins>
        </build>
index 7f4c8d099e0bccb34d53418bdf5faf240370cb76..f58b4690f4dbcf516e506211fc20d93f13cad4bd 100644 (file)
@@ -1,23 +1,27 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.6"?>
 
-<target name="Eclipse Helios Target">
+<target name="Eclipse Indigo Target" sequenceNumber="4">
 <locations>
-<location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.4.2.R36x_v20110125-7N7K7bF8zk1BAKMh0iz0t94miBLY"/>
-<unit id="org.eclipse.platform.source.feature.group" version="3.6.2.r362_v20110210-9gF78Gs1FrIGnHDHWkEcopoN8AmxeZflGDGKQi"/>
-<unit id="org.eclipse.platform.sdk" version="3.6.2.M20110210-1200"/>
-<unit id="org.eclipse.pde.feature.group" version="3.6.2.r362_v20110203-7b7mFL2FET3dhHalh1iNZtL"/>
-<!--unit id="org.eclipse.rcp.sdk.id" version="3.6.0.M20110210-1200"/-->
-<unit id="org.eclipse.zest.feature.group" version="1.2.0.v20100519-2050-67818yE6F-AA7P4B8I52322"/>
-<repository location="http://download.eclipse.org/releases/helios"/>
-</location>
-<location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
-<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.4.20110304_0338-e5aff47-dev-e36"/>
+<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.5.20111003_1754-3676ac8-dev-e36"/>
 <repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site"/>
 </location>
+<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.jdt.feature.group" version="3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK"/>
+<unit id="org.eclipse.pde.source.feature.group" version="3.7.1.r37x_v20110810-0800-7b7qFVtFEx2XnmZ4jlM5mjM"/>
+<unit id="org.eclipse.platform.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
+<unit id="org.eclipse.equinox.executable.feature.group" version="3.5.0.v20110530-7P7NFUFFLWUl76mart"/>
+<unit id="org.eclipse.platform.source.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK"/>
+<unit id="org.eclipse.platform.sdk" version="3.7.1.M20110909-1335"/>
+<unit id="org.eclipse.rcp.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
+<unit id="org.eclipse.rcp.source.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A"/>
+<unit id="org.eclipse.rcp.sdk.id" version="3.7.1.M20110909-1335"/>
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.7.1.R37x_v20110907-7M7W8h8eNV4Vrz-hz01A7SL_MhZP"/>
+<unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C08COMOGAKRUKGP_ULXbePP8ZT"/>
+<repository location="http://download.eclipse.org/releases/indigo"/>
+</location>
 </locations>
 </target>
diff --git a/pom.xml b/pom.xml
index ba52d69b2d4bd3f0779d94a4c52a8ec143e59457..0dd81a70e2d540368d96c1f58312b43d2fda869b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <prerequisites>
-               <maven>3.0</maven>
-       </prerequisites>
-       <groupId>eu.etaxonomy</groupId>
-       <artifactId>taxeditor-parent</artifactId>
-       <version>3.0.6-SNAPSHOT</version>
-       <name>EDIT Taxonomic Editor</name>
-       <description>The Taxonomic Editor for EDIT's platform for cybertaxonomy</description>
-       <url>http://wp5.e-taxonomy.eu</url>
-       <inceptionYear>2007</inceptionYear>
-       <packaging>pom</packaging>
-       <properties>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <cdmlib.version>3.0.8-SNAPSHOT</cdmlib.version>
-               <tycho.version>0.12.0</tycho.version>
-               <taxeditor.version>3.0.6-SNAPSHOT</taxeditor.version>
-       </properties>
-       <modules>
-               <module>eu.etaxonomy.taxeditor.cdmlib</module>
-               <module>eu.etaxonomy.taxeditor.store</module>
-               <module>eu.etaxonomy.taxeditor.navigation</module>
-               <module>eu.etaxonomy.taxeditor.editor</module>
-               <module>eu.etaxonomy.taxeditor.bulkeditor</module>
-               <module>eu.etaxonomy.taxeditor.printpublisher</module>
-               <!--module>eu.etaxonomy.taxeditor.annotatedlineeditor</module-->
-               <module>eu.etaxonomy.taxeditor.help</module>
-               <module>eu.etaxonomy.taxeditor.application</module>
-               <module>eu.etaxonomy.taxeditor.feature.platform</module>
-               <module>eu.etaxonomy.taxeditor.feature</module>
-               <module>eu.etaxonomy.taxeditor</module>
-       </modules>
-       <scm>
-               <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/</connection>
-               <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/</developerConnection>
-               <url>http://dev.e-taxonomy.eu/websvn/listing.php?repname=EDIT+Taxonomic+Editor</url>
-       </scm>
-       <mailingLists>
-               <mailingList>
-                       <name>EDIT Taxonomic Editor</name>
-                       <subscribe>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.0</maven>
+  </prerequisites>
+  <groupId>eu.etaxonomy</groupId>
+  <artifactId>taxeditor-parent</artifactId>
+  <version>3.0.12-SNAPSHOT</version>
+  <name>EDIT Taxonomic Editor</name>
+  <description>The Taxonomic Editor for EDIT's platform for cybertaxonomy</description>
+  <url>http://wp5.e-taxonomy.eu</url>
+  <inceptionYear>2007</inceptionYear>
+  <packaging>pom</packaging>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <cdmlib.version>3.0.12-SNAPSHOT</cdmlib.version><!-- TODO can we use project.version ????? -->
+    <tycho.version>0.14.0</tycho.version>
+    <taxeditor.version>3.0.12-SNAPSHOT</taxeditor.version>
+  </properties>
+  <modules>
+    <module>eu.etaxonomy.taxeditor.cdmlib</module>
+    <module>eu.etaxonomy.taxeditor.store</module>
+    <module>eu.etaxonomy.taxeditor.navigation</module>
+    <module>eu.etaxonomy.taxeditor.editor</module>
+    <module>eu.etaxonomy.taxeditor.bulkeditor</module>
+    <module>eu.etaxonomy.taxeditor.printpublisher</module>
+    <!--module>eu.etaxonomy.taxeditor.annotatedlineeditor</module-->
+    <module>eu.etaxonomy.taxeditor.help</module>
+    <module>eu.etaxonomy.taxeditor.application</module>
+    <module>eu.etaxonomy.taxeditor.feature.platform</module>
+    <module>eu.etaxonomy.taxeditor.feature</module>
+    <module>eu.etaxonomy.taxeditor</module>
+  </modules>
+  <scm>
+    <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/</connection>
+    <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/</developerConnection>
+    <url>http://dev.e-taxonomy.eu/websvn/listing.php?repname=EDIT+Taxonomic+Editor</url>
+  </scm>
+  <mailingLists>
+    <mailingList>
+      <name>EDIT Taxonomic Editor</name>
+      <subscribe>
                                edit-taxonomic-editor+subscribe@googlegroups.com
                        </subscribe>
-                       <unsubscribe>
+      <unsubscribe>
                                edit-taxonomic-editor+unsubscribe@googlegroups.com
                        </unsubscribe>
-                       <post>edit-taxonomic-editor@googlegroups.com</post>
-                       <archive>http://groups.google.com/group/edit-taxonomic-editor/topics</archive>
-               </mailingList>
-       </mailingLists>
-       <licenses>
-               <license>
-                       <name>Mozilla Public License Version 1.1</name>
-                       <url>http://www.mozilla.org/MPL/MPL-1.1.html</url>
-                       <distribution>repo</distribution>
-               </license>
-       </licenses>
-       <developers>
-               <developer>
-                       <!-- your SVN account id please! -->
-                       <id>n.hoffmann</id>
-                       <name>
+      <post>edit-taxonomic-editor@googlegroups.com</post>
+      <archive>http://groups.google.com/group/edit-taxonomic-editor/topics</archive>
+    </mailingList>
+  </mailingLists>
+  <licenses>
+    <license>
+      <name>Mozilla Public License Version 1.1</name>
+      <url>http://www.mozilla.org/MPL/MPL-1.1.html</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <developers>
+    <developer>
+      <!-- your SVN account id please! -->
+      <id>n.hoffmann</id>
+      <name>
                                Niels Hoffmann
                        </name>
-                       <email>n.hoffmann [at] bgbm.org</email>
-                       <organization>
+      <email>n.hoffmann [at] bgbm.org</email>
+      <organization>
                                Botanic Garden Botanical Museum Berlin
                        </organization>
-                       <organizationUrl>http://www.bgbm.org/BioDivInf/</organizationUrl>
-                       <timezone>+1</timezone>
-                       <roles>
-                               <role>Java Developer</role>
-                               <role>Architect</role>
-                       </roles>
-                       <url/>
-               </developer>
-       </developers>
-       <issueManagement>
-               <system>Trac</system>
-               <url>http://dev.e-taxonomy.eu/trac/</url>
-       </issueManagement>
-       <ciManagement>
-               <system>Jenkins</system>
-               <url>http://160.45.63.201/jenkins/view/EDIT%20Taxonomic%20Editor/</url>
-       </ciManagement>
-       <!-- **** REPOSITORIES **** -->
-       <repositories>
-               <!-- the cdm internal repository -->
-               <repository>
-                       <id>EditRepository</id>
-                       <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
-               </repository>
-       </repositories>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.eclipse.tycho</groupId>
-                               <artifactId>tycho-maven-plugin</artifactId>
-                               <version>${tycho.version}</version>
-                               <extensions>true</extensions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.eclipse.tycho</groupId>
-                               <artifactId>tycho-packaging-plugin</artifactId>
-                               <version>${tycho.version}</version>
-                               <configuration>
-                                       <strictVersions>true</strictVersions>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.eclipse.tycho</groupId>
-                               <artifactId>target-platform-configuration</artifactId>
-                               <version>${tycho.version}</version>
-                               <configuration>
-                                       <resolver>p2</resolver>
-                                       <target>
-                                               <artifact>
-                                                       <groupId>eu.etaxonomy</groupId>
-                                                       <artifactId>eu.etaxonomy.taxeditor</artifactId>
-                                                       <version>${taxeditor.version}</version>
-                                                       <classifier>rcp</classifier>
-                                               </artifact>
-                                       </target>
-                                       <ignoreTychoRepositories>true</ignoreTychoRepositories>
-                                       <environments>
-                                               <!--environment>
-                                                       <os>macosx</os>
-                                                       <ws>cocoa</ws>
-                                                       <arch>x86_64</arch>
-                                               </environment-->
-                                               <environment>
-                                                       <os>win32</os>
-                                                       <ws>win32</ws>
-                                                       <arch>x86</arch>
-                                               </environment>
-                                               <environment>
-                                                       <os>linux</os>
-                                                       <ws>gtk</ws>
-                                                       <arch>x86</arch>
-                                               </environment>
-                                               <environment>
-                                                       <os>linux</os>
-                                                       <ws>gtk</ws>
-                                                       <arch>x86_64</arch>
-                                               </environment>
-                                       </environments>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-compiler-plugin</artifactId>
-                               <version>2.3.2</version>
-                               <configuration>
-                                       <source>1.6</source>
-                                       <target>1.6</target>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                               <version>2.6</version>
-                               <configuration>
-                                       <includes>
-                                               <include>**/*Test.java</include>
-                                       </includes>
-                                       <systemPropertyVariables>
-                                               <property>
-                                                       <name>hibernate.connection.driver_class</name>
-                                                       <value>${hibernate.connection.driver_class}</value>
-                                               </property>
-                                               <property>
-                                                       <name>hibernate.connection.url</name>
-                                                       <value>${hibernate.connection.url}</value>
-                                               </property>
-                                               <property>
-                                                       <name>hibernate.connection.username</name>
-                                                       <value>${hibernate.connection.username}</value>
-                                               </property>
-                                               <property>
-                                                       <name>hibernate.connection.password</name>
-                                                       <value>${hibernate.connection.password}</value>
-                                               </property>
-                                       </systemPropertyVariables>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-site-plugin</artifactId>
-                               <version>3.0</version>
-                               <configuration>
-                                       <locales>en</locales>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-source-plugin</artifactId>
-                               <version>2.1.2</version>
-                               <executions>
-                                       <execution>
-                                               <id>attach-sources</id>
-                                               <phase>verify</phase>
-                                               <goals>
-                                                       <goal>jar</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>2.7</version>
-                               <configuration>
-                                       <stylesheet>maven</stylesheet>
-                                       <quiet>true</quiet>
-                                       <detectLinks>true</detectLinks>
-                                       <failOnError>false</failOnError>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>aggregate</id>
-                                               <goals>
-                                                       <goal>aggregate</goal>
-                                               </goals>
-                                               <phase>site</phase>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-eclipse-plugin</artifactId>
-                               <version>2.8</version>
-                               <configuration>
-                                       <downloadSources>true</downloadSources>
-                                       <downloadJavadocs>true</downloadJavadocs>
-                                       <additionalProjectnatures>
-                                               <projectnature>org.eclipse.pde.PluginNature</projectnature>
-                                       </additionalProjectnatures>
-                               </configuration>
-                       </plugin>
-                       <!-- ====== DEPLOY ====== -->
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-release-plugin</artifactId>
-                               <version>2.2.1</version>
-                               <configuration>
-                                       <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
-                                       <autoVersionSubmodules>false</autoVersionSubmodules>
-                                       <!--preparationGoals>clean verify install</preparationGoals-->
-                                       <!--goals>deploy</goals-->
-                                       <!-- skipping site-deploy by explicitly configuring the goal here -->
-                                       <tagBase>http://dev.e-taxonomy.eu/svn/tags/taxeditor</tagBase>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>wagon-maven-plugin</artifactId>
-                               <version>1.0-beta-3</version>
-                               <!--
+      <organizationUrl>http://www.bgbm.org/BioDivInf/</organizationUrl>
+      <timezone>+1</timezone>
+      <roles>
+        <role>Java Developer</role>
+        <role>Architect</role>
+      </roles>
+      <url/>
+    </developer>
+  </developers>
+  <issueManagement>
+    <system>Trac</system>
+    <url>http://dev.e-taxonomy.eu/trac/</url>
+  </issueManagement>
+  <ciManagement>
+    <system>Jenkins</system>
+    <url>http://160.45.63.201/jenkins/view/EDIT%20Taxonomic%20Editor/</url>
+  </ciManagement>
+  <!-- **** REPOSITORIES **** -->
+  <repositories>
+    <!-- the cdm internal repository -->
+    <repository>
+      <id>EditRepository</id>
+      <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
+    </repository>
+    <repository>
+      <id>eclipse-indigo</id>
+      <layout>p2</layout>
+      <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/</url>
+    </repository>
+    <repository>
+      <id>eclipse-swtbot</id>
+      <layout>p2</layout>
+      <url>http://download.eclipse.org/releases/indigo</url>
+    </repository>
+  </repositories>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-maven-plugin</artifactId>
+        <version>${tycho.version}</version>
+        <extensions>true</extensions>
+      </plugin>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-packaging-plugin</artifactId>
+        <version>${tycho.version}</version>
+        <configuration>
+          <strictVersions>true</strictVersions>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>target-platform-configuration</artifactId>
+        <version>${tycho.version}</version>
+        <configuration>
+          <environments>
+            <environment>
+              <os>macosx</os>
+              <ws>cocoa</ws>
+              <arch>x86_64</arch>
+            </environment>
+            <environment>
+              <os>win32</os>
+              <ws>win32</ws>
+              <arch>x86</arch>
+            </environment>
+            <environment>
+              <os>win32</os>
+              <ws>win32</ws>
+              <arch>x86_64</arch>
+            </environment>
+            <environment>
+              <os>linux</os>
+              <ws>gtk</ws>
+              <arch>x86</arch>
+            </environment>
+            <environment>
+              <os>linux</os>
+              <ws>gtk</ws>
+              <arch>x86_64</arch>
+            </environment>
+          </environments>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <includes>
+            <include>**/*Test.java</include>
+          </includes>
+          <systemPropertyVariables>
+            <property>
+              <name>hibernate.connection.driver_class</name>
+              <value>${hibernate.connection.driver_class}</value>
+            </property>
+            <property>
+              <name>hibernate.connection.url</name>
+              <value>${hibernate.connection.url}</value>
+            </property>
+            <property>
+              <name>hibernate.connection.username</name>
+              <value>${hibernate.connection.username}</value>
+            </property>
+            <property>
+              <name>hibernate.connection.password</name>
+              <value>${hibernate.connection.password}</value>
+            </property>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>3.0</version>
+        <configuration>
+          <locales>en</locales>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.1.2</version>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.7</version>
+        <configuration>
+          <stylesheet>maven</stylesheet>
+          <quiet>true</quiet>
+          <detectLinks>true</detectLinks>
+          <failOnError>false</failOnError>
+        </configuration>
+        <executions>
+          <execution>
+            <id>aggregate</id>
+            <goals>
+              <goal>aggregate</goal>
+            </goals>
+            <phase>site</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <version>2.8</version>
+        <configuration>
+          <downloadSources>true</downloadSources>
+          <downloadJavadocs>true</downloadJavadocs>
+          <additionalProjectnatures>
+            <projectnature>org.eclipse.pde.PluginNature</projectnature>
+          </additionalProjectnatures>
+        </configuration>
+      </plugin>
+      <!-- ====== DEPLOY ====== -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <version>2.2.1</version>
+        <configuration>
+          <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
+          <autoVersionSubmodules>false</autoVersionSubmodules>
+          <!--preparationGoals>clean verify install</preparationGoals-->
+          <!--goals>deploy</goals-->
+          <!-- skipping site-deploy by explicitly configuring the goal here -->
+          <tagBase>http://dev.e-taxonomy.eu/svn/tags/taxeditor</tagBase>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>wagon-maven-plugin</artifactId>
+        <version>1.0-beta-3</version>
+        <!--
                                Problems with the wagon-maven-plugin have been encounterd on Windows,
                                        it should work properly on linux though.
                                 -->
-                               <executions>
-                                       <execution>
-                                               <phase>deploy</phase>
-                                               <goals>
-                                                       <goal>upload</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                               <configuration>
-                                       <fromDir>eu.etaxonomy.taxeditor/target/products</fromDir>
-                                       <includes>*.zip</includes>
-                                       <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/${project.version}</url>
-                                       <serverId>wp5.e-taxonomy.eu</serverId>
-                               </configuration>
-                       </plugin>
-               </plugins>
-               <!--pluginManagement>
-                       <plugins>
-                               <plugin>
-                                       <groupId>org.apache.maven.plugins</groupId>
-                                       <artifactId>maven-jar-plugin</artifactId>
-                                       <version>2.3.1</version>
-                               </plugin>
-                               <plugin>
-                                       <groupId>org.codehaus.mojo</groupId>
-                                       <artifactId>wagon-maven-plugin</artifactId>
-                                       <version>1.0-beta-3</version>
-                               </plugin-->
-               <!--plugin>
-                                       <groupId>org.eclipse.tycho</groupId>
-                                       <artifactId>tycho-packaging-plugin</artifactId>
-                                       <version>${tycho.version}</version-->
-               <!--executions>
-                                               <execution>
-                                                       <id>timestamp</id>
-                                                       <phase>validate</phase>
-                                                       <goals>
-                                                               <goal>timestamp</goal>
-                                                       </goals>
-                                               </execution>
-                                       </executions-->
-               <!-- for some reason configuration won't work here, have to define
-                                       in each module -->
-               <!--configuration>
-                                               <archive>
-                                                       <addMavenDescriptor>false</addMavenDescriptor>
-                                               </archive>
-                                               <environments>
-                                                       <environment>
-                                                               <os>macosx</os>
-                                                               <ws>cocoa</ws>
-                                                               <arch>x86</arch>
-                                                       </environment>
-                                               </environments>
-                                       </configuration>
-                               </plugin-->
-               <!--/plugins>
-               </pluginManagement-->
-               <extensions>
-                       <extension>
-                               <groupId>org.apache.maven.wagon</groupId>
-                               <artifactId>wagon-scm</artifactId>
-                               <version>1.0-alpha-5</version>
-                       </extension>
-                       <extension>
-                               <groupId>org.apache.maven.wagon</groupId>
-                               <artifactId>wagon-ssh</artifactId>
-                               <version>1.0-beta-7</version>
-                       </extension>
-                       <extension>
-                               <groupId>org.apache.maven.wagon</groupId>
-                               <artifactId>wagon-ssh-external</artifactId>
-                               <version>1.0-beta-6</version>
-                       </extension>
-                       <extension>
-                               <groupId>org.apache.maven.scm</groupId>
-                               <artifactId>maven-scm-manager-plexus</artifactId>
-                               <version>1.0</version>
-                       </extension>
-                       <extension>
-                               <groupId>org.apache.maven.scm</groupId>
-                               <artifactId>maven-scm-provider-svnexe</artifactId>
-                               <version>1.0</version>
-                       </extension>
-                       <!-- WebDAV plugin to upload snapshots -->
-                       <extension>
-                               <groupId>org.apache.maven.wagon</groupId>
-                               <artifactId>wagon-webdav</artifactId>
-                               <version>1.0-beta-2</version>
-                       </extension>
-               </extensions>
-       </build>
-       <reporting>
-               <plugins>
-                       <plugin>
-                               <!-- you will want to start by publishing your classes' Javadocs -->
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>2.7</version>
-                               <configuration>
-                                       <detectLinks>true</detectLinks>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <!-- this will generate an indexed and cross-referenced HTML version of your source code -->
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-jxr-plugin</artifactId>
-                               <version>2.2</version>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-changes-plugin</artifactId>
-                               <version>2.3</version>
-                               <configuration>
-                                       <issueLinkTemplatePerSystem>
-                                               <default>%URL%/ticket/%ISSUE%</default>
-                                       </issueLinkTemplatePerSystem>
-                               </configuration>
-                               <reportSets>
-                                       <reportSet>
-                                               <reports>
-                                                       <report>changes-report</report>
-                                               </reports>
-                                       </reportSet>
-                               </reportSets>
-                       </plugin>
-               </plugins>
-       </reporting>
-       <!--     DISTRIBUTION MANAGEMENT -->
-       <distributionManagement>
-               <site>
-                       <id>wp5.e-taxonomy.eu</id>
-                       <name>EDIT Taxonomic Editor</name>
-                       <url>scpexe://160.45.63.151/var/www/wp5.e-taxonomy.eu/taxeditor/</url>
-               </site>
-               <repository>
-                       <uniqueVersion>false</uniqueVersion>
-                       <id>wp5.e-taxonomy.eu</id>
-                       <name>Edit Maven Repository</name>
-                       <url>scpexe://160.45.63.151/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
-               </repository>
-       </distributionManagement>
+        <executions>
+          <execution>
+            <phase>deploy</phase>
+            <goals>
+              <goal>upload</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <fromDir>eu.etaxonomy.taxeditor/target/products</fromDir>
+          <includes>*.zip</includes>
+          <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/${project.version}</url>
+          <serverId>wp5.e-taxonomy.eu</serverId>
+        </configuration>
+      </plugin>
+    </plugins>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-scm</artifactId>
+        <version>1.0-alpha-5</version>
+      </extension>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-ssh</artifactId>
+        <version>1.0-beta-7</version>
+      </extension>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-ssh-external</artifactId>
+        <version>1.0-beta-6</version>
+      </extension>
+      <extension>
+        <groupId>org.apache.maven.scm</groupId>
+        <artifactId>maven-scm-manager-plexus</artifactId>
+        <version>1.0</version>
+      </extension>
+      <extension>
+        <groupId>org.apache.maven.scm</groupId>
+        <artifactId>maven-scm-provider-svnexe</artifactId>
+        <version>1.0</version>
+      </extension>
+      <!-- WebDAV plugin to upload snapshots -->
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-webdav</artifactId>
+        <version>1.0-beta-2</version>
+      </extension>
+    </extensions>
+    <pluginManagement>
+      <plugins>
+       <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-antrun-plugin</artifactId>
+         <version>1.7</version>
+       </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <reporting>
+    <plugins>
+      <plugin>
+        <!-- you will want to start by publishing your classes' Javadocs -->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.7</version>
+        <configuration>
+          <detectLinks>true</detectLinks>
+        </configuration>
+      </plugin>
+      <plugin>
+        <!-- this will generate an indexed and cross-referenced HTML version of your source code -->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <issueLinkTemplatePerSystem>
+            <default>%URL%/ticket/%ISSUE%</default>
+          </issueLinkTemplatePerSystem>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>changes-report</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+  <!--  DISTRIBUTION MANAGEMENT -->
+  <distributionManagement>
+    <site>
+      <id>wp5.e-taxonomy.eu</id>
+      <name>EDIT Taxonomic Editor</name>
+      <url>scpexe://wp5.e-taxonomy.eu/var/www/wp5.e-taxonomy.eu/taxeditor/</url>
+    </site>
+    <repository>
+      <uniqueVersion>false</uniqueVersion>
+      <id>wp5.e-taxonomy.eu</id>
+      <name>Edit Maven Repository</name>
+      <url>scpexe://wp5.e-taxonomy.eu/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
+    </repository>
+  </distributionManagement>
 </project>
index 6bd8b2fab95825c4d218810fc4d49b893283ae8c..fc8df516b7b436e73e2284f1f0c9e2eb820bd9f6 100644 (file)
@@ -49,14 +49,14 @@ $ svn co http://dev.e-taxonomy.eu/svn/trunk/taxeditor
        The Taxonomic Editor uses <maven 3> for convenient configuration and automation of common tasks, 
        such as resolving dependencies and automating builds.
        
-       The <<<trunk>>> branch of the Taxonomic Editor is programmed against the latest
+       The <<<latest snapshot branch>>> of the Taxonomic Editor is programmed against the latest
        SNAPSHOT version of the cdmlibrary. Because that dependency will change quickly, we
        do not imclude it with the other dependencies but rather install it with maven.
 
-       In order to do that you have to run <<<mvn validate>>> in your <<<taxeditor/>>> directory.
+       In order to do that you have to run <<<mvn validate>>> in your <<<taxeditor/eu.etaxonomy.taxeditor.cdmlib>>> directory.
 
 ---
-$ cd taxeditor/
+$ cd taxeditor/eu.etaxonomy.taxeditor.cdmlib/
 $ mvn validate
 ---