|
|
Re: SafeRunnerDialog and modality [message #326892 is a reply to message #326649] |
Wed, 02 April 2008 16:56 |
Boris Bokowski Messages: 272 Registered: July 2009 |
Senior Member |
|
|
Try StatusManager.getManager().handle(status, StatusManager.SHOW). Usually,
it is not a good idea to open a modal dialog (error dialog or not) from deep
down in your code, because this will run the event loop and therefore any
asyncExecs that may be queued up. These asyncExecs could then change your
environment in drastic ways - for example, think about the case where the
update manager has finished installing new plug-ins and prompts you to
restart the workbench.
Boris
"David Perez" <craquerpro@yahoo.es> wrote in message
news:cd61b897bc7575fa38b10845143a5c8d$1@www.eclipse.org...
> Is there any better alternative to show exceptions to the end user in a
> modal dialog?
>
> David Perez wrote:
>
>> In a preference page, I have this code to show possible exceptions to the
>> end user:
>
>> SafeRunnable.run(new SafeRunnable() {
>> public void run() throws Exception {
>> ....
>> });
>> }
>
>> The preference page is inside the preferences dialog, which is modal.
>
>> The problem is that the SafeRunnableDialog appears disabled and behind
>> the preferences dialog.
>
>> The cause is probably that the parent of the notifying dialog is the mian
>> workbench window, instead of the preferences dialog.
>
>> I'm using Eclipse 3.3.2, Java 1.6 and Windows XP.
>
>> It's impossible for me to solve this from my plugin, as the
>> SafeRunnableDialog is not public, unless I duplicate all the code.
>> If accessible, maybe I could try SafeRunnableDialog.configureShell()
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03409 seconds