Top Description Methods
org.eclipse.xtend.lib.macro.file

public Interface FileLocations

Known Direct Subinterfaces
org.eclipse.xtend.lib.macro.CodeGenerationContext, org.eclipse.xtend.lib.macro.RegisterGlobalsContext, org.eclipse.xtend.lib.macro.TransformationContext, org.eclipse.xtend.lib.macro.ValidationContext
Annotations
@Beta
Imports
java.util.Set, com.google.common.annotations.Beta

A service which provides information about the location of a path.
Author
Sven Efftinge

Method Summary

Modifier and TypeMethod and Description
public Path

Returns:

the project's root
getProjectFolder
(Path
an absolute path
path
)

Returns the project root for the given resource handle.

public Set<Path>

Returns:

the source folders of the project the given path is contained in
getProjectSourceFolders
(Path
an absolute path
path
)

public Path

Returns:

the source folder the given handle is contained in or null if the given Path is not located in a source folder.
getSourceFolder
(Path
an absolute path to a resource
path
)

Returns the source folder the given handle is contained in or null if the given Path is not located in a source folder.

public Path

Returns:

the target folder
getTargetFolder
(Path
the source folder to find the configured target folder for.
sourceFolder
)

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.

Method Detail

getProjectFolderback to summary
public Path getProjectFolder(Path path)

Returns the project root for the given resource handle.

Parameters
path:Path

an absolute path

Returns:Path

the project's root

getProjectSourceFoldersback to summary
public Set<Path> getProjectSourceFolders(Path path)
Parameters
path:Path

an absolute path

Returns:Set<Path>

the source folders of the project the given path is contained in

Since
2.8
getSourceFolderback to summary
public 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.

Parameters
path:Path

an absolute path to a resource

Returns:Path

the source folder the given handle is contained in or null if the given Path is not located in a source folder.

See Also
Path
getTargetFolderback to summary
public Path getTargetFolder(Path sourceFolder)

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.

Parameters
sourceFolder:Path

the source folder to find the configured target folder for.

Returns:Path

the target folder