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 68727

Summary: Missing SourceGroup for Unit tests
Product: apisupport Reporter: _ pkuzel <pkuzel>
Component: ProjectAssignee: Martin Krauskopf <mkrauskopf>
Status: VERIFIED FIXED    
Severity: blocker Keywords: SIMPLEFIX
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 56457    

Description _ pkuzel 2005-11-15 12:41:32 UTC
Open javacvs/libmodule project. In project view there are Unit Test Packages.
In Files view there are only "CVS Client Library" and "CVS Client Library -
Source Packages" so it means that "CVS Client Library - Test Packages" is missing.

The bug can be observed at API level:

        Sources sources = ProjectUtils.getSources(project);
        SourceGroup [] sourceGroups = sources.getSourceGroups(Sources.TYPE_GENERIC);
        for (int j = 0; j < sourceGroups.length; j++) {
           <print>

shows:
  generic
  {src.dir}

No trace after expected 
  {test.unit.src.dir}

It means that all functionality that uses this API is broken (files view, single
unit test execution, unit test failures hyperlinking, cvs, ...).


May be the libmodule project is improperly configured, I do not know. There is
no diagnostic message, nothing, just broken behaviour...

It breaks CVS functionality, causing partial commits and updates => P2.

Expected behaviour: Misconfiguration reported. Always aligned Project and Files
views.


javacvs/libmodule structure (historical pre-project-age reasons):

   javacvs/libmodule          NB project
   javacvs/libsrc             sources
   javacvs/test/unit/library  test sources
Comment 1 Jesse Glick 2005-11-15 16:54:41 UTC
Martin can you do this? Should be trivial. Probably just

sourcesHelper.addPrincipalSourceRoot("${test.unit.src.dir}",
NbBundle.getMessage(NbModuleProject.class, "LBL_source_packages"), null, null);
Comment 2 Martin Krauskopf 2005-11-16 11:12:59 UTC
Ok, I'll copy-paste it :)
Comment 3 Martin Krauskopf 2005-11-16 11:43:06 UTC
Fixed.

Checking in NbModuleProject.java; 1.128 -> 1.129;
Checking in test/unit/NbModuleProjectTest.java; 1.29 -> 1.30;
Comment 4 _ pkuzel 2005-11-16 14:00:16 UTC
VERIFIED