IDE-926 backport
IDE-1022 backport
IDE-1268 backport to 1.x