Bug 29078 Completion for anonymous inner class results in syntax error
1) enable smart brackets 2) type in Runnable runnable= new Runnable(<code assist>) ->you get the code below with one superflus parenthesis: Runnable runnable= new Runnable() { public void run() { } })
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
}
	
	private IType getDeclaringType(IJavaProject project, String typeName) {
		try {
			return project.findType(typeName);
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		return null;
	}
	
	/* (non-Javadoc)
	 * @see JavaTypeCompletionProposal#updateReplacementString(char, int, ImportsStructure)
	 */
	protected String updateReplacementString(IDocument document, char trigger, int offset, ImportsStructure impStructure) throws CoreException, BadLocationException {
		String replacementString= getReplacementString();
		
		
		StringBuffer buf= new StringBuffer();
		buf.append(replacementString);
		if (!replacementString.endsWith(")")) { 
			buf.append(')');
		}	
		buf.append(" {\n"); 
		if (!createStubs(buf, impStructure)) {
			return null;
		}
		buf.append("}");