Bug 225582 - Provide API to get ModuleInfo by name
Provide API to get ModuleInfo by name
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Module System
7.3
PC Windows 7
: P2 (vote)
: 7.4
Assigned To: Jaroslav Tulach
issues@platform
: API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-31 09:13 UTC by Tomas Pavek
Modified: 2013-02-15 12:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Proposed findCodeNameBase method (5.87 KB, patch)
2013-02-04 09:30 UTC, Jaroslav Tulach
Details | Diff
Changes I'd like to integrate tomorrow (7.05 KB, patch)
2013-02-11 19:20 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2013-01-31 09:13:30 UTC
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
Comment 1 Tomas Pavek 2013-01-31 11:34:26 UTC
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.
Comment 2 Jaroslav Tulach 2013-02-04 09:30:31 UTC
Created attachment 130978 [details]
Proposed findCodeNameBase method

Y01 Add apichanges.xml note
Comment 3 Jaroslav Tulach 2013-02-04 10:50:01 UTC
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.
Comment 4 Jiri Rechtacek 2013-02-11 15:31:27 UTC
(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.
Comment 5 Jaroslav Tulach 2013-02-11 19:20:01 UTC
Created attachment 131261 [details]
Changes I'd like to integrate tomorrow
Comment 6 Jaroslav Tulach 2013-02-12 08:44:17 UTC
ergonomics#6a4a91385406
Comment 7 Jaroslav Tulach 2013-02-14 07:48:11 UTC
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
Comment 8 Quality Engineering 2013-02-15 12:43:44 UTC
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


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