Bug 117493 [content assist] CompletionRequestor#completionFailure(IProblem)) is ignored
This got introduced after 3.2 M1 (i.e. broken in 3.2 M2 and newer). If completion fails we now always show: "No completion available." instead of the real error text. Example: for (Iterator i=things.iterator(); i.<ctrl-space> // Iterator not yet imported)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposalComputer.java
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.ICompletionProposalComputer;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationExtension;
import org.eclipse.jface.text.contentassist.TextContentAssistInvocationContext;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.text.java.CompletionProposalCollector;
import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
import org.eclipse.jdt.internal.ui.text.JavaCodeReader;
/**
 * Computes Java completion proposals and context infos.
 * 
 * @since 3.2
 */
public class JavaCompletionProposalComputer implements ICompletionProposalComputer {
	private static final class ContextInformationWrapper implements IContextInformation, IContextInformationExtension {
		private final IContextInformation fContextInformation;
		private int fPosition;
		public ContextInformationWrapper(IContextInformation contextInformation) {
			fContextInformation= contextInformation;
		}
		/*
		 * @see IContextInformation#getContextDisplayString()
		 */
		public String getContextDisplayString() {
			return fContextInformation.getContextDisplayString();
		}