Show confirmation window and if ok then only, force quit action.

@param actionId
as Id if the action needs to be forced.
432753
private void confirmAndForceQuitAction(final Long actionId) {
        /* Display the confirmation */
        final ConfirmationDialog confirmDialog = new ConfirmationDialog(
                i18n.getMessage("caption.forcequit.action.confirmbox"),
                i18n.getMessage("message.forcequit.action.confirm"), i18n.getMessage(UIMessageIdProvider.BUTTON_OK),
                i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), ok -> {
                    if (!ok) {
                        return;
                    }
                    final boolean cancelResult = forceQuitActiveAction(actionId);
                    if (cancelResult) {
                        populateAndUpdateTargetDetails(selectedTarget);
                        notification.displaySuccess(i18n.getMessage("message.forcequit.action.success"));
                    } else {
                        notification.displayValidationError(i18n.getMessage("message.forcequit.action.failed"));
                    }
                }, FontAwesome.WARNING, UIComponentIdProvider.CONFIRMATION_POPUP_ID, null);
        UI.getCurrent().addWindow(confirmDialog.getWindow());

        confirmDialog.getWindow().bringToFront();
    }
1045395
def wait_on_action(self, action_id, _check_output=subprocess.check_output):
        
        data = amulet.actions.get_action_output(action_id, full_output=True)
        return data.get(u"status") == "completed"
338259
public void quit()
	{
		if (pc != null) {
			final KNXNetworkLink lnk = pc.detach();
			if (lnk != null)
				lnk.close();
			Runtime.getRuntime().removeShutdownHook(sh);
		}
	}
822688
public void actionPerformed(ActionEvent ev) {

        String s = ev.getActionCommand();

        //  System.out.println("Action performed " + s);
        if (s.equals("ConnectOk")) {
            finishCreate();
        } else if (s.equals("ConnectCancel")) {
            dispose();
        }
    }
1339689
<R> R withPrompting(Supplier<R> action) {
    if (prompting) {
      throw new IllegalArgumentException();
    }
    prompting = true;
    try {
      return action.get();
    } finally {
      prompting = false;
    }
  }
553552
public void exit() {
        if (currentView == null) {
            GdxUtilities.exit();
        } else {
            currentView.getStage().addAction(Actions.sequence(getViewHidingAction(currentView),
                    Actions.run(GdxUtilities.getApplicationClosingRunnable())));
        }
    }
1359228
public static br force_stop(nitro_service client, br resource) throws Exception
	{
		return ((br[]) resource.perform_operation(client, "force_stop"))[0];
	}
894630
protected void createTerminateSessionAction(final Flow flow) {
        val terminateSession = createActionState(flow,
            CasWebflowConstants.STATE_ID_TERMINATE_SESSION, createEvaluateAction(CasWebflowConstants.ACTION_ID_TERMINATE_SESSION));
        createStateDefaultTransition(terminateSession, CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK);
    }
680061
def on_quit(self, event, wind=None):
        
        if wind:
            wind.Destroy()
        if not self.parent.IsShown():
            self.on_show_mainframe(None)
            # re-do the quit binding
            self.parent.Bind(wx.EVT_MENU, self.on_quit, self.file_quit)
        else:
            self.parent.Close()
1130120
public void terminateWorkflow(String workflowId, String reason) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        stub.terminateWorkflow(WorkflowServicePb.TerminateWorkflowRequest.newBuilder()
                .setWorkflowId(workflowId)
                .setReason(reason)
                .build()
        );
    }
676631
function removeAction(action, ctrl) {
      if (this.actionExists(action, ctrl)) {
        this.removeActionIcon(action, ctrl);
        delete ctrl.actionListService.actionsToIndex[action.name];
        delete ctrl.actionListService.onToggle[action.name];
        var i = ctrl.actionListService.actionsToDisplay.indexOf(action.name);
        ctrl.actionListService.actionsToDisplay.splice(i, 1);
        i = ctrl.actionListService.requiredActionsList.indexOf(action.name);
        ctrl.actionListService.requiredActionsList.splice(i, 1);
      }
    }
661961
def stop(self, force=False):
		
		if self._initialized:
			self.send(C1218TerminateRequest())
			data = self.recv()
			if data == b'\x00' or force:
				self._initialized = False
				self._toggle_bit = False
				return True
		return False
527455
def confirm(*args, **kwargs):
    """"""
    try:
        return click.confirm(*args, **kwargs)
    except click.Abort:
        return False
517085
def OnApprove(self, event):
        """"""

        if not self.main_window.safe_mode:
            return

        msg = _(u"You are going to approve and trust a file that\n"
                u"you have not created yourself.\n"
                u"After proceeding, the file is executed.\n \n"
                u"It may harm your system as any program can.\n"
                u"Please check all cells thoroughly before\nproceeding.\n \n"
                u"Proceed and sign this file as trusted?")

        short_msg = _("Security warning")

        if self.main_window.interfaces.get_warning_choice(msg, short_msg):
            # Leave safe mode
            self.main_window.grid.actions.leave_safe_mode()

            # Display safe mode end in status bar

            statustext = _("Safe mode deactivated.")
            post_command_event(self.main_window, self.main_window.StatusBarMsg,
                               text=statustext)
331360
@Deactivate
    protected void deactivate(int reason) {
        final String methodName = "deactivate";
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, methodName, "Entry Count: " + ++JDBCMBeanRuntime.counterDeactivate);
        if (trace && tc.isEventEnabled())
            Tr.event(tc, className + methodName + ", reason=" + reason);
        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, methodName, "Normal Exit");
    }
1294729
function(eventData) {

    if (!getConfig().disable_confirm_page) {
      showBookingPage(eventData)
    } else {
      $('.fc-event-clicked').removeClass('fc-event-clicked');
      $(this).addClass('fc-event-clicked');
      utils.doCallback('clickTimeslot', eventData);
    }

  }
620589
def _force_disconnect_action(self, action):
        

        conn_key = action.data['id']
        if self._get_connection_state(conn_key) == self.Disconnected:
            return

        data = self._get_connection(conn_key)

        # If there are any operations in progress, cancel them cleanly
        if data['state'] == self.Connecting:
            callback = data['action'].data['callback']
            callback(data['connection_id'], self.id, False, 'Unexpected disconnection')
        elif data['state'] == self.Disconnecting:
            callback = data['action'].data['callback']
            callback(data['connection_id'], self.id, True, None)
        elif data['state'] == self.InProgress:
            callback = data['action'].data['callback']
            if data['microstate'] == 'rpc':
                callback(False, 'Unexpected disconnection', 0xFF, None)
            elif data['microstate'] == 'open_interface':
                callback(False, 'Unexpected disconnection')
            elif data['microstate'] == 'close_interface':
                callback(False, 'Unexpected disconnection')

        connection_id = data['connection_id']
        internal_id = data['internal_id']
        del self._connections[connection_id]
        del self._int_connections[internal_id]