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.

Bug 96404

Summary: Allow modules to dynamically add/remove layer content
Product: platform Reporter: _ tboudreau <tboudreau>
Component: -- Other --Assignee: issues@platform <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: hmichel
Priority: P3 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Patch to openide/fs adding API for dynamic layers & to core/startup to use it when assembling module layers
Zip file containing API class added to filesystems API and example module in platform/samples

Description _ tboudreau 2007-02-23 05:06:18 UTC
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.
Comment 1 _ tboudreau 2007-02-23 05:07:08 UTC
Created attachment 38851 [details]
Patch to openide/fs adding API for dynamic layers & to core/startup to use it when assembling module layers
Comment 2 _ tboudreau 2007-02-23 05:07:54 UTC
Created attachment 38852 [details]
Zip file containing API class added to filesystems API and example module in platform/samples
Comment 3 Jesse Glick 2007-02-23 22:41:30 UTC
Searching IZ for subject containing "participate" gives only three hits, one of
them right.

*** This issue has been marked as a duplicate of 26338 ***
Comment 4 Jaroslav Tulach 2007-02-24 08:10:52 UTC
No tests - not ready for integration.
Comment 5 _ tboudreau 2007-02-24 11:18:37 UTC
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.