diff options
author | John Arthorne | 2009-08-17 20:04:03 +0000 |
---|---|---|
committer | John Arthorne | 2009-08-17 20:04:03 +0000 |
commit | 862d2017a5433f4efa167f39bfd4ad4111c7bc6d (patch) | |
tree | 3d79e80994c73945098ceee498d1b7c6bbb6f2dc /bundles/org.eclipse.equinox.p2.touchpoint.eclipse | |
parent | 03571a7e645f7a123fe1a4fa1ab822d9c7c088b4 (diff) | |
download | rt.equinox.p2-862d2017a5433f4efa167f39bfd4ad4111c7bc6d.tar.gz rt.equinox.p2-862d2017a5433f4efa167f39bfd4ad4111c7bc6d.tar.xz rt.equinox.p2-862d2017a5433f4efa167f39bfd4ad4111c7bc6d.zip |
Code cleanup
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
7 files changed, 11 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java index d4ffb8f6c..e280bc927 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java @@ -33,7 +33,7 @@ public class EclipseTouchpoint extends Touchpoint { public static final String PARM_IU = "iu"; //$NON-NLS-1$ private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$ - private static List NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$ + private static List NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$ private static final String VALIDATE_PROFILE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.validateProfile"; //$NON-NLS-1$ private static Map manipulators = new WeakHashMap(); diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java index 4078816f0..5dcf1ab92 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java @@ -234,7 +234,7 @@ public class PlatformConfigurationWrapper { if (site == null) return false; - return (site.getFeature(featureId, featureVersion) != null); + return site.getFeature(featureId, featureVersion) != null; } /* diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java index 1729291de..816b41879 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java @@ -94,7 +94,7 @@ public class AddJVMArgumentAction extends ProvisioningAction { if (currentValue == null) // User has removed value from file setUserArg(storedValues, flag, null); - else if ((maxValue == null) || (!maxValue.equals(currentValue.substring(flag.length())))) + else if (maxValue == null || !maxValue.equals(currentValue.substring(flag.length()))) // User has set an initial value, or modified the file setUserArg(storedValues, flag, currentValue.substring(flag.length())); } @@ -114,7 +114,7 @@ public class AddJVMArgumentAction extends ProvisioningAction { String maxStored = getMaxValue(getArgs(storedValues, flag)); String userDefined = AddJVMArgumentAction.getUserArg(storedValues, flag); - if ((maxStored != null) || (userDefined != null)) { + if (maxStored != null || userDefined != null) { // Replacement is available either stored, or user defined if (maxStored == null) launcherData.addJvmArg(flag + userDefined); @@ -145,9 +145,9 @@ public class AddJVMArgumentAction extends ProvisioningAction { bPower += 10; } - if ((aPower > bPower) && (aVal != 0)) + if (aPower > bPower && aVal != 0) return 1; - else if ((aPower < bPower) && (bVal != 0)) + else if (aPower < bPower && bVal != 0) return -1; // Both have same power, so direct comparison else if (aVal > bVal) @@ -190,7 +190,7 @@ public class AddJVMArgumentAction extends ProvisioningAction { // Get the current used argument if there is one protected static String getCurrentArg(String flag, String[] jvmArgs) { for (int i = 0; i < jvmArgs.length; i++) - if ((jvmArgs[i] != null) && (jvmArgs[i].startsWith(flag))) + if (jvmArgs[i] != null && jvmArgs[i].startsWith(flag)) return jvmArgs[i]; return null; } 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 b5313dd48..71bc26fed 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 @@ -10,11 +10,10 @@ *******************************************************************************/ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions; -import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; - 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; /** * An action that adds a repository to the list of known repositories. 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 753eb0c54..4f4fd25ba 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 @@ -10,11 +10,10 @@ *******************************************************************************/ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions; -import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; - 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; /** * An action that adds a repository to the list of known repositories. 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 cf5171854..b3bbf9fe1 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 @@ -169,7 +169,7 @@ abstract class RepositoryAction extends ProvisioningAction { IRepositoryManager manager = getRepositoryManager(event.getRepositoryType()); Preferences node = getRepositoryPreferenceNode(null, event.getRepositoryLocation(), event.getRepositoryType()); int count = getRepositoryCount(node); - if ((--count < 1) && (manager != null)) + if (--count < 1 && manager != null) manager.removeRepository(event.getRepositoryLocation()); setRepositoryCount(node, count); } diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java index 63300b4ac..1a98b007c 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java @@ -73,7 +73,7 @@ public class PathUtil { return toRel.toOSString(); } String result = ""; //$NON-NLS-1$ - for (int j = 0; j < (base.segmentCount() - i); j++) { + for (int j = 0; j < base.segmentCount() - i; j++) { result += ".." + IPath.SEPARATOR; //$NON-NLS-1$ } if (i == toRel.segmentCount()) |