2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.editor
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.jface
.action
.MenuManager
;
14 import org
.eclipse
.jface
.action
.Separator
;
16 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
17 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateAutonymAction
;
18 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateConceptRelationAction
;
19 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateHeterotypicSynonymAction
;
20 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateMisappliedNameAction
;
21 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateSynonymInGroupAction
;
22 import eu
.etaxonomy
.taxeditor
.actions
.name
.CreateTaxonomicallyIncludedTaxonAction
;
23 import eu
.etaxonomy
.taxeditor
.actions
.ui
.ChangeTaxonToSynonymAction
;
24 import eu
.etaxonomy
.taxeditor
.actions
.ui
.MoveTaxonDialogAction
;
25 import eu
.etaxonomy
.taxeditor
.model
.CdmSessionDataRepository
;
32 public class MenuConstants
{
33 private static final Logger logger
= Logger
.getLogger(MenuConstants
.class);
35 public static final MenuManager
EDITOR_TAXON_MENU(){
36 MenuManager taxonEditorMenu
= new MenuManager("Taxon");
38 taxonEditorMenu
.add(new CreateHeterotypicSynonymAction());
39 taxonEditorMenu
.add(new CreateSynonymInGroupAction());
40 taxonEditorMenu
.add(new Separator());
41 taxonEditorMenu
.add(new CreateMisappliedNameAction());
43 MenuManager subMenu
= new MenuManager("Create concept relation");
44 for (TaxonRelationshipType type
:
45 CdmSessionDataRepository
.getDefault().getConceptRelationshipTypes()) {
46 subMenu
.add(new CreateConceptRelationAction(type
));
48 taxonEditorMenu
.add(subMenu
);
49 taxonEditorMenu
.add(new Separator());
50 taxonEditorMenu
.add(new MoveTaxonDialogAction());
51 taxonEditorMenu
.add(new ChangeTaxonToSynonymAction());
52 taxonEditorMenu
.add(new Separator());
53 // TODO is it correct that onlx taxa with rank species may have autonyms?
54 // if(taxon.getName().getRank().equals(Rank.SPECIES())){
55 taxonEditorMenu
.add(new CreateAutonymAction());
57 taxonEditorMenu
.add(new CreateTaxonomicallyIncludedTaxonAction());
59 return taxonEditorMenu
;