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.
Now that the is a way to generate deps.txt and impl-deps.txt it would be great is the import type of APIs could be generated automatically. The would at least cover the java group. It is too hard to maintain the arch docs and too easy to forget (unlike the golden files which fire broken build if not updated:-)
Best to take impl deps from project.xml too.
*** Issue 55586 has been marked as a duplicate of this issue. ***
Created attachment 23067 [details] Nearly done, just uses wrong API names and stability
Created attachment 23068 [details] Example of the generated dependencies
I have 'nearly' finished the task. I am able to read the nbproject/project.xml file and use XSLT to generate <defaultanswer/> to any arch question. There are just two problems: 1. the names of modules one depend on use code-name-base which is not right, they should be the human names like FilesystemsAPI, etc. 2. the stability category is always 'devel', as I have not found a way how to get the right one So 'nearly' finished, but when really done, is uncertain.
Re. problem #1 - no suggestions beyond hardcoding a list of names, or computing them from loc display name and passing them in to the XSLT script in an XML document generated by some special Ant task. Note that names like "FilesystemsAPI" are no longer used anywhere else in docs and could probably just be removed; use either code name base, or localized module display name. Re #2 - actually I could never figure out what stability level you were supposed to be using anyway. How do you know? The module dependency is unambiguous, but the arch files don't really make it clear what the differences are. Maybe you could mechanically distinguish between and map to arch levels: use of public API (spec version dep); use of friend API (target has <friend>s); use of impl dep.
I guess I solved the problem. I am generating a properties file with arch.code.name.base.name= and arch.code.name.base.category= with most stable java api for all modules with javadoc. arch-default-dep-nb.xml is then using this info from (in memory) modified project.xml to find the right api-name and api-category. Seems to work relatively well. cvs ci -m "#53826: project.xml is used to generate defaultanswer to dep-nb question. Just use <defaultanswer generate='here'/> to generate <api/> tags based on your dependencies in project.xml. Also I added new question arch-where that should point to WebCVS with sources (also has defaultanswer) and modified the overview template to not include the imported apis" Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml,v <-- Arch-api-questions.xml new revision: 1.35; previous revision: 1.34 done RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl,v done Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl,v <-- Arch-default-arch-where.xsl initial revision: 1.1 done RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl,v done Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl,v <-- Arch-default-dep-nb.xsl initial revision: 1.1 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd,v <-- Arch.dtd new revision: 1.18; previous revision: 1.17 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.java,v <-- Arch.java new revision: 1.36; previous revision: 1.35 done Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl,v <-- Arch.xsl new revision: 1.26; previous revision: 1.25 done RCS file: /cvs/nbbuild/javadoctools/exportInterfaceProperties.xsl,v done Checking in nbbuild/javadoctools/exportInterfaceProperties.xsl; /cvs/nbbuild/javadoctools/exportInterfaceProperties.xsl,v <-- exportInterfaceProperties.xsl initial revision: 1.1 done Checking in nbbuild/javadoctools/exportOverview.xsl; /cvs/nbbuild/javadoctools/exportOverview.xsl,v <-- exportOverview.xsl new revision: 1.3; previous revision: 1.2 done Checking in nbbuild/javadoctools/template.xml; /cvs/nbbuild/javadoctools/template.xml,v <-- template.xml new revision: 1.50; previous revision: 1.49 done Checking in nbbuild/templates/projectized.xml; /cvs/nbbuild/templates/projectized.xml,v <-- projectized.xml new revision: 1.57; previous revision: 1.56 done Checking in nbbuild/test/unit/src/org/netbeans/nbbuild/ArchQuestionsTest.java; /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/ArchQuestionsTest.java,v <-- ArchQuestionsTest.java new revision: 1.4; previous revision: 1.3 done Checking in ant/project/arch.xml; /cvs/ant/project/arch.xml,v <-- arch.xml new revision: 1.11; previous revision: 1.10 done Checking in editor/build.xml; /cvs/editor/build.xml,v <-- build.xml new revision: 1.58; previous revision: 1.57