Search in sources :

Example 1 with SubjectControlContentAssistant

use of org.eclipse.jface.contentassist.SubjectControlContentAssistant 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)

Example 2 with SubjectControlContentAssistant

use of org.eclipse.jface.contentassist.SubjectControlContentAssistant 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 3 with SubjectControlContentAssistant

use of org.eclipse.jface.contentassist.SubjectControlContentAssistant in project eclipse-cs by checkstyle.

the class ResolvablePropertyEditDialog 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)

Example 4 with SubjectControlContentAssistant

use of org.eclipse.jface.contentassist.SubjectControlContentAssistant 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

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