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 - NullCompilationUnit should be visible in APIs
Summary: NullCompilationUnit should be visible in APIs
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-02-07 12:57 UTC by Pavel Buzek
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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