public interface IDocumentProviderExtension
IDocumentProvider. It adds the following
functions:
| Modifier and Type | Method and Description |
|---|---|
IStatus |
getStatus(Object element)
Returns the status of the given element.
|
boolean |
isModifiable(Object element)
Returns whether the document provider thinks that the given element can persistently be modified.
|
boolean |
isReadOnly(Object element)
Returns whether the document provider thinks that the given element is read-only.
|
boolean |
isStateValidated(Object element)
Returns whether the state of the given element has been validated.
|
void |
setCanSaveDocument(Object element)
Marks the document managed for the given element as savable.
|
void |
synchronize(Object element)
Synchronizes the document provided for the given element with the
given element.
|
void |
updateStateCache(Object element)
Updates the state cache for the given element.
|
void |
validateState(Object element,
Object computationContext)
Validates the state of the given element.
|
boolean isReadOnly(Object element)
true, saveDocument could fail.
This method does not say anything about the document constructed from the given
element. If the given element is not connected to this document provider, the return
value is undefined. Document providers are allowed to use a cache to answer this
question, i.e. there can be a difference between the "real" state of the element and
the return value.element - the elementtrue if the given element is read-only, false otherwiseboolean isModifiable(Object element)
isReadOnly as read-only elements may be modifiable and
writable elements may not be modifiable. If the given element is not connected to this document
provider, the result is undefined. Document providers are allowed to use a cache to answer this
question, i.e. there can be a difference between the "real" state of the element and the return
value.element - the elementtrue if the given element is modifiable, false otherwisevoid validateState(Object element, Object computationContext) throws CoreException
isReadOnly and isModifiable. If the
given element is not connected to this document provider, the effect is undefined.element - the elementcomputationContext - the context in which the computation is performed, e.g., a SWT shellCoreException - if validating failsboolean isStateValidated(Object element)
element - the elementtrue if the state has been validatedvoid updateStateCache(Object element) throws CoreException
isReadOnly and isModifiable. If the given element is not
connected to this document provider, the effect is undefined.element - the elementCoreException - if validating failsvoid setCanSaveDocument(Object element)
canBeSaved(element) will return true
afterwards.element - the elementIStatus getStatus(Object element)
element - the elementvoid synchronize(Object element) throws CoreException
getSynchronizationTimeStamp
and getModificationTimeStamp return the same value.element - the elementCoreException - if the synchronization could not be performedGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.