private static boolean isEnabled(AnActionEvent e) {
    PsiFile file = e.getData(CommonDataKeys.PSI_FILE);
    if (file == null || file.getLanguage() != GroovyLanguage.INSTANCE) {
      return false;
    }

    final VirtualFile virtualFile = file.getVirtualFile();
    return virtualFile != null && !GroovyCompilerConfiguration.getExcludeConfiguration(file.getProject()).isExcluded(virtualFile);
  }
private static boolean isEnabled(AnActionEvent e)