use of org.eclipse.ui.editors.text.ForwardingDocumentProvider in project eclipse.platform.text by eclipse.
the class AbstractDecoratedTextEditor method setDocumentProvider.
/*
* If there is no explicit document provider set, the implicit one is
* re-initialized based on the given editor input.
*
* @see org.eclipse.ui.texteditor.AbstractTextEditor#setDocumentProvider(org.eclipse.ui.IEditorInput)
*/
@Override
protected void setDocumentProvider(IEditorInput input) {
fImplicitDocumentProvider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
IDocumentProvider provider = super.getDocumentProvider();
if (provider instanceof ForwardingDocumentProvider) {
ForwardingDocumentProvider forwarder = (ForwardingDocumentProvider) provider;
forwarder.setParentProvider(fImplicitDocumentProvider);
}
}
use of org.eclipse.ui.editors.text.ForwardingDocumentProvider in project titan.EclipsePlug-ins by eclipse.
the class TTCN3Editor method initializeEditor.
/**
* Initialize the editor
* <p>
* This function is called by the constructor TTCN3Editor() before its first line of its body!
*/
@Override
protected void initializeEditor() {
super.initializeEditor();
IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
setPreferenceStore(new ChainedPreferenceStore(stores));
colorManager = new ColorManager();
configuration = new Configuration(colorManager, this);
setSourceViewerConfiguration(configuration);
ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.TTCN3_PARTITIONING, new DocumentSetupParticipant(this), new TextFileDocumentProvider());
setDocumentProvider(forwardingProvider);
setEditorContextMenuId(EDITOR_CONTEXT);
HeadlessStorage.setTabWidth(configuration.getTabWidth(getSourceViewer()));
}
use of org.eclipse.ui.editors.text.ForwardingDocumentProvider in project titan.EclipsePlug-ins by eclipse.
the class TTCNPPEditor method initializeEditor.
@Override
protected void initializeEditor() {
super.initializeEditor();
IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
setPreferenceStore(new ChainedPreferenceStore(stores));
colorManager = new ColorManager();
configuration = new Configuration(colorManager, this);
setSourceViewerConfiguration(configuration);
DocumentSetupParticipant participant = new DocumentSetupParticipant(this);
ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.TTCNPP_PARTITIONING, participant, new TextFileDocumentProvider());
setDocumentProvider(forwardingProvider);
setEditorContextMenuId(EDITOR_CONTEXT);
}
use of org.eclipse.ui.editors.text.ForwardingDocumentProvider in project titan.EclipsePlug-ins by eclipse.
the class ConfigTextEditor method initializeEditor.
@Override
protected void initializeEditor() {
super.initializeEditor();
IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
setPreferenceStore(new ChainedPreferenceStore(stores));
colorManager = new ColorManager();
configuration = new Configuration(colorManager, this);
setSourceViewerConfiguration(configuration);
DocumentSetupParticipant participant = new DocumentSetupParticipant();
ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.CONFIG_PARTITIONING, participant, new TextFileDocumentProvider());
setDocumentProvider(forwardingProvider);
setEditorContextMenuId(EDITOR_CONTEXT);
}
use of org.eclipse.ui.editors.text.ForwardingDocumentProvider in project titan.EclipsePlug-ins by eclipse.
the class ASN1Editor method initializeEditor.
@Override
protected void initializeEditor() {
super.initializeEditor();
IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
setPreferenceStore(new ChainedPreferenceStore(stores));
colorManager = new ColorManager();
configuration = new Configuration(colorManager, this);
setSourceViewerConfiguration(configuration);
DocumentSetupParticipant participant = new DocumentSetupParticipant(this);
ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.ASN1_PARTITIONING, participant, new TextFileDocumentProvider());
setDocumentProvider(forwardingProvider);
setEditorContextMenuId(EDITOR_CONTEXT);
}
Aggregations