@Override
  public void update() {
    final RrmCalculationResult[] results = m_simulation.getCalculationResults();
    for (final RrmCalculationResult result : results) {
      if (result.getFolder().exists()) {
        setEnabled(true);
        return;
      }
    }

    setEnabled(false);
  }
  @Override
  public void run() {
    final Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
    final boolean confirmed =
        MessageDialog.openConfirm(
            shell,
            Messages.getString("DeleteRrmCalcualtionsAction_2"),
            Messages.getString("DeleteRrmCalcualtionsAction_3")); // $NON-NLS-1$ //$NON-NLS-2$
    if (!confirmed) return;

    final RrmCalculationResult[] calculations = m_simulation.getCalculationResults();

    try {
      for (final RrmCalculationResult calculation : calculations) {
        final IFolder folder = calculation.getFolder();
        folder.delete(true, new NullProgressMonitor());
      }
    } catch (final CoreException e) {
      e.printStackTrace();
    }

    /* update tree */
    m_view.refresh();
  }