Search in sources :

Example 1 with InformationPresenter

use of org.eclipse.jface.text.information.InformationPresenter in project KaiZen-OpenAPI-Editor by RepreZen.

the class JsonSourceViewerConfiguration method getOutlinePresenter.

public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer) {
    if (informationPresenter == null) {
        IInformationControlCreator controlCreator = getOutlineInformationControlCreator();
        informationPresenter = new InformationPresenter(controlCreator);
        informationPresenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
        // Register information provider
        IInformationProvider provider = new InformationProvider(controlCreator);
        String[] contentTypes = getConfiguredContentTypes(sourceViewer);
        for (String contentType : contentTypes) {
            informationPresenter.setInformationProvider(provider, contentType);
        }
        informationPresenter.setSizeConstraints(60, 20, true, true);
    }
    return informationPresenter;
}
Also used : IInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator) IInformationProvider(org.eclipse.jface.text.information.IInformationProvider) IInformationProvider(org.eclipse.jface.text.information.IInformationProvider) IInformationPresenter(org.eclipse.jface.text.information.IInformationPresenter) InformationPresenter(org.eclipse.jface.text.information.InformationPresenter)

Example 2 with InformationPresenter

use of org.eclipse.jface.text.information.InformationPresenter in project tdi-studio-se by Talend.

the class SQLSourceViewerConfiguration method getInformationPresenter.

/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getInformationPresenter(org.eclipse.jface.text.source.ISourceViewer)
	 */
public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
    if (iPresenter == null) {
        IInformationControlCreator informationControlCreator = new IInformationControlCreator() {

            public IInformationControl createInformationControl(Shell parent) {
                // SWT.H_SCROLL);
                return new DefaultInformationControl(parent);
            // SWT.RESIZE,,
            // style,
            // new
            // HTMLTextPresenter(cutDown));
            }
        };
        iPresenter = new InformationPresenter(informationControlCreator);
        iPresenter.setSizeConstraints(60, 10, true, true);
    }
    return iPresenter;
}
Also used : IInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator) Shell(org.eclipse.swt.widgets.Shell) DefaultInformationControl(org.eclipse.jface.text.DefaultInformationControl) InformationPresenter(org.eclipse.jface.text.information.InformationPresenter) IInformationPresenter(org.eclipse.jface.text.information.IInformationPresenter)

Example 3 with InformationPresenter

use of org.eclipse.jface.text.information.InformationPresenter in project dbeaver by serge-rider.

the class SQLEditorSourceViewerConfiguration method getInformationPresenter.

@Override
public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
    InformationPresenter presenter = new InformationPresenter(getInformationControlCreator(sourceViewer));
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    // Register information provider
    IInformationProvider provider = new SQLInformationProvider(getSQLEditor());
    String[] contentTypes = getConfiguredContentTypes(sourceViewer);
    for (String contentType : contentTypes) {
        presenter.setInformationProvider(provider, contentType);
    }
    presenter.setSizeConstraints(60, 10, true, true);
    return presenter;
}
Also used : IInformationProvider(org.eclipse.jface.text.information.IInformationProvider) IInformationPresenter(org.eclipse.jface.text.information.IInformationPresenter) InformationPresenter(org.eclipse.jface.text.information.InformationPresenter) SQLInformationProvider(org.jkiss.dbeaver.ui.editors.sql.syntax.SQLInformationProvider)

Aggregations

IInformationPresenter (org.eclipse.jface.text.information.IInformationPresenter)3 InformationPresenter (org.eclipse.jface.text.information.InformationPresenter)3 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)2 IInformationProvider (org.eclipse.jface.text.information.IInformationProvider)2 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)1 Shell (org.eclipse.swt.widgets.Shell)1 SQLInformationProvider (org.jkiss.dbeaver.ui.editors.sql.syntax.SQLInformationProvider)1