Search in sources :

Example 1 with Name

use of org.whole.lang.environment.model.Name in project whole by wholeplatform.

the class ExecuteSampleModelRunnable method addMissingVariables.

protected void addMissingVariables(IEntity contextModel, MissingVariableException e) {
    String[] varNames = e.getVariableNames();
    EnvironmentEntityFactory ef = EnvironmentEntityFactory.instance;
    for (String varName : varNames) {
        Name var = ef.createName(varName);
        IEntity find = Matcher.find(var, contextModel, false);
        if (find == null)
            contextModel.wAdd(ef.createBinding(var, CommonsEntityAdapterFactory.createResolver(EnvironmentEntityDescriptorEnum.Value)));
    }
}
Also used : IEntity(org.whole.lang.model.IEntity) EnvironmentEntityFactory(org.whole.lang.environment.factories.EnvironmentEntityFactory) Name(org.whole.lang.environment.model.Name)

Aggregations

EnvironmentEntityFactory (org.whole.lang.environment.factories.EnvironmentEntityFactory)1 Name (org.whole.lang.environment.model.Name)1 IEntity (org.whole.lang.model.IEntity)1