|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension interface for IDocumentProvider
. It adds the following
functions:
Method Summary | |
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 saveable. |
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. |
Method Detail |
public 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 element
true
if the given element is read-only, false
otherwisepublic boolean 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 element
true
if the given element is modifiable, false
otherwisepublic void 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 shell
CoreException
- if validating failspublic boolean isStateValidated(Object element)
element
- the elementpublic void 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 element
CoreException
- if validating failspublic void setCanSaveDocument(Object element)
canBeSaved(element)
will return true
afterwards.
element
- the elementpublic IStatus getStatus(Object element)
element
- the element
public void synchronize(Object element) throws CoreException
getSynchronizationTimeStamp
and getModificationTimeStamp
return the same value.
element
- the element
CoreException
- if the synchronization could not be performed
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |