resolverRegistry.registerInput(https);
CWDURIResolver cwd = new CWDURIResolver();
resolverRegistry.registerInputOutput(cwd);
ClassResourceInput library = new ClassResourceInput(resolverRegistry, "std", getClass(), "/org/rascalmpl/library");
resolverRegistry.registerInput(library);
ClassResourceInput testdata = new ClassResourceInput(resolverRegistry, "testdata", getClass(), "/org/rascalmpl/test/data");
resolverRegistry.registerInput(testdata);
ClassResourceInput benchmarkdata = new ClassResourceInput(resolverRegistry, "benchmarks", getClass(), "/org/rascalmpl/benchmark");
resolverRegistry.registerInput(benchmarkdata);
resolverRegistry.registerInput(new JarURIResolver());
resolverRegistry.registerInputOutput(rascalPathResolver);
resolverRegistry.registerInputOutput(new HomeURIResolver());
resolverRegistry.registerInputOutput(new TempURIResolver());
// here we have code that makes sure that courses can be edited by
// maintainers of Rascal, using the -Drascal.courses=/path/to/courses property.
final String courseSrc = System.getProperty("rascal.courses");
if (courseSrc != null) {
FileURIResolver fileURIResolver = new FileURIResolver() {
@Override
public String scheme() {
return "courses";
}
@Override
protected String getPath(URI uri) {
String path = uri.getPath();
return courseSrc + (path.startsWith("/") ? path : ("/" + path));
}
};
resolverRegistry.registerInputOutput(fileURIResolver);
}
else {
resolverRegistry.registerInput(new ClassResourceInput(resolverRegistry, "courses", getClass(), "/org/rascalmpl/courses"));
}
ClassResourceInput tutor = new ClassResourceInput(resolverRegistry, "tutor", getClass(), "/org/rascalmpl/tutor");
resolverRegistry.registerInput(tutor);
// default event trigger to swallow events
setEventTrigger(AbstractInterpreterEventTrigger.newNullEventTrigger());
}