Examples of UICommandMetadata


Examples of org.jboss.forge.addon.ui.metadata.UICommandMetadata

   }

   private ProcessedCommand generateCommand(final CommandController command, final ShellContext shellContext,
            final Map<String, InputComponent<?, ?>> inputs)
   {
      UICommandMetadata metadata = (command instanceof WizardCommandController) ? ((WizardCommandController) command)
               .getInitialMetadata() : command.getMetadata();
      String cmdName = ShellUtil.shellifyName(metadata.getName()).toLowerCase();
      String cmdDescription = metadata.getDescription();
      final ProcessedCommand parameter = new ProcessedCommand(cmdName, cmdDescription,
               (Class<? extends CommandValidator<?>>) null, null);

      for (Entry<String, InputComponent<?, ?>> entry : inputs.entrySet())
      {
View Full Code Here

Examples of org.jboss.forge.addon.ui.metadata.UICommandMetadata

      }

      for (CommandController controller : controllers)
      {
         String name = commandFactory.getCommandName(context.getUIContext(), controller.getCommand());
         UICommandMetadata metadata = controller.getMetadata();
         display.add(metadata.getCategory()
                  + " > "
                  + new TerminalString(name, new TerminalColor(controller.isEnabled() ? Color.CYAN : Color.RED,
                           Color.DEFAULT)).toString() + " - " + metadata.getDescription());
      }

      UIOutput output = context.getUIContext().getProvider().getOutput();
      PrintStream out = output.out();
      out.println(Parser.formatDisplayList(display.toArray(new String[display.size()]),
View Full Code Here

Examples of org.jboss.forge.addon.ui.metadata.UICommandMetadata

      CommandController result = null;
      Iterable<UICommand> commands = commandFactory.getCommands();
      UIContextImpl context = getUIContextInstance(initialSelection);
      for (UICommand command : commands)
      {
         UICommandMetadata metadata = command.getMetadata(context);
         if (name.equals(metadata.getName()))
         {
            result = factory.createSingleController(context, getUIRuntimeInstance(), command);
            break;
         }
      }
View Full Code Here

Examples of org.jboss.forge.addon.ui.metadata.UICommandMetadata

   }

   private ProcessedCommand generateCommand(final CommandController command, final ShellContext shellContext,
            final Map<String, InputComponent<?, ?>> inputs)
   {
      UICommandMetadata metadata = (command instanceof WizardCommandController) ? ((WizardCommandController) command)
               .getInitialMetadata() : command.getMetadata();
      ProcessedCommand parameter = new ProcessedCommand(ShellUtil.shellifyName(metadata.getName()),
               metadata.getDescription(), (CommandValidator<?>) null);

      for (final InputComponent<?, ?> input : inputs.values())
      {
         final Object defaultValue = InputComponents.getValueFor(input);
         final boolean isMultiple = input instanceof ManyValued;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.