@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    final Project project = MavenActionUtil.getProject(e.getDataContext());
    if(project == null) return;
    final List<File> files = getFiles(e);
    final List<VirtualFile> virtualFiles = collectVirtualFiles(files);

    if (files.size() == 1 && virtualFiles.isEmpty()) {
      WriteCommandAction.writeCommandAction(project).withName(e.getPresentation().getText()).run(() -> {
        File file = files.get(0);
        try {
          final VirtualFile virtualFile = VfsUtil.createDirectoryIfMissing(file.getParent());
          if (virtualFile != null) {
            VirtualFile newFile = virtualFile.createChildData(this, file.getName());
            virtualFiles.add(newFile);
            MavenUtil.runFileTemplate(project, newFile, getFileTemplate());
          }
        }
        catch (IOException ex) {
          MavenUtil.showError(project, MavenProjectBundle.message("notification.title.cannot.create", file.getName()), ex);
        }
      });
      return;
    }

    for (VirtualFile each : virtualFiles) {
      PsiNavigationSupport.getInstance().createNavigatable(project, each, -1).navigate(true);
    }
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)