ICompletionProposal[] res= (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
IJavaCompletionProposal[] res= (IJavaCompletionProposal[]) proposals.toArray(new IJavaCompletionProposal[proposals.size()]);
	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();		ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput());				IDocumentProvider provider= JavaPlugin.getDefault().getCompilationUnitDocumentProvider();		IAnnotationModel model= provider.getAnnotationModel(fEditor.getEditorInput());		ArrayList proposals= new ArrayList();		HashSet idsProcessed= new HashSet();				if (model != null) {			for (Iterator iter= new ProblemAnnotationIterator(model, true); iter.hasNext();) {				IProblemAnnotation annot= (IProblemAnnotation) iter.next();				Position pos= model.getPosition((Annotation) annot);				if (pos != null) {					int start= pos.getOffset();					if (documentOffset >= start && documentOffset <= (start +  pos.getLength())) {						Integer probId= new Integer(annot.getId());						if (!idsProcessed.contains(probId)) {							ProblemPosition pp = new ProblemPosition(pos, annot, cu);							idsProcessed.add(probId);							collectCorrections(pp, proposals);							if (proposals.isEmpty()) {								//proposals.add(new NoCorrectionProposal(pp, annot.getMessage()));							}						}					}				}			}		}				if (proposals.isEmpty()) {			proposals.add(new NoCorrectionProposal(null, null));		}		ICompletionProposal[] res= (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);		Arrays.sort(res, new CorrectionsComparator());		return res;	}