Revision a368dac3
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/AbstractDynamicConceptRelationMenu.java | ||
---|---|---|
1 | 1 |
/** |
2 |
*
|
|
2 |
* |
|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.editor.view.concept.handler; |
5 | 5 |
|
... | ... | |
14 | 14 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
15 | 15 |
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin; |
16 | 16 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
17 |
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer; |
|
18 | 17 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
19 | 18 |
|
20 | 19 |
/** |
... | ... | |
25 | 24 |
* @version 1.0 |
26 | 25 |
*/ |
27 | 26 |
public abstract class AbstractDynamicConceptRelationMenu extends ContributionItem { |
28 |
|
|
27 |
|
|
29 | 28 |
/* |
30 | 29 |
* (non-Javadoc) |
31 | 30 |
* @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Menu, int) |
... | ... | |
51 | 50 |
} catch (Exception e) { |
52 | 51 |
EditorUtil.error(getClass(), "Error executing command", e); |
53 | 52 |
} |
54 |
}
|
|
53 |
} |
|
55 | 54 |
}); |
56 | 55 |
*/ |
57 | 56 |
for(final TaxonRelationshipType taxonRelationshipType: CdmStore.getTermManager().getPreferredTerms(TaxonRelationshipType.class)){ |
57 |
if (!taxonRelationshipType.equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())){ |
|
58 | 58 |
MenuItem menuItem = new MenuItem(menu, -1); |
59 | 59 |
menuItem.setText(taxonRelationshipType.getTitleCache()); |
60 | 60 |
menuItem.setData(taxonRelationshipType); |
61 | 61 |
menuItem.addSelectionListener(new SelectionListener(){ |
62 | 62 |
|
63 |
public void widgetDefaultSelected(SelectionEvent e) {} |
|
63 |
@Override |
|
64 |
public void widgetDefaultSelected(SelectionEvent e) {} |
|
64 | 65 |
|
65 |
public void widgetSelected(SelectionEvent ev) { |
|
66 |
@Override |
|
67 |
public void widgetSelected(SelectionEvent ev) { |
|
66 | 68 |
Event event = new Event(); |
67 | 69 |
event.data = taxonRelationshipType; |
68 | 70 |
try { |
... | ... | |
70 | 72 |
} catch (Exception e) { |
71 | 73 |
MessagingUtils.error(getClass(), "Error executing command", e); |
72 | 74 |
} |
73 |
}
|
|
75 |
} |
|
74 | 76 |
}); |
77 |
} |
|
75 | 78 |
} |
76 | 79 |
} |
77 |
|
|
80 |
|
|
78 | 81 |
/** |
79 | 82 |
* <p>getCommandName</p> |
80 | 83 |
* |
Also available in: Unified diff
fix #5800: remove taxonomically included from menu