// $Id$
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
private static final String CONCEPT = "isConceptRelation";
private static final String EMPTY_NAMES = "hasEmptyNames";
private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms";
-
+
/**
* <p>Constructor for NameEditorMenuPropertyTester.</p>
*/
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
*/
/** {@inheritDoc} */
- public boolean test(Object receiver, String property, Object[] args,
+ @Override
+ public boolean test(Object receiver, String property, Object[] args,
Object expectedValue) {
-
+
if(receiver instanceof IStructuredSelection){
-
+
IStructuredSelection selection = (IStructuredSelection) receiver;
-
+
Object selectedElement = selection.getFirstElement();
-
- System.out.println(selectedElement);
- System.out.println(property);
+
if(ACCEPTED.equals(property)){
return isAccepted(selectedElement);
}
else if(SYNONYM.equals(property)){
- System.out.println(isSynonym(selectedElement));
return isSynonym(selectedElement);
}
else if(MISAPPLICATION.equals(property)){
return isAcceptedAndHasNoHomotypicSynonyms(selectedElement);
}
}
-
+
return false;
-
+
}
private boolean isAcceptedAndHasNoHomotypicSynonyms(Object selectedElement) {
}
private boolean isSynonym(Object selectedElement) {
- System.out.println("isSynonym...." + selectedElement);
return (selectedElement instanceof Synonym) ? true : false;
}