code: public void run(IAction action) {
  
      // Ignore non structured selections
      if (!(this.selection instanceof IStructuredSelection))
        return;
  
      // operate on the DFS asynchronously to prevent blocking the main UI
      final IStructuredSelection ss = (IStructuredSelection) selection;
      final String actionId = action.getActionDefinitionId();
      Display.getDefault().asyncExec(new Runnable() {
        public void run() {
          try {
            switch (DFSActions.getById(actionId)) {
              case DELETE: {
                delete(ss);
                break;
              }
              case OPEN: {
                open(ss);
                break;
              }
              case MKDIR: {
                mkdir(ss);
                break;
              }
              case UPLOAD_FILES: {
                uploadFilesToDFS(ss);
                break;
              }
              case UPLOAD_DIR: {
                uploadDirectoryToDFS(ss);
                break;
              }
              case REFRESH: {
                refresh(ss);
                break;
              }
              case DOWNLOAD: {
                downloadFromDFS(ss);
                break;
              }
              case RECONNECT: {
                reconnect(ss);
                break;
              }
              case DISCONNECT: {
                disconnect(ss);
                break;
              }
              default: {
                System.err.printf("Unhandled DFS Action: " + actionId);
                break;
              }
            }
  
          } catch (Exception e) {
            e.printStackTrace();
            MessageDialog.openError(Display.getDefault().getActiveShell(),
                "DFS Action error",
                "An error occurred while performing DFS operation: "
                    + e.getMessage());
          }
        }
      });
    }
docs: /* @inheritDoc