Package org.jboss.forge.addon.scaffold.spi

Examples of org.jboss.forge.addon.scaffold.spi.ScaffoldGenerationContext


   }

   private ScaffoldGenerationContext populateGenerationContext(UIContext context, Collection<Resource<?>> resources)
   {
      Map<Object, Object> attributeMap = context.getAttributeMap();
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      generationContext.setResources(resources);
      return generationContext;
   }
View Full Code Here


      ScaffoldProvider selectedProvider = provider.getValue();
      UIContext uiContext = context.getUIContext();
      Map<Object, Object> attributeMap = uiContext.getAttributeMap();

      attributeMap.put(ScaffoldProvider.class, selectedProvider);
      ScaffoldGenerationContext generationContext = populateGenerationContext(uiContext);
      attributeMap.put(ScaffoldGenerationContext.class, generationContext);

      NavigationResult setupFlow = null;
      Project project = getSelectedProject(uiContext);
View Full Code Here

      String targetDir = webRoot.getValue();
      if(targetDir == null || targetDir.equals("/"))
      {
         targetDir = "";
      }
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) attributeMap
               .get(ScaffoldGenerationContext.class);
      if (generationContext == null)
      {
         return new ScaffoldGenerationContext(targetDir, null, project);
      }
      else
      {
         generationContext.setTargetDirectory(targetDir);
         return generationContext;
      }
   }
View Full Code Here

      return factory;
   }
  
   private ScaffoldGenerationContext populateGenerationContext(UIContext context, Collection resources)
   {
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) context.getAttribute(ScaffoldGenerationContext.class);
      generationContext.setResources(resources);
      return generationContext;
   }
View Full Code Here

      return factory;
   }
  
   private ScaffoldGenerationContext populateGenerationContext(UIContext context)
   {
      ScaffoldGenerationContext generationContext = (ScaffoldGenerationContext) context.getAttribute(ScaffoldGenerationContext.class);
      if(generationContext == null)
      {
         return new ScaffoldGenerationContext(target.getValue(), overwrite.getValue(), null);
      }
      else
      {
         generationContext.setTargetDirectory(target.getValue());
         generationContext.setOverwrite(overwrite.getValue());
         return generationContext;
      }
   }
View Full Code Here

            }
         }
      }

      attributeMap.put(ResourceCollection.class, resourceCollection);
      ScaffoldGenerationContext genCtx = (ScaffoldGenerationContext) attributeMap.get(ScaffoldGenerationContext.class);
      if (uiContext.getProvider().isGUI())
      {
         if (useCustomTemplate.getValue())
         {
            genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
         }
      }
      else
      {
         genCtx.addAttribute("pageTemplate", pageTemplate.getValue());
      }
      return null;
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.scaffold.spi.ScaffoldGenerationContext

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.