use of org.whole.lang.text.builders.TextGenericBuilderAdapter in project whole by wholeplatform.
the class TextLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new TextLanguageKit());
platform.addOperationFactory(TextLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TextGenericBuilderAdapter((ITextBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(TextLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TextSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(TextLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new TextInterpreterVisitor((InterpreterOperation) operation);
else
return null;
}
});
platform.addOperationFactory(TextLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TextPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addPersistenceKit("org.whole.lang.text.TextSourceEditor", TextSourcePersistenceKit.instance());
}
Aggregations