Project

General

Profile

« Previous | Next » 

Revision c3d0aff1

Added by Andreas Müller almost 12 years ago

merge branch to trunk

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorLineDisplay.java
20 20
import org.eclipse.swt.graphics.Image;
21 21
import org.eclipse.swt.widgets.Display;
22 22

  
23
import eu.etaxonomy.cdm.common.CdmUtils;
24 23
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
25 24
import eu.etaxonomy.cdm.model.agent.AgentBase;
26 25
import eu.etaxonomy.cdm.model.common.CdmBase;
27 26
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
28 27
import eu.etaxonomy.cdm.model.common.ICdmBase;
29
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
30 28
import eu.etaxonomy.cdm.model.common.Marker;
31 29
import eu.etaxonomy.cdm.model.common.MarkerType;
32 30
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
......
92 90
		AbstractBulkEditorInput input = editor.getEditorInput();
93 91
		String typeText = input.getTypeText(entity);
94 92
		
95
		supplementalText += CdmUtils.isEmpty(typeText) ? "" : String.format(" [%s]", typeText);
93
		supplementalText += StringUtils.isBlank(typeText) ? "" : String.format(" [%s]", typeText);
96 94
		
97 95
		if (entity instanceof IAnnotatableEntity) {
98 96
			IAnnotatableEntity annotatableEntity = (IAnnotatableEntity) HibernateProxyHelper.deproxy(entity);
......
102 100
			String markerText = "";
103 101
			List<String> markers = new ArrayList<String>();
104 102
			for (Marker marker : annotatableEntity.getMarkers()) {
105
				markers.add(String.format("%1s = %2s", marker.getMarkerType().getLabel(), marker.getFlag() ? "yes" : "no"));
103
				String markerLabel = marker.getMarkerType() == null? " unknown marker " : marker.getMarkerType().getLabel();
104
				markers.add(String.format("%1s = %2s", markerLabel, marker.getFlag() ? "yes" : "no"));
106 105
			}
107 106
			if (! markers.isEmpty()) {
108 107
				markerText = StringUtils.join(markers, ", ");
109 108
			}
110 109
			
111
			supplementalText += CdmUtils.isEmpty(markerText) ? "" : String.format(" [%s]", markerText);
110
			supplementalText += StringUtils.isBlank(markerText) ? "" : String.format(" [%s]", markerText);
112 111
		}
113 112
		
114 113
		return supplementalText;

Also available in: Unified diff