use of org.whole.lang.pojo.visitors.PojoArtifactsGeneratorVisitor in project whole by wholeplatform.
the class CoreOperationsDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addOperationFactory(EditorsLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new EditorsArtifactsGeneratorVisitor((ArtifactsGeneratorOperation) operation);
}
});
platform.addOperationFactory(GrammarsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new GrammarsContentAssistVisitor();
}
});
platform.addOperationFactory(GrammarsLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new GrammarsValidatorVisitor();
}
});
if (!ReflectionFactory.getLanguageKit(GrammarsLanguageKit.URI, false, null).hasVisitor(InterpreterOperation.ID))
platform.addOperationFactory(GrammarsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new GrammarsInterpreterVisitor();
else
return null;
}
});
platform.addPersistenceKit("org.whole.lang.grammars.GrammarEditor", GrammarsPersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.objectivec.ObjectiveCEditor", ObjectiveCPersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.mediawiki.MediaWikiEditor", MediaWikiPersistenceKit.instance());
platform.addOperationFactory(TemplatesLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new AbstractVisitor() {
public void visit(IEntity entity) {
BehaviorUtils.apply("whole:org.whole.lang.templates:TemplatesSemantics#toJava", entity, getBindings());
}
};
}
});
platform.addOperationFactory(PojoLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new PojoArtifactsGeneratorVisitor((ArtifactsGeneratorOperation) operation);
}
});
platform.addOperationFactory(FramesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new FramesInterpreterVisitor();
else
return null;
}
});
// TODO test
// ReflectLibrary.deploy();
new ReflectLibraryDeployer().deploy(platform);
new ViewDerivationLibraryDeployer().deploy(platform);
}
Aggregations