* @return The list of valid proposals regrouped by categories
*/
public ContentAssistProposals buildContentAssistProposals(int position) {
// Create a map of the positions within the parsed tree
QueryPosition queryPosition = getJPQLExpression().buildPosition(
getQuery().getExpression(),
position
);
// Visit the expression, which will collect the possible proposals
AbstractContentAssistVisitor visitor = getContentAssistVisitor();
try {
visitor.prepare(queryPosition);
queryPosition.getExpression().accept(visitor);
return visitor.getProposals();
}
finally {
visitor.dispose();
}