This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
See issue 170659 and issue 170663 for details. Summary: Java Card projects are only allowed to contain a single Java package. We are requesting API support to suppress folder templates and package templates, and the ability to veto new folder creation via Paste or other means. However, renaming a package involves creating the new package, copying the contents of the old one, and then deleting it. So to make vetoability of folder creation useful, we need to be able to detect when a refactoring that could legally be creating packages is running, and if so, disable vetoing of folder creation.
See java.source/src/org/netbeans/modules/java/source/usages/AllRefactoringsPluginFactory.java. It should be what you are looking for.