The actual interface is:
Value importValue(ImportValue importValue) throws ModelInterpreterException;
With this interface we are not able to handle multiple runtime projects simultaneously: we are able to find the path from the ImportValue (String path = ((Variable)importValue.eContainer().eContainer()).getPath();) but that path must refer to a model we have not access to, unless we have a reference to the model in the ModelInterpreter.
Proposal new interface:
The importType method has a reference to the geppetto model through a , GeppettoModelAccess parameter. We can add this parameter also to importValue:
Value importValue(ImportValue importValue, , GeppettoModelAccess modelAccess) throws ModelInterpreterException;
This is not needed because the modelInterpreter is in fact stateful although it may not seem. We have a difference instance of model interpreter for each library instance in the runtime project
The actual interface is:
Value importValue(ImportValue importValue) throws ModelInterpreterException;
With this interface we are not able to handle multiple runtime projects simultaneously: we are able to find the path from the ImportValue (
String path = ((Variable)importValue.eContainer().eContainer()).getPath();
) but that path must refer to a model we have not access to, unless we have a reference to the model in the ModelInterpreter.Proposal new interface: The
importType
method has a reference to the geppetto model through a , GeppettoModelAccess parameter. We can add this parameter also toimportValue
:Value importValue(ImportValue importValue, , GeppettoModelAccess modelAccess) throws ModelInterpreterException;