Fixing api changes from https://github.com/JetBrains/intellij-community/commit/20971c5d23069e7f459013c73b4d6fcf5759f0c0