Search in sources :

Example 1 with DefaultInformationControl

use of org.eclipse.jface.text.DefaultInformationControl 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 2 with DefaultInformationControl

use of org.eclipse.jface.text.DefaultInformationControl in project cubrid-manager by CUBRID.

the class SQLViewerConfiguration method getRecentlyUsedContentAssistant.

/**
	 * get recently used content assistant
	 *
	 * @param sourceViewer the source viewer to be configured by this
	 *        configuration
	 * @return a content assistant
	 */
public IContentAssistant getRecentlyUsedContentAssistant(ISourceViewer sourceViewer) {
    ContentAssistant assistant = new ContentAssistant();
    assistant.setInformationControlCreator(new IInformationControlCreator() {

        public IInformationControl createInformationControl(Shell parent) {
            DefaultInformationControl control = new DefaultInformationControl(parent);
            return control;
        }
    });
    recentlyUsedSQLContentAssistProcessor = new RecentSQLContentAssistProcessor(databaseProvider);
    assistant.setContentAssistProcessor(recentlyUsedSQLContentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
    return assistant;
}
Also used : IInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator) Shell(org.eclipse.swt.widgets.Shell) IInformationControl(org.eclipse.jface.text.IInformationControl) DefaultInformationControl(org.eclipse.jface.text.DefaultInformationControl) IContentAssistant(com.cubrid.common.ui.query.control.jface.text.contentassist.IContentAssistant) ContentAssistant(com.cubrid.common.ui.query.control.jface.text.contentassist.ContentAssistant)

Aggregations

DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)2 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)2 Shell (org.eclipse.swt.widgets.Shell)2 ContentAssistant (com.cubrid.common.ui.query.control.jface.text.contentassist.ContentAssistant)1 IContentAssistant (com.cubrid.common.ui.query.control.jface.text.contentassist.IContentAssistant)1 IInformationControl (org.eclipse.jface.text.IInformationControl)1 IInformationPresenter (org.eclipse.jface.text.information.IInformationPresenter)1 InformationPresenter (org.eclipse.jface.text.information.InformationPresenter)1