use of org.talend.sqlbuilder.ui.proposal.SQLEditorProposalProvider in project tdi-studio-se by Talend.
the class SqlEditDialog 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();
IContentProposalProvider contentProposalProvider = new SQLEditorProposalProvider(repositoryNode, language);
SQLEditorProposalAdapter contentProposalAdapter = new SQLEditorProposalAdapter(colorText, controlContentAdapter, contentProposalProvider, keyStroke, new char[] { ' ', '.' });
contentProposalAdapter.setPropagateKeys(true);
contentProposalAdapter.setFilterStyle(ContentProposalAdapter.FILTER_CUMULATIVE);
contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
contentProposalAdapter.setLabelProvider(new SQLEditorLabelProvider());
contentProposalAdapter.setAutoActivationDelay(10);
contentProposalAdapter.setPopupSize(new Point(300, 200));
} catch (Exception e) {
//$NON-NLS-1$
SqlBuilderPlugin.log(Messages.getString("SQLBuilderEditorComposite.logMessage"), e);
}
}
use of org.talend.sqlbuilder.ui.proposal.SQLEditorProposalProvider in project tdi-studio-se by Talend.
the class SQLBuilderEditorComposite 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();
IContentProposalProvider contentProposalProvider = new SQLEditorProposalProvider(repositoryNode, language);
SQLEditorProposalAdapter contentProposalAdapter = new SQLEditorProposalAdapter(colorText, controlContentAdapter, contentProposalProvider, keyStroke, new char[] { ' ', '.' });
contentProposalAdapter.setPropagateKeys(true);
contentProposalAdapter.setFilterStyle(ContentProposalAdapter.FILTER_CUMULATIVE);
contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
contentProposalAdapter.setLabelProvider(new SQLEditorLabelProvider());
contentProposalAdapter.setAutoActivationDelay(10);
contentProposalAdapter.setPopupSize(new Point(300, 200));
} catch (Exception e) {
//$NON-NLS-1$
SqlBuilderPlugin.log(Messages.getString("SQLBuilderEditorComposite.logMessage"), e);
}
}
Aggregations