public interface ITextFileBufferManager extends IFileBufferManager
Clients are not supposed to implement that interface.
Modifier and Type | Method and Description |
---|---|
IAnnotationModel |
createAnnotationModel(IPath location)
Creates a new annotation for the given location.
|
IDocument |
createEmptyDocument(IPath location)
Creates a new empty document.
|
String |
getDefaultEncoding()
Returns the default encoding that is used to read the contents of text files
if no other encoding is specified.
|
ITextFileBuffer |
getTextFileBuffer(IPath location)
Returns the text file buffer managed for the file at the given location
or
null if either there is no such text file buffer. |
boolean |
isTextFileLocation(IPath location)
Deprecated.
As of 3.2, replaced by
isTextFileLocation(IPath, boolean) |
boolean |
isTextFileLocation(IPath location,
boolean strict)
Returns whether a file at the given location is or can be considered a
text file.
|
addFileBufferListener, connect, disconnect, getFileBuffer, releaseSynchronizationContext, removeFileBufferListener, requestSynchronizationContext, setSynchronizationContext, validateState
ITextFileBuffer getTextFileBuffer(IPath location)
null
if either there is no such text file buffer.
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
location
- the locationnull
String getDefaultEncoding()
IDocument createEmptyDocument(IPath location)
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
location
- the location used to set up the newly created documentIAnnotationModel createAnnotationModel(IPath location)
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
location
- the location used to create the new annotation modelboolean isTextFileLocation(IPath location)
isTextFileLocation(IPath, boolean)
true
. If the file does
not exist, it is checked whether a text content type is associated with
the given location. If no content type is associated with the location,
this method returns true
.
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
location
- the location to checktrue
if the location is a text file locationboolean isTextFileLocation(IPath location, boolean strict)
!strict
. If the file does
not exist, it is checked whether a text content type is associated with
the given location. If no content type is associated with the location,
this method returns !strict
.
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
location
- the location to checkstrict
- true
if a file with unknown content type
is not treated as text file, false
otherwisetrue
if the location is a text file locationGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.