Search in sources :

Example 26 with IInformationControlCreator

use of org.eclipse.jface.text.IInformationControlCreator in project tdq-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.RESIZE,, style, new HTMLTextPresenter(cutDown));
                return new DefaultInformationControl(parent);
            }
        };
        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 27 with IInformationControlCreator

use of org.eclipse.jface.text.IInformationControlCreator in project xtext-eclipse by eclipse.

the class HierarchyInformationPresenter method getHierarchyPresenterControlCreator.

protected static IInformationControlCreator getHierarchyPresenterControlCreator() {
    return new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell parent) {
            int shellStyle = SWT.RESIZE;
            int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
            HierarchyInformationControl hierarchyInformationControl = new HierarchyInformationControl(parent, shellStyle, treeStyle);
            return hierarchyInformationControl;
        }
    };
}
Also used : IInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator) Shell(org.eclipse.swt.widgets.Shell) Point(org.eclipse.swt.graphics.Point) HierarchyInformationControl(org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl)

Example 28 with IInformationControlCreator

use of org.eclipse.jface.text.IInformationControlCreator in project eclipse-cs by checkstyle.

the class FileMatchPatternEditDialog method createContentAssistant.

/**
 * Creates the content assistant.
 *
 * @return the content assistant
 */
private SubjectControlContentAssistant createContentAssistant() {
    final SubjectControlContentAssistant contentAssistant = new SubjectControlContentAssistant();
    contentAssistant.setRestoreCompletionProposalSize(CheckstyleUIPlugin.getDefault().getDialogSettings());
    IContentAssistProcessor processor = new RegExContentAssistProcessor(true);
    contentAssistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
    contentAssistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
    contentAssistant.setInformationControlCreator(new IInformationControlCreator() {

        /*
       * @see org.eclipse.jface.text.IInformationControlCreator#
       * createInformationControl( org.eclipse.swt.widgets.Shell)
       */
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent);
        }
    });
    return contentAssistant;
}
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) IContentAssistProcessor(org.eclipse.jface.text.contentassist.IContentAssistProcessor) SubjectControlContentAssistant(org.eclipse.jface.contentassist.SubjectControlContentAssistant) RegExContentAssistProcessor(net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor)

Aggregations

IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)28 Shell (org.eclipse.swt.widgets.Shell)16 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)14 IInformationControl (org.eclipse.jface.text.IInformationControl)11 InformationPresenter (org.eclipse.jface.text.information.InformationPresenter)7 IContentAssistProcessor (org.eclipse.jface.text.contentassist.IContentAssistProcessor)5 IInformationPresenter (org.eclipse.jface.text.information.IInformationPresenter)5 SubjectControlContentAssistant (org.eclipse.jface.contentassist.SubjectControlContentAssistant)4 IInformationProvider (org.eclipse.jface.text.information.IInformationProvider)4 Point (org.eclipse.swt.graphics.Point)4 RegExContentAssistProcessor (net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor)2 ISourceViewer (org.eclipse.jface.text.source.ISourceViewer)2 ProjectionSupport (org.eclipse.jface.text.source.projection.ProjectionSupport)2 HtmlTextPresenter (org.eclipse.mylyn.wikitext.ui.viewer.HtmlTextPresenter)2 Control (org.eclipse.swt.widgets.Control)2 HTMLTextPresenter (org.eclipse.wst.sse.ui.internal.derived.HTMLTextPresenter)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 GroovyASTCompletionProcessor (eu.esdihumboldt.hale.ui.util.groovy.internal.contentassist.GroovyASTCompletionProcessor)1 PropertiesContentAssistProcessor (net.sf.eclipsecs.ui.config.PropertiesContentAssistProcessor)1