|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.compare.structuremergeviewer.SharedDocumentAdapterWrapper
An implementation of ISharedDocumentAdapter that wraps another
shared document adapter.
Clients may subclass this class.
| Constructor Summary | |
|---|---|
SharedDocumentAdapterWrapper(ISharedDocumentAdapter wrappedAdapter)
Create a shared document adapter that wraps the given adapter. |
|
| 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. |
static ISharedDocumentAdapter |
getAdapter(Object element)
Helper method that returns the shared document adapter for the given typed element or null if there isn't one. |
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. |
ISharedDocumentAdapter |
getWrappedAdapter()
Return the wrapped adapter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SharedDocumentAdapterWrapper(ISharedDocumentAdapter wrappedAdapter)
wrappedAdapter - the wrapped adapter| Method Detail |
public static ISharedDocumentAdapter getAdapter(Object element)
null if there isn't one.
element - the typed element
null
public void connect(IDocumentProvider provider,
IEditorInput documentKey)
throws CoreException
ISharedDocumentAdapter
connect in interface ISharedDocumentAdapterprovider - the document providerdocumentKey - the element's key returned from ISharedDocumentAdapter.getDocumentKey(Object)
CoreException - if connection was not possibleIDocumentProvider.connect(Object)
public void disconnect(IDocumentProvider provider,
IEditorInput documentKey)
ISharedDocumentAdapter
disconnect in interface ISharedDocumentAdapterprovider - the document providerdocumentKey - the element's key returned from ISharedDocumentAdapter.getDocumentKey(Object)IDocumentProvider.disconnect(Object)public IEditorInput getDocumentKey(Object element)
ISharedDocumentAdapterIDocumentProvider from the
DocumentProviderRegistry and for obtaining the shared
IDocument from the document provider. Returns null
if the element does not have a shared document.
getDocumentKey in interface ISharedDocumentAdapterelement - the element being queried for a shared document
null
public void flushDocument(IDocumentProvider provider,
IEditorInput documentKey,
IDocument document,
boolean overwrite)
throws CoreException
ISharedDocumentAdapter
flushDocument in interface ISharedDocumentAdapterprovider - the document providerdocumentKey - the element's key returned from ISharedDocumentAdapter.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)public final ISharedDocumentAdapter getWrappedAdapter()
public void disconnect(Object element)
ISharedDocumentAdapterISharedDocumentAdapter.getDocumentKey(Object)
and the appropriate provider and calls ISharedDocumentAdapter.disconnect(IDocumentProvider, IEditorInput).
disconnect in interface ISharedDocumentAdapterelement - the element that was used to previously connect to a documentIDocumentProvider.disconnect(Object)
|
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.