Examples of PathspecParser


Examples of org.jboss.forge.shell.util.PathspecParser

      }
   }

   private void copyRecursively(final Resource<?> source, Resource<?> directory, final String target)
   {
      List<Resource<?>> results = new PathspecParser(resourceFactory, directory, target).resolve();

      if (results.size() > 1)
      {
         throw new RuntimeException("ambiguous target file name: " + target);
      }
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

         pom.setParent(parent);
         mvn.setPOM(pom);
      }
      else if (relativePath != null)
      {
         PathspecParser parser = new PathspecParser(resources, shell.getCurrentProject().getProjectRoot(), relativePath);
         List<Resource<?>> resolvedResources = parser.resolve();
         if (!resolvedResources.isEmpty()
                  && factory.containsProject(resolvedResources.get(0).reify(DirectoryResource.class)))
         {
            Project parentProject = factory.findProject(resolvedResources.get(0).reify(DirectoryResource.class));
            MavenCoreFacet parentCore = parentProject.getFacet(MavenCoreFacet.class);
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

         pom.setParent(parent);
         mvn.setPOM(pom);
      }
      else if (relativePath != null)
      {
         PathspecParser parser = new PathspecParser(resources, shell.getCurrentProject().getProjectRoot(), relativePath);
         List<Resource<?>> resolvedResources = parser.resolve();
         if (!resolvedResources.isEmpty()
                  && factory.containsProject(resolvedResources.get(0).reify(DirectoryResource.class)))
         {
            Project parentProject = factory.findProject(resolvedResources.get(0).reify(DirectoryResource.class));
            MavenCoreFacet parentCore = parentProject.getFacet(MavenCoreFacet.class);
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

            @Option(required = false, name = "find", shortName = "f") final String path)
   {

      if (path != null)
      {
         PathspecParser pathspecParser = new PathspecParser(resourceFactory, shell.getCurrentResource(), path);
         List<Resource<?>> targets = pathspecParser.search();

         if (targets.isEmpty())
         {
            shell.println("No such resource");
         }
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

         values = new String[] { String.valueOf(valueMap.get(option)) };
      }

      String val = values[values.length - 1];

      for (Resource<?> r : new PathspecParser(resourceFactory, shell.getCurrentResource(), val + "*")
               .resolve())
      {
         // Add result to the results list, and append a '/' if the
         // resource has children.
         String name = ("~".equals(val) ? "~/" : "") + r.getName()
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

   }

   private void rename(final Resource<?> source, Resource<?> directory, final String target, final boolean force,
            final PipeOut out)
   {
      List<Resource<?>> results = new PathspecParser(resourceFactory, directory, target).resolve();

      if (results.size() > 1)
      {
         throw new RuntimeException("ambiguous target file name: " + target);
      }
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

      }
   }

   private void copy(final Resource<?> source, Resource<?> directory, final String target)
   {
      List<Resource<?>> results = new PathspecParser(resourceFactory, directory, target).resolve();

      if (results.size() > 1)
      {
         throw new RuntimeException("ambiguous target file name: " + target);
      }
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

      }
   }

   private void copyRecursively(final Resource<?> source, Resource<?> directory, final String target)
   {
      List<Resource<?>> results = new PathspecParser(resourceFactory, directory, target).resolve();

      if (results.size() > 1)
      {
         throw new RuntimeException("ambiguous target file name: " + target);
      }
View Full Code Here

Examples of org.jboss.forge.shell.util.PathspecParser

         pom.setParent(parent);
         mvn.setPOM(pom);
      }
      else if (relativePath != null)
      {
         PathspecParser parser = new PathspecParser(resources, shell.getCurrentProject().getProjectRoot(), relativePath);
         List<Resource<?>> resolvedResources = parser.resolve();
         if (!resolvedResources.isEmpty()
                  && factory.containsProject(resolvedResources.get(0).reify(DirectoryResource.class)))
         {
            Project parentProject = factory.findProject(resolvedResources.get(0).reify(DirectoryResource.class));
            MavenCoreFacet parentCore = parentProject.getFacet(MavenCoreFacet.class);
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.