|
Re: setting the default PreferencePage in the PreferenceDialog [message #436003 is a reply to message #435359] |
Mon, 29 August 2005 14:50 |
Geoff Draper Messages: 34 Registered: July 2009 |
Member |
|
|
Here's one way I've found to do it:
PreferenceDialog dialog =3D PreferencesUtil.createPreferenceDialogOn(
null, ID_OF_DESIRED_PREFERENCE_PAGE, null, null);
dialog.open();
....where ID_OF_DESIRED_PREFERENCES_PAGE is the ID of the PreferencePage =
=
you want to open, as specified in the org.eclipse.ui.preferencePages =
extension point in plugin.xml. Also, if you have a convenient way of =
obtaining the correct Shell object (via getShell() for example) you can =
=
pass the Shell as the first argument of the createPreferenceDialogOn =
method. If not, passing null seems to work too.
On Mon, 15 Aug 2005 17:17:03 -0600, Geoff Draper <thirstynellan@yahoo.co=
m> =
wrote:
> Does anyone know of a way to specify programmatically which Preference=
=
> Page should be displayed first when the main Preference Dialog is =
> opened? It defaults to the one at the op of the list of Preferences =
> Pages, but is there a way to specify a different initial Preference Pa=
ge?
>
> It looks like it should be the =
> PreferenceDialog.setCurrentPage(IPreferencePage currentPage) method, b=
ut =
> how do I get a reference to the global PreferenceDialog object?
>
> Thanks,
> Geoff
|
|
|
Powered by
FUDForum. Page generated in 0.03383 seconds