private List collectProposals(ITextViewer viewer, int offset, IProgressMonitor monitor, ContentAssistInvocationContext context) { List proposals= new ArrayList(); List providers= getCategories(); for (Iterator it= providers.iterator(); it.hasNext();) { CompletionProposalCategory cat= (CompletionProposalCategory) it.next(); List computed= cat.computeCompletionProposals(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } return proposals; }
private List collectContextInformation(ITextViewer viewer, int offset, IProgressMonitor monitor) { List proposals= new ArrayList(); ContentAssistInvocationContext context= createContext(viewer, offset); List providers= getCategories(); for (Iterator it= providers.iterator(); it.hasNext();) { CompletionProposalCategory cat= (CompletionProposalCategory) it.next(); List computed= cat.computeContextInformation(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } return proposals; }
private List<IContextInformation> collectContextInformation(ITextViewer viewer, int offset, IProgressMonitor monitor) { List<IContextInformation> proposals= new ArrayList<>(); ContentAssistInvocationContext context= createContext(viewer, offset); List<CompletionProposalCategory> providers= getCategories(); for (CompletionProposalCategory cat : providers) { List<IContextInformation> computed= cat.computeContextInformation(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } return proposals; }
private List<IContextInformation> collectContextInformation(ITextViewer viewer, int offset, IProgressMonitor monitor) { List<IContextInformation> proposals= new ArrayList<>(); ContentAssistInvocationContext context= createContext(viewer, offset); List<CompletionProposalCategory> providers= getCategories(); for (CompletionProposalCategory cat : providers) { List<IContextInformation> computed= cat.computeContextInformation(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } return proposals; }
/** * Collects the proposals. * * @param viewer the text viewer * @param offset the offset * @param monitor the progress monitor * @param context the code assist invocation context * @return the list of proposals */ private List<ICompletionProposal> collectProposals(ITextViewer viewer, int offset, IProgressMonitor monitor, ContentAssistInvocationContext context) { boolean needsSortingAfterFiltering= false; List<ICompletionProposal> proposals= new ArrayList<>(); List<CompletionProposalCategory> providers= getCategories(); for (CompletionProposalCategory cat : providers) { List<ICompletionProposal> computed= cat.computeCompletionProposals(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); needsSortingAfterFiltering= needsSortingAfterFiltering || (cat.isSortingAfterFilteringNeeded() && !computed.isEmpty()); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } if (fNeedsSortingAfterFiltering && !needsSortingAfterFiltering) fAssistant.setSorter(null); fNeedsSortingAfterFiltering= needsSortingAfterFiltering; return proposals; }
/** * Collects the proposals. * * @param viewer the text viewer * @param offset the offset * @param monitor the progress monitor * @param context the code assist invocation context * @return the list of proposals */ private List<ICompletionProposal> collectProposals(ITextViewer viewer, int offset, IProgressMonitor monitor, ContentAssistInvocationContext context) { boolean needsSortingAfterFiltering= false; List<ICompletionProposal> proposals= new ArrayList<>(); List<CompletionProposalCategory> providers= getCategories(); for (CompletionProposalCategory cat : providers) { List<ICompletionProposal> computed= cat.computeCompletionProposals(context, fPartition, new SubProgressMonitor(monitor, 1)); proposals.addAll(computed); needsSortingAfterFiltering= needsSortingAfterFiltering || (cat.isSortingAfterFilteringNeeded() && !computed.isEmpty()); if (fErrorMessage == null) fErrorMessage= cat.getErrorMessage(); } if (fNeedsSortingAfterFiltering && !needsSortingAfterFiltering) fAssistant.setSorter(null); fNeedsSortingAfterFiltering= needsSortingAfterFiltering; return proposals; }