use of org.talend.core.ui.proposal.ContextParameterProposal in project tdq-studio-se by Talend.
the class TdqProposalProvider method getProposals.
public IContentProposal[] getProposals(String contents, int position) {
List<IContentProposal> proposals = new ArrayList<IContentProposal>();
if (this.getSupportContextEditor() != null && this.getSupportContextEditor().getContextManager() != null) {
IContextManager contextManager = this.getSupportContextEditor().getContextManager();
String defaultContextName = contextManager.getDefaultContext().getName();
EList<ContextType> contexts = new BasicEList<ContextType>();
contextManager.saveToEmf(contexts);
List<IContextParameter> ctxParams = new JobContextManager(contexts, defaultContextName).getDefaultContext().getContextParameterList();
for (IContextParameter ctxParam : ctxParams) {
proposals.add(new ContextParameterProposal(ctxParam));
}
}
return proposals.toArray(new IContentProposal[proposals.size()]);
}
Aggregations