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.
When working on issue #250809, I've realized that the code is (?) unable to offer the user e.g. several source root directories, or unit test directories -- it uses SourceGroupModifier.createSourceGroup, so JavaProjectConstants.SOURCES_HINT_TEST can be passed as a filter, but the result is a single SourceGroup (one root). If the project had multiple source/test roots, only the 1st is offered by this hint. If I iterated through Sources.getSourceGroups() I could not access the 'hint' attribute to filter the source groups myself. Could be the API extended - or please advise how to use the existing APIs to achieve the goal (offer all suitable source/test roots for class creation)
UnitTestForSourceQuery perhaps