Bug 130655 - [registry] Requesting to have IExtensionDelta provide more information
Summary: [registry] Requesting to have IExtensionDelta provide more information
Status: RESOLVED DUPLICATE of bug 206936
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2006-03-06 17:17 EST by Janek Lasocki-Biczysko CLA
Modified: 2007-11-12 11:53 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janek Lasocki-Biczysko CLA 2006-03-06 17:17:03 EST
Currently IExtensionDelta indicates which IExtension and IExtensionPoint are being affected by the modification and whether the modification is an addition or removal.

It would be very convenient to know specifically which of the two (IExtension vs IExtensionPoint) are actually being modified.
Consider a registry with one extension point and one contributing extension.
Removing either the extension or the extension point will fire an event with some IExtensionDelta.  Looking at the delta there is no way of telling if its the extension or the extension point which is being removed.
Comment 1 Thomas Watson CLA 2006-04-09 17:01:11 EDT
Moving out of NEW inbox.

Thoughts on this?  Is it needed?  Are there scenarios where the extension needs to know that its extension point is going away?  I think the typical case is the extension point needing to listen for when extensions come and go.  In this case an extension point does not care if it has gone away because it no longer exists.

On a side note, what does the registry do to listeners from a bundle that becomes unresolved?  I think it must flush such listeners from the listener list.
Comment 2 Thomas Watson CLA 2006-04-09 17:02:06 EDT
cc'ing Pascal for comment.
Comment 3 BJ Hargrave CLA 2006-04-09 19:23:26 EDT
(In reply to comment #1)
> On a side note, what does the registry do to listeners from a bundle that
> becomes unresolved?  I think it must flush such listeners from the listener
> list.
> 

You should look at the org.eclipse.osgi.framework.eventmgr package. It is design to manage listener list in the face of bundle removal.
Comment 4 Pascal Rapicault CLA 2006-04-09 21:04:50 EDT
>On a side note, what does the registry do to listeners from a bundle that
>becomes unresolved?  I think it must flush such listeners from the listener
>list.
  What you are suggesting here is that non active bundles can have registered some listeners. This is not something we usually encounter in eclipse since most bundles are automatically starting and stopping and doing listener registration on  those operations.
That said it is still interesting.

BJ could you please detail more on how this package would help? Maybe even provide a patch.
Comment 5 Thomas Watson CLA 2006-04-10 09:17:29 EDT
Janek, Sorry for highjacking this bug.  I opened bug 135863 to discuss handling proper listener cleanup.  Anyone have thoughts on my other comments in comment 1?  Do we need more information on IExtensionDelta?
Comment 6 Oleg Besedin CLA 2006-04-10 09:33:21 EDT
Yes, I agree with Janek that such functionality is needed. It is not very interesting in the traditional scenario where lifecycle of extension/extension points is determined by the contributing bundle, but it makes a lot of sense for dynamic contributions. 

I think that this is something we should adress in 3.3.
Comment 7 Thomas Watson CLA 2006-04-10 09:52:06 EDT
marking for 3.3
Comment 8 Janek Lasocki-Biczysko CLA 2006-04-10 10:06:45 EDT
Hi again and thanks for your feedback,
the reason I opened up this defect is because of recent cleanup/migration of the Registry View.  We planned on having a fully dynamic view that would update to any changes detected in the registry.  This specific piece of information is required for the view to be correctly updated when an extension / extension-point is removed.
Comment 9 Janek Lasocki-Biczysko CLA 2006-04-10 16:20:57 EDT
Hello again, 
PDE has no problem leaving this for 3.3 (especially since we are so late in the development cycle). Unblocking - we will workaround on our end.
Thanks
Comment 10 Janek Lasocki-Biczysko CLA 2007-08-31 12:38:40 EDT
Any plans for this to be addressed in 3.4?
Comment 11 Oleg Besedin CLA 2007-08-31 13:41:51 EDT
Yes, the intent is to have this fixed in 3.4.
Comment 12 Janek Lasocki-Biczysko CLA 2007-09-10 15:56:51 EDT
Good to hear.
Additionally, I have a quick question:
My IRegistryChangeListener gets notified upon Extension addition/removal, is it possible to also receive notifications for any changes to Extension Points. (If I have an extenion point with no extensions and I add it/remove it during runtime, no notifications get fired).
Comment 13 Oleg Besedin CLA 2007-09-10 16:13:23 EDT
If that is still the case, yes, most certainly. There is a fix for a similar problem (in that case for extensions with no configuration elements) done in the bug 178028.
Comment 14 Oleg Besedin CLA 2007-11-12 11:53:52 EST
The original listener mechanism was not designed to propagate changes to extension points. As a part of more generic solution in the bug 206936 an IRegistryEventListener has been added to track modifications to extensions and extension points. 


*** This bug has been marked as a duplicate of bug 206936 ***