protected @Nullable @NlsContexts.DialogMessage String checkCanCreateInSourceRoot(final VirtualFile targetSourceRoot) {
    final String targetQName = myPackage.getQualifiedName();
    final String sourceRootPackage = PackageIndex.getInstance(myManager.getProject()).getPackageNameByDirectory(targetSourceRoot);
    if (!CommonJavaRefactoringUtil.canCreateInSourceRoot(sourceRootPackage, targetQName)) {
      return JavaRefactoringBundle.message("source.folder.0.has.package.prefix.1", targetSourceRoot.getPresentableUrl(),
                                       sourceRootPackage, targetQName);
    }
    return null;
  }
protected @Nullable @NlsContexts.DialogMessage String checkCanCreateInSourceRoot(final VirtualFile targetSourceRoot)