((IPostSelectionProvider) this.getSelectionProvider())
.addPostSelectionChangedListener(fOccurrencesUpdater);
// Folding
ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
ProjectionSupport projectionSupport = new ProjectionSupport(viewer,
getAnnotationAccess(), getSharedColors());
projectionSupport
.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
projectionSupport
.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
projectionSupport
.setHoverControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(
Shell shell) {
return new DefaultInformationControl(shell, SWT.TOOL
| SWT.NO_TRIM | getOrientation(), SWT.NONE,
null, EditorsUI.getTooltipAffordanceString());
}
});
projectionSupport
.setInformationPresenterControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(
Shell shell) {
int shellStyle = SWT.RESIZE | SWT.TOOL
| getOrientation();
int style = SWT.V_SCROLL | SWT.H_SCROLL;
return new DefaultInformationControl(shell, shellStyle,
style, null);
}
});
projectionSupport.install();
viewer.doOperation(ProjectionViewer.TOGGLE);
}