public class FileLocationsImpl extends java.lang.Object implements FileLocations
Constructor and Description |
---|
FileLocationsImpl() |
Modifier and Type | Method and Description |
---|---|
protected ProjectConfig |
getProjectConfig(Path path) |
Path |
getProjectFolder(Path path)
Returns the project root for the given resource handle.
|
com.google.inject.Provider<WorkspaceConfig> |
getProjectInformationProvider() |
java.util.Set<Path> |
getProjectSourceFolders(Path path) |
Path |
getSourceFolder(Path path)
Returns the source folder the given handle is contained in or
null if the given Path is not
located in a source folder. |
Path |
getTargetFolder(Path path)
Returns the target folder for the given source folder or
null if the given
folder is not a source folder or doesn't have a configured target folder. |
void |
setProjectInformationProvider(com.google.inject.Provider<WorkspaceConfig> projectInformationProvider) |
protected ProjectConfig getProjectConfig(Path path)
public Path getSourceFolder(Path path)
FileLocations
null
if the given Path
is not
located in a source folder.getSourceFolder
in interface FileLocations
path
- an absolute path to a resourcenull
if the given Path
is not
located in a source folder.Path
public Path getTargetFolder(Path path)
FileLocations
null
if the given
folder is not a source folder or doesn't have a configured target folder.getTargetFolder
in interface FileLocations
path
- the source folder to find the configured target folder for.public Path getProjectFolder(Path path)
FileLocations
getProjectFolder
in interface FileLocations
path
- an absolute pathpublic java.util.Set<Path> getProjectSourceFolders(Path path)
getProjectSourceFolders
in interface FileLocations
path
- an absolute path@Pure public com.google.inject.Provider<WorkspaceConfig> getProjectInformationProvider()
public void setProjectInformationProvider(com.google.inject.Provider<WorkspaceConfig> projectInformationProvider)