/** {@inheritDoc} */
  @Override
  protected IStatus run(IProgressMonitor pMonitor) {
    progressMonitor = pMonitor;
    progressMonitor.setTaskName("Waiting...");

    try {

      final Display display = Activator.getDefault().getWorkbench().getDisplay();
      display.syncExec(
          new Runnable() {

            public void run() {
              MessageBox turnOn = new MessageBox(new Shell(display), SWT.ICON_INFORMATION);
              if (serviceMode) {
                turnOn.setMessage("Turn On connected device in service mode and press OK.");
              } else {
                turnOn.setMessage("Turn On connected device in normal mode and press OK.");
              }
              if (turnOn.open() == SWT.OK) {
                result = "OK";
              } else {
                result = "CANCEL";
              }
            }
          });

      return new Status(IStatus.OK, Activator.PLUGIN_ID, result);
    } catch (Exception e) {
      return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Command failed", e);
    } finally {
      progressMonitor.done();
    }

    // return null;
  }
  private IBackendService getBackendService() {
    ServiceReference[] references = null;
    try {
      references =
          Activator.getBundleContext()
              .getAllServiceReferences(IBackendService.class.getName(), null);
    } catch (InvalidSyntaxException e) {
      log.error(e.getMessage());
    }

    if ((references == null) || (references.length == 0)) {
      return null;
    }

    return (IBackendService) Activator.getBundleContext().getService(references[0]);
  }
 /** Constructor */
 public DumpHandlingPreferencePage() {
   super(GRID);
   setPreferenceStore(Activator.getDefault().getPreferenceStore());
   setDescription("Core Dump Preferences");
 }