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.
[release40-200411021800, JDK 1.4.2_06] Action 'Compile Package' on <default package> compiles entire source tree. It's not very useful. It should either enumerate those files for compilation in the default package or be disabled on default package.
Probably the action provider is setting javac.includes to e.g. "**" when "*" is correct. Similarly, selecting Compile Package on src/org/foo/bar should probably send "org/foo/bar/*" rather than "org/foo/bar/" (~ "org/foo/bar/**").
It was designed to compile whole subtree **. But it can be changed to *. I have no strong opinion concerning this.
I guess the expectation is that only direct child files should be compiled, assuming the user is looking at a standard (list-style) package view... Note, once again, we are missing a proper API for distinguishing a package from a folder in a Lookup (e.g. action selection). Affects VCS integration, search, etc. We should seriously consider defining such an API and using it consistently. Otherwise you will fix this in the obvious way - and then cause a new bug for people who use a traditional tree view for their packages and are expecting Compile to operate recursively.
Requires chnge of: org.netbeans.modules.java.j2seproject.J2SEActionProvider (j2seproject) org.netbeans.modules.ant.freeform.Actions (freeform)
Created attachment 20738 [details] Diff file
Compile on package compiles only single level. If switched to tree package view, it compiles the subtree. Checking in src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java,v <-- J2SEActionProvider.java new revision: 1.39; previous revision: 1.38 done Checking in test/unit/src/org/netbeans/modules/java/j2seproject/J2SEActionProviderTest.java; /cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/J2SEActionProviderTest.java,v <-- J2SEActionProviderTest.java new revision: 1.9; previous revision: 1.8 done
Verified in dev-200504010747.