Package org.jboss.aesh.io.filter

Examples of org.jboss.aesh.io.filter.AllResourceFilter


public class FileOptionCompleter implements OptionCompleter<CompleterInvocation> {

    private final ResourceFilter filter;

    public FileOptionCompleter() {
        this(new AllResourceFilter());
    }
View Full Code Here


        if (cwd == null)
            throw new IllegalArgumentException("Current working directory cannot be null");
        this.token = Parser.switchEscapedSpacesToSpacesInWord(token);
        this.cwd = cwd;
        findRestAndLastDir();
        setFileFilter(new AllResourceFilter());
    }
View Full Code Here

        if (cwd == null)
            throw new IllegalArgumentException("Current working directory cannot be null");
        this.token = Parser.switchEscapedSpacesToSpacesInWord(token);
        this.cwd = cwd;
        findRestAndLastDir();
        setFileFilter(new AllResourceFilter());
    }
View Full Code Here

      String inputType = component.getFacet(HintsFacet.class).getInputType();
      OptionCompleter<CompleterInvocation> strategy = null;
      if (InputType.FILE_PICKER.equals(inputType) && cwd.isDirectory())
      {
         strategy = new FileOptionCompleter(new AllResourceFilter());
      }
      else if (InputType.DIRECTORY_PICKER.equals(inputType) && cwd.isDirectory())
      {
         strategy = new FileOptionCompleter(new DirectoryResourceFilter());
      }
      else if (component instanceof SelectComponent)
      {
         strategy = new SelectComponentOptionCompleter((SelectComponent<?, Object>) component, converterFactory);
      }
      else if (Resource.class.isAssignableFrom(component.getValueType()))
      {
         // fall back to Resource completion.
         strategy = new FileOptionCompleter(new AllResourceFilter());
      }
      // Always try UICompleter first and then fallback to the chosen strategy
      strategy = new UICompleterOptionCompleter(strategy, context, component, converterFactory);
      return strategy;
   }
View Full Code Here

TOP

Related Classes of org.jboss.aesh.io.filter.AllResourceFilter

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.