Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantha Chan2008-03-05 02:12:32 +0000
committerSamantha Chan2008-03-05 02:12:32 +0000
commit4114b26d8d133eab3c7363b4119b4cc5a2924d93 (patch)
tree5e160f5da0f1d480dafff3676f1deffd487ba325 /org.eclipse.debug.ui
parent50043cf7cff63332bb2dc33a735db0cd04188ac3 (diff)
downloadeclipse.platform.debug-4114b26d8d133eab3c7363b4119b4cc5a2924d93.tar.gz
eclipse.platform.debug-4114b26d8d133eab3c7363b4119b4cc5a2924d93.tar.xz
eclipse.platform.debug-4114b26d8d133eab3c7363b4119b4cc5a2924d93.zip
Bug 211928 - ExpressionDropAdapter makes implementation to IWatchExpressionFactoryAdapterExtension mandatory
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
index 25323036b..cbaced58f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
@@ -439,7 +439,8 @@ public class ExpressionDropAdapter extends ViewerDropAdapter {
* adapter for that variable.
*
* @param variable the variable to use to create the watch expression
- * @return whether the creation was successful
+ * @return the string to be used to create expression, return <code>null</code>
+ * if no expression is to be created
*/
private String createExpressionString(Object element) {
try {
@@ -448,11 +449,11 @@ public class ExpressionDropAdapter extends ViewerDropAdapter {
IWatchExpressionFactoryAdapter factory = getFactory(variable);
String exp = variable.getName();
if (factory != null) {
+ //if a factory exists, use it to create expression,
+ //otherwise just use variable name
exp = factory.createWatchExpression(variable);
- return exp;
- } else {
- DebugUIPlugin.log(new Status(IStatus.ERROR,DebugUIPlugin.getUniqueIdentifier(),"Drop failed. Watch Expression Factory could not be found for variable " + variable)); //$NON-NLS-1$
}
+ return exp;
} else {
IWatchExpressionFactoryAdapter2 factory2 = getFactory2(element);
if (factory2 != null) {

Back to the top