public final class FileBuffers extends Object
This class must not be used by clients that do not want to require
org.eclipse.core.resources. Use ITextFileBufferManager.DEFAULT
to get the default text file buffer manager.
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_ID
File buffer plug-in ID
(value
"org.eclipse.core.filebuffers"). |
| Modifier and Type | Method and Description |
|---|---|
static ITextFileBufferManager |
createTextFileBufferManager()
Creates and returns an unshared text file buffer manager.
|
static IFileStore |
getFileStoreAtLocation(IPath location)
Returns the file in the local file system for the given location.
|
static File |
getSystemFileAtLocation(IPath location)
Deprecated.
As of 3.2, replaced by
getFileStoreAtLocation(IPath) |
static ITextFileBufferManager |
getTextFileBufferManager()
Returns the text file buffer manager.
|
static IFile |
getWorkspaceFileAtLocation(IPath location)
Returns the workspace file at the given location if such a file exists.
|
static IFile |
getWorkspaceFileAtLocation(IPath location,
boolean isNormalized)
Returns the workspace file at the given location if such a file exists.
|
static IPath |
normalizeLocation(IPath pathOrLocation)
Returns the normalized form of the given path or location.
|
public static final String PLUGIN_ID
"org.eclipse.core.filebuffers").public static ITextFileBufferManager getTextFileBufferManager()
null if
the file buffers plug-in is not active. This is, for example, the
case when the method is called on plug-in shutdown.
Use ITextFileBufferManager.DEFAULT to get the default text
file buffer manager if you do not want to depend on
org.eclipse.core.resources.
nullpublic static ITextFileBufferManager createTextFileBufferManager()
nullpublic static IFile getWorkspaceFileAtLocation(IPath location)
location - the locationnull if no such file exists or if
the location is not a valid locationpublic static IFile getWorkspaceFileAtLocation(IPath location, boolean isNormalized)
location - the locationisNormalized - true if the given location is already normalizednull if no such file exists or if
the location is not a valid locationpublic static IPath normalizeLocation(IPath pathOrLocation)
The normalized form is defined as follows:
exists
a workspace file, the normalized form is that file's workspace
relative, absolute path as returned by
IFile.getFullPath().absolute form of the path.absolute form of the location.pathOrLocation - the path or location to be normalizedpathOrLocationpublic static IFileStore getFileStoreAtLocation(IPath location)
The location is either a full path of a workspace resource or an absolute path in the local file system.
location - the locationIFileStore in the local file system for the given locationpublic static File getSystemFileAtLocation(IPath location)
getFileStoreAtLocation(IPath)The location is either a full path of a workspace resource or an absolute path in the local file system.
location - the locationFile in the local file system for the given location
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.