use of org.whole.lang.visitors.IVisitor 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.visitors.IVisitor in project whole by wholeplatform.
the class AttributesMatcherFactory method matchReferenceAttribute.
public static IVisitor matchReferenceAttribute(IBindingManager bm) {
IVisitor ov = GenericTraversalFactory.instance.one(GenericMatcherFactory.instance.matchInScope(getRefAttrPattern()), GenericMatcherFactory.instance.matchInScope(getQualifiedRefAttrPattern()));
ov.setBindings(bm);
return ov;
}
use of org.whole.lang.visitors.IVisitor 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.visitors.IVisitor in project whole by wholeplatform.
the class WorkflowsInterpreterDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addOperationFactory(WorkflowsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new WorkflowsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(WorkflowsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new WorkflowsDynamicCompilerVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class ActionsUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(ActionsEditorKit.ID);
platform.addOperationFactory(ActionsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ActionsUIContentAssistVisitor();
}
});
}
Aggregations