Search in sources :

Example 21 with IOperation

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

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

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

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

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new WorkflowsDynamicCompilerVisitor();
            else
                return null;
        }
    });
}
Also used : IOperation(org.whole.lang.operations.IOperation) WorkflowsInterpreterVisitor(org.whole.lang.workflows.visitors.WorkflowsInterpreterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) WorkflowsDynamicCompilerVisitor(org.whole.lang.workflows.visitors.WorkflowsDynamicCompilerVisitor)

Example 24 with IOperation

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

the class ActionsUIDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addEditorKit(ActionsEditorKit.ID);
    platform.addOperationFactory(ActionsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new ActionsUIContentAssistVisitor();
        }
    });
}
Also used : IOperation(org.whole.lang.operations.IOperation) ActionsUIContentAssistVisitor(org.whole.lang.actions.visitors.ActionsUIContentAssistVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory)

Example 25 with IOperation

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

the class CommonsUIDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addEditorKit(CommonsEditorKit.ID);
    platform.addOperationFactory(CommonsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new CommonsUIContentAssistVisitor();
        }
    });
}
Also used : IOperation(org.whole.lang.operations.IOperation) IVisitor(org.whole.lang.visitors.IVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) CommonsUIContentAssistVisitor(org.whole.lang.commons.ui.visitors.CommonsUIContentAssistVisitor)

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