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.
Summary: | <subprojects> not generated when adding folder output rather than JAR | ||
---|---|---|---|
Product: | java | Reporter: | Tomas Zezula <tzezula> |
Component: | Freeform | Assignee: | Tomas Zezula <tzezula> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | cberger, jglick |
Priority: | P3 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 58107 | ||
Bug Blocks: | |||
Attachments: | Patch for ARTIFACT_TYPE_FOLDER |
Description
Tomas Zezula
2005-04-11 16:28:01 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. 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). 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. I filed issue #57747 re. the second point. 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. I've changed the summary and the issue type. Since the <subproject> should already work but it doesn't. 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? 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. OK Created attachment 21776 [details]
Patch for ARTIFACT_TYPE_FOLDER
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 Issue dating back to 4.0, I guess. Just for reference. Marking this issue as VERIFIED since the issue reporter == issue owner. |