IDocumentHandler.IHandlerContext Interface
com.bea.ide.document
IDocumentHandler.IHandlerContext Interface
- public static interface IDocumentHandler.IHandlerContext
This interface is used by the resolveUnknownPriority method to share state information about the document
being examined. Information that is loaded from disk, parsed or otherwise computed should be
stored here for reuse as different handlers are allowed to examine the file.
-
Enclosing interface
-
IDocumentHandler
public static final Object |
-
KEY_BINARYINFIRST1K
- This key represents information about whether the file contains any apparently binary data in it's
first 1k of data.
|
public static final Object |
-
KEY_FIRST1KTEXT
- This key represents an array of the chars in the file, up to 1024 chars in length.
|
public static final Object |
-
KEY_FULLDATA
- This key represents a BufferedInputStream for accessing the full binary content of the file.
|
public static final Object |
-
KEY_FULLTEXT
- This key represents a string containing the full text of the file.
|
public static final Object |
-
KEY_IFILE
- This key represents the IFile object for the current file.
|
public static final Object |
-
KEY_ISBINARY
- This key represents information about whether the file contains any binary data in the entire file.
|
KEY_BINARYINFIRST1K
public static final Object
KEY_BINARYINFIRST1K
- This key represents information about whether the file contains any apparently binary data in it's
first 1k of data. Because it only looks at the first 1k of data, this isn't guaranteed to be accurate,
but in most cases it will be sufficient to differentiate binary from non-binary files.
Value type is java.lang.Boolean
KEY_FIRST1KTEXT
public static final Object
KEY_FIRST1KTEXT
- This key represents an array of the chars in the file, up to 1024 chars in length. Note that if the
file doesn't have 1024 chars, then this array should refelect the actual number of chars in it.
Value type is char[] (length <= 1024)
KEY_FULLDATA
public static final Object
KEY_FULLDATA
- This key represents a BufferedInputStream for accessing the full binary content of the file.
Value type is BufferedInputStream
KEY_FULLTEXT
public static final Object
KEY_FULLTEXT
- This key represents a string containing the full text of the file.
Value type is String
KEY_IFILE
public static final Object
KEY_IFILE
- This key represents the IFile object for the current file.
Value type is com.bea.ide.filesystem.IFile
KEY_ISBINARY
public static final Object
KEY_ISBINARY
- This key represents information about whether the file contains any binary data in the entire file.
Value type is java.lang.Boolean
getURI() Method
public URI
getURI()
returns the URI for the file currently being examined
Returns
- URI for the current file
getValue(Object) Method
public Object
getValue(Object
key)
returns the object associated with the given key. This allows information to be stored
on the context. Any handler that computes information should store it on the context
using a key. The default keys are declared above. Subsystems may create their own
keys to facilitate negotiation within a set of document handlers.
The implementation may initialize the value of some or all of the default keys upon first request.
Returns
- the object associated with key in the context or null if the key has no current value associated
setValue(Object, Object) Method
public Object
setValue(Object
key,
Object
value)
Stores a value on the context, associating it with the given key. Other handlers will
be able to retrieve this value if they know the key. The default keys are listed above.
To clear a value, simply set it to null.
Returns
- returns the old value of the key, or null if the key was not previously associated with any object