Package org.jboss.forge.addon.shell.util

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


   public Result execute(UIExecutionContext context) throws Exception
   {
      Resource<?> currentResource = (Resource<?>) context.getUIContext().getInitialSelection().get();
      for (String path : arguments.getValue())
      {
         List<Resource<?>> resources = new PathspecParser(resourceFactory, currentResource, path).resolve();
         for (Resource<?> resource : resources)
         {
            if (resource.exists())
            {
               return Results.fail(path + ": Resource already exists.");
View Full Code Here


      Resource<?> currentResource = shell.getCurrentResource();
      Iterator<String> it = arguments.getValue() == null ? Collections.<String> emptyList().iterator() : arguments
               .getValue().iterator();

      final Resource<?> resource = (it.hasNext()) ?
               (new PathspecParser(resourceFactory, currentResource, it.next()).resolve().get(0)) : currentResource;

      if (!resource.exists())
      {
         result = Results.fail(resource.getName() + ": No such file or directory");
      }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.shell.util.PathspecParser

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.