Package org.jboss.forge.project

Examples of org.jboss.forge.project.Facet


      {
         Iterator<? extends Facet> iterator = instances.iterator();
         List<Facet> result = new ArrayList<Facet>();
         while (iterator.hasNext())
         {
            Facet element = iterator.next();
            result.add(element);
         }
         facets = result;
      }
      return facets;
View Full Code Here


      return result;
   }

   public Facet getFacetByName(final String facetName) throws FacetNotFoundException
   {
      Facet result = null;
      for (Facet facet : getFacets())
      {
         String name = ConstraintInspector.getName(facet.getClass());
         if (name.equals(facetName))
         {
View Full Code Here

      return project;
   }

   public void installSingleFacet(final Project project, final Class<? extends Facet> type)
   {
      Facet facet = facetFactory.getFacet(type);

      List<Class<? extends Facet>> dependencies = ConstraintInspector.getFacetDependencies(type);
      if (dependencies != null)
      {
         for (Class<? extends Facet> dep : dependencies)
View Full Code Here

      }
   }

   public void registerSingleFacet(final Project project, final Class<? extends Facet> type)
   {
      Facet facet = facetFactory.getFacet(type);
      registerSingleFacet(project, facet);
   }
View Full Code Here

      {
         for (Class<? extends Facet> dep : dependencies)
         {
            if (!project.hasFacet(dep))
            {
               Facet depFacet = facetFactory.getFacet(dep);
               registerSingleFacet(project, depFacet);
               if (!project.hasFacet(dep))
               {
                  return;
               }
View Full Code Here

      return result;
   }

   public Facet getFacetByName(final String facetName) throws FacetNotFoundException
   {
      Facet result = null;
      for (Class<? extends Facet> facet : getFacetTypes())
      {
         String name = ConstraintInspector.getName(facet);
         if (name.equals(facetName))
         {
View Full Code Here

               || shell.promptBoolean("An action has requested to install the following facets into your project "
                        + request.getFacetTypes() + " continue?", true))
      {
         for (Class<? extends Facet> type : request.getFacetTypes())
         {
            Facet facet = factory.getFacet(type);
            if (!project.hasFacet(type))
            {
               install(facet, false);
               installed.add(facet);
            }
View Full Code Here

         else
         {
            List<Facet> installed = new ArrayList<Facet>();
            for (Class<? extends Facet> d : missingDeps)
            {
               Facet instance = factory.getFacet(d);
               if (performInstallation(instance, prompt))
               {
                  installed.add(instance);
               }
               else
View Full Code Here

               || shell.promptBoolean("An action has requested to remove the following facets from your project "
                        + request.getFacetTypes() + " continue?", true))
      {
         for (Class<? extends Facet> type : request.getFacetTypes())
         {
            Facet facet = factory.getFacet(type);
            if (project.hasFacet(type))
            {
               removed.addAll(remove(facet, false));
            }
            else
View Full Code Here

            completer = AvailableFacetsCompleter.class,
            description = "Name of the facet to install") final String facetName)
   {
      try
      {
         Facet facet = factory.getFacetByName(facetName);
         installFacets.fire(new InstallFacets(facet.getClass()));
      }
      catch (FacetNotFoundException e)
      {
         throw new RuntimeException("Could not find a facet with the name: " + facetName
                  + "; use 'project list-facets' to list all available facets.", e);
View Full Code Here

TOP

Related Classes of org.jboss.forge.project.Facet

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.