Re: How to get Java Packages
Svata Dedic <[email protected]> Thu, 31 Jul 2003 06:37:43 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Joe Warzecha wrote: > If I have access to a JavaProject object, how do I > retrieve the Packages (FileObjects) that the user has > defined in the project? > * JavaProject contains Compilation Units (o.n.a.java.project.CompilationUnit) [sources, tests, whatever other parts of the app] * CompilationUnit can give you RootedFileSet from its getSourceRoots() * that rooted fileset's getRootSet() will give you precisely folders that merge up into the default package of that compilation unit * Sources in individual CompilationUnits are separate, they do not share packages. Do read the JavaProject javadoc and the overview documentation to find the above information and more details. -Svata