本文整理了Java中jline.History.setHistoryFile()
方法的一些代码示例,展示了History.setHistoryFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。History.setHistoryFile()
方法的具体详情如下:
包路径:jline.History
类名称:History
方法名:setHistoryFile
暂无
代码示例来源:origin: org.apache.servicemix.kernel.gshell/org.apache.servicemix.kernel.gshell.core
public void setHistoryFile(final File file) throws IOException {
assert file != null;
File dir = file.getParentFile();
if (!dir.exists()) {
// noinspection ResultOfMethodCallIgnored
dir.mkdirs();
}
log.debug("History file: {}", file);
super.setHistoryFile(file);
}
}
代码示例来源:origin: io.snappydata/gemfire-core
private void initJline() throws Exception
{
// String osName = System.getProperty("os.name");
// if (osName.startsWith("Windows")) {
// return;
// }
consoleReader = new ConsoleReader();
consoleReader.setBellEnabled(false);
// consoleReader.setDebug(new java.io.PrintWriter("jline-debug.txt"));
History history = consoleReader.getHistory();
if (history == null) {
history = new History();
consoleReader.setHistory(history);
}
File historyFile = new File(System.getProperty("user.home"), ".gfshhistory");
history.setHistoryFile(historyFile);
// reader.setDebug(new PrintWriter(new FileWriter("writer.debug", true)));
List completors = new LinkedList();
completors.add(new SimpleCompletor(commands));
consoleReader.addCompletor(new ArgumentCompletor(completors));
}
代码示例来源:origin: org.apache.felix.karaf.shell/org.apache.felix.karaf.shell.console
reader.getHistory().setHistoryFile(file);
session.put(".jline.history", reader.getHistory());
if (completer != null) {
代码示例来源:origin: tinkerpop/tinkubator
history.setHistoryFile(new File(MUTANT_HISTORY));
reader.setHistory(history);
} catch (IOException e) {
内容来源于网络,如有侵权,请联系作者删除!