@@ -0,0 +1,919 @@
+package org.metaborg.core.project;%0A%0Aimport org.apache.commons.vfs2.FileObject;%0Aimport org.apache.commons.vfs2.FileSystemException;%0A%0A/**%0A * Creates a project from a single file with the parent directory as project location (if possible, otherwise just%0A * the file) and no config (== null).%0A * Never returns null for the project.%0A * Doesn't cache projects.%0A */%0Apublic class SingleFileProjectService implements IProjectService %7B%0A%0A    @Override%0A    public IProject get(FileObject resource) %7B%0A        try %7B%0A            // project location should be a directory (otherwise building gave errors), so take parent dir (if possible)%0A            if (resource.isFile()) %7B%0A                return new Project(resource.getParent(), null);%0A            %7D else %7B%0A                return new Project(resource, null);%0A            %7D%0A        %7D catch (FileSystemException e) %7B%0A            return new Project(resource, null);%0A        %7D%0A    %7D%0A%7D%0A

add ProjectService for single file projects that takes parent directory as project location