use of org.whole.lang.properties.builders.PropertiesGenericBuilderAdapter in project whole by wholeplatform.
the class PropertiesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new PropertiesLanguageKit());
platform.addOperationFactory(PropertiesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PropertiesGenericBuilderAdapter((IPropertiesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PropertiesSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new PropertiesPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new PropertiesInterpreterVisitor();
else
return null;
}
});
platform.addPersistenceKit("org.whole.lang.properties.PropertiesTextEditor", PropertiesTextPersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.properties.PropertiesXmlEditor", PropertiesXmlPersistenceKit.instance());
}
Aggregations