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.
Classic (2.0) Java Card projects are only allowed to contain one Java package. Issue 170659 requests an API to suppress new package and folder templates. To fully support this option we also need an API to allow our code to veto creating a new folder under source folders if sources are present. One notable caveat to this is that package rename refactoring will create intermediate folders and should still be allowed to. Will request a separate API for detecting when running inside a refactoring.
Either the project's new file wizard can give project some control over the templates (btw. there are PreferredTemplates, so maybe just use them properly?), or Java Package template shall consult the project and allow its creation to be forbidden. I don't plan to do anything about this in openide.filesystems nor openide.loaders as this is very IDE specific request.
(In reply to comment #1) > there are PreferredTemplates, so maybe just use them properly? That would be the obvious solution. Or just display a warning on the project node, and/or an error in the task list, and/or a build-time error if there is >1 package.