use of org.ow2.proactive_grid_cloud_portal.cli.console.JLineDevice in project scheduling by ow2-proactive.
the class AbstractSchedulerCommandTest method configureDevice.
protected void configureDevice() throws IOException {
InputStream in = new ByteArrayInputStream(userInput.toString().getBytes());
PrintStream out = new PrintStream(capturedOutput);
AbstractDevice device = new JLineDevice(in, out);
when(context.getDevice()).thenReturn(device);
this.engine.getContext().setWriter(device.getWriter());
}
use of org.ow2.proactive_grid_cloud_portal.cli.console.JLineDevice in project scheduling by ow2-proactive.
the class EntryPoint method getCommandFactory.
protected static CommandFactory getCommandFactory(ApplicationContext currentContext) throws IOException {
CommandFactory commandFactory;
AbstractDevice console;
commandFactory = getCommandFactory();
console = AbstractDevice.getConsole(AbstractDevice.JLINE);
((JLineDevice) console).setCommands(ObjectArrays.concat(commandFactory.supportedCommandEntries(), CommandSet.INTERACTIVE_COMMANDS, CommandSet.Entry.class));
currentContext.setDevice(console);
return commandFactory;
}
Aggregations