Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » setting the default PreferencePage in the PreferenceDialog
setting the default PreferencePage in the PreferenceDialog [message #435359] Mon, 15 August 2005 23:17 Go to next message
Geoff Draper is currently offline Geoff DraperFriend
Messages: 34
Registered: July 2009
Member
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 i=
s =

there a way to specify a different initial Preference Page?

It looks like it should be the =

PreferenceDialog.setCurrentPage(IPreferencePage currentPage) method, but=
=

how do I get a reference to the global PreferenceDialog object?

Thanks,
Geoff
Re: setting the default PreferencePage in the PreferenceDialog [message #436003 is a reply to message #435359] Mon, 29 August 2005 14:50 Go to previous message
Geoff Draper is currently offline Geoff DraperFriend
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
Previous Topic:Providing context help
Next Topic:Automated GUI-Tests: Abbot? The Eclipse Test Framework?
Goto Forum:
  


Current Time: Fri Dec 27 01:46:12 GMT 2024

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

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

Back to the top