use of org.whole.lang.operations.IOperation in project whole by wholeplatform.
the class GenOperationsDeployer method deploy.
public void deploy(ReflectionFactory platform) {
// from java (legacy)
platform.addOperationFactory(JavaLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new JavaJavaModelGeneratorVisitor();
else
return new JavaJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
}
});
// from artifacts (core)
platform.addOperationFactory(ArtifactsLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ArtifactsJavaModelGeneratorVisitor();
else
return new ArtifactsJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
}
});
platform.addOperationFactory(ArtifactsLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
// if (stage == 0)
IBindingManager args = operation.getOperationEnvironment();
if (args.wIsSet("resourceKind") && ResourceKindEnum.FILE_SYSTEM.equals(((ResourceKind) args.wGet("resourceKind")).getValue()))
return new ResourceArtifactsGeneratorVisitor();
else
return new WorkspaceArtifactsGeneratorVisitor();
}
});
// from editors (core)
// platform.addOperationFactory(EditorsLanguageKit.URI, JavaCompilerOperation.ID,
// new IVisitorFactory() {
// public IVisitor create(IOperation operation, int stage) {
// if (stage == 0)
// return new EditorsJavaModelGeneratorVisitor();
// else
// return new EditorsJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
// }
// });
// misc (core)
platform.addOperationFactory(MiscLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new MiscTraverseAllVisitor();
else
return new MiscJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
}
});
// from models (core)
platform.addOperationFactory(ModelsLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ModelsJavaModelGeneratorVisitor();
else
return new ModelsJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
}
});
platform.addOperationFactory(GrammarsLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new GrammarsJavaModelGeneratorVisitor();
}
});
// from pojo (core.op)
platform.addOperationFactory(PojoLanguageKit.URI, JavaCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new PojoJavaModelGeneratorVisitor();
else
return new PojoJavaStoreGeneratorVisitor(((JavaCompilerOperation) operation).getGenerator().javaStoreBuilder(), true);
}
});
}
use of org.whole.lang.operations.IOperation in project whole by wholeplatform.
the class MiscLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new MiscLanguageKit());
platform.addOperationFactory(MiscLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new MiscGenericBuilderAdapter((IMiscBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(MiscLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new MiscSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(MiscLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new MiscOperationVisitor();
}
});
platform.addOperationFactory(MiscLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new MiscOperationVisitor();
else
return null;
}
});
platform.addOperationFactory(MiscLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new MiscOperationVisitor();
}
});
platform.addOperationFactory(MiscLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new MiscOperationVisitor();
}
});
platform.addOperationFactory(MiscLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new MiscOperationVisitor();
}
});
platform.addOperationFactory(MiscLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new MiscDynamicCompilerVisitor();
}
});
}
use of org.whole.lang.operations.IOperation in project whole by wholeplatform.
the class MathLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new MathLanguageKit());
platform.addOperationFactory(MathLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new MathGenericBuilderAdapter((IMathBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(MathLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new MathSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(MathLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new MathInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.operations.IOperation in project whole by wholeplatform.
the class ReusablesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ReusablesLanguageKit());
platform.addOperationFactory(ReusablesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ReusablesGenericBuilderAdapter((IReusablesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ReusablesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ReusablesSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ReusablesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ReusablesInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ReusablesLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ReusablesDynamicCompilerVisitor();
else
return null;
}
});
platform.addOperationFactory(ReusablesLanguageKit.URI, ArtifactsGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ReusablesArtifactsGeneratorVisitor();
}
});
// platform.addReactionsHandler(ReusablesLanguageKit.URI, new ReusablesReactionsHandler());
}
use of org.whole.lang.operations.IOperation in project whole by wholeplatform.
the class ModelsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ModelsLanguageKit());
platform.addOperationFactory(ModelsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsGenericBuilderAdapter((IModelsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ExportTexOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TeXGeneratorVisitor((ExportTexOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsValidatorVisitor();
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ModelsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsNormalizerVisitor();
}
});
}
Aggregations