@Override
  public void update(@NotNull AnActionEvent e) {
    final List<VirtualFile> modules = getModuleNames(e);
    final Presentation presentation = e.getPresentation();
    final boolean visible = !modules.isEmpty();
    presentation.setEnabledAndVisible(visible);
    String text;
    if (modules.size() > 1) {
      text = LangBundle.message("action.import.modules.text", modules.size());
    }
    else if (modules.size() == 1) {
      text = LangBundle.message("action.import.module.text", modules.get(0).getNameWithoutExtension());
    }
    else {
      text = getTemplatePresentation().getText();
    }
    presentation.setText(text);
  }
@Override
  public void update(@NotNull AnActionEvent e)