Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dynamic Preference Pages and IExtensionRegistry
Dynamic Preference Pages and IExtensionRegistry [message #251973] Fri, 11 June 2004 21:45 Go to next message
Eclipse UserFriend
Originally posted by: rhill2_._free.fr

hi-

i refine here my question from some days back (reformulating it slighty
differently).

i want to dynamically add
some preference pages, based on informations provided via a custom
extension point.

im able to statically add pages via
getWorkbench().getPreferenceManager() but the question is
when to call the addTo() method. indeed the informations displayed in
those dynamic pages are to be read from the plugin descriptor.

to exercise the api ive tried to call it from the start() method but it
seems the descriptor is not yet parsed at that time because
Platform.getExtensionRegistry().getExtension(myExtensionId) is null.
however this seems normal since the plugin isnot yet loaded in the
registry.

i then tried to listen to registry event using
IRegistryChangeListener#registryChanged() with no success (a syserr
doesnot even produce any output).

so questions are :

1. how to listen properly to the registry ?
2. when to add preference pages ? (also is the registry thingie not a
bit biased ?)

thanks for your help,

-- gd
[solved] Dynamic Preference Pages and IExtensionRegistry [message #252082 is a reply to message #251973] Sat, 12 June 2004 18:18 Go to previous message
Eclipse UserFriend
Originally posted by: rhill2_._free.fr

> 1. how to listen properly to the registry ?
> 2. when to add preference pages ? (also is the registry thingie not a
> bit biased ?)


not very sure about the first point because i dont listen to the
extension registry anymore. Indeed i dont know why it gave me troubles
but adding pages within the start() method of the Plugin seems to works
fine.

so in case someone is interested, in the start() i just lookup the
IExtensionPoint by id, and grab all necessary IConfigurationElements.
not sure this is best way to do this but it fills my need.

the only thing that worries me is that to do what i want i need to
create instances of PreferencePage ; so dependencing of the use of this
extension points, it could slow down the startup of the plugin (i cannot
just create IPreferenceNode here).

regards,

-- gd
Previous Topic:Class not found exception in Cheatsheet
Next Topic:How to publish a plug-in
Goto Forum:
  


Current Time: Thu Jul 25 13:40:46 GMT 2024

Powered by FUDForum. Page generated in 0.03829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top