Project

General

Profile

« Previous | Next » 

Revision 7d743a99

Added by Cherian Mathew over 8 years ago

Remove eclipse env check

View differences:

eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/update/UpdateHandler.java
19 19
import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
20 20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
21 21
import org.eclipse.equinox.p2.core.ProvisionException;
22
import org.eclipse.equinox.p2.operations.ProvisioningJob;
23 22
import org.eclipse.equinox.p2.operations.UpdateOperation;
24 23
import org.eclipse.equinox.p2.repository.IRepositoryManager;
25 24
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
......
30 29
import org.osgi.framework.ServiceReference;
31 30

  
32 31
import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
33
import eu.etaxonomy.taxeditor.model.MessagingUtils;
34 32

  
35 33
/**
36 34
 * UpdateHandler invokes the check for updates UI
......
47 45

  
48 46
        // check for updates
49 47
        checkForUpdates(operation);
50

  
51
        ProvisioningJob provisioningJob = operation.getProvisioningJob(null);
52
        if (provisioningJob == null) {
53
            MessagingUtils.messageDialog("Error in performing update",
54
                    operation,
55
                    "ProvisioningJob could not be created." + System.getProperty("line.separator") +
56
                    "Either this application does not support p2 software installation or this application has been launched from within the Eclipse IDE",
57
                    null,
58
                    false);
59

  
60
        } else if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
48
        if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
61 49
            if (UpdateSingleIUWizard.validFor(operation)) {
62 50
                // Special case for only updating a single root
63 51
                UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
......
107 95
            bundleContext.ungetService(reference);
108 96
        }
109 97
    }
98

  
110 99
}

Also available in: Unified diff