public static boolean isInDGMFile(PsiElement e) {
    PsiFile file = e.getContainingFile();
    return file instanceof PropertiesFile &&
           Comparing.equal(file.getName(), ORG_CODEHAUS_GROOVY_RUNTIME_EXTENSION_MODULE,
                           file.getViewProvider().getVirtualFile().isCaseSensitive());
  }
public static boolean isInDGMFile(PsiElement e)