Search in sources :

Example 1 with SourceViewerInformationControl

use of org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl in project tdi-studio-se by Talend.

the class ReconcilerViewer method initializeModel.

protected void initializeModel() {
    ProjectionSupport projectionSupport = new ProjectionSupport(this, annotationAccess, sharedColors);
    //$NON-NLS-1$
    projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
    //$NON-NLS-1$
    projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
    projectionSupport.setHoverControlCreator(new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell shell) {
            return new SourceViewerInformationControl(shell, false, SWT.LEFT_TO_RIGHT, EditorsUI.getTooltipAffordanceString());
        }
    });
    projectionSupport.setInformationPresenterControlCreator(new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell shell) {
            int shellStyle = SWT.RESIZE | SWT.TOOL | SWT.LEFT_TO_RIGHT;
            int style = SWT.V_SCROLL | SWT.H_SCROLL;
            return new SourceViewerInformationControl(shell, true, SWT.LEFT_TO_RIGHT, null);
        }
    });
    projectionSupport.install();
}
Also used : ProjectionSupport(org.eclipse.jface.text.source.projection.ProjectionSupport) IInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator) Shell(org.eclipse.swt.widgets.Shell) IInformationControl(org.eclipse.jface.text.IInformationControl) SourceViewerInformationControl(org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl)

Aggregations

SourceViewerInformationControl (org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl)1 IInformationControl (org.eclipse.jface.text.IInformationControl)1 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)1 ProjectionSupport (org.eclipse.jface.text.source.projection.ProjectionSupport)1 Shell (org.eclipse.swt.widgets.Shell)1