case GOTOSTEP: this.activityState.setGoToStepInd(this.goToStepInd);  this.activityState.gotoStep(); break;
    public void manageRequest(ApplicationManager.Request request)    {        // TODO test state        System.out.println(this.state + " -> " + request);                switch (request)        {            case NEXT:                this.activityState.next();                break;                           case PREVIOUS:                this.activityState.previous();                break;        }                /*        switch (this.state)        {            case INIT:                switch (request)                {                    case RUN_ACTIVITY:                        this.presentActivity();                        ActionManager.getInstance().getAction(                                Constants.ACTION_NEXT).setEnabled(true);                        break;                }                break;            case ACTIVITY_PRESENTATION:                switch (request)                {                    case NEXT:                        // pagod                         // this.activityState.next();                                                // TODO avant le design state                        // dans tout les cas on active l'action Previous                        ActionManager.getInstance().getAction(                                Constants.ACTION_PREVIOUS).setEnabled(true);                        // si on a des produit en entree ou des outils                        if (this.activity.hasInputProducts()                                || this.activity.needsTools())                            // on presente la checklist                            this.checkBeforeStart();                        // sinon si il y a des etapes                        else if (this.activity.hasSteps())                        {                            // on pr?sente la premiere ?tape                            this.stepList = this.activity.getSteps();                            this.step = this.stepList.get(this.index);                            this.presentStep(this.step, this.index,                                    this.stepList.size());                        }                        // sinon s'il y a des produits en sortie activit?s                        else if (this.activity.hasOutputProducts())                            // on presente ces produits                            this.presentProducts(this.activity                                    .getOutputProducts());                        // sinon l'activit? est terminer                        else                            ApplicationManager                                    .getInstance()                                    .manageRequest(                                            ApplicationManager.Request.TERMINATE_ACTIVITY);                                                break;                }                break;            case ACTIVITY_CHECKLIST:                switch (request)                {                    case NEXT:                        // si on il y a des etapes                        if (this.activity.hasSteps())                        {                            // on pr?sente la premiere ?tape                            this.stepList = this.activity.getSteps();                            this.step = this.stepList.get(this.index);                            this.presentStep(this.step, this.index,                                    this.stepList.size());                        }                        // sinon si l'activit? a des produits                        else if (this.activity.hasOutputProducts())                            // on presente ces produits                            this.presentProducts(this.activity                                    .getOutputProducts());                        // sinon l'activit? est terminer                        else                            ApplicationManager                                    .getInstance()                                    .manageRequest(                                            ApplicationManager.Request.TERMINATE_ACTIVITY);                        break;                    case PREVIOUS:                        this.presentActivity();                        ActionManager.getInstance().getAction(                                Constants.ACTION_PREVIOUS).setEnabled(false);                        break;                }                break;            case STEP_PRESENTATION:                switch (request)                {                    case NEXT:                        // si l'etape a des produits                        if (this.step.hasOutputProducts())                        {                            List<Product> lstOutputProduct = this.step                                    .getOutputProducts();                            // s'il n'y a qu'un produit on affiche un                            // JOptionPane lui permettant de choisir                            // s'il veut creer ou non le produit                            int optionSelected;                            if (lstOutputProduct.size() == 1)                            {                                optionSelected = JOptionPane                                        .showConfirmDialog(                                                this.mfPagod,                                                LanguagesManager                                                        .getInstance()                                                        .getString(                                                                "createProductmsg")                                                        + " "                                                        + lstOutputProduct.get(                                                                0).getName()                                                        + " ? ",                                                LanguagesManager                                                        .getInstance()                                                        .getString(                                                                "createProductTitle"),                                                JOptionPane.YES_NO_OPTION);                                // si l'utilisateur a choisi l'option yes on                                // lance la cr?ation du produit                                Product outputProduct = lstOutputProduct.get(0);                                if (optionSelected == JOptionPane.YES_OPTION                                        && outputProduct.getEditor() != null)                                    ModelResourcesManager.getInstance()                                            .launchProductApplication(                                                    outputProduct);                            }                            else                            {                                // il y a plusieurs produit a cree                            }                            // on presente ces produits                            this.presentProducts(this.step.getOutputProducts());                        }                        // sinon si il reste des etapes ? presenter                        else if (this.index < this.stepList.size() - 1)                        {                            // on presente l'etape suivante                            this.index++;                            this.step = this.stepList.get(this.index);                            this.presentStep(this.step, this.index,                                    this.stepList.size());                        }                        else                            ApplicationManager                                    .getInstance()                                    .manageRequest(                                            ApplicationManager.Request.TERMINATE_ACTIVITY);                        break;                    case PREVIOUS:                        // si c'est la premiere ?tape                        if (this.index == 0)                        {                            this.step = null;                            this.stepList = null;                            this.checkBeforeStart();                        }                        // si ce n'est pas la premiere etape                        else                        {                            // on presente l'etape suivante                            this.index--;                            this.step = this.stepList.get(this.index);                            // si l'?tape a des produit en sortie                            if (this.step.hasOutputProducts())                                this.presentProducts(this.step                                        .getOutputProducts());                            // sinon                            else                                this.presentStep(this.step, this.index,                                        this.stepList.size());                        }                        break;                }                break;            case PRODUCTS_PRESENTATION:                switch (request)                {                    case NEXT:                        // si activit? a des ?tapes il reste des etapes ?                        // presenter                        if (this.step != null                                && this.index < this.stepList.size() - 1)                        {                            // on presente l'etape suivante                            this.index++;                            this.step = this.stepList.get(this.index);                            this.presentStep(this.step, this.index,                                    this.stepList.size());                        }                        else                            ApplicationManager                                    .getInstance()                                    .manageRequest(                                            ApplicationManager.Request.TERMINATE_ACTIVITY);                        break;                    case PREVIOUS:                        // si activit? a des ?tapes                        if (this.step != null)                            this.presentStep(this.step, this.index,                                    this.stepList.size());                        // sinon si l'activit? a des produit en entree ou                        // des outils                        else if (this.activity.hasInputProducts()                                || this.activity.needsTools())                            // on presente la checklist                            this.checkBeforeStart();                        // sinon                        else                        {                            // on affiche la presentation de l'activit?                            this.presentActivity();                            ActionManager.getInstance().getAction(                                    Constants.ACTION_PREVIOUS)                                    .setEnabled(false);                        }                        break;                }                break;        }        */    }