Search in sources :

Example 16 with IOperation

use of org.whole.lang.operations.IOperation 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;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) SQLInterpreterVisitor(org.whole.lang.sql.visitors.SQLInterpreterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) SQLSpecificBuilderAdapter(org.whole.lang.sql.builders.SQLSpecificBuilderAdapter) SQLPrettyPrinterVisitor(org.whole.lang.sql.visitors.SQLPrettyPrinterVisitor) ISQLBuilder(org.whole.lang.sql.builders.ISQLBuilder) SQLGenericBuilderAdapter(org.whole.lang.sql.builders.SQLGenericBuilderAdapter)

Example 17 with IOperation

use of org.whole.lang.operations.IOperation 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)

Example 18 with IOperation

use of org.whole.lang.operations.IOperation in project whole by wholeplatform.

the class IDEOperationsDeployer 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 WorkflowsIDEInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(WorkflowsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new WorkflowsIDEContentAssistVisitor();
        }
    });
    new JavaReflectLibraryDeployer().deploy(platform);
}
Also used : IOperation(org.whole.lang.operations.IOperation) WorkflowsIDEInterpreterVisitor(org.whole.lang.workflows.visitors.WorkflowsIDEInterpreterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) WorkflowsIDEContentAssistVisitor(org.whole.lang.workflows.visitors.WorkflowsIDEContentAssistVisitor) JavaReflectLibraryDeployer(org.whole.lang.java.JavaReflectLibraryDeployer) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory)

Example 19 with IOperation

use of org.whole.lang.operations.IOperation in project whole by wholeplatform.

the class QueriesLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new QueriesLanguageKit());
    platform.addOperationFactory(QueriesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new QueriesGenericBuilderAdapter((IQueriesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new QueriesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new QueriesInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new QueriesDynamicCompilerVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new QueriesPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) QueriesDynamicCompilerVisitor(org.whole.lang.queries.visitors.QueriesDynamicCompilerVisitor) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) QueriesPrettyPrinterVisitor(org.whole.lang.queries.visitors.QueriesPrettyPrinterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) QueriesSpecificBuilderAdapter(org.whole.lang.queries.builders.QueriesSpecificBuilderAdapter) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) IQueriesBuilder(org.whole.lang.queries.builders.IQueriesBuilder) QueriesInterpreterVisitor(org.whole.lang.queries.visitors.QueriesInterpreterVisitor) QueriesGenericBuilderAdapter(org.whole.lang.queries.builders.QueriesGenericBuilderAdapter)

Example 20 with IOperation

use of org.whole.lang.operations.IOperation in project whole by wholeplatform.

the class SemanticsLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new SemanticsLanguageKit());
    platform.addOperationFactory(SemanticsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SemanticsGenericBuilderAdapter((ISemanticsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SemanticsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new SemanticsInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new SemanticsDynamicCompilerVisitor();
            else
                return null;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) ISemanticsBuilder(org.whole.lang.semantics.builders.ISemanticsBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) SemanticsSpecificBuilderAdapter(org.whole.lang.semantics.builders.SemanticsSpecificBuilderAdapter) SemanticsInterpreterVisitor(org.whole.lang.semantics.visitors.SemanticsInterpreterVisitor) SemanticsDynamicCompilerVisitor(org.whole.lang.semantics.visitors.SemanticsDynamicCompilerVisitor) SemanticsGenericBuilderAdapter(org.whole.lang.semantics.builders.SemanticsGenericBuilderAdapter)

Aggregations

IOperation (org.whole.lang.operations.IOperation)36 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)36 IVisitor (org.whole.lang.visitors.IVisitor)34 IBuilder (org.whole.lang.builders.IBuilder)20 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)20 IEntityContext (org.whole.lang.contexts.IEntityContext)20 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)13 ResourceArtifactsGeneratorVisitor (org.whole.lang.artifacts.visitors.ResourceArtifactsGeneratorVisitor)2 IBindingManager (org.whole.lang.bindings.IBindingManager)2 IImpBuilder (org.whole.examples.lang.imp.builders.IImpBuilder)1 ImpGenericBuilderAdapter (org.whole.examples.lang.imp.builders.ImpGenericBuilderAdapter)1 ImpSpecificBuilderAdapter (org.whole.examples.lang.imp.builders.ImpSpecificBuilderAdapter)1 BytecodeGeneratorOperation (org.whole.examples.lang.imp.visitors.BytecodeGeneratorOperation)1 ImpBytecodeGeneratorVisitor (org.whole.examples.lang.imp.visitors.ImpBytecodeGeneratorVisitor)1 ImpDefUseValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpDefUseValidatorVisitor)1 ImpInterpreterVisitor (org.whole.examples.lang.imp.visitors.ImpInterpreterVisitor)1 ImpPrettyPrinterVisitor (org.whole.examples.lang.imp.visitors.ImpPrettyPrinterVisitor)1 ImpResolverValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpResolverValidatorVisitor)1 ReflectLibraryDeployer (org.whole.lang.ReflectLibraryDeployer)1 ViewDerivationLibraryDeployer (org.whole.lang.ViewDerivationLibraryDeployer)1