public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
List proposalsList = new ArrayList();
// first get list of fixes
IQuickAssistProcessor processor = getQuickFixProcessor();
ICompletionProposal[] proposals = processor.computeQuickAssistProposals(invocationContext);
if (proposals != null && proposals.length > 0) {
proposalsList.addAll(Arrays.asList(proposals));
}
// no fixes, so try adding assists
if (proposalsList.isEmpty()) {
Set processors = getQuickAssistProcessors(invocationContext);
if (processors != null) {
// iterate through list of processors until one processor says
// canAssist
for (Iterator it = processors.iterator(); it.hasNext();) {
IQuickAssistProcessor assistProcessor = (IQuickAssistProcessor) it.next();
ICompletionProposal[] assistProposals = assistProcessor.computeQuickAssistProposals(invocationContext);
if (assistProposals != null && assistProposals.length > 0) {
proposalsList.addAll(Arrays.asList(assistProposals));
}
}
}