Package org.eclipse.xtend.lib.macro.file
Interface FileLocations
-
- All Known Subinterfaces:
CodeGenerationContext,RegisterGlobalsContext,TransformationContext,ValidationContext
@Beta public interface FileLocationsA service which provides information about the location of a path.- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PathgetProjectFolder(Path path)Returns the project root for the given resource handle.java.util.Set<Path>getProjectSourceFolders(Path path)PathgetSourceFolder(Path path)Returns the source folder the given handle is contained in ornullif the givenPathis not located in a source folder.PathgetTargetFolder(Path sourceFolder)Returns the target folder for the given source folder ornullif the given folder is not a source folder or doesn't have a configured target folder.
-
-
-
Method Detail
-
getSourceFolder
Path getSourceFolder(Path path)
Returns the source folder the given handle is contained in ornullif the givenPathis not located in a source folder.
-
getTargetFolder
Path getTargetFolder(Path sourceFolder)
Returns the target folder for the given source folder ornullif the given folder is not a source folder or doesn't have a configured target folder.- Parameters:
sourceFolder- the source folder to find the configured target folder for.- Returns:
- the target folder
-
getProjectFolder
Path getProjectFolder(Path path)
Returns the project root for the given resource handle.- Parameters:
path- an absolute path- Returns:
- the project's root
-
-