|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.ui.util.ResourceUtil
public class ResourceUtil
Copied from org.eclipse.emf.workspace.util.WorkspaceSynchronizer to avoid dependencies to EMFT.
Constructor Summary | |
---|---|
ResourceUtil()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceUtil()
Method Detail |
---|
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 resource
null
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 resource
null
if the resource's URI is not a platform-resource URIgetFile(Resource)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |