A forwarding document provider is a document provider that forwards all requests to a known parent document provider. The only functional addition of the forwarding document provider is that it ensures that all documents provided to clients are appropriately set up.
This document provider should be used by editors that directly or indirectly work with a {@link org.eclipse.ui.editors.text.TextFileDocumentProvider} and do notaccept that they may be provided with documents which do not contain the partitioning they work on. This can happen either because of a plug-in configuration error or when a user associates a file name or file extension with an existing text editor and the file buffer infrastructure does not recognize that file name or file extension to be of the same file type the editor works on. Thus, the document provided for the files with that name or extension may not be set up in the way the editor expects it. The ForwardingDocumentProvider
compensates for that situation.
Editors that directly work with a {@link org.eclipse.ui.editors.text.TextFileDocumentProvider} cannow use a ForwardingDocumentProvider
instead and configure a {@link org.eclipse.ui.editors.text.TextFileDocumentProvider} as its parent provider. Editors thatindirectly work with a {@link org.eclipse.ui.editors.text.TextFileDocumentProvider}, e.g. never set a document provider explicitly, should explicitly set a ForwardingDocumentProvider
as document provider. In this case the forwarding document provider may not be shared between editors.
@since 3.0