|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An ISharedDocumentAdapter
is used to map an ITypedElement
to
a shared document for the purposes of editing.
Clients are not expected to implement this interface but instead should subclass
SharedDocumentAdapter
or SharedDocumentAdapterWrapper
.
Method Summary | |
---|---|
void |
connect(IDocumentProvider provider,
IEditorInput documentKey)
Connect the given element to its document provider. |
void |
disconnect(IDocumentProvider provider,
IEditorInput documentKey)
Disconnect the element from the document provider. |
void |
disconnect(Object element)
A helper disconnect method that looks up the appropriate key (using getDocumentKey(Object)
and the appropriate provider and calls disconnect(IDocumentProvider, IEditorInput) . |
void |
flushDocument(IDocumentProvider provider,
IEditorInput documentKey,
IDocument document,
boolean overwrite)
Flush the contents of the given document into the typed element that provided the document. |
IEditorInput |
getDocumentKey(Object element)
Return the object that is to be used as the key for retrieving the appropriate IDocumentProvider from the
DocumentProviderRegistry and for obtaining the shared
IDocument from the document provider. |
Method Detail |
public IEditorInput getDocumentKey(Object element)
IDocumentProvider
from the
DocumentProviderRegistry
and for obtaining the shared
IDocument
from the document provider. Returns null
if the element does not have a shared document.
element
- the element being queried for a shared document
null
public void connect(IDocumentProvider provider, IEditorInput documentKey) throws CoreException
provider
- the document providerdocumentKey
- the element's key returned from getDocumentKey(Object)
CoreException
- if connection was not possibleIDocumentProvider.connect(Object)
public void disconnect(IDocumentProvider provider, IEditorInput documentKey)
provider
- the document providerdocumentKey
- the element's key returned from getDocumentKey(Object)
IDocumentProvider.disconnect(Object)
public void disconnect(Object element)
getDocumentKey(Object)
and the appropriate provider and calls disconnect(IDocumentProvider, IEditorInput)
.
element
- the element that was used to previously connect to a documentIDocumentProvider.disconnect(Object)
public void flushDocument(IDocumentProvider provider, IEditorInput documentKey, IDocument document, boolean overwrite) throws CoreException
provider
- the document providerdocumentKey
- the element's key returned from getDocumentKey(Object)
document
- 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 elementIDocumentProvider.saveDocument(IProgressMonitor, Object, IDocument, boolean)
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.