98,13 → 98,6 |
} |
|
/** |
* Namespace for variables used by the enviroment |
*/ |
private static String namespace() { |
return "$net.outlyer.runtime.internal"; |
} |
|
/** |
* Creates a unique variable name. |
*/ |
private static String uniqueVarName() { |
117,8 → 110,7 |
* @see #uniqueVarName |
*/ |
private static String uniqueFQVarName() { |
return new StringBuilder(namespace()).append(".") |
.append(uniqueVarName()).toString(); |
return Internal.getInternalObjectFieldName(uniqueVarName()); |
} |
|
/** |
160,12 → 152,12 |
// $net.outlyer.runtime.sandbox Contains a reference to this object |
// Implementation note: PluginEnvironment.EXPORTED_SANDBOX_VARIABLE |
// should have the same name |
final NamespaceContainer.$Net $net = new NamespaceContainer.$Net(pE, this); |
assert this == $net.outlyer.runtime.sandbox; |
rhino.put("$net", $net); |
final NamespaceContainer.$Net_Outlyer $nspc = new NamespaceContainer.$Net_Outlyer(pE, this); |
assert this == $nspc.runtime.sandbox; |
rhino.put(Internal.getReservedObjectName(), $nspc); |
// ....internal can be used to store random internal data, it's |
// a dynamic object so that fields can be created as needed |
rhino.eval("$net.outlyer.runtime.internal={};"); |
rhino.eval(Internal.getInternalObjectName()+Internal.getInternalInitialisation()); |
|
if (null != prependText) { |
rhino.eval(prependText); |