fNumberOfComputedResults= (results == null ? 0 : results.length);
	public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {				ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());		IJavaCompletionProposal[] results;		if (ExperimentalPreference.fillArgumentsOnMethodCompletion(JavaPlugin.getDefault().getPreferenceStore())) {							try {				if (unit != null) {						fExperimentalCollector.reset(offset, unit.getJavaProject(), fAllowAddImports ? unit : null);					fExperimentalCollector.setViewer(viewer);										Point selection= viewer.getSelectedRange();					if (selection.y > 0)						fExperimentalCollector.setReplacementLength(selection.y);										unit.codeComplete(offset, fExperimentalCollector);				}			} 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$			}							results= fExperimentalCollector.getResults();		} else {			try {				if (unit != null) {						fCollector.reset(offset, unit.getJavaProject(), fAllowAddImports ? unit : null);					Point selection= viewer.getSelectedRange();					if (selection.y > 0)						fCollector.setReplacementLength(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$			}						results= fCollector.getResults();		}		if (fTemplateEngine != null) {			try {				fTemplateEngine.reset();				fTemplateEngine.complete(viewer, offset, unit);			} 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$			}										IJavaCompletionProposal[] templateResults= fTemplateEngine.getResults();				// concatenate arrays			IJavaCompletionProposal[] total= new IJavaCompletionProposal[results.length + templateResults.length];			System.arraycopy(templateResults, 0, total, 0, templateResults.length);			System.arraycopy(results, 0, total, templateResults.length, results.length);			results= total;		}				/*		 * Order here and not in result collector to make sure that the order		 * applies to all proposals and not just those of the compilation unit. 		 */		return order(results);	}