Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 198389

Summary: [MessageBox] MessageBox missing
Product: [RT] RAP Reporter: Frank Gerhardt <fg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: b.muskalla, caniszczyk, ivan
Version: 1.0Keywords: plan
Target Milestone: 1.2 M2   
Hardware: All   
OS: All   
Whiteboard: plan-version=1.2 plan-theme=extend-rwt plan-status=committed
Attachments:
Description Flags
First implementation
none
JUnit tests added. none

Description Frank Gerhardt CLA 2007-07-31 09:08:10 EDT
It is surprising that it is missing because it's part of the SWT API.

Benny wrote: 
"you can use the ErrorDialog of JFace to show something like a MessageDialog but also with informations of an IStats object.

Try something like this:

Exception e = new NullPointerException();
IStatus s = new Status(IStatus.WARNING, "foo.nar", "foooo", e);
ErrorDialog ed = new ErrorDialog(window.getShell(), "foo",
                "bar", s, Status.WARNING);
ed.open(null); "
Comment 1 Benjamin Muskalla CLA 2007-07-31 09:25:13 EDT
As RWT is only a subset of SWT, we can't provide everything SWT does.
Furthermore is the JFace MessageDialog much more flexible than the SWT MessageBox.
But I don't understand why you posted this quote?

As MessageBox is a legal feature request, I'll let this one open but I don't think that we can solve it before 1.0
Comment 2 Ivan Furnadjiev CLA 2008-03-31 14:12:37 EDT
Already implemented in latest version.
Comment 3 Ralf Sternberg CLA 2008-03-31 16:10:55 EDT
 (In reply to comment #2)
> Already implemented in latest version.
That's news to me ;-) Ivan, sure you didn't mix up MessageBox (SWT) and MessageDialog (JFace)? The latter is implemented in RAP.
Comment 4 Ivan Furnadjiev CLA 2008-04-01 03:10:14 EDT
I try the above snippet in RAP... and it's working without problem.
Comment 5 Benjamin Muskalla CLA 2008-04-01 03:55:27 EDT
The code above is a quote of me from the newsgroups. It should show an alternative to the MessageBox. (ErrorDialog is a JFace dialog).

This bug is about the pure SWT MessageBox (see http://help.eclipse.org/stable/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/MessageBox.html)
Comment 6 Ivan Furnadjiev CLA 2008-08-15 05:12:02 EDT
Created attachment 110081 [details]
First implementation
Comment 7 Ivan Furnadjiev CLA 2008-09-04 09:53:07 EDT
Created attachment 111669 [details]
JUnit tests added.
Comment 8 Ivan Furnadjiev CLA 2008-09-08 15:23:14 EDT
MessageBox is added to CVS HEAD.