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 45888 - No way to compile only one package in a j2seproject
Summary: No way to compile only one package in a j2seproject
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
: 47790 (view as bug list)
Depends on:
Blocks: 41537
  Show dependency tree
Reported: 2004-07-07 07:41 UTC by tboerkel
Modified: 2004-10-19 08:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Screen Shot (14.46 KB, image/jpeg)
2004-10-18 14:54 UTC, Tomas Zezula

Note You need to log in before you can comment on or make changes to this bug.
Description tboerkel 2004-07-07 07:41:43 UTC
In NB 3.6, we could compile or build one package.
There were compile and build items in the package
context menu. This is not possible anymore with NB
4.0, but is much needed.
Comment 1 Milan Kubec 2004-07-12 08:19:05 UTC
Reassigning for evaluation.
Comment 2 Jesse Glick 2004-07-12 21:59:30 UTC
Don't think the UI spec ever provided for enabling F9 on a folder in a
source root, but it would be easy enough to do AFAIK - just set
javac.includes to e.g. "org/foo/pjg/". Don't consider this important
since F9 itself was only really intended as a quick way to
syntax-check a single file open in the editor; F11 (Build Project)
remains the canonical way to compile.
Comment 3 tboerkel 2004-07-13 06:45:53 UTC
Building the whole app takes longer, even without cleaning before,
because NB has to look, which files changed (we have >1700 Java sources).
If I am sure, that I only want that package, then it should be
possible to compile or build (both was possible in NB 3.6) only one
Also, build should come back for a single file (only compile possible
Comment 4 Jesse Glick 2004-07-14 18:40:01 UTC
No intention of reintroducing an action such as Clean & Build File.
Comment 5 tboerkel 2004-07-15 07:04:14 UTC
I have another advantage for the build only one package action:
In our company, every developer "owns" one or more packages. If you
want to see, what's deprecated only in "your" package, you switch
deprecated warnings on and build only "your" package.
Comment 6 Jesse Glick 2004-07-15 23:32:01 UTC
Yes, could be useful in such a setup... though for new code I would
almost certainly recommend that each of those code modules be made
into a separate project, under the assumption they are separated
functionally and have controlled interdependencies. Not an option for
existing code unless you are willing to move versioned files around
and fool with any existing build scripts, however.
Comment 7 Jesse Glick 2004-08-25 00:03:03 UTC
*** Issue 47790 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2004-09-28 15:45:36 UTC
Should be fixable for 4.0.
Comment 9 jensbruhn 2004-10-01 14:31:45 UTC
one more reason to fix thisone:
we have a package with own text components, which we use in the form
editor. if we are using the form editor, we need these text components
to be compiled.

so even if there are other classes which are not able to compile, we
need the possibility to compile only the package with our text components.
Comment 10 Tomas Zezula 2004-10-07 10:10:23 UTC
Checking in
new revision: 1.5; previous revision: 1.4
Processing log script arguments...
More commits to come...
Checking in
new revision: 1.28; previous revision: 1.27
Processing log script arguments...
More commits to come...
Checking in
new revision: 1.7; previous revision: 1.6
Checking in
new revision: 1.43; previous revision: 1.42
Comment 11 Jesse Glick 2004-10-07 15:13:40 UTC
Pavel check if web/project needs a similar fix...
Comment 12 tboerkel 2004-10-15 07:37:19 UTC
It's only available in the build menu, not in the context menu of the
package. Could you please implement it there, too?

Also, there is only the compile option. But to see, what's deprecated
in this package, the classes first have to be deleted, otherwise only
the changed sources are being compiled. So, a clean+compile option is
Comment 13 Tomas Zezula 2004-10-15 10:55:49 UTC
The action is also in the package pop up menu as "Compile Package" and
can be invoked by "F8".
The clean and build package is a bit strange.
The deprecation should be handled by task list and not by build system.
Jano, what you do you think about it?
Comment 14 tboerkel 2004-10-15 11:46:42 UTC
Since which build? I do not have it in the package popup menu. Not in
the project tab and not in the files tab.
Comment 15 tboerkel 2004-10-15 11:50:40 UTC
Regarding the "need" for clean + build: This was possible in NB 3.6.
It was called "build" then. See original description here.
Comment 16 Jesse Glick 2004-10-15 20:07:30 UTC
It does what it is currently supposed to do (Thomas get a current
build to see), which is compile the package, i.e. whatever files in it
are not yet compiled. Ability to either have a separate Clean & Build
{Files | Package} action, or to make the current Compile {Files |
Package} action do a clean first, is a reasonable RFE for a future
release, but please file it *separately* because this is fixed.
Comment 17 tboerkel 2004-10-18 13:46:38 UTC
It's still not in the context menu in build 20041017, only in the
build menu.

The ORIGINAL Summary was "No way to build or compile only one
package". Someone altered it to only "compile".
Comment 18 Tomas Zezula 2004-10-18 14:53:38 UTC
1) It is in a context menu of pacakge. In the logical view select
package. The third action is "Compile Package F9".
See attached image.

2) Agree with Jesse.
Comment 19 Tomas Zezula 2004-10-18 14:54:53 UTC
Created attachment 18359 [details]
Screen Shot
Comment 20 tboerkel 2004-10-18 15:05:52 UTC
OK, I got it. I am using
and then it's not in the context menu.

Also, it is not in the context menu, if you are in the "Files" tab.
Comment 21 Jesse Glick 2004-10-18 20:37:11 UTC
If you have USE_TREE_VIEW=true we just use the same appearance as the
Files tab. I think there is no need for a special context menu here.
The KB shortcut works in any case. The UI is only specified for the
regular package view for 4.0; USE_TREE_VIEW is unsupported.

The item, along with many other project-oriented things, is
intentionally not shown in the Files tab.

BTW Tomas does F9 now compile subpackages? Or only files directly in
the package?
Comment 22 Tomas Zezula 2004-10-19 08:12:14 UTC
The "Compile Package" action compiles files and subpackages.