diff options
author | Darin Wright | 2008-02-11 19:41:18 +0000 |
---|---|---|
committer | Darin Wright | 2008-02-11 19:41:18 +0000 |
commit | 962bd1cf11eb8f10268dcfac765d81aad02ed39a (patch) | |
tree | 917735f85e9a8ce292b6f9bbe21a881d4ccee6ab | |
parent | 49d38bf17ddb1748e669f39aa41a8dc169eb7b9e (diff) | |
download | eclipse.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
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java | 15 |
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; |