Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:19 Go to next message
Jayant Gupta is currently offline Jayant GuptaFriend
Messages: 10
Registered: March 2012
Junior Member
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 07:08 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
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: Sat Apr 27 01:49:14 GMT 2024

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

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

Back to the top