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 52749 - compile.single on j2seproject should do clean step first
Summary: compile.single on j2seproject should do clean step first
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL: http://www.netbeans.org/servlets/Read...
Keywords: RELNOTE
: 50282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-21 17:49 UTC by lordpixel
Modified: 2008-07-30 22:49 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lordpixel 2004-12-21 17:49:13 UTC
In Netbeans 3.X I could right click on a package
in the Files view and rebuild just that package.

In Netbeans 4.0 there are no build related options
in the right-click context menu when I select a
package folder in the Files or Projects views.

The Build menu in the Menubar does have a context
sensetive item "Compile <File>", where <File>
updates to show your current selection (this
should be in the right click menu too, BTW) but
this is only "Compile" not "Build" ie, there is no
context sensetive option to clean then compile.

This means if I have a package in my project where
 I have changed a class and I know other classes
in the package need to be rebuilt to account for
the changes (eg, because I'm getting
NoSuchMethodErrors when I try to run the code)
then there's no way I can find to rebuild just one
package.

The only option seens to be "Build->Clean and
Build Main Project", but this is unacceptable
because this project has 5000 source files and I
shouldn't have to wait several minutes when I know
which package I need to rebuild!
Comment 1 Jesse Glick 2005-01-07 22:27:00 UTC
I could have sworn this was already filed, but I have looked up and
down and cannot find the original. Anyway, it was suggested before
(somewhere?) to make compile.single on a j2seproject do a clean on the
file selection (s/\.java/.class/g) before running the compiler, which
should be straightforward. The actual Ant code to do it (as a
build.xml override) is in fact already known and I posted it somewhere
as a tip, but I can't remember where now.
Comment 2 Jesse Glick 2005-01-07 22:29:11 UTC
Note also that reporter is probably more interested in issue #36033
than the actual reported problem.
Comment 3 Jesse Glick 2005-01-07 23:11:32 UTC
Hah, found it - on netcat in response to Bryan Boone, who apparently
never filed an RFE for it, not sure why not. See URL.
Comment 4 Tomas Zezula 2005-01-11 08:07:20 UTC
The cleaning package before compiling it seems a good idea.
Comment 5 Jesse Glick 2005-01-25 21:46:14 UTC
Possible release note, in case we do not get a chance to actually fix
it for 4.1; easy workaround once you know how, see URL. Note that
exact text of overridden Ant target will change a bit (be more
complicated) if you use multiple source roots in 4.1. Will need to
draft an actual release note item in case this is still open by 4.1
high-resistance mode.
Comment 6 Jesse Glick 2005-10-04 00:15:14 UTC
Obviously not for 4.1.
Comment 7 Jesse Glick 2006-01-22 16:42:46 UTC
*** Issue 50282 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2008-07-30 22:49:04 UTC
I think this was fixed in 6.0 along with other changes in compile-single, and dependency tracking? Anyway this is not
too relevant in 6.5 with Compile on Save.