use of org.metaborg.core.project.ISimpleProjectService in project spoofax by metaborg.
the class CLIUtils method getOrCreateProject.
/**
* Get or create project for the given resource
*/
public IProject getOrCreateProject(FileObject resource) throws MetaborgException {
final ISimpleProjectService projectService = spoofax.injector.getInstance(ISimpleProjectService.class);
final IProject project = projectService.get(resource);
if (project == null) {
return projectService.create(resource);
}
return project;
}
Aggregations