@Override public CompletionContext getChildContext(CompletionToken token, int offset) throws Exception { return walkColumns( grid.getHeader(), (GridColumnsNode node) -> { ModelColumn mCol = (ModelColumn) node.getTableColumn(); if (mCol.getName() != null && !mCol.getName().isEmpty() && mCol.getName().equals(token.name)) { return new CompletionContext(node.getClass()); } else return null; }); }
protected void fillColumns(CompletionResultSet resultSet, CompletionPoint point) throws Exception { walkColumns( grid.getHeader(), (GridColumnsNode node) -> { ModelColumn mCol = (ModelColumn) node.getTableColumn(); if (mCol.getName() != null && !mCol.getName().isEmpty()) { addItem( resultSet, point.getFilter(), new BeanCompletionItem( node.getClass(), mCol.getName(), null, point.getCaretBeginWordOffset(), point.getCaretEndWordOffset())); } return null; }); }