Revision 4716220c
Added by Katja Luther over 2 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/update/UpdateHandler.java | ||
---|---|---|
23 | 23 |
import org.eclipse.e4.ui.di.UISynchronize; |
24 | 24 |
import org.eclipse.e4.ui.workbench.IWorkbench; |
25 | 25 |
import org.eclipse.equinox.p2.core.IProvisioningAgent; |
26 |
import org.eclipse.equinox.p2.engine.IProfile; |
|
27 |
import org.eclipse.equinox.p2.engine.IProfileRegistry; |
|
26 | 28 |
import org.eclipse.equinox.p2.operations.ProvisioningJob; |
27 | 29 |
import org.eclipse.equinox.p2.operations.ProvisioningSession; |
28 | 30 |
import org.eclipse.equinox.p2.operations.UpdateOperation; |
... | ... | |
101 | 103 |
logger.info("Try to get updates" + startTime); |
102 | 104 |
try{ |
103 | 105 |
operation = new UpdateOperation(session); |
106 |
IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME); |
|
107 |
|
|
108 |
String profileID = operation.getProfileId(); |
|
109 |
IProfile profile = registry.getProfile(profileID); |
|
110 |
if (profile == null){ |
|
111 |
logger.info("There is no profile for profileID: " + profileID); |
|
112 |
} |
|
104 | 113 |
configureUpdate(operation); |
105 | 114 |
// check for updates, this causes I/O |
106 | 115 |
final IStatus status = operation.resolveModal(monitor); |
... | ... | |
163 | 172 |
// set location of artifact and metadata repo |
164 | 173 |
operation.getProvisioningContext().setArtifactRepositories(new URI[] { uri }); |
165 | 174 |
operation.getProvisioningContext().setMetadataRepositories(new URI[] { uri }); |
166 |
|
|
175 |
|
|
167 | 176 |
//if local plugin is installed, then check for updates |
168 | 177 |
//operation.getProvisioningContext().setExtraInstallableUnits(extraIUs); |
169 | 178 |
return operation; |
Also available in: Unified diff
minor