Search in sources :

Example 11 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class MappingLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MappingGenericBuilderAdapter((IMappingBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(MappingLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new MappingSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) MappingGenericBuilderAdapter(org.whole.lang.xsd.mapping.builders.MappingGenericBuilderAdapter) MappingSpecificBuilderAdapter(org.whole.lang.xsd.mapping.builders.MappingSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) IMappingBuilder(org.whole.lang.xsd.mapping.builders.IMappingBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Example 12 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class TestEventsLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    if (ReflectionFactory.getLanguageKitRegistry().containsResource(TestEventsLanguageKit.URI, false, null))
        return;
    platform.addLanguageKit(new TestEventsLanguageKit());
    platform.addOperationFactory(TestEventsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new TestEventsGenericBuilderAdapter((ITestEventsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(TestEventsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new TestEventsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) ITestEventsBuilder(org.whole.lang.testevents.builders.ITestEventsBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) TestEventsGenericBuilderAdapter(org.whole.lang.testevents.builders.TestEventsGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) TestEventsSpecificBuilderAdapter(org.whole.lang.testevents.builders.TestEventsSpecificBuilderAdapter)

Example 13 with IEntityContext

use of org.whole.lang.contexts.IEntityContext 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();
        }
    });
}
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) TestsLearningInterpreterVisitor(org.whole.lang.tests.visitors.TestsLearningInterpreterVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) ITestsBuilder(org.whole.lang.tests.builders.ITestsBuilder) TestsSpecificBuilderAdapter(org.whole.lang.tests.builders.TestsSpecificBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) TestsContentAssistVisitor(org.whole.lang.tests.visitors.TestsContentAssistVisitor) TestsGenericBuilderAdapter(org.whole.lang.tests.builders.TestsGenericBuilderAdapter) TestsPrettyPrinterVisitor(org.whole.lang.tests.visitors.TestsPrettyPrinterVisitor)

Example 14 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class VersionsLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new VersionsGenericBuilderAdapter((IVersionsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(VersionsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new VersionsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IVersionsBuilder(org.whole.lang.versions.builders.IVersionsBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) VersionsGenericBuilderAdapter(org.whole.lang.versions.builders.VersionsGenericBuilderAdapter) VersionsSpecificBuilderAdapter(org.whole.lang.versions.builders.VersionsSpecificBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Example 15 with IEntityContext

use of org.whole.lang.contexts.IEntityContext in project whole by wholeplatform.

the class FirstOrderLogicLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new FirstOrderLogicGenericBuilderAdapter((IFirstOrderLogicBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(FirstOrderLogicLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new FirstOrderLogicSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addEditorKit(FirstOrderLogicTextualEditorKit.ID);
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) FirstOrderLogicSpecificBuilderAdapter(org.whole.lang.firstorderlogic.builders.FirstOrderLogicSpecificBuilderAdapter) FirstOrderLogicGenericBuilderAdapter(org.whole.lang.firstorderlogic.builders.FirstOrderLogicGenericBuilderAdapter) IFirstOrderLogicBuilder(org.whole.lang.firstorderlogic.builders.IFirstOrderLogicBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)42 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)42 IEntityContext (org.whole.lang.contexts.IEntityContext)42 IOperation (org.whole.lang.operations.IOperation)20 IVisitor (org.whole.lang.visitors.IVisitor)20 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)20 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)11 IRedBlackTreeBuilder (org.whole.examples.datatypes.redblacktree.builders.IRedBlackTreeBuilder)1 RedBlackTreeGenericBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeGenericBuilderAdapter)1 RedBlackTreeSpecificBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeSpecificBuilderAdapter)1 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 ActionsGenericBuilderAdapter (org.whole.lang.actions.builders.ActionsGenericBuilderAdapter)1