Bug 82260 ResultCollector: remove dependency to internal J Core interface
I20050104-1600 Summary says it all.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java
try {
			if (unit != null) {
				collector.setPreventEating(false);	
				collector.reset(offset, contextOffset, unit.getJavaProject(), fAllowAddImports ? unit : null);
				collector.setViewer(viewer);
				
				Point selection= viewer.getSelectedRange();
				if (selection.y > 0)
				collector.setReplacementLength(selection.y);
				
				if (JavaPlugin.USE_COMPLETION_REQUESTOR)
					unit.codeComplete(offset, (CompletionRequestor) collector);
				else
					unit.codeComplete(offset, (ICompletionRequestor) collector);
			}
		} catch (JavaModelException x) {
			Shell shell= viewer.getTextWidget().getShell();
			if (x.isDoesNotExist() && unit != null && !unit.getJavaProject().isOnClasspath(unit))
				MessageDialog.openInformation(shell, JavaTextMessages.getString("CompletionProcessor.error.notOnBuildPath.title"), JavaTextMessages.getString("CompletionProcessor.error.notOnBuildPath.message"));  
			else
				ErrorDialog.openError(shell, JavaTextMessages.getString("CompletionProcessor.error.accessing.title"), JavaTextMessages.getString("CompletionProcessor.error.accessing.message"), x.getStatus()); 
		}				
		results= collector.getResults();
		if (fTemplateEngine != null) {
			fTemplateEngine.reset();
			fTemplateEngine.complete(viewer, offset, unit);				
			
			TemplateProposal[] templateResults= fTemplateEngine.getResults();