/** * Called when a Context is created. */ public void contextCreated(Context cx) { if (type != IPROXY_LISTEN) Kit.codeBug(); ContextData contextData = new ContextData(); Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG); cx.setDebugger(debugger, contextData); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); }
/** * Converts the given script object to a string. */ public String objectToString(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_TO_STRING); action.object = object; action.withContext(); return action.stringResult; }
/** * Attaches the debugger to the given ContextFactory. */ public void attachTo(ContextFactory factory) { detach(); this.contextFactory = factory; this.listener = new DimIProxy(this, IPROXY_LISTEN); factory.addListener(this.listener); }
/** * Called when a Context is created. */ public void contextCreated(Context cx) { if (type != IPROXY_LISTEN) Kit.codeBug(); ContextData contextData = new ContextData(); Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG); cx.setDebugger(debugger, contextData); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); }
/** * Compiles the given script. */ public void compileScript(String url, String text) { DimIProxy action = new DimIProxy(this, IPROXY_COMPILE_SCRIPT); action.url = url; action.text = text; action.withContext(); }
/** * Returns whether the given string is syntactically valid script. */ public boolean stringIsCompilableUnit(String str) { DimIProxy action = new DimIProxy(this, IPROXY_STRING_IS_COMPILABLE); action.text = str; action.withContext(); return action.booleanResult; }
/** * Converts the given script object to a string. */ public String objectToString(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_TO_STRING); action.object = object; action.withContext(); return action.stringResult; }
/** * Returns the value of a property on the given script object. */ public Object getObjectProperty(Object object, Object id) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_PROPERTY); action.object = object; action.id = id; action.withContext(); return action.objectResult; }
/** * Evaluates the given script. */ public void evalScript(final String url, final String text) { DimIProxy action = new DimIProxy(this, IPROXY_EVAL_SCRIPT); action.url = url; action.text = text; action.withContext(); }
/** * Attaches the debugger to the given ContextFactory. */ public void attachTo(ContextFactory factory) { detach(); this.contextFactory = factory; this.listener = new DimIProxy(this, IPROXY_LISTEN); factory.addListener(this.listener); }
/** * Called when a Context is created. */ public void contextCreated(Context cx) { if (type != IPROXY_LISTEN) Kit.codeBug(); ContextData contextData = new ContextData(); Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG); cx.setDebugger(debugger, contextData); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); }
/** * Returns whether the given string is syntactically valid script. */ public boolean stringIsCompilableUnit(String str) { DimIProxy action = new DimIProxy(this, IPROXY_STRING_IS_COMPILABLE); action.text = str; action.withContext(); return action.booleanResult; }
/** * Returns an array of the property names on the given script object. */ public Object[] getObjectIds(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_IDS); action.object = object; action.withContext(); return action.objectArrayResult; }
/** * Returns the value of a property on the given script object. */ public Object getObjectProperty(Object object, Object id) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_PROPERTY); action.object = object; action.id = id; action.withContext(); return action.objectResult; }
/** * Compiles the given script. */ public void compileScript(String url, String text) { DimIProxy action = new DimIProxy(this, IPROXY_COMPILE_SCRIPT); action.url = url; action.text = text; action.withContext(); }
/** * Returns an array of the property names on the given script object. */ public Object[] getObjectIds(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_IDS); action.object = object; action.withContext(); return action.objectArrayResult; }
/** * Compiles the given script. */ public void compileScript(String url, String text) { DimIProxy action = new DimIProxy(this, IPROXY_COMPILE_SCRIPT); action.url = url; action.text = text; action.withContext(); }
/** * Converts the given script object to a string. */ public String objectToString(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_TO_STRING); action.object = object; action.withContext(); return action.stringResult; }
/** * Returns an array of the property names on the given script object. */ public Object[] getObjectIds(Object object) { DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_IDS); action.object = object; action.withContext(); return action.objectArrayResult; }
/** * Evaluates the given script. */ public void evalScript(final String url, final String text) { DimIProxy action = new DimIProxy(this, IPROXY_EVAL_SCRIPT); action.url = url; action.text = text; action.withContext(); }