import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.security.RequiredPermissions;
public class TaxonTreeNodeLabelProvider extends ColumnLabelProvider
implements IStyledLabelProvider {
- private Styler notGrantedStyler = null;
+ protected Styler notGrantedStyler = null;
/**
* {@inheritDoc}
//taxon node
else if (element instanceof TaxonNode){
TaxonNode taxonNode = (TaxonNode) HibernateProxyHelper.deproxy(element);
-
- try{
+ try{
Taxon taxon = HibernateProxyHelper.deproxy(taxonNode.getTaxon());
if(taxon == null){
String text = taxonNode.getClassification().getName() == null ? null : taxonNode.getClassification().getName().getText();
return text;
}else{
try{
- return taxon.getName() != null ? ((IIdentifiableEntity) HibernateProxyHelper.deproxy(taxon.getName())).getTitleCache() : new String();
+ String text= "";
+ if (taxonNode.isUnplaced()){
+ text += Character.toString((char)63) + " ";
+ }
+ if (taxonNode.isExcluded()){
+ text +=Character.toString((char)248) + " ";
+ }
+ text += taxon.getName() != null ? ((IIdentifiableEntity) HibernateProxyHelper.deproxy(taxon.getName())).getTitleCache() : new String();
+ return text;
}catch(Exception e){
MessagingUtils.error(getClass(), e);
}
MessagingUtils.error(getClass(), e);
}
}
+ else if (element instanceof TaxonNodeDto){
+ TaxonNodeDto taxonNode = (TaxonNodeDto) element;
+ String text= "";
+ if (taxonNode.isUnplaced()){
+ text += Character.toString((char)63) + " ";
+ }
+ if (taxonNode.isExcluded()) {
+ text +=Character.toString((char)248) + " ";
+ }
+ text += taxonNode.getTitleCache();
+ return text;
+ }
return new String();
}