Package org.jboss.forge.addon.ui.test.impl

Examples of org.jboss.forge.addon.ui.test.impl.UIContextImpl


   }

   @Test
   public void testNoExceptionsOnEnabledCommandNames()
   {
      UIContext context = new UIContextImpl(true, Selections.emptySelection());
      Set<String> enabledCommandNames = commandFactory.getEnabledCommandNames(context);
      Assert.assertEquals(5, enabledCommandNames.size());
   }
View Full Code Here


   }

   @Test
   public void testNoExceptionsOnCommandsNames()
   {
      UIContext context = new UIContextImpl(true, Selections.emptySelection());
      Set<String> commandNames = commandFactory.getCommandNames(context);
      Assert.assertEquals(5, commandNames.size());

   }
View Full Code Here

   public CommandController createCommandController(String name, Resource<?>... initialSelection) throws Exception
   {
      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()))
         {
View Full Code Here

   public WizardCommandController createWizardController(String name, Resource<?>... initialSelection) throws Exception
   {
      WizardCommandController result = null;
      Iterable<UICommand> commands = commandFactory.getCommands();
      UIContextImpl context = getUIContextInstance(initialSelection);
      for (UICommand command : commands)
      {
         if (command instanceof UIWizard)
         {
            UICommandMetadata metadata = command.getMetadata(context);
View Full Code Here

   private UIContextImpl getUIContextInstance(Resource<?>... initialSelection)
   {
      Imported<UIContextListener> listeners = addonRegistry.getServices(UIContextListener.class);
      UISelection<Resource<?>> selection = Selections.from(initialSelection);
      UIContextImpl context = new UIContextImpl(getProvider(), listeners, selection);
      return context;
   }
View Full Code Here

   public CommandController createCommandController(String name, Resource<?>... initialSelection) throws Exception
   {
      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()))
         {
View Full Code Here

   private UIContextImpl getUIContextInstance(Resource<?>... initialSelection)
   {
      Imported<UIContextListener> listeners = addonRegistry.getServices(UIContextListener.class);
      UISelection<Resource<?>> selection = Selections.from(initialSelection);
      UIContextImpl context = new UIContextImpl(getProvider(), listeners, selection);
      return context;
   }
View Full Code Here

   public CommandController createCommandController(String name, Resource<?>... initialSelection) throws Exception
   {
      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()))
         {
View Full Code Here

   private UIContextImpl getUIContextInstance(Resource<?>... initialSelection)
   {
      Imported<UIContextListener> listeners = addonRegistry.getServices(UIContextListener.class);
      UISelection<Resource<?>> selection = Selections.from(initialSelection);
      UIContextImpl context = new UIContextImpl(getProvider(), listeners, selection);
      return context;
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.ui.test.impl.UIContextImpl

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.