return (ICompletionProposal[]) vector.toArray(new ICompletionProposal[vector.size()]);
return proposals;
	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,	int documentOffset) {		if (fContextType == null)			return null;		Vector vector= new Vector();				try {			int offset= (documentOffset > 0) && (viewer.getDocument().get(documentOffset - 1, 1).equals("$")) //$NON-NLS-1$				? documentOffset - 1				: documentOffset;					int length= documentOffset - offset;			for (Iterator iterator= fContextType.variableIterator(); iterator.hasNext(); ) {				TemplateVariable variable= (TemplateVariable) iterator.next();				vector.add(new TemplateVariableProposal(variable, offset, length, viewer));			}		} catch (BadLocationException e) {			JavaPlugin.log(e);			Shell shell= viewer.getTextWidget().getShell();			MessageDialog.openError(shell, TemplateMessages.getString("TemplateVariableProcessor.error.title"), e.getMessage()); //$NON-NLS-1$		}				return (ICompletionProposal[]) vector.toArray(new ICompletionProposal[vector.size()]);	}