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 57733 - <subprojects> not generated when adding folder output rather than JAR
Summary: <subprojects> not generated when adding folder output rather than JAR
Alias: None
Product: java
Classification: Unclassified
Component: Freeform (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
Depends on: 58107
  Show dependency tree
Reported: 2005-04-11 16:28 UTC by Tomas Zezula
Modified: 2006-03-24 10:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Patch for ARTIFACT_TYPE_FOLDER (20.26 KB, patch)
2005-04-20 16:11 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2005-04-11 16:28:01 UTC
Currently there is no way how to define project's subproject in the UI. This
makes refactoring or find usages hard to use in the freeform project.
There should be Add project action in the freeform project's customizer doing it.
Comment 1 Jesse Glick 2005-04-11 20:14:23 UTC
Nonsense - if you the output of project A in freeform project B's classpath, B
will automatically be marked as using A as a subproject. There is no need for a
special GUI for this. I don't know offhand why in issue #57656 <subprojects> was
not set up correctly, but it should have been - try to reproduce.

Also, refactoring functionality should *not* use <subprojects> (i.e.
SubprojectProvider), since this is just a GUI convention with no guaranteed
meaning. It should only pay attention to ClassPath (and SFBQ) to find the
relationships between source roots.
Comment 2 Martin Matula 2005-04-11 20:22:13 UTC
Refactoring is taking project dependencies into account to optimize the
performance (if you have 100 projects open and are searching for usages of
something that is declared in a small project that no other projects depend on,
we will search just that small project).
Comment 3 cberger 2005-04-11 20:24:09 UTC
you can look at
and download the first attachment. subprojects wasn't generated
by the IDE. but once I added it manually, then refactoring worked.
Comment 4 Jesse Glick 2005-04-11 20:26:12 UTC
I filed issue #57747 re. the second point.
Comment 5 Tomas Zezula 2005-04-12 13:11:37 UTC
Sorry Jesse, but the subprojects does not work for me. If it should be generated
automatically while adding an project output you can close this.
Comment 6 Tomas Zezula 2005-04-12 13:14:35 UTC
I've changed the summary and the issue type. Since the <subproject> should
already work but it doesn't.
Comment 7 Tomas Zezula 2005-04-12 15:28:48 UTC
The subprojects element is not generated because the subproject (also freeform
project) does not recognize its output and returns an empty array from the
ArtifactProvider.getBuildArtifacts (). The reason is that the export element is
written only in case when the project output is a jar archive (ends with .jar).
If it is a folder the export element is not generated.

The question is should be folder supported as output? If so, what export type
should it have?
Comment 8 Jesse Glick 2005-04-12 18:02:19 UTC
I guess we could add a JavaProjectConstants.ARTIFACT_TYPE_FOLDER for this case.
It never came up before because j2seproject's only export JARs as artifacts. But
there is nothing wrong with exporting a folder containing *.class from a
freeform project to another project; in fact we may want to support this option
for j2seprojects too (issue #46721). If you agree, try to come up with a working
patch for freeform projects at least, and send to apireviews.
Comment 9 Tomas Zezula 2005-04-13 08:35:50 UTC
Comment 10 Tomas Zezula 2005-04-20 16:11:00 UTC
Created attachment 21776 [details]
Comment 11 Tomas Zezula 2005-04-22 09:10:31 UTC
Checking in
new revision: 1.5; previous revision: 1.4
Checking in freeform/src/org/netbeans/modules/java/freeform/ui/;
new revision: 1.9; previous revision: 1.8
Checking in
new revision: 1.6; previous revision: 1.5
Checking in
new revision: 1.16; previous revision: 1.15
Checking in
new revision: 1.13; previous revision: 1.12
Checking in
new revision: 1.8; previous revision: 1.7
Checking in project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.9; previous revision: 1.8
Checking in project/src/org/netbeans/api/java/project/;
new revision: 1.6; previous revision: 1.5
Comment 12 Jesse Glick 2005-04-22 16:59:46 UTC
Issue dating back to 4.0, I guess. Just for reference.
Comment 13 Jaromir Uhrik 2006-01-18 10:46:57 UTC
Marking this issue as VERIFIED since the issue reporter == issue owner.