Search in sources :

Example 1 with RegExContentAssistProcessor

use of net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor in project eclipse-cs by checkstyle.

the class ConfigPropertyWidgetRegex 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 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) RegExContentAssistProcessor(net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor)

Example 2 with RegExContentAssistProcessor

use of net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor 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

RegExContentAssistProcessor (net.sf.eclipsecs.ui.util.regex.RegExContentAssistProcessor)2 SubjectControlContentAssistant (org.eclipse.jface.contentassist.SubjectControlContentAssistant)2 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)2 IInformationControl (org.eclipse.jface.text.IInformationControl)2 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)2 IContentAssistProcessor (org.eclipse.jface.text.contentassist.IContentAssistProcessor)2 Shell (org.eclipse.swt.widgets.Shell)2