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

Bug 380650

Summary: ProgressMonitorDialog does not support JEE mode
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: JFaceAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dave.smith
Version: 1.5   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2012-05-25 08:33:31 EDT
The ProgressMonitorDialog does not support the JEE mode because it uses the ModalContext internally.
Comment 1 Ralf Sternberg CLA 2015-10-01 11:13:07 EDT
Suggested solution: https://git.eclipse.org/r/#/c/57201/

With this change, it's possible to use ProgressMonitorDialog in JEE mode with some restrictions:
- the dialog must be set to non-blocking before run() is called
- the run does not block, but method returns immediately
- exceptions that occur in the given runnable cannot be thrown by the run method. Application code has to ensure that all exceptions are handled properly within the runnable.

This change of contracts feels a bit hacky (especially the part about exception handling). As an alternative, we could think about providing a utility to open JFace dialogs in JEE mode, similar to DialogUtil for SWT. In this case, exceptions could be provided by a dialog-close callback.

However, this seems like the simplest thing that can be done to enable compatibility with existing code.
Comment 2 Ivan Furnadjiev CLA 2015-10-27 05:55:29 EDT
*** Bug 443218 has been marked as a duplicate of this bug. ***
Comment 3 Ivan Furnadjiev CLA 2015-10-27 05:57:09 EDT
I'll mark this bug as fixed - Gerrit change has been merged to master.