Hi All,
I am trying to do following in the OpenRequestHandler
ITclInterpreter tclInterpreter = getTclInterpreter(model);
try {
// Load the required Network package in TCL.
tclInterpreter.execute("package require AgtClient");
// Tell the model that the session is now open (all initialization is complete).
((SessionModel) model).setOpen();
} catch (InterpreterException e) {
throw new ToolException("Error executing command in Tcl interpreter", e);
}
}
I am getting exception on tclInterpreter.execute can any one help me with this.
This how my getTclInterpreter looks like
protected ITclInterpreter getTclInterpreter(ISessionModel model) throws ToolException {
// Request the tool to see if anybody is providing ITclInterpreter service.
// If we can't find one, this tool cannot operate in that environment.
Object adapter = model.getContext().getAdapter(ITclInterpreter.class);
if (!(adapter instanceof ITclInterpreter)) {
throw new ToolException("Cannot find a Tcl Interpreter");
}
return (ITclInterpreter) adapter;
}