IDE-1232

rebase IDE-1232 to master, so pull request again for IDE-1232.