use of org.whole.lang.commons.visitors.CommonsContentAssistVisitor in project whole by wholeplatform.
the class CommonsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new CommonsLanguageKit());
platform.addOperationFactory(CommonsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new CommonsGenericBuilderAdapter((ICommonsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new CommonsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new CommonsContentAssistVisitor();
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new CommonsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new CommonsDynamicCompilerVisitor();
else
return null;
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new CommonsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, FindDeclarationOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return null;
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, FindDeclarationsOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return null;
}
});
platform.addOperationFactory(CommonsLanguageKit.URI, IOperation.ANY_ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new CommonsInterpreterVisitor();
else
return null;
}
});
}
Aggregations