Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2010-02-22 11:28:27 -0500
committerSimon Kaegi2010-02-22 11:28:27 -0500
commit25e0f9d0f76437b5be2bb7f7df7f3142d7d9001b (patch)
tree2e707f6969dc214e4d7271f9b31c8fb1a9f93ecb /bundles/org.eclipse.equinox.p2.touchpoint.eclipse
parent4fdc796a4cfa93f73d628343b9f1fd4ea6043eb5 (diff)
downloadrt.equinox.p2-25e0f9d0f76437b5be2bb7f7df7f3142d7d9001b.tar.gz
rt.equinox.p2-25e0f9d0f76437b5be2bb7f7df7f3142d7d9001b.tar.xz
rt.equinox.p2-25e0f9d0f76437b5be2bb7f7df7f3142d7d9001b.zip
Bug 297253 - [Engine][API] Remove direct use of PhaseSet and Phases
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/actions/AddRepositoryAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java9
4 files changed, 15 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
index b86ff5dd2..03d624dc8 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
@@ -12,10 +12,10 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
import java.util.Map;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
/**
@@ -30,7 +30,7 @@ public class AddRepositoryAction extends RepositoryAction {
IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
final RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
if (profile != null)
addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
//if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
@@ -52,7 +52,7 @@ public class AddRepositoryAction extends RepositoryAction {
IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
final RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
if (profile != null)
removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
//if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
index e15474e47..0d63482a9 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
@@ -12,10 +12,10 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
import java.util.Map;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
/**
@@ -30,7 +30,7 @@ public class RemoveRepositoryAction extends RepositoryAction {
IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
if (profile != null)
removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
//if we are provisioning into the self profile, update the current set of repositories in this configuration
@@ -48,7 +48,7 @@ public class RemoveRepositoryAction extends RepositoryAction {
IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
if (profile != null)
addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
//if we are provisioning into the self profile, update the current set of repositories in this configuration
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
index 35379ca37..2ded7cfa3 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
@@ -14,7 +14,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.equinox.internal.p2.engine.Profile;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
import org.eclipse.equinox.p2.core.IAgentLocation;
@@ -64,7 +63,7 @@ abstract class RepositoryAction extends ProvisioningAction {
* Associates the repository described by the given event with the given profile.
* Has no effect if the repository is already associated with this profile.
*/
- protected void addRepositoryToProfile(IAgentLocation agentLocation, Profile profile, URI location, String nickname, int type, boolean enabled) {
+ protected void addRepositoryToProfile(IAgentLocation agentLocation, IProfile profile, URI location, String nickname, int type, boolean enabled) {
Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
int count = 0;
@@ -150,7 +149,7 @@ abstract class RepositoryAction extends ProvisioningAction {
* Return <code>true</code> if the given profile is the currently running profile,
* and <code>false</code> otherwise.
*/
- protected boolean isSelfProfile(IProfileRegistry registry, Profile profile) {
+ protected boolean isSelfProfile(IProfileRegistry registry, IProfile profile) {
//if we can't determine the current profile, assume we are running on self
if (profile == null)
return true;
@@ -180,7 +179,7 @@ abstract class RepositoryAction extends ProvisioningAction {
* and the given profile. Has no effect if the location is not already associated with
* this profile.
*/
- protected void removeRepositoryFromProfile(IAgentLocation agentLocation, Profile profile, URI location, int type) {
+ protected void removeRepositoryFromProfile(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
int count = getRepositoryCount(node);
@@ -234,7 +233,7 @@ abstract class RepositoryAction extends ProvisioningAction {
/*
* Get the preference node associated with profile & location
*/
- protected Preferences getRepositoryPreferenceNode(IAgentLocation agentLocation, Profile profile, URI location, int type) {
+ protected Preferences getRepositoryPreferenceNode(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
String key = type == IRepository.TYPE_METADATA ? METADATA_REPOSITORY : ARTIFACT_REPOSITORY;
String profileId = profile == null ? IProfileRegistry.SELF : profile.getProfileId();
return new ProfileScope(agentLocation, profileId).getNode(key + '/' + NODE_REPOSITORIES + '/' + getKey(location));
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
index 6fadd2397..01220b8ea 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
@@ -16,6 +16,7 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
public class SetLauncherNameAction extends ProvisioningAction {
@@ -23,7 +24,7 @@ public class SetLauncherNameAction extends ProvisioningAction {
public IStatus execute(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME));
String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME);
setLauncher(manipulator, profile, launcherName);
@@ -32,16 +33,16 @@ public class SetLauncherNameAction extends ProvisioningAction {
public IStatus undo(Map<String, Object> parameters) {
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
String previousLauncherName = (String) getMemento().get(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
setLauncher(manipulator, profile, previousLauncherName);
return Status.OK_STATUS;
}
- private static void setLauncher(Manipulator manipulator, Profile profile, String launcherName) {
+ private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) {
//Get the launcherData before changing the name so we don't lose anything from the old launcher.ini
LauncherData launcherData = manipulator.getLauncherData();
- profile.setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
+ ((Profile) profile).setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
launcherData.setLauncher(Util.getLauncherPath(profile));
}
} \ No newline at end of file

Back to the top