Project

General

Profile

Revision c3d0aff1

IDc3d0aff1a5bb7506a08cc284ffbdee6e00e6201a
Parent f77d2f87
Child f67430cd, 5bfed917

Added by Andreas Müller almost 9 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;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
88 88
				configurator.setProgressMonitor(CdmProgressMonitorAdapter
89 89
						.CreateSubMonitor(monitor, 70));
90 90

  
91
				monitor.worked(10);
91
				monitor.worked(5);
92 92

  
93 93
				CdmDefaultImport<IImportConfigurator> importer = new CdmDefaultImport<IImportConfigurator>();
94 94
				importer.setCdmAppController(applicationConfiguration);
95
				monitor.worked(10);
95
				monitor.worked(5);
96 96

  
97 97
				try {
98 98
					importer.invoke(configurator);
99
					monitor.worked(60);
99
					monitor.worked(80);
100 100
				} catch (RuntimeException e) {
101 101
					StoreUtil.errorDialog(
102 102
							"Error importing data",
......
108 108
									+ "Please check error log for details.", e);
109 109
				}
110 110

  
111
				monitor.worked(10);
111
				monitor.worked(5);
112 112
				monitor.done();
113 113

  
114 114
				display.asyncExec(new Runnable() {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)