fix #6619: add message if no import result is available
authorKatja Luther <k.luther@bgbm.org>
Thu, 11 May 2017 12:16:06 +0000 (14:16 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 11 May 2017 12:16:06 +0000 (14:16 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java

index 7d9edcc350fd34ecff12e2f9ef6f49f5bb1f1389..50ab7dd2c077e362ef71d8ecbeb949e4ae1e3bae 100644 (file)
@@ -18,6 +18,7 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -535,19 +536,21 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
 //                    }
 //                });
                 final StringBuffer reportText = importResult.createReport();
-
-                display.asyncExec(new Runnable() {
-
-                    @Override
-                    public void run() {
-                        // display reports with possibility to save
-                        ReportTextDialog dialog = new ReportTextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
-                        dialog.setTitle(configurator.getClass().getSimpleName()+" Report");
-                        dialog.setReportText(reportText.toString());
-                        dialog.open();
-                        CdmStore.getContextManager().notifyContextRefresh();
-                    }
-                });
+                if (StringUtils.isBlank(reportText.toString())){
+                    reportText.append("No update result available");
+                }
+                    display.asyncExec(new Runnable() {
+
+                        @Override
+                        public void run() {
+                            // display reports with possibility to save
+                            ReportTextDialog dialog = new ReportTextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+                            dialog.setTitle(configurator.getClass().getSimpleName()+" Report");
+                            dialog.setReportText(reportText.toString());
+                            dialog.open();
+                            CdmStore.getContextManager().notifyContextRefresh();
+                        }
+                    });
 
 
                 return Status.OK_STATUS;