[forge-issues] [JBoss JIRA] (FORGE-1610) Introduce an Update addon

George Gastaldi (JIRA) issues at jboss.org
Thu Sep 4 21:24:59 EDT 2014


    [ https://issues.jboss.org/browse/FORGE-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999166#comment-12999166 ] 

George Gastaldi commented on FORGE-1610:
----------------------------------------

Hi Ivan, glad you're ready with this! 

Let's get these questions answered:

1) To show a confirmation dialog/question in Forge UI/Shell, you need to use the {{UIPrompt}} object, supplied by the {{UIExecutionContext}}. 
The code should be similar to this: 
{code}
public class MyCommand implements UICommand {
...
    public Result execute(UIExecutionContext context) throws Exception {
         UIPrompt prompt = context.getPrompt();
         boolean answer = prompt.promptBoolean("Do you want to continue?");
         return Results.success("You answered: "+answer);
    }
}
{code}

2) I think it would be better to have that in a command, since users can ask for update anytime inside the Forge shell (and not only during boot, if the code were in Bootstrap)
3) To test this, I'd recommend to use a controlled Maven environment, like we do in https://github.com/forge/furnace/blob/master/manager/tests/src/test/java/org/jboss/forge/furnace/manager/impl/AddonManagerRepositoryTest.java. 

Let me know if you need anything else.

Best Regards,

George Gastaldi


> Introduce an Update addon
> -------------------------
>
>                 Key: FORGE-1610
>                 URL: https://issues.jboss.org/browse/FORGE-1610
>             Project: Forge
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Usability
>    Affects Versions: 2.0.0.Final
>            Reporter: George Gastaldi
>            Assignee: Ivan St. Ivanov
>             Fix For: 2.x Future
>
>
> It would be nice to have an Update addon to allow update of addons and the Forge version itself.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the forge-issues mailing list