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 30795

Summary: NullCompilationUnit should be visible in APIs
Product: java Reporter: Pavel Buzek <pbuzek>
Component: UnsupportedAssignee: Tomas Zezula <tzezula>
Status: CLOSED FIXED    
Severity: blocker Keywords: API
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Windows 3.1/NT   
Issue Type: TASK Exception Reporter:

Description Pavel Buzek 2003-02-07 12:57:52 UTC
The documentation for java project apis says that the list of compilation units returned from 
JavaProject.getCompilationUnits () containes a null compilation unit that represents sources 
that should not be compiled. There is however no way to find out which one it is. It would be 
useful to make it possible to locate this unit, e.g. by JavaProject.getNullCompilationUnit (), or 
perhaps just declare a constant with a name of this unit (to compare with 
compilationUnit.getName()).
This is needed to:
1) assign sources to null CU
2) filter out the null CU when you want to work with "real" CUs
Comment 1 Svata Dedic 2003-02-07 13:00:43 UTC
What about getBuildTarget() == null ?
Comment 2 Pavel Buzek 2003-02-07 13:32:55 UTC
All right. Could this be (explicitly) mentioned in documentation that this is how to recognize it? It is 
logical, but ... :-)
Thanks!
Comment 3 Tomas Zezula 2003-04-22 13:19:34 UTC
Fixed documentation for JavaPrject.getCompilationUnits()
Comment 4 Pavel Buzek 2003-07-02 14:08:18 UTC
i've verified all these issues
Comment 5 Pavel Buzek 2003-07-02 14:19:24 UTC
closing all my verified issues