Bug 57733 - <subprojects> not generated when adding folder output rather than JAR
<subprojects> not generated when adding folder output rather than JAR
Status: CLOSED FIXED
Product: java
Classification: Unclassified
Component: Freeform
4.x
All All
: P3 (vote)
: 5.x
Assigned To: Tomas Zezula
issues@java
:
Depends on: 58107
Blocks:
  Show dependency treegraph
 
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
:


Attachments
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 http://www.netbeans.org/issues/show_bug.cgi?id=57656
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
OK
Comment 10 Tomas Zezula 2005-04-20 16:11:00 UTC
Created attachment 21776 [details]
Patch for ARTIFACT_TYPE_FOLDER
Comment 11 Tomas Zezula 2005-04-22 09:10:31 UTC
Checking in
freeform/src/org/netbeans/modules/java/freeform/JavaProjectGenerator.java;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/JavaProjectGenerator.java,v
 <--  JavaProjectGenerator.java
new revision: 1.5; previous revision: 1.4
done
Checking in freeform/src/org/netbeans/modules/java/freeform/ui/ProjectModel.java;
/cvs/java/freeform/src/org/netbeans/modules/java/freeform/ui/ProjectModel.java,v
 <--  ProjectModel.java
new revision: 1.9; previous revision: 1.8
done
Checking in
freeform/test/unit/src/org/netbeans/modules/java/freeform/JavaProjectGeneratorTest.java;
/cvs/java/freeform/test/unit/src/org/netbeans/modules/java/freeform/JavaProjectGeneratorTest.java,v
 <--  JavaProjectGeneratorTest.java
new revision: 1.6; previous revision: 1.5
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/LibrariesNode.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/LibrariesNode.java,v
 <--  LibrariesNode.java
new revision: 1.16; previous revision: 1.15
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/AntArtifactChooser.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/AntArtifactChooser.java,v
 <--  AntArtifactChooser.java
new revision: 1.13; previous revision: 1.12
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEClassPathUi.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEClassPathUi.java,v
 <--  J2SEClassPathUi.java
new revision: 1.8; previous revision: 1.7
done
Checking in project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.9; previous revision: 1.8
done
Checking in project/src/org/netbeans/api/java/project/JavaProjectConstants.java;
/cvs/java/project/src/org/netbeans/api/java/project/JavaProjectConstants.java,v
 <--  JavaProjectConstants.java
new revision: 1.6; previous revision: 1.5
done
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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo