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 270131 - Allow to create source groups "relative" to existing ones
Summary: Allow to create source groups "relative" to existing ones
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: Dev
Hardware: PC Linux
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2017-03-20 10:57 UTC by Svata Dedic
Modified: 2017-04-07 01:49 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed API change (27.33 KB, patch)
2017-03-20 10:57 UTC, Svata Dedic
Details | Diff
Proposed API change (28.75 KB, patch)
2017-03-20 11:02 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2017-03-20 10:57:42 UTC
Created attachment 163891 [details]
Proposed API change

In J2SE modular project, in presence of multiple modules in a project, several source (type:java, hint:main) and test (type:java, hint:test) locations exist. When using current SourceGroupModifier to materialize a test source root for certain sources, the implementation has no idea how the source and test root relate to each other. 

A strawman approach is to introduce an abstract "component" or "part" hierarchical structure to the project, with semantics defined by the project implementation. Project types which are not internally structured can ignore such extension.

So the j2se project will be structured (from the most general to the least):
* modules
* module locations
* individual folders

When configuring a SourceRootConfig, the project abstract location can be given. When attempting to create a SourceGroup, the associated existing SG + desired additional location can be provided.

The change affects modules.projectapi and modules.project.ant modules.

Please see / review the attached diff.
Comment 1 Svata Dedic 2017-03-20 11:02:17 UTC
Created attachment 163892 [details]
Proposed API change

Sorry, added the java implementation and junit user to the patch
Comment 2 Svata Dedic 2017-04-05 13:48:09 UTC
Committed as jet-main#103c1a9d42dc
Comment 3 Quality Engineering 2017-04-07 01:49:47 UTC
Integrated into 'main-silver', will be available in build *201704070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/103c1a9d42dc
User: Svata Dedic <sdedic@netbeans.org>
Log: #270131: related source group support added