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;
}
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;
}
};
}
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;
}
Aggregations