|
68 | 68 | import org.eclipse.swt.widgets.Button;
|
69 | 69 | import org.eclipse.swt.widgets.Composite;
|
70 | 70 | import org.eclipse.swt.widgets.Control;
|
| 71 | +import org.eclipse.swt.widgets.Display; |
71 | 72 | import org.eclipse.swt.widgets.Label;
|
72 | 73 | import org.eclipse.ui.IWorkbench;
|
73 | 74 | import org.eclipse.ui.IWorkbenchPreferenceConstants;
|
@@ -241,7 +242,6 @@ protected void createEnableMruPref(Composite composite) {
|
241 | 242 | enableMru = createCheckButton(composite, WorkbenchMessages.ViewsPreference_enableMRU, actualValue);
|
242 | 243 | }
|
243 | 244 |
|
244 |
| - |
245 | 245 | /** @return the currently selected theme or null if there are no themes */
|
246 | 246 | private ITheme getSelectedTheme() {
|
247 | 247 | return (ITheme) (themeIdCombo.getStructuredSelection().getFirstElement());
|
@@ -314,11 +314,10 @@ public boolean performOk() {
|
314 | 314 | */
|
315 | 315 | private void showRestartDialog() {
|
316 | 316 | if (new MessageDialog(null, WorkbenchMessages.ThemeChangeWarningTitle, null,
|
317 |
| - WorkbenchMessages.ThemeChangeWarningText, |
318 |
| - MessageDialog.QUESTION, 2, WorkbenchMessages.Workbench_RestartButton, |
319 |
| - WorkbenchMessages.Workbench_DontRestartButton) |
| 317 | + WorkbenchMessages.ThemeChangeWarningText, MessageDialog.QUESTION, 2, |
| 318 | + WorkbenchMessages.Workbench_RestartButton, WorkbenchMessages.Workbench_DontRestartButton) |
320 | 319 | .open() == Window.OK) {
|
321 |
| - PlatformUI.getWorkbench().restart(); |
| 320 | + Display.getDefault().asyncExec(() -> PlatformUI.getWorkbench().restart()); |
322 | 321 | }
|
323 | 322 | }
|
324 | 323 |
|
|
0 commit comments