make the introspector work with rhino

This commit is contained in:
stefanp 2003-06-23 15:39:18 +00:00
parent b67b75c3b4
commit 71ac4541ae

View file

@ -16,6 +16,7 @@
package helma.scripting.rhino; package helma.scripting.rhino;
import helma.doc.DocApplication;
import helma.extensions.ConfigurationException; import helma.extensions.ConfigurationException;
import helma.extensions.HelmaExtension; import helma.extensions.HelmaExtension;
import helma.framework.*; import helma.framework.*;
@ -58,6 +59,9 @@ public final class RhinoEngine implements ScriptingEngine {
// the global vars set by extensions // the global vars set by extensions
HashMap extensionGlobals; HashMap extensionGlobals;
// the introspector that provides documentation for this application
DocApplication doc = null;
/** /**
* Zero argument constructor. * Zero argument constructor.
*/ */
@ -412,10 +416,14 @@ public final class RhinoEngine implements ScriptingEngine {
} }
/** /**
* Get an introspector to this engine. FIXME: not yet implemented for the rhino engine. * Get an introspector to this engine.
*/ */
public IPathElement getIntrospector() { public IPathElement getIntrospector() {
return null; if (doc == null) {
doc = new DocApplication(app.getName(), app.getAppDir().toString());
doc.readApplication();
}
return doc;
} }
/** /**