bug 66060
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
index e9fb7bd..e4de65c 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties
@@ -296,6 +296,8 @@
NewUpdateSiteDialog.name=Name:
NewUpdateSiteDialog.url=URL:
+InstallWizard.isRunningTitle=Install/Update in progress
+InstallWizard.isRunningInfo=Another install/update job is in progress. Please cancel it and then re-launch this action.
InstallWizard.jobName=Update Manager
InstallWizard.download=Download and install selected features.
InstallWizard.anotherJob = There is another update/install task running in the background. Do you want to kill it and continue the current tasks instead?
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindUpdatesAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindUpdatesAction.java
index 7627de6..047ba91 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindUpdatesAction.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindUpdatesAction.java
@@ -54,6 +54,10 @@
!confirm(UpdateUI.getString("Actions.brokenConfigQuestion"))) //$NON-NLS-1$
return;
+ if (InstallWizard.isRunning()) {
+ MessageDialog.openInformation(shell, UpdateUI.getString("InstallWizard.isRunningTitle"), UpdateUI.getString("InstallWizard.isRunningInfo"));
+ return;
+ }
IFeature [] features=null;
if (feature!=null)
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallOptionalFeatureAction.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallOptionalFeatureAction.java
index 1990a2c..eb625ab 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallOptionalFeatureAction.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallOptionalFeatureAction.java
@@ -80,6 +80,10 @@
});
}
private void openWizard(UpdateSearchRequest searchRequest) {
+ if (InstallWizard.isRunning()) {
+ MessageDialog.openInformation(shell, UpdateUI.getString("InstallWizard.isRunningTitle"), UpdateUI.getString("InstallWizard.isRunningInfo"));
+ return;
+ }
InstallWizard wizard = new InstallWizard(searchRequest);
WizardDialog dialog = new ResizableInstallWizardDialog(shell, wizard, UpdateUI.getString(KEY_OPTIONAL_INSTALL_TITLE));
dialog.create();
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
index b526e48..7f75a35 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java
@@ -335,7 +335,7 @@
}
public static synchronized boolean isRunning() {
- return isRunning;
+ return isRunning || Platform.getJobManager().find(jobFamily).length > 0;
}
private IBatchOperation getBatchInstallOperation(final IInstallFeatureOperation[] selectedJobs) {
diff --git a/update/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java b/update/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
index 875ad19..282c705 100644
--- a/update/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
+++ b/update/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.update.ui;
+import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.window.*;
import org.eclipse.jface.wizard.*;
import org.eclipse.swt.widgets.*;
@@ -41,6 +42,10 @@
* @param shell the dialog parent shell
*/
public static void openInstaller(Shell shell) {
+ if (InstallWizard.isRunning()) {
+ MessageDialog.openInformation(shell, UpdateUI.getString("InstallWizard.isRunningTitle"), UpdateUI.getString("InstallWizard.isRunningInfo"));
+ return;
+ }
InstallWizard wizard = new InstallWizard();
WizardDialog dialog = new ResizableInstallWizardDialog(shell, wizard, UpdateUI.getString("InstallWizardAction.title")); //$NON-NLS-1$
dialog.create();