public class ResourceUtil extends Object
| Constructor and Description |
|---|
ResourceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.core.resources.IContainer |
getContainer(org.eclipse.core.resources.IProject project,
String path) |
static org.eclipse.core.resources.IFile |
getFile(org.eclipse.emf.ecore.resource.Resource resource)
Obtains the workspace file corresponding to the specified resource, if it has a platform-resource URI.
|
static org.eclipse.core.resources.IFile |
getUnderlyingFile(org.eclipse.emf.ecore.resource.Resource resource)
Obtains the workspace file underlying the specified resource.
|
static void |
sync(org.eclipse.core.resources.IResource resource,
int depth,
org.eclipse.core.runtime.IProgressMonitor progressMonitor) |
public static void sync(org.eclipse.core.resources.IResource resource,
int depth,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic static org.eclipse.core.resources.IContainer getContainer(org.eclipse.core.resources.IProject project,
String path)
public static org.eclipse.core.resources.IFile getFile(org.eclipse.emf.ecore.resource.Resource resource)
null, may nonetheless not actually exist (as the file is just a handle).
Note that, if the resource is in an archive (such as a ZIP file) then it does not map to a workspace
file. In this case, however, the workspace file (if any) corresponding to the containing archive can be obtained
via the getUnderlyingFile(Resource) method.
resource - an EMF resourcenull if the resource's URI is not a platform-resource
URIgetUnderlyingFile(Resource)public static org.eclipse.core.resources.IFile getUnderlyingFile(org.eclipse.emf.ecore.resource.Resource resource)
archive scheme, the authority is considered instead. If the URI has a file scheme,
it's looked up in the workspace, just as in the getFile(Resource) method. Otherwise, a platform scheme
is assumed.
Note that the resulting file, if not null, may nonetheless not actually exist (as the file is just a
handle).
resource - an EMF resourcenull if the resource's URI is not a platform-resource URIgetFile(Resource)Copyright © 2016. All Rights Reserved.