use of org.jboss.as.cli.impl.FileSystemPathArgument 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();
}
use of org.jboss.as.cli.impl.FileSystemPathArgument in project wildfly-core by wildfly.
the class EmbedHostControllerHandler method create.
static EmbedHostControllerHandler create(final AtomicReference<EmbeddedProcessLaunch> hostControllerReference, final CommandContext ctx, final boolean modular) {
EmbedHostControllerHandler result = new EmbedHostControllerHandler(hostControllerReference);
final FilenameTabCompleter pathCompleter = FilenameTabCompleter.newCompleter(ctx);
if (!modular) {
result.jbossHome = new FileSystemPathArgument(result, pathCompleter, "--jboss-home");
}
result.stdOutHandling = new ArgumentWithValue(result, new SimpleTabCompleter(new String[] { ECHO, DISCARD_STDOUT }), "--std-out");
result.domainConfig = new ArgumentWithValue(result, DOMAIN_CONFIG);
result.hostConfig = new ArgumentWithValue(result, HOST_CONFIG);
result.dashC = new ArgumentWithValue(result, "-c");
result.dashC.addCantAppearAfter(result.domainConfig);
result.domainConfig.addCantAppearAfter(result.dashC);
result.timeout = new ArgumentWithValue(result, "--timeout");
result.emptyDomainConfig = new ArgumentWithoutValue(result, EMPTY_DOMAIN_CONFIG);
result.removeExistingDomainConfig = new ArgumentWithoutValue(result, REMOVE_EXISTING_DOMAIN_CONFIG);
result.emptyHostConfig = new ArgumentWithoutValue(result, EMPTY_HOST_CONFIG);
result.removeExistingHostConfig = new ArgumentWithoutValue(result, REMOVE_EXISTING_HOST_CONFIG);
return result;
}
use of org.jboss.as.cli.impl.FileSystemPathArgument in project wildfly-core by wildfly.
the class EmbedServerHandler method create.
static EmbedServerHandler create(final AtomicReference<EmbeddedProcessLaunch> serverReference, CommandContext ctx, boolean modular) {
EmbedServerHandler result = new EmbedServerHandler(serverReference);
final FilenameTabCompleter pathCompleter = FilenameTabCompleter.newCompleter(ctx);
if (!modular) {
result.jbossHome = new FileSystemPathArgument(result, pathCompleter, "--jboss-home");
}
result.stdOutHandling = new ArgumentWithValue(result, new SimpleTabCompleter(new String[] { ECHO, DISCARD_STDOUT }), "--std-out");
result.serverConfig = new ArgumentWithValue(result, "--server-config");
result.dashC = new ArgumentWithValue(result, "-c");
result.dashC.addCantAppearAfter(result.serverConfig);
result.serverConfig.addCantAppearAfter(result.dashC);
result.adminOnly = new ArgumentWithValue(result, SimpleTabCompleter.BOOLEAN, "--admin-only");
result.emptyConfig = new ArgumentWithoutValue(result, "--empty-config");
result.removeExisting = new ArgumentWithoutValue(result, "--remove-existing");
result.removeExisting.addRequiredPreceding(result.emptyConfig);
result.timeout = new ArgumentWithValue(result, "--timeout");
return result;
}
Aggregations