Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-04-09 13:54:14 -0400
committerSimon Kaegi2009-04-09 13:54:14 -0400
commit01edca3bedb529f0ac9f8c6638ccf63e42e6c778 (patch)
tree9d899e49c612740d348214d553b148067030713d /bundles/org.eclipse.equinox.p2.touchpoint.eclipse
parent9b61fe852043154936752989a0ceca7d10331f1f (diff)
downloadrt.equinox.p2-01edca3bedb529f0ac9f8c6638ccf63e42e6c778.tar.gz
rt.equinox.p2-01edca3bedb529f0ac9f8c6638ccf63e42e6c778.tar.xz
rt.equinox.p2-01edca3bedb529f0ac9f8c6638ccf63e42e6c778.zip
Bug 266871 Redundant setPropertyActions
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkDependentPropertyAction.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkIndependentPropertyAction.java43
3 files changed, 2 insertions, 88 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
index 80612c582..6aa98b435 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
@@ -138,7 +138,7 @@
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetFrameworkDependentPropertyAction"
+ class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
name="setFrameworkDependentProperty"
touchpointType="org.eclipse.equinox.p2.osgi"
touchpointVersion="1.0.0"
@@ -148,7 +148,7 @@
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetFrameworkIndependentPropertyAction"
+ class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
name="setFrameworkIndependentProperty"
touchpointType="org.eclipse.equinox.p2.osgi"
touchpointVersion="1.0.0"
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkDependentPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkDependentPropertyAction.java
deleted file mode 100644
index 9531cf32e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkDependentPropertyAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class SetFrameworkDependentPropertyAction extends ProvisioningAction {
- public static final String ID = "setFwDependentProp"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String propValue = (String) parameters.get(ActionConstants.PARM_PROP_VALUE);
- getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, manipulator.getConfigData().getProperty(propName));
- manipulator.getConfigData().setProperty(propName, propValue);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String previousValue = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE);
- manipulator.getConfigData().setProperty(propName, previousValue);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkIndependentPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkIndependentPropertyAction.java
deleted file mode 100644
index d69c027c0..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetFrameworkIndependentPropertyAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class SetFrameworkIndependentPropertyAction extends ProvisioningAction {
- public static final String ID = "setFwIndependentProp"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String propValue = (String) parameters.get(ActionConstants.PARM_PROP_VALUE);
- getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, manipulator.getConfigData().getProperty(propName));
- manipulator.getConfigData().setProperty(propName, propValue);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String previousValue = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE);
- manipulator.getConfigData().setProperty(propName, previousValue);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file

Back to the top