-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
The progress monitor that is shown when switching to the Design page is run in the UI thread and therefore blocks the internal refresh of the dialog. The result is as such:
We need to investigate what parts of the IRunnableWithProgress need to be run in the UI thread and what can be done in a separate thread. We also needs to make sure that we only switch to the Design page, once the runnable has completed.
windowbuilder/org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/editor/DesignPage.java
Lines 454 to 482 in d650c20
| IRunnableWithProgress runnable = new IRunnableWithProgress() { | |
| @Override | |
| public void run(final IProgressMonitor monitor) throws InvocationTargetException, | |
| InterruptedException { | |
| monitor.beginTask("Opening Design page.", 7); | |
| // | |
| try { | |
| DesignPageSite.setProgressMonitor(monitor); | |
| display.syncExec(new Runnable() { | |
| @Override | |
| public void run() { | |
| try { | |
| internal_refreshGEF(monitor); | |
| } catch (Throwable e) { | |
| ReflectionUtils.propagate(e); | |
| } | |
| } | |
| }); | |
| } catch (Throwable e) { | |
| ReflectionUtils.propagate(e); | |
| } finally { | |
| DesignPageSite.setProgressMonitor(null); | |
| } | |
| // | |
| monitor.done(); | |
| } | |
| }; | |
| try { | |
| new ProgressMonitorDialog(DesignerPlugin.getShell()).run(false, false, runnable); |
Bonus points if we can remove those dreadful IProgressMonitor methods in the DesignPageSite class.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
