public void runAction()

in src/main/java/org/apache/openwhisk/intellij/run/toolwindow/ui/WhiskRunWindowForm.java [152:178]


    public void runAction(WhiskActionService whiskActionService, WhiskAuth auth, ExecutableWhiskAction action) {
        ProgressManager.getInstance().run(new Task.Backgroundable(project, "Run action") {
            @Override
            public void run(@NotNull ProgressIndicator indicator) {
                try {
                    if (StringUtils.isEmpty(paramJTextArea.getText())) {
                        paramJTextArea.setText("{}");
                    }

                    Optional<String> params = ParameterUtils.validateParams(paramJTextArea.getText());
                    if (params.isPresent()) {
                        String result = whiskActionService.invokeWhiskAction(auth,
                                Optional.ofNullable(action.getNamespacePath()),
                                action.getWhiskPackage(),
                                action.getName(),
                                params.get());
                        updateResult(result);
                    } else {
                        NOTIFIER.notify(project, "The json format of the parameter is incorrect.", NotificationType.ERROR);
                    }
                } catch (IOException e) {
                    LOG.error("Failed to invoke action: " + action.getFullyQualifiedName(), e);
                }

            }
        });
    }