Bug 60349 [implementation] reduce warnings due to core.runtime deprecations
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java
}
			}
			if (curr.getErrorMessage() != null) {
				errorMessage= curr.getErrorMessage();
			}
		}
		if (fTemplateEngine != null) {
			fTemplateEngine.reset(); 
			fTemplateEngine.complete(viewer, offset, cu);				
			
			ICompletionProposal[] templateResults= fTemplateEngine.getResults();
			for (int k= 0; k < templateResults.length; k++) {
				result.add(templateResults[k]);
			}
		}
		fErrorMessage= result.isEmpty() ? errorMessage : null;
		
		IJavaCompletionProposal[] total= (IJavaCompletionProposal[]) result.toArray(new IJavaCompletionProposal[result.size()]);	
		return order(total);			
	}
	
	/**
	 * Order the given proposals.
	 */
	private IJavaCompletionProposal[] order(IJavaCompletionProposal[] proposals) {
		Arrays.sort(proposals, fComparator);
		return proposals;	
	}
}