use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class Matcher method findChild.
@SuppressWarnings("unchecked")
public static <E extends IEntity> E findChild(E pattern, IEntity model, IBindingManager bindings) {
IVisitor mv = GenericMatcherFactory.instance.matchInScope(pattern);
mv.setBindings(bindings);
return (E) findChild(mv, model);
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class FramesUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(FramesEditorKit.ID);
platform.addOperationFactory(FramesLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new FramesContentAssistVisitor();
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class QueriesUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(QueriesEditorKit.ID);
platform.addOperationFactory(QueriesLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new QueriesContentAssistVisitor();
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class ActionsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ActionsLanguageKit());
platform.addOperationFactory(ActionsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ActionsGenericBuilderAdapter((IActionsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ActionsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ActionsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ActionsDynamicCompilerVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class PojoLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new PojoLanguageKit());
platform.addOperationFactory(PojoLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PojoGenericBuilderAdapter((IPojoBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(PojoLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PojoSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(PojoLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new PojoNormalizerVisitor();
}
});
}
Aggregations