use of com.cubrid.common.ui.query.control.jface.text.contentassist.ContentAssistant in project cubrid-manager by CUBRID.
the class SQLViewerConfiguration method getContentAssistant.
/**
* Get content assistant
*
* @param sourceViewer the source viewer to be configured by this
* configuration
* @return a content assistant
*/
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
// assistant.setInformationControlCreator(new IInformationControlCreator() {
// public IInformationControl createInformationControl(Shell parent) {
// DefaultInformationControl control = new DefaultInformationControl(
// parent);
// return control;
// }
// });
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
final WordTracker tracker = WordTracker.getWordTracker();
contentAssistProcessor = new SQLContentAssistProcessor(tracker, databaseProvider);
assistant.setContentAssistProcessor(contentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
return assistant;
}
use of com.cubrid.common.ui.query.control.jface.text.contentassist.ContentAssistant 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