use of org.talend.core.service.IPigMapService in project tdi-studio-se by Talend.
the class PigExpressionComposite method createEditorProposal.
/**
* Creates proposal for editor.
*/
private void createEditorProposal() {
try {
// create KeyStroke use Ctrl+Space as default
KeyStroke keyStroke = HotKeyUtil.getHotKey(HotKeyUtil.contentAssist);
IControlContentAdapter controlContentAdapter = new StyledTextContentAdapter();
// TDI-25309 :expression builder UDF autocompletion need add the inputTable node
if (GlobalServiceRegister.getDefault().isServiceRegistered(IPigMapService.class)) {
final IPigMapService service = (IPigMapService) GlobalServiceRegister.getDefault().getService(IPigMapService.class);
ContentProposalAdapterExtended proposalAdaptor = ProposalUtils.getCommonProposal(textControl, service.createExpressionProposalProvider(dataBean));
new ContentProposalAdapter(textControl, controlContentAdapter, service.createExpressionProposalProvider(dataBean), keyStroke, new char[] { ' ', '.' });
}
} catch (Exception e) {
//
}
}
use of org.talend.core.service.IPigMapService in project tdi-studio-se by Talend.
the class BatchExpressionComposite method createEditorProposal.
/**
* Creates proposal for editor.
*/
private void createEditorProposal() {
try {
// create KeyStroke use Ctrl+Space as default
KeyStroke keyStroke = HotKeyUtil.getHotKey(HotKeyUtil.contentAssist);
IControlContentAdapter controlContentAdapter = new StyledTextContentAdapter();
// TDI-25309 :expression builder UDF autocompletion need add the inputTable node
if (GlobalServiceRegister.getDefault().isServiceRegistered(IPigMapService.class)) {
final IPigMapService service = (IPigMapService) GlobalServiceRegister.getDefault().getService(IPigMapService.class);
ContentProposalAdapterExtended proposalAdaptor = ProposalUtils.getCommonProposal(textControl, service.createExpressionProposalProvider(dataBean));
new ContentProposalAdapter(textControl, controlContentAdapter, service.createExpressionProposalProvider(dataBean), keyStroke, new char[] { ' ', '.' });
}
} catch (Exception e) {
//
}
}
Aggregations