use of org.phoenicis.javafx.views.mainwindow.console.ConsoleTab in project POL-POM-5 by PhoenicisOrg.
the class ConsoleController method createConsole.
public ConsoleTab createConsole() {
final ConsoleTab consoleTab = consoleTabFactory.createInstance();
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
consoleTab.setOnSendCommand(command -> {
consoleTab.appendTextToConsole("> " + command + "\n", ConsoleTextType.NORMAL);
consoleTab.disableCommand();
interactiveScriptSession.eval(command, result -> {
consoleTab.appendTextToConsole(result == null ? "null\n" : result.toString() + "\n");
consoleTab.enableCommand();
}, error -> {
consoleTab.appendTextToConsole(ExceptionUtils.getFullStackTrace(error), ConsoleTextType.ERROR);
consoleTab.enableCommand();
});
});
return consoleTab;
}
use of org.phoenicis.javafx.views.mainwindow.console.ConsoleTab in project POL-POM-5 by PlayOnLinux.
the class LibraryFeaturePanel method openConsole.
/**
* Opens a new console tab
*/
public void openConsole() {
final ConsoleTab console = getConsoleController().createConsole();
getTabs().add(console);
setSelectedTab(console);
}
use of org.phoenicis.javafx.views.mainwindow.console.ConsoleTab in project phoenicis by PhoenicisOrg.
the class ConsoleController method createConsole.
public ConsoleTab createConsole() {
final ConsoleTab consoleTab = consoleTabFactory.createInstance();
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
consoleTab.setOnSendCommand(command -> {
consoleTab.appendTextToConsole("> " + command + "\n", ConsoleTextType.NORMAL);
consoleTab.disableCommand();
interactiveScriptSession.eval(command, result -> {
consoleTab.appendTextToConsole(result == null ? "null\n" : result.toString() + "\n");
consoleTab.enableCommand();
}, error -> {
consoleTab.appendTextToConsole(ExceptionUtils.getFullStackTrace(error), ConsoleTextType.ERROR);
consoleTab.enableCommand();
});
});
return consoleTab;
}
use of org.phoenicis.javafx.views.mainwindow.console.ConsoleTab in project POL-POM-5 by PlayOnLinux.
the class ConsoleController method createConsole.
public ConsoleTab createConsole() {
final ConsoleTab consoleTab = consoleTabFactory.createInstance();
final InteractiveScriptSession interactiveScriptSession = scriptInterpreter.createInteractiveSession();
consoleTab.setOnSendCommand(command -> {
consoleTab.appendTextToConsole("> " + command + "\n", ConsoleTextType.NORMAL);
consoleTab.disableCommand();
interactiveScriptSession.eval(command, result -> {
consoleTab.appendTextToConsole(result == null ? "null\n" : result.toString() + "\n");
consoleTab.enableCommand();
}, error -> {
consoleTab.appendTextToConsole(ExceptionUtils.getFullStackTrace(error), ConsoleTextType.ERROR);
consoleTab.enableCommand();
});
});
return consoleTab;
}
Aggregations