@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    Module module = ModuleManager.getInstance(project).findModuleByName(myModuleName);
    if (module != null) {
      String qualifierText = StringUtil.getPackageName(myImplementationClassName);
      if (!StringUtil.isEmpty(qualifierText)) {
        PsiClass outerClass = findClassInModule(qualifierText, module);
        if (outerClass != null) {
          createClassInOuter(qualifierText, outerClass);
          return;
        }
      }

      if (ApplicationManager.getApplication().isUnitTestMode()) {
        PsiDirectory rootDir = file.getUserData(SERVICE_ROOT_DIR);
        Boolean isSubclass = file.getUserData(SERVICE_IS_SUBCLASS);
        if (rootDir != null && isSubclass != null) {
          WriteAction.run(() -> createClassInRoot(rootDir, isSubclass, file));
        }
        return;
      }
      PsiDirectory[] psiRootDirs = getModuleRootDirs(module);

      CreateServiceImplementationDialog dialog = new CreateServiceImplementationDialog(project, psiRootDirs, mySuperClassName);
      if (dialog.showAndGet()) {
        PsiDirectory psiRootDir = dialog.getRootDir();
        if (psiRootDir != null) {
          boolean isSubclass = dialog.isSubclass();
          PsiClass psiClass = WriteAction.compute(() -> createClassInRoot(psiRootDir, isSubclass, file));
          positionCursor(psiClass);
        }
      }
    }
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)