use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class ReusablesUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(ReusablesEditorKit.ID);
platform.addOperationFactory(ReusablesLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ReusablesUIDynamicCompilerVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class LegacyContributionExtensionsDeployer method deploy.
public void deploy(ReflectionFactory platform) {
try {
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/html/HTML5Semantics.xwl")));
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/html/HTML5Actions.xwl")));
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/javascript/JavaScriptSemantics.xwl")));
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/javascript/JavaScriptActions.xwl")));
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/mediawiki/MediaWikiActions.xwl")));
InterpreterOperation.interpret(XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/ui/CaretActionsSemantics.xwl")));
} catch (Exception e) {
throw new IllegalStateException(e);
}
platform.addPersistenceKit("org.whole.lang.html.Html5Editor", HtmlPersistenceKit.instance());
platform.addOperationFactory(LegacyMetaModelsDeployer.HTML5_URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new HtmlPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(JavaScriptLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new JavaScriptInterpreterVisitor();
else
return null;
}
});
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class JavaStoreBuilder method addSubtree.
public Expression addSubtree(IVisitor visitor, StageDownFragment fragment, String type) {
int parentNestingSize = initNestingSize();
IVisitor v = ((AbstractOperation) visitor.getOperation()).getVisitor(fragment.wGetRoot(), 0);
v.visit(fragment.wGetRoot());
MethodInvocation callExp2 = newFactoryInvocation(v, "makeRootEntity");
callExp2.arguments().add(getExpression());
MethodInvocation callExp = newFactoryInvocation(visitor, "create" + type);
callExp.arguments().add(callExp2);
return addSubtree(parentNestingSize, type, callExp);
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class JSONPersistenceDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addOperationFactory(JSONLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new JSONPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addPersistenceKit("org.whole.lang.json.JSONSourceEditor", JSONSourcePersistenceKit.instance());
platform.addPersistenceKit("org.whole.lang.json.JSONLDEditor", JSONLDPersistenceKit.instance());
}
use of org.whole.lang.visitors.IVisitor in project whole by wholeplatform.
the class TestsUIDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addEditorKit(TestsEditorKit.ID);
platform.addOperationFactory(TestsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new TestsUIInterpreterVisitor();
else
return null;
}
});
}
Aggregations