Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: *****SPAM***** [equinox-dev] Problem with showing popup message in 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



Back to the top