Merge branch 'develop' into featureTreeEditor
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / io / ImportManager.java
index 2ce1b670c6ec372da69a595c5f5df5fe3c5ccdd8..b515f67232d162ba1a69d93c54ba6ab2ee74cf69 100644 (file)
@@ -260,6 +260,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
         Path path = Paths.get(importFile.toURI());
         try {
             runMoniteredOperation(configurator, Files.readAllBytes(path), type);
+
         } catch (Exception e) {
             MessagingUtils.errorDialog("Error importing input stream",
                     this,
@@ -313,6 +314,7 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
                    return DwcaImportConfigurator.NewInstance(null, null);
                case Excel_Distribution:
             return ExcelDistributionUpdateConfigurator.NewInstance(null, null, null);
+
                default:
                        MessagingUtils.notImplementedMessage(this);
                        throw new IllegalArgumentException("Import not supported yet");
@@ -558,42 +560,9 @@ public class ImportManager extends AbstractIOManager<IImportConfigurator> implem
         return (ExcelDistributionUpdateConfigurator) getConfigurator(TYPE.Excel_Distribution);
     }
 
-    /**
-     * @param configurator
-     * @param display
-     * @param importResult
-     */
-    private void showResult(String importName, final Display display,
-            ImportResult importResult) {
-        StringBuffer reportTextTemp = importResult.createReport();
-        final StringBuffer reportText;
-        if (StringUtils.isBlank(reportTextTemp.toString())){
-            reportTextTemp.append("No update result available");
-            //TODO: this is a workaround because the abcd import writes the report in the report part...
-            if (!importResult.getReports().isEmpty()){
-                reportTextTemp = new StringBuffer();
-                if(importResult!=null){
-                    List<byte[]> reports = importResult.getReports();
-                    for (byte[] bs : reports) {
-                        reportTextTemp.append(new String(bs));
-                    }
-                }
-            }
-        }
-        reportText = reportTextTemp;
-            display.asyncExec(new Runnable() {
-
-                @Override
-                public void run() {
-                    // display reports with possibility to save
-                    ReportTextDialog dialog = new ReportTextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
-                    dialog.setTitle(importName+" Report");
-                    dialog.setReportText(reportText.toString());
-                    dialog.open();
-                    CdmStore.getContextManager().notifyContextRefresh();
-                }
-            });
-    }
+
+
+