From bf31b84b84742b08282dc3a15e654d2ac5648117 Mon Sep 17 00:00:00 2001 From: Emanuela Epure <67077116+emanuelaepure10@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:10:10 +0200 Subject: [PATCH] fixup! fix: Reload and update schemas - saves the last changes --- .../ui/service/project/internal/ProjectServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/service/project/internal/ProjectServiceImpl.java b/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/service/project/internal/ProjectServiceImpl.java index 2be0c2c32e..db13d1ff9e 100644 --- a/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/service/project/internal/ProjectServiceImpl.java +++ b/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/service/project/internal/ProjectServiceImpl.java @@ -930,7 +930,11 @@ private boolean changeCheck() { @Override public void run() { - MessageBox mb = new MessageBox(display.getActiveShell(), + Shell shell = display.getActiveShell(); + if (shell == null) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + } + MessageBox mb = new MessageBox(shell, SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_QUESTION); mb.setMessage("Save changes to the current project?"); //$NON-NLS-1$ mb.setText("Unsaved changes"); //$NON-NLS-1$