@Override
  public void beforePage() {
    setTitle(extractor.getLabel());

    // clear all entries (if embedded into multi-page wizard)
    allEntries.clear();
    tableViewer.setInput(allEntries);
    errorTableViewer.setInput(Collections.emptyList());

    try {
      new AbstractClientJob(client, extractor.getLabel()) {
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          monitor.beginTask(Messages.PDFImportWizardMsgExtracting, files.size());

          final List<Exception> errors = new ArrayList<Exception>();
          List<ExtractedEntry> entries =
              extractor //
                  .extract(files, errors)
                  .stream() //
                  .map(i -> new ExtractedEntry(i)) //
                  .collect(Collectors.toList());

          // Logging them is not a bad idea if the whole method fails
          PortfolioPlugin.log(errors);

          Display.getDefault().asyncExec(() -> setResults(entries, errors));

          return Status.OK_STATUS;
        }
      }.schedule();
    } catch (Exception e) {
      throw new UnsupportedOperationException(e);
    }
  }
  public ReviewExtractedItemsPage(
      Client client, Extractor extractor, IPreferenceStore preferences, List<File> files) {
    super(PAGE_ID);

    this.client = client;
    this.extractor = extractor;
    this.preferences = preferences;
    this.files = files;

    setTitle(extractor.getLabel());
    setDescription(Messages.PDFImportWizardDescription);
  }