use of org.whole.lang.visitors.IVisitorFactory in project whole by wholeplatform.
the class XmlLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new XmlLanguageKit());
platform.addOperationFactory(XmlLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new XmlGenericBuilderAdapter((IXmlBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(XmlLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new XmlSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(XmlLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new XmlPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(XmlLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new XmlNormalizerVisitor();
}
});
platform.addPersistenceKit("org.whole.lang.xml.XmlBuilderEditor", XmlBuilderPersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.xml.XmlSourceEditor", XmlSourcePersistenceKit.instance());
}
use of org.whole.lang.visitors.IVisitorFactory in project whole by wholeplatform.
the class ScriptsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ScriptsLanguageKit());
platform.addOperationFactory(ScriptsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ScriptsGenericBuilderAdapter((IScriptsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ScriptsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ScriptsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ScriptsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ScriptsInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitorFactory in project whole by wholeplatform.
the class GrammarsUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(GrammarsEditorKit.ID);
platform.addEditorKit(GrammarsParserEditorKit.ID);
platform.addEditorKit(GrammarsUnparserEditorKit.ID);
platform.addOperationFactory(GrammarsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new GrammarsUIInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitorFactory in project whole by wholeplatform.
the class ArtifactsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ArtifactsLanguageKit());
platform.addOperationFactory(ArtifactsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ArtifactsGenericBuilderAdapter((IArtifactsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ArtifactsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ArtifactsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ArtifactsLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ResourceArtifactsGeneratorVisitor();
}
});
platform.addOperationFactory(ArtifactsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ArtifactsInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitorFactory in project whole by wholeplatform.
the class EnvironmentLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new EnvironmentLanguageKit());
platform.addOperationFactory(EnvironmentLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new EnvironmentGenericBuilderAdapter((IEnvironmentBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(EnvironmentLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new EnvironmentSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(EnvironmentLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return stage == 0 ? new EnvironmentInterpreterVisitor() : null;
}
});
platform.addOperationFactory(EnvironmentLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return stage == 0 ? new EnvironmentInterpreterVisitor() : null;
}
});
platform.addOperationFactory(EnvironmentLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new EnvironmentPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
}
Aggregations