Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » eRCP » call PreferencePage(s) from MultipageDialog
call PreferencePage(s) from MultipageDialog [message #1724] Sat, 18 July 2009 10:25 Go to next message
Eclipse UserFriend
Originally posted by: martin.zehetner.fh-hagenberg.at

Hello,

Short question:
Is it possible to call the PreferenceCommand, which is added
automatically to the Commands (when org.eclipse.ui.preferencePages
Extenision is added), programatically???

My Application "runs" in a MultipageDialog ... and i wand to add a
command which opens the preferences Dialog.

Thanks,
Martin
Re: call PreferencePage(s) from MultipageDialog [message #479011 is a reply to message #1724] Sat, 08 August 2009 01:01 Go to previous message
Mark Rogalski is currently offline Mark RogalskiFriend
Messages: 201
Registered: July 2009
Senior Member
Yes, it is possible to invoke the Preferences dialog programatically. There
is an API in the workbench. Try:

import org.eclipse.jface.preference.PreferenceDialog;

import org.eclipse.ui.dialogs.PreferencesUtil;

referenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null,
currentPrefPage, null, null);

dialog.open();

where currentPrefPage is the id of the preference page you wan to display.



"Martin Zehetner" <martin.zehetner@fh-hagenberg.at> wrote in message
news:h3s7vj$6v3$1@build.eclipse.org...
> Hello,
>
> Short question:
> Is it possible to call the PreferenceCommand, which is added automatically
> to the Commands (when org.eclipse.ui.preferencePages Extenision is added),
> programatically???
>
> My Application "runs" in a MultipageDialog ... and i wand to add a command
> which opens the preferences Dialog.
>
> Thanks,
> Martin
Re: call PreferencePage(s) from MultipageDialog [message #563610 is a reply to message #1724] Sat, 08 August 2009 01:01 Go to previous message
Mark Rogalski is currently offline Mark RogalskiFriend
Messages: 201
Registered: July 2009
Senior Member
Yes, it is possible to invoke the Preferences dialog programatically. There
is an API in the workbench. Try:

import org.eclipse.jface.preference.PreferenceDialog;

import org.eclipse.ui.dialogs.PreferencesUtil;

referenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null,
currentPrefPage, null, null);

dialog.open();

where currentPrefPage is the id of the preference page you wan to display.



"Martin Zehetner" <martin.zehetner@fh-hagenberg.at> wrote in message
news:h3s7vj$6v3$1@build.eclipse.org...
> Hello,
>
> Short question:
> Is it possible to call the PreferenceCommand, which is added automatically
> to the Commands (when org.eclipse.ui.preferencePages Extenision is added),
> programatically???
>
> My Application "runs" in a MultipageDialog ... and i wand to add a command
> which opens the preferences Dialog.
>
> Thanks,
> Martin
Previous Topic:eRCP 1.3 Released
Next Topic:eRCP and e4 and Android
Goto Forum:
  


Current Time: Tue Mar 19 05:07:49 GMT 2024

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

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

Back to the top