/** * Safely computes context information objects of all computers of this category through their * extension. If an extension is disabled, throws an exception or otherwise does not adhere to * the contract described in {@link IJavaCompletionProposalComputer}, it is disabled. * * @param context the invocation context passed on to the extension * @param partition the partition type where to invocation occurred * @param monitor the progress monitor passed on to the extension * @return the list of computed context information objects (element type: * {@link org.eclipse.jface.text.contentassist.IContextInformation}) */ public List computeContextInformation(ContentAssistInvocationContext context, String partition, SubProgressMonitor monitor) { fLastError= null; List result= new ArrayList(); List descriptors= new ArrayList(fRegistry.getProposalComputerDescriptors(partition)); for (Iterator it= descriptors.iterator(); it.hasNext();) { CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next(); if (desc.getCategory() == this) result.addAll(desc.computeContextInformation(context, monitor)); if (fLastError == null) fLastError= desc.getErrorMessage(); } return result; }
/** * Safely computes context information objects of all computers of this category through their * extension. If an extension is disabled, throws an exception or otherwise does not adhere to * the contract described in {@link IJavaCompletionProposalComputer}, it is disabled. * * @param context the invocation context passed on to the extension * @param partition the partition type where to invocation occurred * @param monitor the progress monitor passed on to the extension * @return the list of computed context information objects (element type: * {@link org.eclipse.jface.text.contentassist.IContextInformation}) */ public List<IContextInformation> computeContextInformation(ContentAssistInvocationContext context, String partition, SubProgressMonitor monitor) { fLastError= null; List<IContextInformation> result= new ArrayList<>(); List<CompletionProposalComputerDescriptor> descriptors= new ArrayList<>(fRegistry.getProposalComputerDescriptors(partition)); for (CompletionProposalComputerDescriptor desc : descriptors) { if (desc.getCategory() == this && (isIncluded() || isSeparateCommand())) result.addAll(desc.computeContextInformation(context, monitor)); if (fLastError == null) fLastError= desc.getErrorMessage(); } return result; }
/** * Safely computes context information objects of all computers of this category through their * extension. If an extension is disabled, throws an exception or otherwise does not adhere to * the contract described in {@link IJavaCompletionProposalComputer}, it is disabled. * * @param context the invocation context passed on to the extension * @param partition the partition type where to invocation occurred * @param monitor the progress monitor passed on to the extension * @return the list of computed context information objects (element type: * {@link org.eclipse.jface.text.contentassist.IContextInformation}) */ public List<IContextInformation> computeContextInformation(ContentAssistInvocationContext context, String partition, SubProgressMonitor monitor) { fLastError= null; List<IContextInformation> result= new ArrayList<>(); List<CompletionProposalComputerDescriptor> descriptors= new ArrayList<>(fRegistry.getProposalComputerDescriptors(partition)); for (CompletionProposalComputerDescriptor desc : descriptors) { if (desc.getCategory() == this && (isIncluded() || isSeparateCommand())) result.addAll(desc.computeContextInformation(context, monitor)); if (fLastError == null) fLastError= desc.getErrorMessage(); } return result; }