@Override
  protected void doAction(@NotNull DataContext dataContext, Project project) {
    Module module = dataContext.getData(LangDataKeys.MODULE_CONTEXT);
    if (module != null) {
      ProjectTaskManager.getInstance(project).rebuild(module);
    }
    else {
      VirtualFile[] files = getCompilableFiles(project, dataContext.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY));
      if (files.length > 0) {
        ProjectTaskManager.getInstance(project).compile(files);
      }
      else {
        module = dataContext.getData(PlatformCoreDataKeys.MODULE); // fallback to any module available from the context
        if (module != null) {
          ProjectTaskManager.getInstance(project).rebuild(module);
        }
      }
    }
  }
@Override
  protected void doAction(@NotNull DataContext dataContext, Project project)