2 Replies Latest reply on Dec 31, 2013 6:00 PM by George Gastaldi

    [forge-dev] Missing commands on shell (jpa-setup wizard)

    Lincoln Baxter III Master

      So I don't forget by the time we get back from new-years- The bug is in

      ShellWizard.java:

       

      https://issues.jboss.org/browse/FORGE-1407

       

         private CommandLineParser populate(ShellContext shellContext, String

      line,

       

                  final Map<String, InputComponent<?, ?>> inputs)

       

                  throws Exception

       

         {

       

            inputs.putAll(getController().getInputs());

       

            CommandLineParser parser =

      commandLineUtil.generateParser(getController(),

      shellContext, inputs);

       

            CommandLine cmdLine = parser.parse(line, true);

       

            Map<String, InputComponent<?, ?>> populatedInputs =

      commandLineUtil.populateUIInputs(cmdLine,

      inputs);

       

            if (getController().isValid())

       

            {

       

               if (getController().canMoveToNextStep())

       

               {

       

                  // The bug is here. we are immediately moving to the next step

      and removing all inputs that are not populated.

       

                  // this really needs to know if we have defaulted to next step

      or actually moved there willingly

       

                  // it should not remove old choices until a new choice has been

      made

       

                  getController().next().initialize();

       

                  inputs.keySet().retainAll(populatedInputs.keySet());

       

                  parser = populate(shellContext, line, inputs);

       

               }

       

            }

       

            return parser;

       

         }

       

      --

      Lincoln Baxter, III

      http://ocpsoft.org

      "Simpler is better."

       

        • 1. Re: [forge-dev] Missing commands on shell (jpa-setup wizard)
          Lincoln Baxter III Master

          Sorry, the subject should be "missing options"

           

           

          On Tue, Dec 31, 2013 at 5:15 PM, Lincoln Baxter, III <

          lincolnbaxter@gmail.com> wrote:

           

          So I don't forget by the time we get back from new-years- The bug is in

          ShellWizard.java:

           

          https://issues.jboss.org/browse/FORGE-1407

           

             private CommandLineParser populate(ShellContext shellContext, String

          line,

           

                      final Map<String, InputComponent<?, ?>> inputs)

           

                      throws Exception

           

             {

           

                inputs.putAll(getController().getInputs());

           

                CommandLineParser parser = commandLineUtil.generateParser(getController(),

          shellContext, inputs);

           

                CommandLine cmdLine = parser.parse(line, true);

           

                Map<String, InputComponent<?, ?>> populatedInputs = commandLineUtil.populateUIInputs(cmdLine,

          inputs);

           

                if (getController().isValid())

           

                {

           

                   if (getController().canMoveToNextStep())

           

                   {

           

                      // The bug is here. we are immediately moving to the next

          step and removing all inputs that are not populated.

           

                      // this really needs to know if we have defaulted to next

          step or actually moved there willingly

           

                      // it should not remove old choices until a new choice has

          been made

           

                      getController().next().initialize();

           

                      inputs.keySet().retainAll(populatedInputs.keySet());

           

                      parser = populate(shellContext, line, inputs);

           

                   }

           

                }

           

                return parser;

           

             }

           

          --

          Lincoln Baxter, III

          http://ocpsoft.org

          "Simpler is better."

           

           

           

           

          --

          Lincoln Baxter, III

          http://ocpsoft.org

          "Simpler is better."

           

          • 2. Re: [forge-dev] Missing commands on shell (jpa-setup wizard)
            George Gastaldi Master

            This looks like a duplicate of https://issues.jboss.org/browse/FORGE-1404

             

            Maybe we should close FORGE-1404, given that FORGE-1407 has more information

             

            Em 31/12/2013, às 20:15, "Lincoln Baxter, III" <lincolnbaxter@gmail.com> escreveu:

             

            So I don't forget by the time we get back from new-years- The bug is in ShellWizard.java:

             

            https://issues.jboss.org/browse/FORGE-1407

               private CommandLineParser populate(ShellContext shellContext, String line,

             

                        final Map<String, InputComponent<?, ?>> inputs)

             

                        throws Exception

             

               {

             

                  inputs.putAll(getController().getInputs());

             

                  CommandLineParser parser = commandLineUtil.generateParser(getController(), shellContext, inputs);

             

                  CommandLine cmdLine = parser.parse(line, true);

             

                  Map<String, InputComponent<?, ?>> populatedInputs = commandLineUtil.populateUIInputs(cmdLine, inputs);

             

                  if (getController().isValid())

             

                  {

             

                     if (getController().canMoveToNextStep())

             

                     {

             

                        // The bug is here. we are immediately moving to the next step and removing all inputs that are not populated.

             

                        // this really needs to know if we have defaulted to next step or actually moved there willingly

             

                        // it should not remove old choices until a new choice has been made

             

                        getController().next().initialize();

             

                        inputs.keySet().retainAll(populatedInputs.keySet());

             

                        parser = populate(shellContext, line, inputs);

             

                     }

             

                  }

             

                  return parser;

             

               }

             

             

            --

            Lincoln Baxter, III

            http://ocpsoft.org

            "Simpler is better."

            _______________________________________________

            forge-dev mailing list

            forge-dev@lists.jboss.org

            https://lists.jboss.org/mailman/listinfo/forge-dev