use of org.eclipse.wst.sse.ui.internal.text.SourceInfoProvider in project webtools.sourceediting by eclipse.
the class StructuredTextEditor method configureOutlinePresenter.
private IInformationPresenter configureOutlinePresenter(ISourceViewer sourceViewer, SourceViewerConfiguration config) {
InformationPresenter presenter = null;
// Get the quick outline configuration
AbstractQuickOutlineConfiguration cfg = null;
ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
String[] ids = getConfigurationPoints();
for (int i = 0; cfg == null && i < ids.length; i++) {
cfg = (AbstractQuickOutlineConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.QUICKOUTLINECONFIGURATION, ids[i]);
}
if (cfg != null) {
presenter = new InformationPresenter(getOutlinePresenterControlCreator(cfg));
presenter.setDocumentPartitioning(config.getConfiguredDocumentPartitioning(sourceViewer));
presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
IInformationProvider provider = new SourceInfoProvider(this);
String[] contentTypes = config.getConfiguredContentTypes(sourceViewer);
for (int i = 0; i < contentTypes.length; i++) {
presenter.setInformationProvider(provider, contentTypes[i]);
}
presenter.setSizeConstraints(50, 20, true, false);
}
return presenter;
}
Aggregations