Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2008-02-11 16:58:21 +0000
committerCurtis Windatt2008-02-11 16:58:21 +0000
commitf1556b17b1869d0960acd1c85a15bdb916878883 (patch)
tree8c34ae4aaa8d304124c526242b0772b9f05986f9 /org.eclipse.debug.ui
parent91b4c79ba11bb62ac13ad150f737398d8c59e737 (diff)
downloadeclipse.platform.debug-f1556b17b1869d0960acd1c85a15bdb916878883.tar.gz
eclipse.platform.debug-f1556b17b1869d0960acd1c85a15bdb916878883.tar.xz
eclipse.platform.debug-f1556b17b1869d0960acd1c85a15bdb916878883.zip
Bug 218240 - [expressions] Missing check for delegate and factory when creating watch expression
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchAction.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchAction.java
index ed1fe5427..7cff7f3a6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchAction.java
@@ -149,14 +149,15 @@ public class WatchAction implements IViewActionDelegate {
if (element instanceof IVariable) {
IVariable variable = (IVariable)element;
- DebugPlugin.getDefault().getExpressionManager().hasWatchExpressionDelegate(variable.getModelIdentifier());
-
- IWatchExpressionFactoryAdapter factory = getFactory(variable);
- if (factory instanceof IWatchExpressionFactoryAdapterExtension) {
- IWatchExpressionFactoryAdapterExtension ext = (IWatchExpressionFactoryAdapterExtension) factory;
- return ext.canCreateWatchExpression(variable);
- }
- return true;
+ if (DebugPlugin.getDefault().getExpressionManager().hasWatchExpressionDelegate(variable.getModelIdentifier())){
+ IWatchExpressionFactoryAdapter factory = getFactory(variable);
+ if (factory instanceof IWatchExpressionFactoryAdapterExtension) {
+ IWatchExpressionFactoryAdapterExtension ext = (IWatchExpressionFactoryAdapterExtension) factory;
+ return ext.canCreateWatchExpression(variable);
+ }
+ return factory != null;
+ }
+ return false;
} else {
IWatchExpressionFactoryAdapter2 factory2 = getFactory2(element);
if (factory2 != null) {

Back to the top