autodetect idea