import java.util.Map;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.action.IAction;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
+import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
this.entity = element;
mediaDetailElement.setEntity(element);
- selection_artist.setEntity((AgentBase<?>) HibernateProxyHelper
+ selection_artist.setEntity(HibernateProxyHelper
.deproxy(element.getArtist()));
text_description.setLanguageString(element.getDescription(CdmStore
.getDefaultLanguage()));
- if (text_description.getText().isEmpty()){
+ if (CdmUtils.isBlank(text_description.getText())){
Map<Language, LanguageString> allDescriptions = element.getAllDescriptions();
if (!allDescriptions.isEmpty()){
text_description.setLanguageString(allDescriptions.get(Language.ENGLISH()));