use of org.eclipse.jface.text.IInformationControl in project tdi-studio-se by Talend.
the class ReconcilerViewer method initializeModel.
protected void initializeModel() {
ProjectionSupport projectionSupport = new ProjectionSupport(this, annotationAccess, sharedColors);
//$NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
//$NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
projectionSupport.setHoverControlCreator(new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell shell) {
return new SourceViewerInformationControl(shell, false, SWT.LEFT_TO_RIGHT, EditorsUI.getTooltipAffordanceString());
}
});
projectionSupport.setInformationPresenterControlCreator(new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell shell) {
int shellStyle = SWT.RESIZE | SWT.TOOL | SWT.LEFT_TO_RIGHT;
int style = SWT.V_SCROLL | SWT.H_SCROLL;
return new SourceViewerInformationControl(shell, true, SWT.LEFT_TO_RIGHT, null);
}
});
projectionSupport.install();
}
use of org.eclipse.jface.text.IInformationControl in project cubrid-manager by CUBRID.
the class SQLViewerConfiguration method getRecentlyUsedContentAssistant.
/**
* get recently used content assistant
*
* @param sourceViewer the source viewer to be configured by this
* configuration
* @return a content assistant
*/
public IContentAssistant getRecentlyUsedContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
assistant.setInformationControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
DefaultInformationControl control = new DefaultInformationControl(parent);
return control;
}
});
recentlyUsedSQLContentAssistProcessor = new RecentSQLContentAssistProcessor(databaseProvider);
assistant.setContentAssistProcessor(recentlyUsedSQLContentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
return assistant;
}
Aggregations