use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class JavaLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new JavaLanguageKit());
platform.addOperationFactory(JavaLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaGenericBuilderAdapter((IJavaBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new JavaPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new JavaInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class JavaScriptLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new JavaScriptLanguageKit());
platform.addOperationFactory(JavaScriptLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaScriptGenericBuilderAdapter((IJavaScriptBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(JavaScriptLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaScriptSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addPersistenceKit("org.whole.lang.java.JavaScriptSourceEditor", JavaScriptSourcePersistenceKit.instance());
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class WorkflowsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new WorkflowsLanguageKit());
platform.addOperationFactory(WorkflowsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new WorkflowsGenericBuilderAdapter((IWorkflowsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(WorkflowsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new WorkflowsSpecificBuilderAdapter(strategy, entityContext);
}
});
}
use of org.whole.lang.builders.IBuilderFactory 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());
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class PatternsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new PatternsLanguageKit());
platform.addOperationFactory(PatternsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PatternsGenericBuilderAdapter((IPatternsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(PatternsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PatternsSpecificBuilderAdapter(strategy, entityContext);
}
});
}
Aggregations