diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
6 files changed, 26 insertions, 59 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java index c53cdff30..30a597086 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramPropertyAction.java @@ -25,7 +25,7 @@ import org.eclipse.osgi.util.NLS; public class AddProgramPropertyAction extends ProvisioningAction { public static final String ID = "addProgramProperty"; //$NON-NLS-1$ - // treat the given string as a comma-separated list and parse and + // treat the given string as a comma-separated list and parse and // convert it to a real list protected static List<String> convertToList(String value) { List<String> result = new ArrayList<>(); @@ -45,9 +45,6 @@ public class AddProgramPropertyAction extends ProvisioningAction { return buffer.toString(); } - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map) - */ public IStatus execute(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME); @@ -64,11 +61,12 @@ public class AddProgramPropertyAction extends ProvisioningAction { } } - // if there was no value previously, then just set our key/value pair and return. - // otherwise we have to merge. + // if there was no value previously, then just set our key/value pair and + // return. + // otherwise we have to merge. ConfigData data = manipulator.getConfigData(); String previous = data.getProperty(propName); - // make a backup - even if it is null + // make a backup - even if it is null getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous); // assume the value is a comma-separated list and just add ourselves to the end if (previous != null) @@ -77,9 +75,6 @@ public class AddProgramPropertyAction extends ProvisioningAction { return Status.OK_STATUS; } - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map) - */ public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME); diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java index 6d27eb497..0860dd56f 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java @@ -13,8 +13,6 @@ *******************************************************************************/ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions; -import org.eclipse.equinox.p2.query.QueryUtil; - import java.io.File; import java.util.Collection; import java.util.Map; @@ -27,25 +25,24 @@ import org.eclipse.equinox.p2.engine.IProfile; import org.eclipse.equinox.p2.engine.spi.ProvisioningAction; import org.eclipse.equinox.p2.metadata.IArtifactKey; import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.query.QueryUtil; /** - * This action collects the set of bundle files on which the signature trust check - * should be performed. The actual trust checking is done by the CheckTrust phase. + * This action collects the set of bundle files on which the signature trust + * check should be performed. The actual trust checking is done by the + * CheckTrust phase. */ public class CheckTrustAction extends ProvisioningAction { public static final String ID = "checkTrust"; //$NON-NLS-1$ - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#execute(java.util.Map) - */ public IStatus execute(Map<String, Object> parameters) { IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU); if (iu == null) return null; IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT); IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE); - //if the IU is already in the profile there is nothing to do + // if the IU is already in the profile there is nothing to do if (!profile.available(QueryUtil.createIUQuery(iu), null).isEmpty()) return null; @SuppressWarnings("unchecked") @@ -61,9 +58,6 @@ public class CheckTrustAction extends ProvisioningAction { return null; } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#undo(java.util.Map) - */ public IStatus undo(Map<String, Object> parameters) { return Status.OK_STATUS; } diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java index b4e5a730e..ae46ce101 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramPropertyAction.java @@ -27,9 +27,6 @@ import org.eclipse.osgi.util.NLS; public class RemoveProgramPropertyAction extends ProvisioningAction { public static final String ID = "removeProgramProperty"; //$NON-NLS-1$ - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map) - */ public IStatus execute(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME); @@ -41,14 +38,14 @@ public class RemoveProgramPropertyAction extends ProvisioningAction { String previous = data.getProperty(propName); if (previous == null) return Status.OK_STATUS; - // make a backup - even if it is null + // make a backup - even if it is null getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous); - // if the value is null, remove the key/value pair. + // if the value is null, remove the key/value pair. if (propValue == null) { data.setProperty(propName, null); return Status.OK_STATUS; } - // Otherwise treat the current value as a comma-separated list and remove + // Otherwise treat the current value as a comma-separated list and remove // just the one value that was specified. List<String> list = AddProgramPropertyAction.convertToList(previous); // if the value wasn't in the list, then just return @@ -60,9 +57,6 @@ public class RemoveProgramPropertyAction extends ProvisioningAction { return Status.OK_STATUS; } - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map) - */ public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME); diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java index d413e4a1a..9a682eb1e 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetJvmAction.java @@ -26,39 +26,35 @@ import org.eclipse.equinox.p2.engine.spi.ProvisioningAction; import org.eclipse.osgi.util.NLS; /** - * Touchpoint action which allows the user to set the -vm parameter in the + * Touchpoint action which allows the user to set the -vm parameter in the * eclipse.ini file. * */ public class SetJvmAction extends ProvisioningAction { public static final String ID = "setJvm"; //$NON-NLS-1$ - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#execute(java.util.Map) - */ public IStatus execute(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); - LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); + LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)) + .getLauncherData(); File previous = launcherData.getJvm(); File jvm = "null".equals(jvmArg) ? null : new File(jvmArg); //$NON-NLS-1$ - // make a backup - even if it is null + // make a backup - even if it is null getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous == null ? null : previous.getPath()); launcherData.setJvm(jvm); return Status.OK_STATUS; } - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.engine.spi.ProvisioningAction#undo(java.util.Map) - */ public IStatus undo(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); - // make a backup - even if it is null + // make a backup - even if it is null String previous = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE); - LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); + LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)) + .getLauncherData(); launcherData.setJvm(previous == null ? null : new File(previous)); return Status.OK_STATUS; } diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java index 702dbf73f..82abd4668 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java @@ -105,9 +105,6 @@ public class Feature { this.version = version; } - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (!(obj instanceof Feature)) @@ -129,9 +126,6 @@ public class Feature { return one == null ? two == null : one.equals(two); } - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { return id.hashCode() + version.hashCode(); diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java index c2ef681b3..78c9e1cd9 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java @@ -57,8 +57,8 @@ public class Site { } /* - * Return the feature object with the specific id and version. Return null - * if there is no match or the id is null. If the version is null then return the + * Return the feature object with the specific id and version. Return null if + * there is no match or the id is null. If the version is null then return the * first feature with a matching id. */ public Feature getFeature(String id, String version) { @@ -132,17 +132,11 @@ public class Site { this.url = url; } - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { return getUrl().hashCode(); } - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (!(obj instanceof Site)) @@ -166,16 +160,16 @@ public class Site { } /* - * Return a boolean value indicating whether or not the given - * objects are considered equal. + * Return a boolean value indicating whether or not the given objects are + * considered equal. */ public static boolean equals(Object one, Object two) { return one == null ? two == null : one.equals(two); } /* - * Return a boolean value indicating whether or not the given - * lists are considered equal. + * Return a boolean value indicating whether or not the given lists are + * considered equal. */ public static boolean equals(Object[] one, Object[] two) { if (one == null && two == null) |