use of org.whole.lang.operations.PrettyPrinterOperation in project whole by wholeplatform.
the class ModelsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ModelsLanguageKit());
platform.addOperationFactory(ModelsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsGenericBuilderAdapter((IModelsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ExportTexOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TeXGeneratorVisitor((ExportTexOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsValidatorVisitor();
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ModelsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsNormalizerVisitor();
}
});
}
use of org.whole.lang.operations.PrettyPrinterOperation in project whole by wholeplatform.
the class TestsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new TestsLanguageKit());
platform.addOperationFactory(TestsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestsGenericBuilderAdapter((ITestsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TestsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new TestsLearningInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(TestsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TestsContentAssistVisitor();
}
});
}
use of org.whole.lang.operations.PrettyPrinterOperation in project whole by wholeplatform.
the class ImpLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ImpLanguageKit());
platform.addOperationFactory(ImpLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ImpGenericBuilderAdapter((IImpBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ImpSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ImpPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ImpInterpreterVisitor((InterpreterOperation) operation);
else
return null;
}
});
platform.addOperationFactory(ImpLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return ImpTraversalFactory.instance.topDown(ImpTraversalFactory.instance.sequence(new ImpResolverValidatorVisitor((ValidatorOperation) operation), new ImpDefUseValidatorVisitor((ValidatorOperation) operation)), false);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, BytecodeGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ImpBytecodeGeneratorVisitor((BytecodeGeneratorOperation) operation);
}
});
}
use of org.whole.lang.operations.PrettyPrinterOperation in project whole by wholeplatform.
the class SQLLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new SQLLanguageKit());
platform.addOperationFactory(SQLLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SQLGenericBuilderAdapter((ISQLBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SQLSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new SQLPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new SQLInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.operations.PrettyPrinterOperation in project whole by wholeplatform.
the class PropertiesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new PropertiesLanguageKit());
platform.addOperationFactory(PropertiesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PropertiesGenericBuilderAdapter((IPropertiesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PropertiesSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new PropertiesPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(PropertiesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new PropertiesInterpreterVisitor();
else
return null;
}
});
platform.addPersistenceKit("org.whole.lang.properties.PropertiesTextEditor", PropertiesTextPersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.properties.PropertiesXmlEditor", PropertiesXmlPersistenceKit.instance());
}
Aggregations