From a3eff6a40832ef197e958b8d00f7de4672e60d6e Mon Sep 17 00:00:00 2001 From: "n.hoffmann" Date: Fri, 23 Jan 2009 12:07:59 +0000 Subject: [PATCH] switched to cdmlib 2.0 --- .../src/eu/etaxonomy/taxeditor/model/CdmUtil.java | 2 +- .../taxeditor/navigation/SearchResultView.java | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/model/CdmUtil.java b/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/model/CdmUtil.java index 421f1e5e1..852f9cb3c 100644 --- a/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/model/CdmUtil.java +++ b/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/model/CdmUtil.java @@ -259,7 +259,7 @@ public class CdmUtil { configurator.setSearchString(name.replace("*", "%")); configurator.setDoTaxa(true); -// configurator.setDoNamesWithoutTaxa(true); + configurator.setDoNamesWithoutTaxa(true); configurator.setDoSynonyms(true); configurator.setPageNumber(1); // TODO currently limit results to 1000 for now diff --git a/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/navigation/SearchResultView.java b/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/navigation/SearchResultView.java index fe93afaac..c37d0e033 100644 --- a/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/navigation/SearchResultView.java +++ b/eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/navigation/SearchResultView.java @@ -51,12 +51,16 @@ public class SearchResultView extends ViewPart { resultViewer.setLabelProvider(new LabelProvider() { public String getText(Object element) { if (element instanceof IdentifiableEntity) { - // TODO we want to stylize the text (color, font-style etc.) - if(element instanceof Taxon){ - return "Taxon: " + ((TaxonBase) element).getTitleCache(); + if(element instanceof TaxonBase){ + // TODO we want to stylize the text (color, font-style etc.) + if(element instanceof Taxon){ + return "Taxon: " + ((TaxonBase) element).getTitleCache(); + }else{ + return "Synonym: " + ((TaxonBase) element).getTitleCache(); + } }else{ - return "Synonym: " + ((TaxonBase) element).getTitleCache(); - } + return "Name: " + super.getText(element); + } } return super.getText(element); } -- 2.34.1