Class Resources
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.resource.Resources
-
public class Resources extends Object
- Since:
- 3.9
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IStatus
checkInSync(IResource resource)
Checks if the given resource is in sync with the underlying file system.static IStatus
checkInSync(IResource[] resources)
Checks if the given resources are in sync with the underlying file system.static boolean
containsOnlyNonProjects(IResource[] resources)
static boolean
containsOnlyProjects(IResource[] resources)
static boolean
isReadOnly(IResource resource)
static IStatus
makeCommittable(IResource[] resources, Object context)
Makes the given resources committable.static IStatus
makeCommittable(IResource resource, Object context)
Makes the given resource committable.
-
-
-
Method Detail
-
checkInSync
public static IStatus checkInSync(IResource resource)
Checks if the given resource is in sync with the underlying file system.- Parameters:
resource
- the resource to be checked- Returns:
- IStatus status describing the check's result. If
status. isOK()
returnstrue
then the resource is in sync
-
checkInSync
public static IStatus checkInSync(IResource[] resources)
Checks if the given resources are in sync with the underlying file system.- Parameters:
resources
- the resources to be checked- Returns:
- IStatus status describing the check's result. If
status. isOK()
returnstrue
then the resources are in sync
-
makeCommittable
public static IStatus makeCommittable(IResource resource, Object context)
Makes the given resource committable. Committable means that it is writeable and that its content hasn't changed by callingvalidateEdit
for the given resource onIWorkspace
.- Parameters:
resource
- the resource to be checkedcontext
- the context passed tovalidateEdit
- Returns:
- status describing the method's result. If
status.isOK()
returnstrue
then the resources are committable. - See Also:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
-
makeCommittable
public static IStatus makeCommittable(IResource[] resources, Object context)
Makes the given resources committable. Committable means that all resources are writeable and that the content of the resources hasn't changed by callingvalidateEdit
for a given file onIWorkspace
.- Parameters:
resources
- the resources to be checkedcontext
- the context passed tovalidateEdit
- Returns:
- IStatus status describing the method's result. If
status. isOK()
returnstrue
then the add resources are committable - See Also:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
-
isReadOnly
public static boolean isReadOnly(IResource resource)
-
containsOnlyNonProjects
public static boolean containsOnlyNonProjects(IResource[] resources)
-
containsOnlyProjects
public static boolean containsOnlyProjects(IResource[] resources)
-
-