Class EclipseWorkspaceRoot
- java.lang.Object
-
- org.faktorips.devtools.abstraction.AWrapper<org.eclipse.core.resources.IResource>
-
- org.faktorips.devtools.abstraction.eclipse.internal.EclipseResource
-
- org.faktorips.devtools.abstraction.eclipse.internal.EclipseContainer
-
- org.faktorips.devtools.abstraction.eclipse.internal.EclipseWorkspaceRoot
-
- All Implemented Interfaces:
java.lang.Comparable<AResource>,java.lang.Iterable<AResource>,org.eclipse.core.runtime.IAdaptable,AAbstraction,AContainer,AResource,AWorkspaceRoot
public class EclipseWorkspaceRoot extends EclipseContainer implements AWorkspaceRoot
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.faktorips.devtools.abstraction.AResource
AResource.AResourceTreeTraversalDepth, AResource.AResourceType
-
-
Field Summary
-
Fields inherited from interface org.faktorips.devtools.abstraction.AResource
COMPARING_BY_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AFilegetFileForLocation(java.nio.file.Path location)Returns the file with the given name in a project inside this workspace.AProjectgetProject(java.lang.String name)Returns the project with the given name in this workspace.java.util.Set<AProject>getProjects()Returns all projects in this workspace.org.eclipse.core.resources.IWorkspaceRootunwrap()Returns the platform-specific object corresponding to this abstraction.-
Methods inherited from class org.faktorips.devtools.abstraction.eclipse.internal.EclipseContainer
findMember, getFile, getFolder, getMembers
-
Methods inherited from class org.faktorips.devtools.abstraction.eclipse.internal.EclipseResource
copy, createMarker, delete, deleteMarkers, exists, findMarkers, getAdapter, getLocalTimeStamp, getLocation, getModificationStamp, getName, getParent, getProject, getProjectRelativePath, getType, getWorkspace, getWorkspaceRelativePath, isAccessible, isDerived, isSynchronized, move, refreshLocal, setDerived, touch
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.faktorips.devtools.abstraction.AContainer
findMember, getFile, getFolder, getMembers, iterator
-
Methods inherited from interface org.faktorips.devtools.abstraction.AResource
compareTo, copy, createMarker, delete, deleteMarkers, exists, findMarkers, getLocalTimeStamp, getLocation, getModificationStamp, getName, getParent, getProject, getProjectRelativePath, getType, getWorkspace, getWorkspaceRelativePath, isAccessible, isDerived, isSynchronized, move, refreshLocal, setDerived, touch
-
-
-
-
Method Detail
-
unwrap
public org.eclipse.core.resources.IWorkspaceRoot unwrap()
Description copied from interface:AAbstractionReturns the platform-specific object corresponding to this abstraction. The generic type parameter is used to avoid casts when assigning to platform-specific objects. It is the obligation of the caller to make sure the right type is used, otherwise aClassCastExceptionwill be thrown.Sample usage:
interface ACalendar extends AAbstraction[...] class LocalDateAsCalendarWrapper extends AWrapper<LocalDate>[...] [...] ACalendar calendar = Wrappers.of(LocalDate.now()).as(ACalendar.class); [...] LocalDate date = calendar.unwrap();- Specified by:
unwrapin interfaceAAbstraction- Overrides:
unwrapin classEclipseContainer- See Also:
Wrappers#unwrap(AAbstraction) for a way to unwrap potentially null abstractions.
-
getProject
public AProject getProject(java.lang.String name)
Description copied from interface:AWorkspaceRootReturns the project with the given name in this workspace. It may notexist.- Specified by:
getProjectin interfaceAWorkspaceRoot- Parameters:
name- a project's name
-
getFileForLocation
public AFile getFileForLocation(java.nio.file.Path location)
Description copied from interface:AWorkspaceRootReturns the file with the given name in a project inside this workspace.- Specified by:
getFileForLocationin interfaceAWorkspaceRoot- Parameters:
location- a file location; should reference a resource in one of the projects of this workspace- Returns:
- the resource corresponding to the file, or
nullif no such file exists in this workspace
-
getProjects
public java.util.Set<AProject> getProjects()
Description copied from interface:AWorkspaceRootReturns all projects in this workspace.- Specified by:
getProjectsin interfaceAWorkspaceRoot
-
-