Skip to main content



      Home
Home » Eclipse Projects » JFace » Open a JFace Dialog over another JFace Dialog
icon5.gif  Open a JFace Dialog over another JFace Dialog [message #1113654] Sat, 21 September 2013 09:19 Go to next message
Eclipse UserFriend
Hi,

I have a custom JFace Dialog (called PropertyDialog) which extends the FormDialog. I would like to open a modal message Dialog over the PropertryDialog as soon as it opens, to display a message to the user.

How could this be accomplished? Would I have to override the open() method? Note that it is required that the PropertyDialog.open() does not return until a button is pressed on the button bar.

Thanks for your help.

Regards,
Jayant
Re: Open a JFace Dialog over another JFace Dialog [message #1123078 is a reply to message #1113654] Wed, 02 October 2013 03:08 Go to previous message
Eclipse UserFriend
If you want to block the dialog I would not override the open method because you would have to open your dialog before calling super.open(). By that time the FormDialog shell has not yet been created and you need to show your MessageDialog over that shell. Instead you could simply add the follwing asyncExec to your implementation of createFormContent().

getShell().getDisplay().asyncExec(new Runnable() {
   @Override
   public void run() {
      MessageDialog.openInformation(getShell(), "Some Title", "Some info to the user");
   }
});


HTH
Thorsten
Previous Topic:Finding sub menu for a menu manager (Project Explorer)
Next Topic:Project Explorer Undo/Redo Operation
Goto Forum:
  


Current Time: Wed Jul 23 02:30:45 EDT 2025

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

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

Back to the top