Remove eclipse env check
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 17:14:45 +0000 (18:14 +0100)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 17:14:45 +0000 (18:14 +0100)
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/update/UpdateHandler.java

index 4497c34..ecb9d18 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
 import org.eclipse.equinox.p2.core.IProvisioningAgent;
 import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
 import org.eclipse.equinox.p2.operations.UpdateOperation;
 import org.eclipse.equinox.p2.repository.IRepositoryManager;
 import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
@@ -30,7 +29,6 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
 import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
  * UpdateHandler invokes the check for updates UI
@@ -47,17 +45,7 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
 
         // check for updates
         checkForUpdates(operation);
-
-        ProvisioningJob provisioningJob = operation.getProvisioningJob(null);
-        if (provisioningJob == null) {
-            MessagingUtils.messageDialog("Error in performing update",
-                    operation,
-                    "ProvisioningJob could not be created." + System.getProperty("line.separator") +
-                    "Either this application does not support p2 software installation or this application has been launched from within the Eclipse IDE",
-                    null,
-                    false);
-
-        } else if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
+        if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
             if (UpdateSingleIUWizard.validFor(operation)) {
                 // Special case for only updating a single root
                 UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
@@ -107,4 +95,5 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
             bundleContext.ungetService(reference);
         }
     }
+
 }