Search in sources :

Example 26 with IBuilderFactory

use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.

the class JavaLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new JavaGenericBuilderAdapter((IJavaBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(JavaLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new JavaSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(JavaLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new JavaPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
    platform.addOperationFactory(JavaLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new JavaInterpreterVisitor();
            else
                return null;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) IJavaBuilder(org.whole.lang.java.builders.IJavaBuilder) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) JavaPrettyPrinterVisitor(org.whole.lang.java.visitors.JavaPrettyPrinterVisitor) JavaSpecificBuilderAdapter(org.whole.lang.java.builders.JavaSpecificBuilderAdapter) JavaGenericBuilderAdapter(org.whole.lang.java.builders.JavaGenericBuilderAdapter) JavaInterpreterVisitor(org.whole.lang.java.visitors.JavaInterpreterVisitor)

Example 27 with IBuilderFactory

use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.

the class JavaScriptLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new JavaScriptGenericBuilderAdapter((IJavaScriptBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(JavaScriptLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new JavaScriptSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addPersistenceKit("org.whole.lang.java.JavaScriptSourceEditor", JavaScriptSourcePersistenceKit.instance());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) JavaScriptSpecificBuilderAdapter(org.whole.lang.javascript.builders.JavaScriptSpecificBuilderAdapter) IJavaScriptBuilder(org.whole.lang.javascript.builders.IJavaScriptBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) JavaScriptGenericBuilderAdapter(org.whole.lang.javascript.builders.JavaScriptGenericBuilderAdapter)

Example 28 with IBuilderFactory

use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.

the class WorkflowsLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new WorkflowsGenericBuilderAdapter((IWorkflowsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(WorkflowsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new WorkflowsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) WorkflowsGenericBuilderAdapter(org.whole.lang.workflows.builders.WorkflowsGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IWorkflowsBuilder(org.whole.lang.workflows.builders.IWorkflowsBuilder) WorkflowsSpecificBuilderAdapter(org.whole.lang.workflows.builders.WorkflowsSpecificBuilderAdapter)

Example 29 with IBuilderFactory

use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.

the class TextLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new TextGenericBuilderAdapter((ITextBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(TextLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

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

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

        public IVisitor create(IOperation operation, int stage) {
            return new TextPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
    platform.addPersistenceKit("org.whole.lang.text.TextSourceEditor", TextSourcePersistenceKit.instance());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) ITextBuilder(org.whole.lang.text.builders.ITextBuilder) 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) TextPrettyPrinterVisitor(org.whole.lang.text.visitors.TextPrettyPrinterVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) TextInterpreterVisitor(org.whole.lang.text.visitors.TextInterpreterVisitor) TextGenericBuilderAdapter(org.whole.lang.text.builders.TextGenericBuilderAdapter) TextSpecificBuilderAdapter(org.whole.lang.text.builders.TextSpecificBuilderAdapter)

Example 30 with IBuilderFactory

use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.

the class PatternsLanguageDeployer method deploy.

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

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new PatternsGenericBuilderAdapter((IPatternsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(PatternsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new PatternsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) PatternsSpecificBuilderAdapter(org.whole.lang.patterns.builders.PatternsSpecificBuilderAdapter) IPatternsBuilder(org.whole.lang.patterns.builders.IPatternsBuilder) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) PatternsGenericBuilderAdapter(org.whole.lang.patterns.builders.PatternsGenericBuilderAdapter)

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