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.
Please provide API to obtain ModuleInfo for given code name base. It would be much more convenient and efficient than the currentl (only possible) way of looking up all ModuleInfos and iterating through them. Seems org.openide.modules.Modules could be extended in a compatible way for this purpose. Thanks
We need this in JDev startup when looking for extension.xml files in dependent modules. This is done via OSGi API, but BundleDescription.getRequiredBundles() does not return dependencies of NetBeans modules. So NetBeans module system API needs to be used here. Getting from Dependency to ModuleInfo by collecting all ModuleInfos and iterating through them is needlessly inefficient and also leads to unwanted disk touches during startup.
Created attachment 130978 [details] Proposed findCodeNameBase method Y01 Add apichanges.xml note
Btw. I am also considering to support add/removeModuleListener. I know there are various places in the NetBeans platform that want to be notified when a set of enabled modules changes (settings, ide.ergonomics, maven). I don't want to tight and delay Tomáš's API request due to the listener support, but if simple, I'd like to implement it.
(In reply to comment #1) > We need this in JDev startup when looking for extension.xml files in dependent > modules. This is done via OSGi API, but BundleDescription.getRequiredBundles() > does not return dependencies of NetBeans modules. So NetBeans module system API > needs to be used here. Getting from Dependency to ModuleInfo by collecting all > ModuleInfos and iterating through them is needlessly inefficient and also leads > to unwanted disk touches during startup. Also Autoupdate Services could benefit from that API.
Created attachment 131261 [details] Changes I'd like to integrate tomorrow
ergonomics#6a4a91385406
changeset: a9d2d3b01c57 branch: jdev_abrams tag: tip parent: 7ea2f01b3e96 parent: 6a4a91385406 user: Jaroslav Tulach <jtulach@netbeans.org> date: Thu Feb 14 08:42:06 2013 +0100 summary: Merge of #225582 for use in JDeveloper
Integrated into 'main-golden', will be available in build *201302150954* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6a4a91385406 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #225582: Get ModuleInfo for code name base easily now