Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-02-18 17:10:13 -0500
committerJohn Arthorne2010-02-18 17:10:13 -0500
commit273e205c6904675b1b1314b6f4df5f9e962735b5 (patch)
treebb0ef29c36a6e9bfda009865f76e260e4a265acd /bundles/org.eclipse.equinox.p2.touchpoint.eclipse
parent0dc41c7a19c73794ad558c24c13821f3aaa7fd85 (diff)
downloadrt.equinox.p2-273e205c6904675b1b1314b6f4df5f9e962735b5.tar.gz
rt.equinox.p2-273e205c6904675b1b1314b6f4df5f9e962735b5.tar.xz
rt.equinox.p2-273e205c6904675b1b1314b6f4df5f9e962735b5.zip
Bug 303226 - Problems updating to I20100217-1031
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
index 7ce57715b..c9d40c34c 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,6 @@ import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.osgi.framework.ServiceReference;
/**
* MarkSetProvider implementation for the Eclipse touchpoint.
@@ -43,7 +42,7 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
if (repositoryToGC == null)
return new MarkSet[0];
addArtifactKeys(inProfile);
- IProfile currentProfile = getCurrentProfile();
+ IProfile currentProfile = getCurrentProfile(agent);
if (currentProfile != null && inProfile.getProfileId().equals(currentProfile.getProfileId())) {
addRunningBundles(repositoryToGC);
addRunningFeatures(inProfile, repositoryToGC);
@@ -78,14 +77,10 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
return result;
}
- private IProfile getCurrentProfile() {
- ServiceReference sr = Activator.getContext().getServiceReference(IProfileRegistry.SERVICE_NAME);
- if (sr == null)
- return null;
- IProfileRegistry pr = (IProfileRegistry) Activator.getContext().getService(sr);
+ private IProfile getCurrentProfile(IProvisioningAgent agent) {
+ IProfileRegistry pr = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
if (pr == null)
return null;
- Activator.getContext().ungetService(sr);
return pr.getProfile(IProfileRegistry.SELF);
}

Back to the top