engine.reset();
	public List computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {		TemplateEngine engine;		try {			String partition= TextUtilities.getContentType(context.getDocument(), IJavaPartitions.JAVA_PARTITIONING, context.getInvocationOffset(), true);			if (partition.equals(IJavaPartitions.JAVA_DOC))				engine= fJavadocTemplateEngine;			else				engine= fJavaTemplateEngine;		} catch (BadLocationException x) {			return Collections.EMPTY_LIST;		}				if (engine != null) {			if (!(context instanceof JavaContentAssistInvocationContext))				return Collections.EMPTY_LIST;			JavaContentAssistInvocationContext javaContext= (JavaContentAssistInvocationContext) context;			ICompilationUnit unit= javaContext.getCompilationUnit();			if (unit == null)				return Collections.EMPTY_LIST;						engine.reset();			engine.complete(javaContext.getViewer(), javaContext.getInvocationOffset(), unit);			TemplateProposal[] templateProposals= engine.getResults();			List result= new ArrayList(Arrays.asList(templateProposals));			IJavaCompletionProposal[] keyWordResults= javaContext.getKeywordProposals();			if (keyWordResults.length > 0) {				List removals= new ArrayList();								// update relevance of template proposals that match with a keyword				// give those templates slightly more relevance than the keyword to				// sort them first				// remove keyword templates that don't have an equivalent				// keyword proposal				if (keyWordResults.length > 0) {					outer: for (int k= 0; k < templateProposals.length; k++) {						TemplateProposal curr= templateProposals[k];						String name= curr.getTemplate().getName();						for (int i= 0; i < keyWordResults.length; i++) {							String keyword= keyWordResults[i].getDisplayString();							if (name.startsWith(keyword)) {								curr.setRelevance(keyWordResults[i].getRelevance() + 1);								continue outer;							}						}						if (isKeyword(name))							removals.add(curr);					}				}								result.removeAll(removals);			}			return result;		}				return Collections.EMPTY_LIST;	}