use of com.guigarage.shell.event.VarData in project jdk9-jigsaw by AdoptOpenJDK.
the class ShellService method eval.
public synchronized void eval(String command) {
List<SnippetEvent> events = shell.eval(command);
for (SnippetEvent event : events) {
if (event.snippet() instanceof VarSnippet) {
String type = ((VarSnippet) event.snippet()).typeName();
String name = ((VarSnippet) event.snippet()).name();
String value = event.value();
VarData varData = new VarData(type, name, value);
eventBus.publish(Topics.VAR_CREATED_TOPIC, varData);
variables.add(varData);
}
}
}
Aggregations