|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ui.editors.text.TextFileDocumentProvider.NullProvider
protected static class TextFileDocumentProvider.NullProvider
| Constructor Summary | |
|---|---|
protected |
TextFileDocumentProvider.NullProvider()
Deprecated. |
| Method Summary | |
|---|---|
void |
aboutToChange(Object element)
Deprecated. Informs this document provider about upcoming changes of the given element. |
void |
addElementStateListener(IElementStateListener listener)
Deprecated. Adds the given element state listener to this document provider. |
boolean |
canSaveDocument(Object element)
Deprecated. Returns whether the document provided for the given element differs from its original state which would required that it be saved. |
void |
changed(Object element)
Deprecated. Informs this document provider that the given element has been changed. |
void |
connect(Object element)
Deprecated. Connects the given element to this document provider. |
void |
disconnect(Object element)
Deprecated. Disconnects the given element from this document provider. |
IAnnotationModel |
getAnnotationModel(Object element)
Deprecated. Returns the annotation model for the given element. |
IContentType |
getContentType(Object element)
Deprecated. Returns the content type of for the given element or null if none could be determined. |
String |
getDefaultEncoding()
Deprecated. Returns the default character encoding used by this provider. |
IDocument |
getDocument(Object element)
Deprecated. Returns the document for the given element. |
String |
getEncoding(Object element)
Deprecated. Returns the character encoding for the given element, or null if the element is not managed by this provider. |
long |
getModificationStamp(Object element)
Deprecated. Returns the modification stamp of the given element. |
IProgressMonitor |
getProgressMonitor()
Deprecated. Returns this providers progress monitor. |
IStatus |
getStatus(Object element)
Deprecated. Returns the status of the given element. |
long |
getSynchronizationStamp(Object element)
Deprecated. Returns the time stamp of the last synchronization of the given element and its provided document. |
boolean |
isDeleted(Object element)
Deprecated. Returns whether the given element has been deleted. |
boolean |
isModifiable(Object element)
Deprecated. Returns whether the document provider thinks that the given element can persistently be modified. |
boolean |
isNotSynchronizedException(Object element,
CoreException ex)
Deprecated. Tells whether the given core exception is exactly the exception which is thrown for a non-synchronized element. |
boolean |
isReadOnly(Object element)
Deprecated. Returns whether the document provider thinks that the given element is read-only. |
boolean |
isStateValidated(Object element)
Deprecated. Returns whether the state of the given element has been validated. |
boolean |
isSynchronized(Object element)
Deprecated. Returns whether the information provided for the given element is in sync with the element. |
boolean |
mustSaveDocument(Object element)
Deprecated. Returns whether the document provided for the given element must be saved. |
void |
removeElementStateListener(IElementStateListener listener)
Deprecated. Removes the given element state listener from this document provider. |
void |
resetDocument(Object element)
Deprecated. Resets the given element's document to its last saved state. |
void |
saveDocument(IProgressMonitor monitor,
Object element,
IDocument document,
boolean overwrite)
Deprecated. Saves the given document provided for the given element. |
void |
setCanSaveDocument(Object element)
Deprecated. Marks the document managed for the given element as savable. |
void |
setEncoding(Object element,
String encoding)
Deprecated. Sets the encoding for the given element. |
void |
setProgressMonitor(IProgressMonitor progressMonitor)
Deprecated. Sets this providers progress monitor. |
void |
synchronize(Object element)
Deprecated. Synchronizes the document provided for the given element with the given element. |
void |
updateStateCache(Object element)
Deprecated. Updates the state cache for the given element. |
void |
validateState(Object element,
Object computationContext)
Deprecated. Validates the state of the given element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected TextFileDocumentProvider.NullProvider()
| Method Detail |
|---|
public void connect(Object element)
throws CoreException
IDocumentProviderdisconnect(Object) this provider can assume to know the
correct number of clients working with the document provided for that
domain model element.
The given element must not be null.
connect in interface IDocumentProviderelement - the element
CoreException - if the textual representation or the annotation model
of the element could not be createdpublic void disconnect(Object element)
IDocumentProviderconnect(Object) and of this method this provider can assume to
know the correct number of clients working with the document provided for that
domain model element.
The given element must not be null.
disconnect in interface IDocumentProviderelement - the elementpublic IDocument getDocument(Object element)
IDocumentProvider
getDocument in interface IDocumentProviderelement - the element, or null
null if none
public void resetDocument(Object element)
throws CoreException
IDocumentProviderelementContentAboutToBeReplaced)
and after (elementContentReplaced) the content is changed.
resetDocument in interface IDocumentProviderelement - the element, or null
CoreException - if document could not be reset for the given element
public void saveDocument(IProgressMonitor monitor,
Object element,
IDocument document,
boolean overwrite)
throws CoreException
IDocumentProvider
saveDocument in interface IDocumentProvidermonitor - a progress monitor to report progress and request cancelationelement - the element, or nulldocument - the documentoverwrite - indicates whether overwrite should be performed
while saving the given element if necessary
CoreException - if document could not be stored to the given elementpublic long getModificationStamp(Object element)
IDocumentProvider
getModificationStamp in interface IDocumentProviderelement - the element
public long getSynchronizationStamp(Object element)
IDocumentProvider
getSynchronizationStamp in interface IDocumentProviderelement - the element
public boolean isDeleted(Object element)
IDocumentProvider
isDeleted in interface IDocumentProviderelement - the element
true if the element has been deletedpublic boolean mustSaveDocument(Object element)
IDocumentProvider
mustSaveDocument in interface IDocumentProviderelement - the element, or null
true if the document must be saved, and
false otherwise (including the element is null)public boolean canSaveDocument(Object element)
IDocumentProvider
canSaveDocument in interface IDocumentProviderelement - the element, or null
true if the document can be saved, and
false otherwise (including the element is null)public IAnnotationModel getAnnotationModel(Object element)
IDocumentProvider
getAnnotationModel in interface IDocumentProviderelement - the element, or null
null if nonepublic void aboutToChange(Object element)
IDocumentProvider
aboutToChange has been and before changed is called. In this case,
it is assumed that the document is already up to date, e.g., a save operation is a
typical case.
The concrete nature of the change notification depends on the concrete type of the
given element. If the element is, e.g., an IResource the notification
is a resource delta.
aboutToChange in interface IDocumentProviderelement - the element, or nullpublic void changed(Object element)
IDocumentProviderIResource the notification is a resource delta.
changed in interface IDocumentProviderelement - the element, or nullpublic void addElementStateListener(IElementStateListener listener)
IDocumentProvider
addElementStateListener in interface IDocumentProviderlistener - the listenerpublic void removeElementStateListener(IElementStateListener listener)
IDocumentProvider
removeElementStateListener in interface IDocumentProviderlistener - the listenerpublic boolean isReadOnly(Object element)
IDocumentProviderExtensiontrue, 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.
isReadOnly in interface IDocumentProviderExtensionelement - the element
true if the given element is read-only, false otherwisepublic boolean isModifiable(Object element)
IDocumentProviderExtensionisReadOnly 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.
isModifiable in interface IDocumentProviderExtensionelement - the element
true if the given element is modifiable, false otherwise
public void validateState(Object element,
Object computationContext)
throws CoreException
IDocumentProviderExtensionisReadOnly and isModifiable. If the
given element is not connected to this document provider, the effect is undefined.
validateState in interface IDocumentProviderExtensionelement - the elementcomputationContext - the context in which the computation is performed, e.g., a SWT shell
CoreException - if validating failspublic boolean isStateValidated(Object element)
IDocumentProviderExtension
isStateValidated in interface IDocumentProviderExtensionelement - the element
true if the state has been validated
public void updateStateCache(Object element)
throws CoreException
IDocumentProviderExtensionisReadOnly and isModifiable. If the given element is not
connected to this document provider, the effect is undefined.
updateStateCache in interface IDocumentProviderExtensionelement - the element
CoreException - if validating failspublic void setCanSaveDocument(Object element)
IDocumentProviderExtensioncanBeSaved(element) will return true
afterwards.
setCanSaveDocument in interface IDocumentProviderExtensionelement - the elementpublic IStatus getStatus(Object element)
IDocumentProviderExtension
getStatus in interface IDocumentProviderExtensionelement - the element
public void synchronize(Object element)
throws CoreException
IDocumentProviderExtensiongetSynchronizationTimeStamp
and getModificationTimeStamp return the same value.
synchronize in interface IDocumentProviderExtensionelement - the element
CoreException - if the synchronization could not be performedpublic void setProgressMonitor(IProgressMonitor progressMonitor)
IDocumentProviderExtension2
setProgressMonitor in interface IDocumentProviderExtension2progressMonitor - the progress monitorpublic IProgressMonitor getProgressMonitor()
IDocumentProviderExtension2
getProgressMonitor in interface IDocumentProviderExtension2public boolean isSynchronized(Object element)
IDocumentProviderExtension3
isSynchronized in interface IDocumentProviderExtension3element - the element
true if the information is in sync with the element, false otherwise
public boolean isNotSynchronizedException(Object element,
CoreException ex)
IDocumentProviderExtension5
isNotSynchronizedException in interface IDocumentProviderExtension5element - the elementex - the core exception
true iff the given core exception is exactly the
exception which is thrown for a non-synchronized elementpublic String getDefaultEncoding()
IStorageDocumentProvider
getDefaultEncoding in interface IStorageDocumentProviderpublic String getEncoding(Object element)
IStorageDocumentProvidernull if the element is not managed by this provider.
getEncoding in interface IStorageDocumentProviderelement - the element
public void setEncoding(Object element,
String encoding)
IStorageDocumentProviderencoding
is null the workbench's character encoding should be used.
setEncoding in interface IStorageDocumentProviderelement - the elementencoding - the encoding to be used
public IContentType getContentType(Object element)
throws CoreException
IDocumentProviderExtension4null if none could be determined. If the element's
document can be saved, the returned content type is determined by the
document's current content.
getContentType in interface IDocumentProviderExtension4element - the element
null
CoreException - if reading or accessing the underlying store
fails
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.