[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Problem with showing popup messagein Custom Install Handler

Hi Gladyston,

I have tried with solution you have provided. With minor modification it
works fine to me.
I am thankful to you.

Thanks & Regards,
Hardik

-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx
[mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Gladyston
Sent: Thursday, August 21, 2008 8:35 PM
To: Equinox development mailing list
Subject: Re: *****SPAM***** [equinox-dev] Problem with showing popup
messagein Custom Install Handler

Hardik,

        You could Try this snippet:

        Display display = Display.getDefault();
        display.syncExec( new Runnable(){
            public void run() {
                Shell s = new Shell(display);
                MessageDialog dialog = new MessageDialog(s, "Message 
here", display.getSystemImage(SWT.ICON_WARNING), "some 
text",SWT.ICON_WARNING, new String[] { "OK" }, 0);
                dialog.setBlockOnOpen(true);
                dialog.open();
            }
        });

Regards,

Gladyston


Hardik Parikh wrote:
>
> Hello All,
>
>  
>
>    I am using Eclipse 3.3 for plug-in development. We have used Custom 
> Install Handler to customize plug-in installation for our requirement. 
> We wrote a InstallHandler with extending BaseInstallHandler class and 
> override completeInstall() and completeUninstall() methods. But we 
> want to display popup message to user during feature un-installation.
>
>  
>
> I have tried with MessageDialog.openInformation() in 
> completeUninstall() method but it throws NullPointerException while 
> executing getSystemImage() method of SWT class.
>
> I have also tried with ErrorDialong.openError()in completeUninstall() 
> method but it throws SWTException:Invalid Thread Access
>
> When tried with PopupDialog it requires parent shell that is not there 
> in InstallHandler code.
>
>  
>
> Please provide your valuable suggestion for implementation strategy.
>
>  
>
> Thanks & Regards,
>
> -Hardik
>
>  
>
> DISCLAIMER ========== This e-mail may contain privileged and 
> confidential information which is the property of Persistent Systems 
> Ltd. It is intended only for the use of the individual or entity to 
> which it is addressed. If you are not the intended recipient, you are 
> not authorized to read, retain, copy, print, distribute or use this 
> message. If you have received this communication in error, please 
> notify the sender and delete all copies of this message. Persistent 
> Systems Ltd. does not accept any liability for virus infected mails.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>   

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.