public Object execute(ExecutionEvent event) throws ExecutionException {

    DBSelection dbSel = new DBSelection(HandlerUtil.getCurrentSelection(event));

    ElementDBNode sel = dbSel.getSel();
    if (sel == null) {
      Logger.warn("nothing selected in the design browser, nothing to report");
      return null;
    }
    String selName = (sel instanceof ModelDBNode) ? "/" : ((InstanceDBNode) sel).getInstPath();

    MessageDialogWithToggle dialog =
        new MessageDialogWithToggle(
            HandlerUtil.getActiveShell(event),
            "Report type",
            null,
            "After clicking OK, the states of the current model are applied successively; "
                + "the currents found in each state are stored in a PowerPoint document ",
            MessageDialog.INFORMATION,
            new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL},
            0,
            "generate a power report instead",
            false);

    if (dialog.open() == Window.OK) {

      IScriptService interpreter = ScriptRegistry.instance.interpreter(SCRIPT_LANGAGE.TCL);

      try {
        interpreter.eval(
            "package require ms_report; ms_report::ppa_report "
                + selName
                + " "
                + (dialog.getToggleState() ? "power" : "current"),
            SCR_LOG_TYPE.PRINT_TRANSCRIPT);
      } catch (ScriptServiceException e) {
        ViewUtils.setErrorMessage("report generation failed", true);
      }
    }

    return null;
  }