Search in sources :

Example 1 with CommandHandlerWithArguments

use of org.jboss.as.cli.handlers.CommandHandlerWithArguments in project wildfly-core by wildfly.

the class FilenameTabCompleterTestCase method setup.

@Before
public void setup() throws CliInitializationException {
    ctx = CommandContextFactory.getInstance().newCommandContext();
    final DefaultFilenameTabCompleter completer = new DefaultFilenameTabCompleter(ctx);
    final CommandHandlerWithArguments cmd = new CommandHandlerWithArguments() {

        @Override
        public boolean isAvailable(CommandContext ctx) {
            // TODO Auto-generated method stub
            return false;
        }

        @Override
        public boolean isBatchMode(CommandContext ctx) {
            // TODO Auto-generated method stub
            return false;
        }

        @Override
        public void handle(CommandContext ctx) throws CommandLineException {
        // TODO Auto-generated method stub
        }
    };
    arg = new FileSystemPathArgument(cmd, completer, 0, "arg");
    parsedCmd = new DefaultCallbackHandler();
}
Also used : CommandHandlerWithArguments(org.jboss.as.cli.handlers.CommandHandlerWithArguments) CommandContext(org.jboss.as.cli.CommandContext) FileSystemPathArgument(org.jboss.as.cli.impl.FileSystemPathArgument) DefaultFilenameTabCompleter(org.jboss.as.cli.handlers.DefaultFilenameTabCompleter) DefaultCallbackHandler(org.jboss.as.cli.operation.impl.DefaultCallbackHandler) Before(org.junit.Before)

Aggregations

CommandContext (org.jboss.as.cli.CommandContext)1 CommandHandlerWithArguments (org.jboss.as.cli.handlers.CommandHandlerWithArguments)1 DefaultFilenameTabCompleter (org.jboss.as.cli.handlers.DefaultFilenameTabCompleter)1 FileSystemPathArgument (org.jboss.as.cli.impl.FileSystemPathArgument)1 DefaultCallbackHandler (org.jboss.as.cli.operation.impl.DefaultCallbackHandler)1 Before (org.junit.Before)1