private void deleteOrder() {
    Order order = (Order) ((IStructuredSelection) tableViewer.getSelection())
        .getFirstElement();
    if (order != null) {
      if (order.getMonitoring() == null || order.getMonitoring().size() == 0) {
        tableViewer.remove(order);
        int index = data.indexOf(order);
        data.remove(order);
        new File(AssemblyMonitoring.DATA_LOCATION + File.separator
            + (order.getOrderNumber() == null
                || order.getOrderNumber().equals("?") ? "unknown"
                    : order.getOrderNumber())
            + ".xml").delete();
        if (data.size() == index) {
          index--;
        }
        if (data.size() > index && index >= 0) {
          tableViewer.setSelection(new StructuredSelection(data.get(index)));
          table.setFocus();
        }
      } else {
        MessageBox.displayMessageBox(table.getShell(), SWT.ERROR, "Chyba !",
            "Objednavka cislo " + order.getOrderNumber()
                + " nemoze byt zmazana."
                + "\nK tejto objednavke existuju zaznamy v monitoringu."
                + "\nZmazte najskor zaznamy v monitoringu patriace k tejto objednavke.");
      }
    }
  }