Search in sources :

Example 1 with PropertiesContentAssistProcessor

use of net.sf.eclipsecs.ui.config.PropertiesContentAssistProcessor in project eclipse-cs by checkstyle.

the class ConfigPropertyWidgetFile 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 PropertiesContentAssistProcessor();
    contentAssistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
    contentAssistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
    contentAssistant.setInformationControlCreator(new IInformationControlCreator() {

        /*
       * @see IInformationControlCreator#createInformationControl(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) PropertiesContentAssistProcessor(net.sf.eclipsecs.ui.config.PropertiesContentAssistProcessor)

Aggregations

PropertiesContentAssistProcessor (net.sf.eclipsecs.ui.config.PropertiesContentAssistProcessor)1 SubjectControlContentAssistant (org.eclipse.jface.contentassist.SubjectControlContentAssistant)1 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)1 IInformationControl (org.eclipse.jface.text.IInformationControl)1 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)1 IContentAssistProcessor (org.eclipse.jface.text.contentassist.IContentAssistProcessor)1 Shell (org.eclipse.swt.widgets.Shell)1