Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-02-11 19:41:18 +0000
committerDarin Wright2008-02-11 19:41:18 +0000
commit962bd1cf11eb8f10268dcfac765d81aad02ed39a (patch)
tree917735f85e9a8ce292b6f9bbe21a881d4ccee6ab /org.eclipse.debug.ui
parent49d38bf17ddb1748e669f39aa41a8dc169eb7b9e (diff)
downloadeclipse.platform.debug-962bd1cf11eb8f10268dcfac765d81aad02ed39a.tar.gz
eclipse.platform.debug-962bd1cf11eb8f10268dcfac765d81aad02ed39a.tar.xz
eclipse.platform.debug-962bd1cf11eb8f10268dcfac765d81aad02ed39a.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/WatchExpressionFactoryTester.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
index c8b2911b4..6f300f4e3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
@@ -36,20 +36,19 @@ public class WatchExpressionFactoryTester extends PropertyTester {
if (CAN_CREATE_WATCH_EXPRESSION_PROPERTY.equals(property)){
if (element instanceof IVariable) {
IVariable variable = (IVariable)element;
- DebugPlugin.getDefault().getExpressionManager().hasWatchExpressionDelegate(variable.getModelIdentifier());
-
- IWatchExpressionFactoryAdapter factory = WatchHandler.getFactory(variable);
- if (factory instanceof IWatchExpressionFactoryAdapterExtension) {
- IWatchExpressionFactoryAdapterExtension ext = (IWatchExpressionFactoryAdapterExtension) factory;
- return ext.canCreateWatchExpression(variable);
+ if (DebugPlugin.getDefault().getExpressionManager().hasWatchExpressionDelegate(variable.getModelIdentifier())) {
+ IWatchExpressionFactoryAdapter factory = WatchHandler.getFactory(variable);
+ if (factory instanceof IWatchExpressionFactoryAdapterExtension) {
+ IWatchExpressionFactoryAdapterExtension ext = (IWatchExpressionFactoryAdapterExtension) factory;
+ return ext.canCreateWatchExpression(variable);
+ }
+ return true;
}
- return true;
} else {
IWatchExpressionFactoryAdapter2 factory2 = WatchHandler.getFactory2(element);
if (factory2 != null) {
return factory2.canCreateWatchExpression(element);
}
- return false;
}
}
return false;

Back to the top