ICompletionProposal[] total= new ICompletionProposal[results.length + exactTemplateResults.length + notExactTemplateResults.length]; System.arraycopy(exactTemplateResults, 0, total, 0, exactTemplateResults.length); System.arraycopy(results, 0, total, exactTemplateResults.length, results.length); System.arraycopy(notExactTemplateResults, 0, total, exactTemplateResults.length + results.length, notExactTemplateResults.length);
ICompletionProposal[] total= new ICompletionProposal[results.length + templateResults.length ]; System.arraycopy(templateResults, 0, total, 0, templateResults.length); System.arraycopy(results, 0, total, templateResults.length, results.length);
	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {		ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());		IDocument document= viewer.getDocument();				try {			if (unit != null) {								fCollector.reset(unit.getJavaProject(), unit);				Point selection= viewer.getSelectedRange();				if (selection.y > 0)					fCollector.setRegionToReplace(selection.x, selection.y);								unit.codeComplete(offset, fCollector);			}		} catch (JavaModelException x) {			Shell shell= viewer.getTextWidget().getShell();			ErrorDialog.openError(shell, JavaTextMessages.getString("CompletionProcessor.error.accessing.title"), JavaTextMessages.getString("CompletionProcessor.error.accessing.message"), x.getStatus()); //$NON-NLS-2$ //$NON-NLS-1$		}						ICompletionProposal[] results= fCollector.getResults();		try {			if (unit != null) {							fTemplateEngine.reset(viewer);				fTemplateEngine.complete(unit, offset);			}					} catch (JavaModelException x) {			Shell shell= viewer.getTextWidget().getShell();			ErrorDialog.openError(shell, JavaTextMessages.getString("CompletionProcessor.error.accessing.title"), JavaTextMessages.getString("CompletionProcessor.error.accessing.message"), x.getStatus()); //$NON-NLS-2$ //$NON-NLS-1$		}								ICompletionProposal[] exactTemplateResults= fTemplateEngine.getExactResults();		ICompletionProposal[] notExactTemplateResults= fTemplateEngine.getNotExactResults();		// concatenate arrays		ICompletionProposal[] total= new ICompletionProposal[results.length + exactTemplateResults.length + notExactTemplateResults.length];		System.arraycopy(exactTemplateResults, 0, total, 0, exactTemplateResults.length);		System.arraycopy(results, 0, total, exactTemplateResults.length, results.length);		System.arraycopy(notExactTemplateResults, 0, total, exactTemplateResults.length + results.length, notExactTemplateResults.length);				return total;	}