Search in sources :

Example 1 with PropertiesPrettyPrinterVisitor

use of org.whole.lang.properties.visitors.PropertiesPrettyPrinterVisitor 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());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) PropertiesPrettyPrinterVisitor(org.whole.lang.properties.visitors.PropertiesPrettyPrinterVisitor) PropertiesSpecificBuilderAdapter(org.whole.lang.properties.builders.PropertiesSpecificBuilderAdapter) PropertiesInterpreterVisitor(org.whole.lang.properties.visitors.PropertiesInterpreterVisitor) PropertiesGenericBuilderAdapter(org.whole.lang.properties.builders.PropertiesGenericBuilderAdapter) IPropertiesBuilder(org.whole.lang.properties.builders.IPropertiesBuilder)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)1 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)1 IEntityContext (org.whole.lang.contexts.IEntityContext)1 IOperation (org.whole.lang.operations.IOperation)1 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)1 IPropertiesBuilder (org.whole.lang.properties.builders.IPropertiesBuilder)1 PropertiesGenericBuilderAdapter (org.whole.lang.properties.builders.PropertiesGenericBuilderAdapter)1 PropertiesSpecificBuilderAdapter (org.whole.lang.properties.builders.PropertiesSpecificBuilderAdapter)1 PropertiesInterpreterVisitor (org.whole.lang.properties.visitors.PropertiesInterpreterVisitor)1 PropertiesPrettyPrinterVisitor (org.whole.lang.properties.visitors.PropertiesPrettyPrinterVisitor)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1