/** * Filters the displayed proposal based on the given cursor position and the * offset of the original invocation of the content assistant. * * @return <code>true</code> if there are still proposals left, <code>false</code> if the popup has been closed * @since 3.7 */ public boolean doFilterProposals() { fInvocationProcessedCounter= fInvocationCounter; int offset= fViewer.getSelectedRange().x; ICompletionProposal[] proposals= null; try { if (offset > -1) { DocumentEvent event= TextUtilities.mergeProcessedDocumentEvents(fDocumentEvents); proposals= computeFilteredProposals(offset, event); } } catch (BadLocationException x) { } finally { fDocumentEvents.clear(); } fFilterOffset= offset; if (proposals != null && proposals.length > 0) { setProposals(proposals); return true; } else { hide(); return false; } }
/** * Filters the displayed proposal based on the given cursor position and the * offset of the original invocation of the content assistant. * * @return <code>true</code> if there are still proposals left, <code>false</code> if the popup has been closed * @since 3.7 */ public boolean doFilterProposals() { fInvocationProcessedCounter= fInvocationCounter; int offset= fViewer.getSelectedRange().x; ICompletionProposal[] proposals= null; try { if (offset > -1) { DocumentEvent event= TextUtilities.mergeProcessedDocumentEvents(fDocumentEvents); proposals= computeFilteredProposals(offset, event); } } catch (BadLocationException x) { } finally { fDocumentEvents.clear(); } fFilterOffset= offset; if (proposals != null && proposals.length > 0) { setProposals(proposals); return true; } else { hide(); return false; } }