Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-02-12 14:29:41 +0000
committerUwe Stieber2012-02-12 14:29:41 +0000
commit85317552643627cb37c37456f9776d010724a3a5 (patch)
treecc277b8c22eea64a74404aff50ee11abbc814ee4 /target_explorer/plugins/org.eclipse.tcf.te.launch.core
parentfa2c1e67395a966938100d3f3d55274629a14e83 (diff)
downloadorg.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.tar.gz
org.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.tar.xz
org.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.zip
Target Explorer: Fix asserts and typos in javadoc
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/extensions/internal/LaunchModeVariantDelegateExtensionPointManager.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java5
8 files changed, 34 insertions, 23 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java
index b600c68a2..a779e198d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java
@@ -9,6 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.launch.core.bindings.internal;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.launch.core.bindings.interfaces.IOverwritableLaunchBinding;
/**
@@ -49,7 +50,7 @@ public class OverwritableLaunchBinding extends VaryableLaunchBinding implements
*/
@Override
public boolean overwrites(String id) {
- assert id != null;
+ Assert.isNotNull(id);
for (int i = 0; i < overwrites.length; i++) {
if (id.equals(overwrites[i])) {
return true;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
index 0e67ceddb..0b9867b6e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
@@ -250,7 +250,7 @@ public class LaunchConfigurationDelegate extends AbstractLaunchConfigurationDele
* @return The list of project resources or an empty list.
*/
protected List<IProject> findProjectResources(List<String> projectNames) throws CoreException {
- assert projectNames != null;
+ Assert.isNotNull(projectNames);
List<IProject> projects = new ArrayList<IProject>();
@@ -281,7 +281,7 @@ public class LaunchConfigurationDelegate extends AbstractLaunchConfigurationDele
* @param projects The list of project resources. Must be not <code>null</code>.
*/
protected void checkForDuplicatesAndSubProjects(List<IProject> projects) {
- assert projects != null;
+ Assert.isNotNull(projects);
// The list of already processed project names
List<String> processedProjectNames = new ArrayList<String>();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/extensions/internal/LaunchModeVariantDelegateExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/extensions/internal/LaunchModeVariantDelegateExtensionPointManager.java
index 5ce74fd33..908bd6341 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/extensions/internal/LaunchModeVariantDelegateExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/extensions/internal/LaunchModeVariantDelegateExtensionPointManager.java
@@ -12,6 +12,7 @@ package org.eclipse.tcf.te.launch.core.extensions.internal;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
@@ -80,7 +81,7 @@ public class LaunchModeVariantDelegateExtensionPointManager extends AbstractExte
* @param id The id of the launch mode variant delegate. Must not be <code>null</code>.
*/
public IVariantDelegate getLaunchModeVariantDelegate(String id) {
- assert id != null;
+ Assert.isNotNull(id);
IVariantDelegate delegate = null;
if (getExtensions().containsKey(id)) {
delegate = getExtensions().get(id).getInstance();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
index 89166f816..a6dabe152 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java
@@ -81,7 +81,8 @@ public class LaunchManager extends PlatformObject {
* @return The corresponding launch manager delegate instance.
*/
public ILaunchManagerDelegate getLaunchManagerDelegate(ILaunchConfigurationType launchConfigType, String launchMode) {
- assert launchConfigType != null && launchMode != null;
+ Assert.isNotNull(launchConfigType);
+ Assert.isNotNull(launchMode);
return LaunchConfigTypeBindingsManager.getInstance().getLaunchManagerDelegate(launchConfigType.getIdentifier(), launchMode);
}
@@ -184,8 +185,8 @@ public class LaunchManager extends PlatformObject {
* the configuration with the given launch specification. Attributes not listed by the given
* launch specification will be initialized with default values.
*
- * @param launchConfig A launch config to update or <code>null</code> if a new launch config
- * should be created.
+ * @param launchConfig A launch configuration to update or <code>null</code> if a new launch
+ * configuration should be created.
* @param launchSpec A set of non default launch configuration attributes.
* @param validateSpec Validate the launch specification in the <code>launchSpec</code>
* parameter. If <code>false</code>, it will attempt to create the launch
@@ -199,7 +200,7 @@ public class LaunchManager extends PlatformObject {
* @since 3.2
*/
public ILaunchConfiguration createOrUpdateLaunchConfiguration(ILaunchConfiguration launchConfig, ILaunchSpecification launchSpec, boolean validateSpec) throws LaunchServiceException {
- assert launchSpec != null;
+ Assert.isNotNull(launchSpec);
String launchConfigTypeId = launchSpec.getLaunchConfigurationTypeId();
String launchMode = launchSpec.getLaunchMode();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java
index be2cda09c..ab5716ab0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java
@@ -112,7 +112,7 @@ public class LaunchSpecification extends PlatformObject implements ILaunchSpecif
*/
@Override
public boolean hasAttribute(String key) {
- assert key != null;
+ Assert.isNotNull(key);
return attributes.containsKey(key);
}
@@ -121,7 +121,7 @@ public class LaunchSpecification extends PlatformObject implements ILaunchSpecif
*/
@Override
public Object removeAttribute(String key) {
- assert key != null;
+ Assert.isNotNull(key);
if (isReadOnly()) return null;
return attributes.remove(key);
}
@@ -131,7 +131,7 @@ public class LaunchSpecification extends PlatformObject implements ILaunchSpecif
*/
@Override
public boolean isCreateOnlyAttribute(String key) {
- assert key != null;
+ Assert.isNotNull(key);
ILaunchAttribute attribute = getAttribute(key);
return attribute != null && attribute.isCreateOnlyAttribute();
}
@@ -141,7 +141,7 @@ public class LaunchSpecification extends PlatformObject implements ILaunchSpecif
*/
@Override
public Object getAttribute(String key, Object defaultValue) {
- assert key != null;
+ Assert.isNotNull(key);
ILaunchAttribute attribute = getAttribute(key);
return (attribute != null && attribute.getValue() != null) ? attribute.getValue() : defaultValue;
}
@@ -178,7 +178,7 @@ public class LaunchSpecification extends PlatformObject implements ILaunchSpecif
*/
@Override
public ILaunchAttribute getAttribute(String key) {
- assert key != null;
+ Assert.isNotNull(key);
return attributes.get(key);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
index e771e0b47..8fa98f12b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
@@ -60,7 +60,8 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
*/
@Override
public void initLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec) {
- assert wc != null && launchSpec != null;
+ Assert.isNotNull(wc);
+ Assert.isNotNull(launchSpec);
validateLaunchSpecification(launchSpec);
}
@@ -69,7 +70,8 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
*/
@Override
public void updateLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec) {
- assert wc != null && launchSpec != null;
+ Assert.isNotNull(wc);
+ Assert.isNotNull(launchSpec);
validateLaunchSpecification(launchSpec);
}
@@ -78,7 +80,9 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
*/
@Override
public boolean isDefaultAttribute(String attributeKey, Object attributeValue, ILaunchConfiguration launchConfig, String launchMode) {
- assert attributeKey != null && launchConfig != null && launchMode != null;
+ Assert.isNotNull(attributeKey);
+ Assert.isNotNull(launchConfig);
+ Assert.isNotNull(launchMode);
return false;
}
@@ -216,7 +220,8 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
* @return The launch specification with attributes from the selection context.
*/
protected ILaunchSpecification addLaunchSpecAttributes(ILaunchSpecification launchSpec, String launchConfigTypeId, ISelectionContext selectionContext) {
- assert launchSpec != null && launchConfigTypeId != null;
+ Assert.isNotNull(launchSpec);
+ Assert.isNotNull(launchConfigTypeId);
return launchSpec;
}
@@ -582,18 +587,19 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
// if launch specification value is null,
// values are equal if launch configuration value is default
else if (specValue == null) {
- assert confValue != null;
+ Assert.isNotNull(confValue);
return isDefaultAttribute(attributeKey, confValue, launchConfig, launchSpec.getLaunchMode()) ? FULL_MATCH : NO_MATCH;
}
// if launch configuration value is default,
// values are equal if launch specification value is default too
else if (isDefaultAttribute(attributeKey, confValue, launchConfig, launchSpec.getLaunchMode()) || confValue == null) {
- assert specValue != null;
+ Assert.isNotNull(specValue);
return isDefaultAttribute(attributeKey, specValue, launchConfig, launchSpec.getLaunchMode()) ? FULL_MATCH : NO_MATCH;
}
// use object.equals as default
else {
- assert specValue != null && confValue != null;
+ Assert.isNotNull(specValue);
+ Assert.isNotNull(confValue);
return equals(attributeKey, specValue, confValue, launchSpec, launchConfig, launchSpec.getLaunchMode());
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java
index 9f9fc34fd..c0f42f4c3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java
@@ -12,6 +12,7 @@ package org.eclipse.tcf.te.launch.core.lm.internal;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.launch.core.lm.delegates.DefaultLaunchManagerDelegate;
import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
@@ -82,7 +83,7 @@ public class ExtensionPointManager extends AbstractExtensionPointManager<ILaunch
* @param id The id of the launch manager delegate.
*/
public ILaunchManagerDelegate getLaunchManagerDelegate(String id) {
- assert id != null;
+ Assert.isNotNull(id);
ILaunchManagerDelegate delegate = null;
if (getExtensions().containsKey(id)) {
delegate = getExtensions().get(id).getInstance();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java
index 1aab7e305..d1430d222 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java
@@ -11,6 +11,7 @@ package org.eclipse.tcf.te.launch.core.persistence;
import java.util.EventObject;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.tcf.te.runtime.events.EventManager;
@@ -38,7 +39,7 @@ public class LaunchConfigurationChangedEvent extends EventObject {
public LaunchConfigurationChangedEvent(ILaunchConfiguration source, String attributeName, Object oldValue, Object newValue) {
super(source);
- assert attributeName != null;
+ Assert.isNotNull(attributeName);
this.attributeName = attributeName;
this.oldValue = oldValue;
this.newValue = newValue;
@@ -81,7 +82,7 @@ public class LaunchConfigurationChangedEvent extends EventObject {
}
/* (non-Javadoc)
- * @see com.windriver.ide.common.core.event.WRAbstractNotificationEvent#toString()
+ * @see java.util.EventObject#toString()
*/
@Override
public String toString() {

Back to the top