Script models are used to retrieve various informations from scripts. The responsibility of a modelling engine is to provide a context for the models to share information.
Modelling engines work with modelling environment which provide overall information about the present scripts for a build configuration. The modelling environment is passed to the engine at creation time.
Modelling engines should not hold references to unmanaged data. (E.g. file handles, network connections, etc...)
Modelling engines are not shared by modelling environments.
public void | close() Closes this modelling engine. |
public ScriptSyntaxModel | createModel( Creates a model representation for the given script identified by the parsing options. |
public void | destroyModel( Destroys a previously created script model from this engine. |
The engine should release references to models, and treat them as invalidated. The engine should not make any further calls to the modelling environment. After closing a modelling engine, further calls to its models might be made, but they should be treated as invalid script models.
This method throws no checked exceptions, as it should not fail. Modelling engines should not keep references to unmanaged resources like files, network connections, etc...
The created model is to be lazily populated, meaning that creating a model does not entitle parsing it at the time of this function call.
Destroying a model should result in releasing any resources associated to it, and treating the corresponding script as no longer existing. Any other models that depend on the currently destroyed model should update their underlying data.