use of org.talend.designer.dbmap.ui.proposal.expression.KeyWordProposalProvider in project tdi-studio-se by Talend.
the class DataMapTableView method initExpressionProposals.
/**
*
* Init proposals of Text control, and StyledText in tab "Expression editor".
*
* @param textControl
* @param zones
* @param tableViewerCreator
* @param currentModifiedEntry
*/
protected void initExpressionProposals(final TextCellEditorWithProposal textCellEditor, Zone[] zones, final TableViewerCreator tableViewerCreator, ITableEntry currentModifiedEntry) {
if (this.expressionProposalProvider == null) {
IContentProposalProvider[] contentProposalProviders = new IContentProposalProvider[0];
if (!MapperMain.isStandAloneMode()) {
contentProposalProviders = new IContentProposalProvider[] { // new ProcessProposalProvider(mapperManager.getComponent().getProcess())
new KeyWordProposalProvider("tsql", //$NON-NLS-1$ //$NON-NLS-2$
"KEYWORD1") };
}
this.expressionProposalProvider = new ExpressionProposalProvider(mapperManager, contentProposalProviders);
}
this.expressionProposalProvider.init(abstractDataMapTable, zones, currentModifiedEntry);
textCellEditor.setContentProposalProvider(this.expressionProposalProvider);
StyledTextHandler styledTextHandler = mapperManager.getUiManager().getTabFolderEditors().getStyledTextHandler();
styledTextHandler.getStyledText().setEnabled(true);
ContentProposalAdapterExtended expressionProposalStyledText = styledTextHandler.getContentProposalAdapter();
expressionProposalStyledText.setContentProposalProvider(this.expressionProposalProvider);
// System.out.println("init expression proposal:"+this.expressionProposal);
}
Aggregations