UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache) element;
String titleCache = uuidAndTitleCache.getTitleCache();
String abbrevTitleCache = uuidAndTitleCache.getAbbrevTitleCache();
- abbrevTitleCache += " - " + titleCache;
+ if (!titleCache.equals(abbrevTitleCache)){
+ abbrevTitleCache += " - " + titleCache;
+ }
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG)){
abbrevTitleCache += " ["+uuidAndTitleCache.getId()+"]";
}
public boolean matchItem(Object item) {
String text = null;
if(item instanceof UuidAndTitleCache){
- text = ((UuidAndTitleCache) item).getAbbrevTitleCache();
+ if (((UuidAndTitleCache) item).getAbbrevTitleCache() != null){
+ text = ((UuidAndTitleCache) item).getAbbrevTitleCache();
+ } else{
+ text = ((UuidAndTitleCache) item).getTitleCache();
+ }
}else if(item instanceof String){
text = (String) item;
}
EntitySelectionElement.ALL, style);
addElement(selectionBasionymAuthor);
selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
- formElement, "Ex Basionym Author", entity.getExBasionymAuthorship(),
+ formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
EntitySelectionElement.ALL, style);
addElement(selectionExBasionymAuthor);