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 51132 - Compile Package on <default package> compiles whole src tree
Summary: Compile Package on <default package> compiles whole src tree
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on: 52271 56127
Blocks: 56772
  Show dependency tree
 
Reported: 2004-11-03 15:32 UTC by Milan Kubec
Modified: 2006-03-24 10:04 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff file (7.59 KB, patch)
2005-03-10 10:43 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2004-11-03 15:32:14 UTC
[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.
Comment 1 Jesse Glick 2004-11-08 21:44:14 UTC
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/**").
Comment 2 Tomas Zezula 2004-11-09 15:28:46 UTC
It was designed to compile whole subtree **.
But it can be changed to *. I have no strong opinion concerning this.
Comment 3 Jesse Glick 2004-11-09 23:37:56 UTC
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.
Comment 4 Tomas Zezula 2005-02-11 11:48:37 UTC
Requires chnge of:
org.netbeans.modules.java.j2seproject.J2SEActionProvider (j2seproject)
org.netbeans.modules.ant.freeform.Actions (freeform)
Comment 5 Tomas Zezula 2005-03-10 10:43:11 UTC
Created attachment 20738 [details]
Diff file
Comment 6 Tomas Zezula 2005-03-22 08:02:49 UTC
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
Comment 7 Milan Kubec 2005-04-01 10:29:59 UTC
Verified in dev-200504010747.