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.
Per recent discussion on dev@openide - for folks who want to provide actions or other UI parts only in certain situations (user is authenticated, etc.), a likely solution would be to allow dynamic adding/removing of the module's layer (or a portion of it). I think there was an issue like this once, called "Allow modules to participate..." in something or other, but could not find it. The attached patch is a sketch of what could be done - notably missing is sorting - the dynamic layer should be ordered immediately after the module's normal XML layer, and currently it does not attempt that, but it wouldn't be hard to add.
Created attachment 38851 [details] Patch to openide/fs adding API for dynamic layers & to core/startup to use it when assembling module layers
Created attachment 38852 [details] Zip file containing API class added to filesystems API and example module in platform/samples
Searching IZ for subject containing "participate" gives only three hits, one of them right. *** This issue has been marked as a duplicate of 26338 ***
No tests - not ready for integration.
So modify your patch to allow enablement/disablement. We both know what it's supposed to do. I'm glad you have tests for your patch - mine is almost identical, and they can be easily adapted, so it doesn't matter so much - I'm not going to integrate anything here or anywhere else without tests, of course. The important question is, is the ability to dynamically insert and remove a module's layer an important part of this enhancement request, or a non-interesting side-note. Other than that our patches are almost identical.