Revision 60e722d0
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermMenu.java | ||
---|---|---|
51 | 51 |
dtMenuManager.setVisible(true); |
52 | 52 |
|
53 | 53 |
items.add(dtMenuManager); |
54 |
//add Feature and NamedArea to top level |
|
55 |
dtMenuManager.add(addChildTermsToMenuManager(TermType.Feature)); |
|
56 |
dtMenuManager.add(addChildTermsToMenuManager(TermType.NamedArea)); |
|
57 |
|
|
58 |
MenuManager otherMenuManager = |
|
59 |
new MenuManager("Other","eu.etaxonomy.taxeditor.store.term.other.menu"); |
|
60 |
otherMenuManager.setVisible(true); |
|
61 |
dtMenuManager.add(otherMenuManager); |
|
62 |
|
|
54 | 63 |
List<TermType> ttList = new ArrayList<TermType>(EnumSet.allOf(TermType.class)); |
55 | 64 |
Collections.sort(ttList,new SortByTermTypeMessage()); |
56 | 65 |
for (TermType tt : ttList) |
57 | 66 |
{ |
67 |
//skip Feature and NamedArea as they have already been added to top level |
|
68 |
if(tt.equals(TermType.Feature) || tt.equals(TermType.NamedArea)){ |
|
69 |
continue; |
|
70 |
} |
|
58 | 71 |
// if term type has a parent, do not add it |
59 | 72 |
// it will be added in the recursive call |
60 | 73 |
if(tt.getKindOf() == null) { |
61 | 74 |
IContributionItem ici = addChildTermsToMenuManager(tt); |
62 | 75 |
if(ici != null) { |
63 |
dtMenuManager.add(ici);
|
|
76 |
otherMenuManager.add(ici);
|
|
64 | 77 |
} |
65 | 78 |
} |
66 | 79 |
} |
Also available in: Unified diff
fix #5474 moved Feature and NamedArea to top level