porting completion autopopup Confidence from symfony2 plugin