Revision 7ccb7304
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/ContainerFactoryE4.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
} |
33 | 33 |
|
34 |
public static void emptyAcceptedTaxonsHomotypicGroup( |
|
35 |
TaxonNameEditorE4 taxonNameEditor) { |
|
36 |
|
|
37 |
if (taxonNameEditor.getAcceptedGroup() != null ){ |
|
38 |
taxonNameEditor.getAcceptedGroup().emptyGroup(); |
|
39 |
} |
|
40 |
|
|
41 |
} |
|
42 |
|
|
43 |
public static void emptyHeterotypicSynonymsGroups( |
|
44 |
TaxonNameEditorE4 taxonNameEditor) { |
|
45 |
for (HomotypicalSynonymGroupE4 group: taxonNameEditor.getHeterotypicSynonymGroups()){ |
|
46 |
|
|
47 |
group.emptyGroup(); |
|
48 |
|
|
49 |
} |
|
50 |
} |
|
51 |
|
|
52 |
public static void emptyMisappliedNameGroups( |
|
53 |
TaxonNameEditorE4 taxonNameEditor) { |
|
54 |
if (taxonNameEditor.getMisappliedGroup() != null){ |
|
55 |
taxonNameEditor.getMisappliedGroup().emptyGroup(); |
|
56 |
} |
|
57 |
|
|
58 |
} |
|
59 |
|
|
60 |
|
|
34 | 61 |
public static void createOrUpdateHeterotypicSynonymyGroups( |
35 | 62 |
TaxonNameEditorE4 taxonNameEditor) { |
36 | 63 |
List<HomotypicalSynonymGroupE4> retainedGroups = new ArrayList<>(); |
... | ... | |
79 | 106 |
TaxonNameEditorE4 taxonNameEditor) { |
80 | 107 |
MisappliedGroupE4 group = taxonNameEditor.getMisappliedGroup(); |
81 | 108 |
Taxon taxon = HibernateProxyHelper.deproxy(taxonNameEditor.getTaxon(), Taxon.class); |
82 |
if(taxon.getMisappliedNames(true).isEmpty() && taxon.getProParteAndPartialSynonyms().isEmpty()){ |
|
109 |
if(taxon.getMisappliedNames(true).isEmpty() && taxon.getProParteAndPartialSynonyms().isEmpty() && taxon.getInvalidDesignations().isEmpty()){
|
|
83 | 110 |
taxonNameEditor.removeGroup(group); |
84 | 111 |
taxonNameEditor.setMisapplicationsGroup(null); |
85 | 112 |
}else{ |
... | ... | |
92 | 119 |
|
93 | 120 |
} |
94 | 121 |
|
122 |
public static void setMenuToAllContainers(TaxonNameEditorE4 taxonNameEditor){ |
|
123 |
taxonNameEditor.getAcceptedGroup().setMenuToGroup(); |
|
124 |
for(HomotypicalGroup homotypicalGroup : taxonNameEditor.getTaxon().getHeterotypicSynonymyGroups()){ |
|
125 |
homotypicalGroup = HibernateProxyHelper.deproxy(homotypicalGroup, HomotypicalGroup.class); |
|
126 |
HomotypicalSynonymGroupE4 group = taxonNameEditor.getHomotypicalGroupContainer(homotypicalGroup); |
|
127 |
group.setMenuToGroup(); |
|
128 |
} |
|
129 |
taxonNameEditor.getMisappliedGroup().setMenuToGroup(); |
|
130 |
} |
|
131 |
|
|
95 | 132 |
} |
Also available in: Unified diff
ref #7424: after updating name editor set menu to all containers to avoid missing menu