ExtensionTracker [message #86572] |
Thu, 12 April 2007 13:55 |
Paul Gardiner Messages: 94 Registered: July 2009 |
Member |
|
|
Is there any equivalent of a ServiceTracker but for extensions? There is
the ExtensionTracker in dynamichelpers, and registry change listeners in the
extension registry (my preference), but neither is very satisfying. In both
cases, I need to get the extensions, and then add a listener or create a
tracker. This is kind of messy, and opens up potential timing problems if
extensions are registered/deregistered between the time I get the
extensions, and the time I add a lister. Also, if I am doing some operation
each time an extension is registered, I need to do the same thing on the
extensions that were registered before I created my listener, so I need to
call the listener for each extension, or factor out a method I can call to
do the operation from multiple places. Either way, it's rather offensive.
The service tracker/service tracker customizer are easy to use, and
relatively fool proof. If something like this exists for extensions, please
let me know.
|
|
|
Re: ExtensionTracker [message #86586 is a reply to message #86572] |
Thu, 12 April 2007 15:23 |
Simon Kaegi Messages: 381 Registered: July 2009 |
Senior Member |
|
|
Hi Paul,
In "org.eclipse.equinox.http.registry" there's a class that might be what
you're klooking for. Take a look at
org.eclipse.equinox.http.registry.internal.ExtensionPointTra cker.
There's an old bug to look at making this API --
https://bugs.eclipse.org/bugs/show_bug.cgi?id=115257 -- that could use some
help in terms of validation. We're now past the 3.3 API freeze however for
3.4 this could be reasonable however I want to be sure we're covering the
main use-cases.
Any comments/suggestions?
-Simon
"Paul Gardiner" <pgardiner@syntellect.com> wrote in message
news:evldnv$ofn$1@build.eclipse.org...
> Is there any equivalent of a ServiceTracker but for extensions? There is
> the ExtensionTracker in dynamichelpers, and registry change listeners in
> the extension registry (my preference), but neither is very satisfying.
> In both cases, I need to get the extensions, and then add a listener or
> create a tracker. This is kind of messy, and opens up potential timing
> problems if extensions are registered/deregistered between the time I get
> the extensions, and the time I add a lister. Also, if I am doing some
> operation each time an extension is registered, I need to do the same
> thing on the extensions that were registered before I created my listener,
> so I need to call the listener for each extension, or factor out a method
> I can call to do the operation from multiple places. Either way, it's
> rather offensive.
>
> The service tracker/service tracker customizer are easy to use, and
> relatively fool proof. If something like this exists for extensions,
> please let me know.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02905 seconds