Package org.jboss.forge.addon.ui.command

Examples of org.jboss.forge.addon.ui.command.UICommand


   @Override
   public CommandController createController(final UIContext context, final UIRuntime runtime,
            final UICommand originalCommand)
   {
      UICommand command = transform(context, originalCommand);
      if (command instanceof UIWizard)
      {
         return doCreateWizardController(context, runtime, (UIWizard) command);
      }
      else
View Full Code Here


   @Override
   public SingleCommandController createSingleController(final UIContext context, final UIRuntime runtime,
            final UICommand originalCommand)
   {
      final UICommand command = transform(context, originalCommand);
      return doCreateSingleController(context, runtime, command);
   }
View Full Code Here

   @Override
   public WizardCommandController createWizardController(final UIContext context, final UIRuntime runtime,
            final UIWizard wizard)
   {
      final UICommand command = transform(context, wizard);
      if (command instanceof UIWizard)
      {
         return doCreateWizardController(context, runtime, (UIWizard) command);
      }
      else
View Full Code Here

      }
   }

   private UICommand transform(final UIContext context, final UICommand originalCommand)
   {
      UICommand command = originalCommand;
      for (UICommandTransformer transformer : transformers)
      {
         UICommand tmpCommand = transformer.transform(context, command);
         if (tmpCommand == null)
         {
            log.warning(UICommandTransformer.class.getName() + " implementation "
                     + Proxies.unwrapProxyClassName(transformer.getClass())
                     + " should not have returned null. Ignoring.");
View Full Code Here

      if (command == null)
      {
         List<UICommand> commands = new ArrayList<>();
         for (NavigationResultEntry entry : entries)
         {
            UICommand command = entry.getCommand(addonRegistry, context);
            commands.add(command);
         }
         command = new CompositeCommand(metadata, commands);
      }
      return command;
View Full Code Here

         CommandController controller = entry.controller;
         if (progressMonitor.isCancelled())
         {
            break;
         }
         UICommand command = controller.getCommand();
         try
         {
            for (CommandExecutionListener listener : listeners)
            {
               listener.preCommandExecuted(command, executionContext);
            }

            Result currentResult = command.execute(executionContext);
            for (CommandExecutionListener listener : listeners)
            {
               listener.postCommandExecuted(command, executionContext, currentResult);
            }
            results.add(currentResult);
View Full Code Here

            addNextFlowStep(result);
         }
         else
         {
            // FORGE-1372- Test if the inputs changed.
            final UICommand command;
            if (result == null)
            {
               if (subflow.isEmpty())
               {
                  command = null;
               }
               else
               {
                  UICommand command2 = Proxies.unwrap(subflow.peek().controller.getCommand());
                  command = createCommand(command2.getClass());
               }
            }
            else
            {
               command = createCommand(result[0]);
View Full Code Here

      return getCurrentEntry().controller;
   }

   private WizardStepEntry createEntry(Class<? extends UICommand> commandClass, boolean subflowHead)
   {
      UICommand command = createCommand(commandClass);
      return createEntry(command, subflowHead);
   }
View Full Code Here

      return createEntry(command, subflowHead);
   }

   private UICommand createCommand(Class<? extends UICommand> commandClass)
   {
      UICommand command = addonRegistry.getServices(commandClass).get();
      return command;
   }
View Full Code Here

   @Override
   public InputStream getManualDocument(String command)
   {
      try (ShellContextImpl context = shell.createUIContext())
      {
         UICommand cmd = manager.getCommandByName(context, command);
         if (cmd != null)
         {
            URL docLocation = cmd.getMetadata(context).getDocLocation();
            if (docLocation != null)
            {
               try
               {
                  return docLocation.openStream();
               }
               catch (IOException e)
               {
                  log.log(Level.SEVERE,
                           "Could not open man page document stream URL [" + docLocation.toExternalForm()
                                    + "] for command [" + cmd.getMetadata(context).getType().getName() + "].", e);
               }
            }
            return buildDefaultManPage(cmd, context);
         }
      }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.ui.command.UICommand

Copyright © 2018 www.massapicom. 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.