@Override
  protected boolean isAvailable(DataContext dataContext) {
    if (!super.isAvailable(dataContext)) {
      return false;
    }

    Module module = dataContext.getData(PlatformCoreDataKeys.MODULE);
    if (module == null || !PsiUtil.isPluginModule(module)) {
      return false;
    }

    return CreateTemplateInPackageAction.isAvailable(dataContext, JavaModuleSourceRootTypes.SOURCES,
                                                     JavaCreateTemplateInPackageAction::doCheckPackageExists);
  }
@Override
  protected boolean isAvailable(DataContext dataContext)