Search in sources :

Example 1 with DBGPStackManager

use of org.eclipse.dltk.rhino.dbgp.DBGPStackManager in project servoy-client by Servoy.

the class DebugNGClient method getStackFrame.

/**
 * @return
 */
private DBGPDebugFrame getStackFrame() {
    IExecutingEnviroment engine = getScriptEngine();
    if (engine instanceof RemoteDebugScriptEngine && ((RemoteDebugScriptEngine) engine).getDebugger() != null) {
        DBGPDebugger debugger = ((RemoteDebugScriptEngine) engine).getDebugger();
        DBGPStackManager stackManager = debugger.getStackManager();
        if (stackManager != null) {
            return debugger.getStackManager().getStackFrame(0);
        }
    }
    return null;
}
Also used : DBGPDebugger(org.eclipse.dltk.rhino.dbgp.DBGPDebugger) IExecutingEnviroment(com.servoy.j2db.scripting.IExecutingEnviroment) DBGPStackManager(org.eclipse.dltk.rhino.dbgp.DBGPStackManager)

Example 2 with DBGPStackManager

use of org.eclipse.dltk.rhino.dbgp.DBGPStackManager in project servoy-client by Servoy.

the class RemoteDebugScriptEngine method destroy.

/**
 * @see com.servoy.j2db.scripting.ScriptEngine#destroy()
 */
@Override
public void destroy() {
    if (debugger != null) {
        List<Context> list = contexts.remove(application);
        if (list != null && list.size() > 0) {
            Context[] array;
            synchronized (list) {
                array = list.toArray(new Context[list.size()]);
                list.clear();
            }
            for (Context cx : array) {
                DBGPStackManager manager = DBGPStackManager.removeManager(cx);
                if (manager != null) {
                    manager.stop();
                }
            }
        }
        debugger.removeTerminationListener(this);
    }
    super.destroy();
}
Also used : Context(org.mozilla.javascript.Context) DBGPStackManager(org.eclipse.dltk.rhino.dbgp.DBGPStackManager)

Aggregations

DBGPStackManager (org.eclipse.dltk.rhino.dbgp.DBGPStackManager)2 IExecutingEnviroment (com.servoy.j2db.scripting.IExecutingEnviroment)1 DBGPDebugger (org.eclipse.dltk.rhino.dbgp.DBGPDebugger)1 Context (org.mozilla.javascript.Context)1