Revision 9f983dae
Added by Katja Luther about 8 years ago
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
499 | 499 |
label="%command.label.12" |
500 | 500 |
style="push"> |
501 | 501 |
<visibleWhen> |
502 |
<and> |
|
502 | 503 |
<not> |
503 | 504 |
<or> |
504 | 505 |
<reference |
... | ... | |
507 | 508 |
<reference |
508 | 509 |
definitionId="isMisapplication"> |
509 | 510 |
</reference> |
510 |
<reference |
|
511 |
definitionId="isHomotypicSynonymOfAcceptedTaxon"> |
|
512 |
</reference> |
|
513 | 511 |
</or> |
514 |
</not> |
|
512 |
</not> |
|
513 |
<reference |
|
514 |
definitionId="isNotHomotypicSynonymOfAcceptedTaxon"> |
|
515 |
</reference> |
|
516 |
</and> |
|
515 | 517 |
</visibleWhen> |
516 | 518 |
</command> |
517 | 519 |
<command |
... | ... | |
614 | 616 |
label="%command.label.56" |
615 | 617 |
style="push"> |
616 | 618 |
<visibleWhen> |
619 |
<and> |
|
617 | 620 |
<reference |
618 | 621 |
definitionId="isSynonym"> |
619 | 622 |
</reference> |
623 |
<reference |
|
624 |
definitionId="isNotHomotypicSynonymOfAcceptedTaxon"> |
|
625 |
</reference> |
|
626 |
</and> |
|
620 | 627 |
</visibleWhen> |
621 | 628 |
</command> |
622 | 629 |
<separator |
... | ... | |
1692 | 1699 |
<with |
1693 | 1700 |
variable="selection"> |
1694 | 1701 |
<test |
1695 |
property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isHomotypicSynonymOfAcceptedTaxon"> |
|
1702 |
property="eu.etaxonomy.taxeditor.editor.name.propertyTester.isNotHomotypicSynonymOfAcceptedTaxon">
|
|
1696 | 1703 |
</test> |
1697 | 1704 |
</with> |
1698 | 1705 |
</definition> |
... | ... | |
1898 | 1905 |
class="eu.etaxonomy.taxeditor.editor.name.handler.NameEditorMenuPropertyTester" |
1899 | 1906 |
id="eu.etaxonomy.taxeditor.editor.name.propertyTester" |
1900 | 1907 |
namespace="eu.etaxonomy.taxeditor.editor.name.propertyTester" |
1901 |
properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms" |
|
1908 |
properties="isAcceptedTaxon,isSynonym,isMisapplication,isTaxonBase,hasEmptyNames,isAcceptedAndHasNoHomotypicSynonyms,isNotHomotypicSynonymOfAcceptedTaxon"
|
|
1902 | 1909 |
type="org.eclipse.jface.viewers.IStructuredSelection"> |
1903 | 1910 |
</propertyTester> |
1904 | 1911 |
<propertyTester |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java | ||
---|---|---|
35 | 35 |
private static final String CONCEPT = "isConceptRelation"; |
36 | 36 |
private static final String EMPTY_NAMES = "hasEmptyNames"; |
37 | 37 |
private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms"; |
38 |
private static final String HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isHomotypicSynonymOfAcceptedTaxon";
|
|
39 |
|
|
38 |
private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon";
|
|
39 |
|
|
40 | 40 |
|
41 | 41 |
/** |
42 | 42 |
* <p>Constructor for NameEditorMenuPropertyTester.</p> |
... | ... | |
78 | 78 |
} |
79 | 79 |
else if(ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS.equals(property)){ |
80 | 80 |
return isAcceptedAndHasNoHomotypicSynonyms(selectedElement); |
81 |
}else if (HOMOTYPIC_SYNONYM_OF_ACCEPTED.equals(property)){ |
|
82 |
return isHomotypicSynonymOfAcceptedTaxon(selectedElement); |
|
81 |
}else if (NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED.equals(property)){
|
|
82 |
return isNotHomotypicSynonymOfAcceptedTaxon(selectedElement);
|
|
83 | 83 |
} |
84 |
|
|
84 |
|
|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
return false; |
... | ... | |
95 | 95 |
} |
96 | 96 |
return false; |
97 | 97 |
} |
98 |
|
|
99 |
private boolean isHomotypicSynonymOfAcceptedTaxon(Object selectedElement) { |
|
98 |
|
|
99 |
private boolean isNotHomotypicSynonymOfAcceptedTaxon(Object selectedElement) {
|
|
100 | 100 |
if (isSynonym(selectedElement)){ |
101 | 101 |
Synonym synonym = (Synonym) selectedElement; |
102 | 102 |
for (Taxon taxon:synonym.getAcceptedTaxa()){ |
Also available in: Unified diff
fix #5524