diff options
author | Uwe Stieber | 2012-02-12 14:29:41 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-02-12 14:29:41 +0000 |
commit | 85317552643627cb37c37456f9776d010724a3a5 (patch) | |
tree | cc277b8c22eea64a74404aff50ee11abbc814ee4 | |
parent | fa2c1e67395a966938100d3f3d55274629a14e83 (diff) | |
download | org.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.tar.gz org.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.tar.xz org.eclipse.tcf-85317552643627cb37c37456f9776d010724a3a5.zip |
Target Explorer: Fix asserts and typos in javadoc
21 files changed, 85 insertions, 55 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() { diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java index deb6ca238..356bc9b5d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java @@ -176,7 +176,14 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel @Override protected boolean dropEvent(Object source, String key, Object oldValue, Object newValue) { boolean drop = super.dropEvent(source, key, oldValue, newValue); - if (drop) return true; + if (drop || PROPERTY_IS_GHOST.equals(key)) { + if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EVENTS)) { + CoreBundleActivator.getTraceHandler().trace("Drop change event (hidden property)\n\t\t" + //$NON-NLS-1$ + "for eventId = " + key, //$NON-NLS-1$ + 0, ITraceIds.TRACE_EVENTS, IStatus.WARNING, this); + } + return true; + } // If the parent is null, it must be allowed to fire change events explicitly if (parent == null && suppressEventsOnNullParent) { diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java index 0e727f6ad..01a96ab6a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java @@ -60,6 +60,16 @@ public interface IModelNode extends IPropertiesContainer, ISchedulingRule { public static final String PROPERTY_ERROR = "error"; //$NON-NLS-1$ /** + * Property: Model node is a ghost node. Ghost nodes may be used to add + * elements to the model without "committing" them. The creator + * of the ghost node is fully responsible for managing the life + * cycle of this node types! + * <p> + * <i>Change notifications for this property are suppressed!</i> + */ + public static final String PROPERTY_IS_GHOST = "isghost"; //$NON-NLS-1$ + + /** * Returns the parent model node. * * @return The model parent diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java index bfcd48dc6..58cc68389 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java @@ -663,7 +663,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme /** * Rollback the steps previously executed to the failed step. The rollback - * is executed in reverse order and the step must be of type {@link IWRExtendedTargetContextStep} + * is executed in reverse order and the step must be of type {@link IExtendedContextStep} * to participate in the rollback. * * @param executedSteps diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java index a69af96d0..29180e048 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java @@ -9,6 +9,7 @@ *******************************************************************************/ package org.eclipse.tcf.te.runtime.stepper.extensions; +import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; @@ -104,7 +105,7 @@ public class ContextStepExecutor extends AbstractContextStepExecutor { */ @Override protected boolean isExceptionMessageFormatted(String message) { - assert message != null; + Assert.isNotNull(message); return message.startsWith(Messages.ContextStepExecutor_checkPoint_normalizationNeeded); } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java index 563374a65..54d13986a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java @@ -92,7 +92,7 @@ public abstract class AbstractExtensionPointManager<V> { * @return The extensions in sorted order or an empty array if the extension point has no extensions. */ protected IExtension[] getExtensionsSorted(IExtensionPoint point) { - assert point != null; + Assert.isNotNull(point); List<IExtension> extensions = new ArrayList<IExtension>(Arrays.asList(point.getExtensions())); if (extensions.size() > 0) { diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java index 305550280..84ba2a317 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java @@ -1,29 +1,25 @@ -/** - * IWRNotificationFireDelegateListener.java - * Created on Sep 14, 2006 - * - * Copyright (c) 2006 - 2009 Wind River Systems, Inc. +/******************************************************************************* + * Copyright (c) 2011 Wind River Systems, Inc. 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 * - * The right to copy, distribute, modify, or otherwise make use - * of this software may be licensed only pursuant to the terms - * of an applicable Wind River license agreement. - */ + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ package org.eclipse.tcf.te.runtime.interfaces.events; /** - * Common interface for notification fire delegate listeners.<br> - * If a notification listener additionally implements this interface, the notification - * manager will call the {@link #fire(Runnable)} method to delegate the thread - * handling. - * - * @author tobias.schwarz@windriver.com + * Common interface for notification fire delegate listeners. + * <p> + * If a event listener additionally implements this interface, the event manager will + * call the {@link #fire(Runnable)} method to delegate the thread handling. */ public interface IEventFireDelegate { /** - * Fire the given runnable. If the given runnable is <code>null</code>, - * the method should return immediatelly. The implementator of the - * interface is responsible for the thread-handling. + * Fire the given runnable. If the given runnable is <code>null</code>, the method should return + * immediately. The implementor of the interface is responsible for the thread-handling. * * @param runnable The runnable that should be started for notification or <code>null</code>. */ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java index 97fe58346..ab3b75e22 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java @@ -152,7 +152,7 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener { @Override public void done(Exception error, Object[] args) { if (error == null) { - assert args.length == 2; + Assert.isTrue(args.length == 2); error = toError(args[0]); } // If the error is still null here, process the returned peers diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java index 38716bde9..975bbac13 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java @@ -55,7 +55,7 @@ public class AbstractConsole extends MessageConsole implements IConsoleListener, * @param messageType The message type. */ public ConsoleBufferLine(String message, char messageType) { - assert message != null; + Assert.isNotNull(message); this.message = message; this.messageType = messageType; } @@ -96,7 +96,7 @@ public class AbstractConsole extends MessageConsole implements IConsoleListener, * @param line The line. Must not be <code>null</code>. */ public void addLine(ConsoleBufferLine line) { - assert line != null; + Assert.isNotNull(line); // If the limit has been reached, we have to remove the oldest buffered line first. while (bufferLimit > 0 && charactersConsumed + line.message.length() >= bufferLimit) { diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java index 52b805692..89b916804 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java @@ -9,6 +9,7 @@ *******************************************************************************/ package org.eclipse.tcf.te.tcf.ui.console.internal.preferences; +import org.eclipse.core.runtime.Assert; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.ColorFieldEditor; @@ -158,7 +159,9 @@ public class PreferencesPage extends FieldEditorPreferencePage implements IWorkb * @param parent The field editor parent. Must not be <code>null</code>. */ private ColorFieldEditor createColorFieldEditor(String slotId, String label, Composite parent) { - assert slotId != null && label != null && parent != null; + Assert.isNotNull(slotId); + Assert.isNotNull(label); + Assert.isNotNull(parent); // Create the color field editor ColorFieldEditor editor = new ColorFieldEditor(slotId, label, parent); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java index b4bd58b7f..6b6a1a277 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java @@ -14,6 +14,7 @@ import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.swt.events.TypedEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; +import org.eclipse.tcf.te.ui.controls.validator.Validator; import org.eclipse.ui.forms.widgets.FormToolkit; /** @@ -49,7 +50,7 @@ public interface IWizardConfigurationPanel extends IMessageProvider { /** * Validates the control and sets the message text and type so the parent * page or control is able to display validation result informations. - * The validation should be done by implementations of {@link WRValidator}! + * The validation should be done by implementations of {@link Validator}! * The default implementation of this method does nothing. * * @return Result of validation. diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java index 790bba719..b0599b1a6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java @@ -432,7 +432,7 @@ public class ConsoleManager { // Show the tab folder page view.switchToTabFolderControl(); - + // make sure the terminals view has the focus after opening a new terminal view.setFocus(); } @@ -539,8 +539,9 @@ public class ConsoleManager { * @param data The custom terminal data node or <code>null</code>. */ public void terminateConsole(String id, String title, ITerminalConnector connector, Object data) { - assert title != null && connector != null; - assert Display.findDisplay(Thread.currentThread()) != null; + Assert.isNotNull(title); + Assert.isNotNull(connector); + Assert.isNotNull(Display.findDisplay(Thread.currentThread())); // Lookup the console CTabItem console = findConsoleForTerminalConnector(id, title, connector, data); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF index 6ce707198..fcd82b151 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF @@ -33,7 +33,7 @@ Export-Package: org.eclipse.tcf.te.ui.views, org.eclipse.tcf.te.ui.views.interfaces.handler, org.eclipse.tcf.te.ui.views.interfaces.tracing;x-internal:=true, org.eclipse.tcf.te.ui.views.interfaces.workingsets, - org.eclipse.tcf.te.ui.views.internal;x-friends:="org.eclipse.tcf.te.ui.views.workingsets", + org.eclipse.tcf.te.ui.views.internal;x-friends:="org.eclipse.tcf.te.ui.views.workingsets,org.eclipse.tcf.te.launch.ui", org.eclipse.tcf.te.ui.views.listeners, org.eclipse.tcf.te.ui.views.nls;x-internal:=true, org.eclipse.tcf.te.ui.views.perspective, diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java index 176d92535..2849bceeb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java @@ -263,7 +263,7 @@ public class DefaultStatusHandler extends AbstractStatusHandler { * @param keyDontAskAgain The unique key for the stored result value or <code>null</code>.
* @param helpContextId The help context id or <code>null</code>.
*
- * @return {@link Boolean} if the severity is {@link IWRMessageStatusHandler#QUESTION}, <code>null</code> otherwise.
+ * @return {@link Boolean} if the severity is {@link IStatusHandlerConstants#QUESTION}, <code>null</code> otherwise.
*/
protected Object doOpenMessageDialog(Shell shell, String title, String message, String[] buttonLabel, int severity, String keyDontAskAgain, String helpContextId) {
Assert.isNotNull(shell);
|