class FinishImport implements LongTask, Runnable {

        private final List<Container> containers;
        private final ImportErrorHandler errorHandler;
        private ProgressTicket progressTicket;

        public FinishImport(List<Container> containers, ImportErrorHandler errorHandler) {
            this.containers = containers;
            this.errorHandler = errorHandler;
        }

        @Override
        public void run() {<FILL_FUNCTION_BODY>}

        @Override
        public boolean cancel() {
            return false;
        }

        @Override
        public void setProgressTicket(ProgressTicket progressTicket) {
            this.progressTicket = progressTicket;
        }
    }

            // If exceptions were thrown we show them in the processor panel
            if (errorHandler != null) {
                Report errorReport = errorHandler.closeAndGetReport();
                if (errorHandler.countErrors() > 0) {
                    showProcessorIssues(errorReport);
                    return;
                }
            }

            Report finalReport = new Report();
            for (Container container : containers) {
                if (container.verify()) {
                    Report report = container.getReport();
                    report.close();
                    finalReport.append(report);
                } else {
                    //TODO
                }
            }
            finalReport.close();

            //Report panel
            if (!containers.isEmpty()) {
                ReportPanel reportPanel = new ReportPanel();
                reportPanel.setData(finalReport, containers.toArray(new Container[0]));
                DialogDescriptor dd = new DialogDescriptor(reportPanel,
                    NbBundle.getMessage(DesktopImportControllerUI.class, "ReportPanel.title"));
                Object response = DialogDisplayer.getDefault().notify(dd);
                reportPanel.destroy();
                finalReport.clean();
                for (Container c : containers) {
                    c.getReport().clean();
                }
                if (!response.equals(NotifyDescriptor.OK_OPTION)) {
                    return;
                }
                final Processor processor = reportPanel.getProcessor();
                processor.setProgressTicket(progressTicket);

                //Project
                Workspace workspace = null;
                ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
                if (pc.getCurrentProject() == null) {
                    Project project = pc.newProject();
                    workspace = project.getCurrentWorkspace();
                }

                //Process
                final ProcessorUI pui = getProcessorUI(processor);
                final ValidResult validResult = new ValidResult();
                if (pui != null) {
                    try {
                        final JPanel panel = pui.getPanel();
                        if (panel != null) {
                            SwingUtilities.invokeAndWait(new Runnable() {
                                @Override
                                public void run() {
                                    String title = NbBundle.getMessage(DesktopImportControllerUI.class,
                                        "DesktopImportControllerUI.processor.ui.dialog.title");

                                    pui.setup(processor);
                                    final DialogDescriptor dd2 = DialogDescriptorWithValidation.dialog(panel, title);
                                    Object result = DialogDisplayer.getDefault().notify(dd2);
                                    if (result.equals(NotifyDescriptor.CANCEL_OPTION) ||
                                        result.equals(NotifyDescriptor.CLOSED_OPTION)) {
                                        validResult.setResult(false);
                                    } else {
                                        pui.unsetup(); //true
                                        validResult.setResult(true);
                                    }
                                }
                            });
                        }
                    } catch (InterruptedException | InvocationTargetException ex) {
                        Exceptions.printStackTrace(ex);
                    }
                }

                if (validResult.isResult()) {
                    controller.process(containers.toArray(new Container[0]), processor, workspace);

                    Report report = processor.getReport();
                    if (report != null && !report.isEmpty()) {
                        showProcessorIssues(report);
                    }

                    //StatusLine notify
                    StatusDisplayer.getDefault().setStatusText(NbBundle
                        .getMessage(DesktopImportControllerUI.class,
                            "DesktopImportControllerUI.status.multiImportSuccess",
                            containers.size()));
                }
            }
        
<no_super_class>