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.

Bug 252136 - Better access to multiple roots of the same type
Summary: Better access to multiple roots of the same type
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks: 250809
  Show dependency tree
 
Reported: 2015-04-28 11:15 UTC by Svata Dedic
Modified: 2015-07-22 13:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2015-04-28 11:15:25 UTC
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)
Comment 1 Tomas Stupka 2015-07-22 13:36:46 UTC
UnitTestForSourceQuery perhaps